I'm trying to import an SVG logo, and when I look at the result, any holes in
it are filled. For example, an 8 would look like two stacked solid circles,
not two rings.
Am I doing something wrong, or is this "behaviour by design" and I can stop
trying to find problems in my SVG file?
--
Sent from: http://forum.openscad.org/
There are two ways of specifying holes in an SVG. One is winding order and
the other is counting from the inside out. Perhaps OpenSCAD is expecting
one and your file is using the other. It is specified by an attribute IIRC,
so readers should work with both.
On Thu, 11 Jun 2020 at 20:11, Troberg troberg.anders@gmail.com wrote:
I'm trying to import an SVG logo, and when I look at the result, any holes
in
it are filled. For example, an 8 would look like two stacked solid circles,
not two rings.
Am I doing something wrong, or is this "behaviour by design" and I can stop
trying to find problems in my SVG file?
--
Sent from: http://forum.openscad.org/
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
On 11.06.20 21:10, Troberg wrote:
Am I doing something wrong, or is this "behaviour by design" and
I can stop trying to find problems in my SVG file?
It behaves just like circle() in OpenSCAD. If you only stack them
they will union and the smaller one will vanish.
For SVG to import with the inner circle cut out, the SVG file needs
to be a single path for the whole 8 shape. E.g. in Inkscape it's
possible to do Path->Difference.
This is also visible in Inkscape if the shape is filled. Just
overlapping will show the fill everywhere. Doing the difference
will show the background though the cut out.
ciao,
Torsten.
Thanks, everybody. In the end, I solved it by cheating, I simply made two
SVGs, with the outer shapes removed in the second, and diffed them. I had to
put a dot in opposite corners to make them scale the same, but I suspect
that's an artifact of the export, not the import in OpenSCAD.
--
Sent from: http://forum.openscad.org/
Another option is to use Inkscape extension "Paths to OpenSCAD" which also fills in the holes. the extension creates individual modules for each component of the build. This enables one to move the holes to a difference operation, providing the desired result.
On Friday, June 12, 2020, 1:17:20 AM EDT, Troberg <troberg.anders@gmail.com> wrote:
Thanks, everybody. In the end, I solved it by cheating, I simply made two
SVGs, with the outer shapes removed in the second, and diffed them. I had to
put a dot in opposite corners to make them scale the same, but I suspect
that's an artifact of the export, not the import in OpenSCAD.
--
Sent from: http://forum.openscad.org/
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org