Loading
Hey! This thing is still a Work in Progress. Files, instructions, and other stuff might change!

svg2scad

by Spiritdude, published

svg2scad by Spiritdude Aug 7, 2012

Description

Converting Inkscape .svg files (paths only) into .scad files, useable for further processing using OpenSCAD.org

Version: 0.005

Recent Comments

view all

I have an inkscape plugin that creates a module OnePartName####() from each path. Specifically this one is for extruding 2d shapes, so you pass the depth to it when you call it. That seems to work out pretty well. 

Liked By

view all

License

GNU - GPL
svg2scad by Spiritdude is licensed under the GNU - GPL license.

Give a Shout Out

If you print this Thing and display it in public proudly give attribution by printing and displaying this tag. Print Thing Tag

Instructions

This is an early release of svg2scad command-line tool (perl script) and works with
- Linux,
- Windows (with Cygwin.com installed) and
- MacOS-X.

Note: This is NOT a graphical user-interface program, but a command-line tool - but it's still very useful. If you want to export from Inkscape direct, see thingiverse.com/thing:25036

Unpack package after download:
% tar xzf svg2scad-0.005.tar.gz

and read README (a few perl modules to be installed, quite easy)

Limitations:
- only Inkscape .svg files supported (for now)
- convert all forms in Inkscape to paths (even circles)
- SVG text converted to paths do not work well as .scad-files / OpenSCAD has some polygon restrictions (e.g. "T" renders, where as "O" does not, see sample image)

Features:
You can edit 2D path(s) with Inkscape in all tiny details and export it as polygon(s) as .scad and process it (linear_extrude, rotate_extrude etc) with OpenSCAD to do incredible forms.

I will release new versions at thingiverse.com/thing:28108 direct, and on github.com/Spiritdude/SVG2SCAD

History:
-2012/08/12: 0.005: -openrot switch, to make first/last coord x-pos the same (rotate_extrude() requires that), see updated README
-2012/08/03: 0.003: discovering inconsistancy in path definition, hacking myself to support it
-2012/08/02: 0.002: extended with some functionality
-2012/08/01: 0.001: first rudimentary version

Q: I'm rather new to OpenSCAD, so I ask for some feedback from experienced OpenSCAD users how to convert multiple paths to a single .scad file, any suggestions? Right now multiple paths are "union() { }" enclosed as polygons, so they can't be individually referenced anymore.

Comments

You must be logged in to post a comment.

tinyenormous on Oct 2, 2012 said:

I have an inkscape plugin that creates a module OnePartName####() from each path. Specifically this one is for extruding 2d shapes, so you pass the depth to it when you call it. That seems to work out pretty well. 

Top