Making Extruded 3D Models of Inkscape Illustrations
So, you have some vector artwork in Inkscape and you want to make it into a stamp or some other sort of 3D-printable gewgaw. Here are two ways to give your paths some depth. One uses Onshape for an interactive approach. The other uses OpenSCAD for a more programmatic approach. Both are parametric, permitting subsequent revision without restarting from scratch.
DXF Export to Onshape
Open your SVG. Go to the File menu and choose Save As:
In the save dialog, be sure to choose the dxf
file type:
To load the design in Onshape, begin by choosing Import from the tab menu in the lower left and select your DXF:
Next, in a part studio tab, create a sketch and choose the Insert DXF or DWG tool. A list of available drawings will appear:
Select your drawing and it will be added to the sketch. Note you can still edit or add to the sketch. The imported points work with inference and constraint tools.
Now you can extrude your art or otherwise develop it into a solid part:
Direct Export to OpenSCAD
This method uses an Inkscape extension called paths2openscad. Extension installation summary: put the paths2openscad.inx
and paths2openscad.py
files in your Inkscape extensions folder (~/.config/inkscape/extensions
).
Once set up, open your SVG, go to the Extensions menu, select the Generate from Path submenu, and choose Paths to OpenSCAD:
The Output file path must be entered manually; be sure the directory exists. OpenSCAD doesn’t really support curves, so smooth paths are approximated with many small segments.
The result is an OpenSCAD script you can edit and compile to generate solid models. The script is composed of modules representing each path as an extruded polygon.