[OpenSCAD] SVG import recenter
fred_dot_u at yahoo.com
Mon Jan 15 16:38:08 EST 2018
You've not made note of the program in which you are using the SVG file, so I
ran amok on my end and used Inkscape to make an assessment which may be of
no value to you.
It appears that Inkscape (and perhaps the SVG world in general?) will take a
file and arbitrarily assign the coordinate system by referencing the
bounding box of the items being created/rendered.
I created a primitive in OpenSCAD and exported it as SVG. When opened in
Inkscape, it was offset by the radius of the circle created, even though the
circle was centered on the origin in OpenSCAD.
Shifting the circle changed nothing. The circle opened in Inkscape in the
I created two circles, one with dual positive center coordinates and the
other with dual negative center coordinates. When the SVG was opened, it was
all referenced to the bounding box.
I'm operating on simple guessing here, as I did not research the foundation
of the SVG world. Most of what I might have found would have gone over my
head, while these simple tests allow for simple conclusions.
If you require a specific origin reference when moving from OpenSCAD to SVG,
it may be necessary to create registrations objects that will define the
bounding box and place your creations where desired. I suspect that any
objects created that are centered on the origin will never appear as such in
Sent from: http://forum.openscad.org/
More information about the Discuss