Extracting 2D mendel outlines using OpenSCAD

Here is a quick and easy way to get 2D DXF drawings extracted from 3D STL shapes using OpenSCAD. Launch OpenSCAD and enter the following:

projection(cut=false) import_stl("/full/path/to/stl");

Replace “/full/path/to/stl” with the path to your stl file, and hit F6 to compile and render using CGAL.

From the Design pull down menu choose Export as DXF.

The resulting DXF file as viewed in QCad is basic (circles are made from several straight line segments), but its good for making measurements or printing out templates.

You might find that you have to rotate the STL if you want to get a projection from a different side. You can also set cut=true if you want to cut the object using the XY-plane instead of projecting onto the XY-plane, if you do you will need to translate your object by a negative Z value. e.g:

projection(cut=true) translate([0,0,-10]) rotate([0,90,0]) import_stl("file.stl");

See the projection function in the OpenSCAD manual for more details.

projection

About these ads

6 thoughts on “Extracting 2D mendel outlines using OpenSCAD”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s