Skip to content

Latest commit

 

History

History
61 lines (41 loc) · 1001 Bytes

README.md

File metadata and controls

61 lines (41 loc) · 1001 Bytes

SVG2SCAD

svg2scad is a perl script and requires some additional modules, which you can install like this:

% sudo cpan XML::Simple Math::Bezier Data::Dumper

that's all.

Install Script

% sudo cp svg2scad /usr/bin/

or

% sudo make install

How to use

  1. Draw a path in Inkscape, save it as file.svg

  2. Run svg2scad

% svg2scad file.svg

creates a file.scad

  1. OpenSCAD you can include that file:
linear_extrude(height=10) include <file.scad>

and hit F5 to display the polygon, or make a nice extrusion:

% svg2scad -openrot sample4.svg

the -openrot switch ensures open polygon prepared for rotational extrusion: first and last coordinate x-position to be the same, making a closed volume; OpenSCAD otherwise cannot compile and create a STL file.

rotate_extrude ($fn=100) include <sample4.scad>
  1. higher bezier curve subdivision (default = 32)
% svg2scad -bzsteps 64 myvase.svg

that's it!