Introduction: Convert STL to DXF Using Open Source Tools
Background
I recently did an arduino workshop at Makers Asylum, I also took my DSO nano v3 to show how PWM works. Came back home and found the stand for the DSO was missing. Also the one that came with the DSO was not good. So I decided to make one. I thought of designing it my self from scratch, but before I did, I searched thingiverse for similar stands, luckily I found one(here), the design was robust and I just had to cut it out. I have a laser cutter,no 3d printer sadly. So had to convert the stl to dxf for my laser cutter.
I looked for some stuff online to convert it but it just didn't cut it.
Tools Used:
For those who want to go gungho, import the stl in blender, clean the file so that only the contours of the object remain, export it as DXF.
Before you begin make sure you have blender and Qcad installed and the stl file that needs to be converted.
Step 1: Import File in Blender
Start blender, you be show a cube a camera and a light source, press 'a' to select all and 'x' to delete it.
- Go to File>Import>STL
- Open up your stl, use scroll wheel to zoom out.
- Press tab to go in edit mode, now all the vertices will be selected. Press 'a' to deselect,
- Press '1' on NUMPAD to go to front view
- Press 'z' for skeleton view
- press 'b' for border select, click and drag so that all the upper vertices are selected. DO NOT SELECT THE FULL MODEL(refer the images)
- press 'x' to delete, a menu will pop up, asking what to delete, select vertices. Make sure you are in Edit mode, else the whole STL will be deleted.
- Now you should have a flat shape.
now its ready to be exported.
- Go to File>User preferences>Addon>Import-Export> check mark Export autocad dxf format. close the dialog
- Dxf should now be visible in the export options
- Go to FIle>export>autocad(.dxf)
- Save window will open up with some options on the left.
- Select projection as "TOP"
- Export mesh as "Polylines"
That is it, now your dxf is ready.
Step 2: Open in Qcad
Fire up Qcad and open the exported file.
In this example one small line was missing, so clean that up. now the tab size were 4mm thick so I had to reduce the size to 3mm, as I'm using 3mm acrylic for laser cutting.
13 Comments
3 years ago
Hi,
When I delete the vertices everything disappear, what am I doing wrong?
Thank you very much
Reply 3 years ago
Yup, I missed to add that you need to be in edit mode when deleting the vertices, I've edited the step 7. Thanks
Reply 3 years ago
Thank you for your reply,
I was able to import the dxf into qcad, but it was not the correct shape, instead it was just a line, I tried to export from all of the different perspectives and I would get either nothing, a vertical line, or a horizontal line in Qcad
3 years ago
Another option, if you don't want to download/install any new programs is AtomicCompiler.com. You upload your .STL to the site, then orient as you please, slice, then download either as DXF or SVG. It uses a command line style interface but if you go to the tutorial page there are some code snippets that describe how to do it; it's only two or three lines of code IIRC.
Question 4 years ago
Thanks fro the useful information hemalchevli.
Question I have 3D STL and I want to convert to 2D DXF...which I guess means a lot of "slices".
How can I do it?
Many thanks for your time!
6 years ago
Having trouble with this one... It's exporting fine, but once I get into Illustrator, there are still a gazillion internal lines that I have to delete before it's a cut-able outline. I get what you're trying to do with deleting all the other lines within Blender, but I haven't been able to delete that precisely, and I'm just trying to flatten a very very simple .stl... (One of these cuties: http://www.thingiverse.com/thing:752901/#files)
Still hammering on it... Thank you for the Blender tips!
Reply 6 years ago
Hi, I tried one of the files it, I used qcad to delete the extra lines. I managed to clean the line quite easily.
7 years ago on Introduction
Can you please fix your instructable. when you select vertices and delete them the entire STL is deleted. Thanks
7 years ago on Introduction
Missed a step. I've never used Blender before today. Apparently you have to be in edit mode rather than object mode to delete vertices. Took me some time to figure that out. :)
7 years ago on Introduction
haha.
6.7.8. select vertices, delete them, you should now have... nothing whatsoever...
8 years ago on Introduction
Nicely done. Thanks for sharing this!
Reply 8 years ago on Introduction
Just curious, Are you a bot?
Reply 8 years ago on Introduction
Ha ha. Look at my profile, I am definitely NOT bot, although I feel like one sometimes!
Tutorials like this a great. I may not need it right now, but someday I might. This is the kind of stuff people go searching for online and are extremely grateful when they find it. It's excellent that you've taken the time to share this with the world.