Closed frioSC closed 6 years ago
Example attached Non-circular-circles.zip
Oops
Do you mean that the lines are segments, or the expected circle is "elliptical". I’m happy to look at the issue, probably tonight. You can look at the generated SVG output -- if it looks like
d='M 9.277 4.344 A 2.692 2.692 -0.000 0 0 14.662 4.344 A 2.692 2.692 -0.000 0 0 9.277 4.344 Z'
it is circular. In this case this is a circular arc "A 2.692 2.692" because both the "horizontal" and "vertical" radii for the ellipse are 2.692.
I looked at your svg, and the arcs in the svg format seem perfectly circular, and viewing them in a web browser they seem pretty circular. There is a strange value for something SVG calls the x-axis rotation (5156.620), which should not matter for a circle - it is possible that Inkscape has a problem rendering that because of some bug interpreting that. If you look at it in a web browser it should seem perfectly circular. But, I can patch this tonight to make sure that the xaxis rotation is in a more expected range like 0 to 2*3.1415 [edit: this should be 0 - 360, svg angles are degrees]
I just upgraded my machine here to Inkscape 0.92.2. The rendering of the stroke now appears circular but the path behind the stroke still does not (show path outline). What's even weirder now is that stroke width acts very strangely.
I'll look into this this evening. Meanwhile if you could upload the sketchup model with this issue, and perhaps attach an Inkscape screenshot demonstrating the issues you are experiencing. I don't really understand what you mean "the path behind the stroke" does not appear.
The example svg you uploaded seemed to have svg paths from the FaceSVG plugin and from another tool, presumably Inkscape. I am not completely clear on how the SVG specification defines for overlapping paths to be rendered, or for how the shaper origin will handle the situation. I suspect the best advice is to not have overlapping paths.
I'll upload some data this evening once I get home. What I meant by "The rendering of the stroke now appears circular but the path behind the stroke still does not" is that the rendered stroke and the path that defines the stroke are not the same. Turn on 'Show path outline' when editing path nodes to see this.
Ultimately I'm curious/concerned how Origin will interpret this.
I've done two tests on a different machine than earlier today using SketchUp 2016 and 2017 and both versions exhibited the same behavior.
Ignore the colors as I changed them to make viewing the path easier.
The first circle placed in SketchUp and passed through FaceSVG has four nodes and the path appears to be fine. All subsequently placed circles have only two nodes and the path does not match the rendered stroke. I did this multiple times and got the same result each time.
Also, all circles' stroke width acts very weird in that the stroke width renders as only a fraction of the actual set width but the bounding box seems to be correct (notice it is out of view in the screen shots). This does not happen with shapes/paths not from FaceSVG.
Hope this helps.
So, I'm uncertain this will convince you, but I think that the thing you are observing is just some artifact of the Inkscape tool. I checked the math of the points, and the distance between the points is exactly correct. I would suggest a real test - make an inner profile circle of precisely (say) 5" diameter and check the cut path generated using the SO. (I'd do it but unfortunately my basement is really not ready for woodworking right now). Sorry, follows is TL;DR...
Here's the actual data (the circle excerpt) in the generated svg - you can look at the svg file in any editor or in a web browser with "view page source". This is the file generated directly by FaceSVG plugin.
<path d='M 10.073 16.543 A 6.000 6.000 15.000 0 0 21.665 19.648 A 6.000 6.000 15.000 0 0 10.073 16.543 Z'
<path d='M 17.319 35.190 A 4.000 4.000 60.000 0 0 13.319 28.262 A 4.000 4.000 60.000 0 0 17.319 35.190 Z'
<path d='M 15.040 45.337 A 3.000 3.000 5156.620 0 0 15.040 39.337 A 3.000 3.000 5156.620 0 0 15.040 45.337 Z'
<path d='M 4.783 23.712 A 2.000 2.000 60.000 0 0 6.783 27.176 A 2.000 2.000 60.000 0 0 4.783 23.712 Z'
Here's a little python method that shows the distances
>>> distance( 10.073, 16.543, 21.665, 19.648), distance( 17.319, 35.190, 13.319, 28.262)
(12.000645357646395, 7.999823998063954)
>>> distance( 15.040, 45.337, 15.040, 39.337), distance( 4.783, 23.712, 6.783, 27.176)
(6.0, 3.9999119990319776)
The SO is supposedly accurate to a maximum of about 1/100", so I output all the SVG output to 1/1000". But these numbers and the radii in the arcs above (6, 4, 3, 2) are clearly correct.
Note also that all four circles are drawn in the FaceSVG SVG (above) as exactly two semi circles. The fact that Inkscape displays one with FOUR control points indicates that Inkscape is doing some processing when it reads the SVG in. A software tool like Inkscape that allows you to edit SVG must have its own internal representation to allow the software to add, modify, etc the SVG. This processing of reading in the SVG and then displaying control points, path outlines, bounding boxes is something the software is doing and is not a property of the SVG.
I'm guessing that for some reason Inkscape chooses to model the larger circle with four control points for some reason. In turn, the code that renders the path outline behaves differently for the case where it chooses to have 4 control points. I'm guessing that Inkscape is using b-splines of some sort to render the output path and it cannot perfectly fit a circular arc that is 180 degrees. When I look at the output path from Inkscape it looks to me flatter around the control points - not circular.
I'm attaching a couple pictures and a couple SVG files. I tried using a calipers to measure the output path and it seems to me to be out-of-round, while the real ;-) circles in the originally generated SVG seem circular.
Three SVG files. One directly output by FaceSvg the other two identical with only changes in colors, from manually edit' svg_samples.zip
Just a final comment - the pictures are showing the red Inkscape path outline, when I have set the colors to the actual svg to be all similar shades of gray. I directly edited the svg files from FaceSVG using a text editor. As soon as you start editing it and saving it using Inkscape or another tool, those tools can and do make all manners of changes to the underlying SVG.
Thanks, appreciate you taking a look. It all sounds reasonable so I'll give it a go with SO as soon as I get chance and hopefully all will be well.
As an aside, while looking at the code I did find a bug (thanks!) which was why the "xaxis rotations" were such huge numbers. I fixed that and made a new release 1.0.2. I really hope to get my shop in order so I can play with my SO AND get the new release 2.0 code up because I think it provides some neat features.
In Inkscape overlaying a circle over a circular path from from SketchUp reveals the path is not truly circular.