Openscad SVG Import

For those of us who use it, I finally learned that the development versions have an option to import SVG (You turn it on in features under preferences). Why would you do this when you’re just going to export SVG’s out the other end? So you can play with flat things designed in Inkscape or other programs in 3D, and even design little openscad bits that mate with them in interesting ways. You could do the same thing, mostly likely, in other CAD programs, but if openscad is your weapon of choice the following snippets may come in handy:

module svg(string)
{import(string);}

DescriptiveStringName=“/path/to/thing.svg”;

svg(DescriptiveStringName);

Then you can translate or rotate or scale or extrude or whatever to your heart’s content. Also import multiple svg’s so that you can fit designed pieces together in weird ways. (I did the module thing and the strings for readability and maintainabilty for me; YMMV)

Everyone who’s been doing this for years, please let me down easy…

10 Likes

Matrixed. :wink:

2 Likes

This topic was automatically closed after 32 days. New replies are no longer allowed.