[OpenSCAD] SVG import recenter

Ronaldo Persiano rcmpersiano at gmail.com
Mon Jan 15 19:47:19 EST 2018

I am using version 2018.01.06. The problem seems to be in both import and
export or how they map the coordinate system of SVG into the coordinate
system of OpenSCAD.
For instance, the following SVG file

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "
<svg width="80mm" height="80mm" viewBox="0 0 80 80" xmlns="
http://www.w3.org/2000/svg" version="1.1">
<title>OpenSCAD Model</title>
<path d="
M 40,40 L 80,40 L 80,80 L 40,80 z
" stroke="black" fill="lightgray" stroke-width="0.5"/>

is shown as a square translated from the origin in the online editor
But if you import that SVG file into OpenSCAD, the square is centered.

On the other hand, the SVG file exported by:

translate([40,40]) square(40);

does not show any translation in the referred SVG editor.

2018-01-15 22:17 GMT-02:00 Marius Kintel <marius at kintel.net>:

> > On Jan 15, 2018, at 6:08 PM, Ronaldo Persiano <rcmpersiano at gmail.com>
> wrote:
> >
> > and the exported file was:
> > [...]
> Thanks. This is an import issue and is covered by
> https://github.com/openscad/openscad/issues/1740
> If anyone wants to contribute to SVG import, there is more work to do in
> this domain before it can become a stable feature.
>  -Marius
> _______________________________________________
> OpenSCAD mailing list
> Discuss at lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscad.org/pipermail/discuss_lists.openscad.org/attachments/20180115/a7c4869b/attachment-0002.html>

More information about the Discuss mailing list