I've been getting into OpenSCAD lately—I'd rather wrestle with a text-based 3D modeling application for more dimensional models than fight with lockups of Fusion 360!
One thing I wanted to do recently was model a sheet-metal object that would be cut from a flat piece of sheet metal, then folded into its final form using a brake. Before 3D printing the final design, or cutting metal, I wanted to 'dry fit' my design to make sure my measurements were correct.
The idea was to print a to-scale line drawing of the part on my laser printer, cut it out, fold it, and check to make sure everything lined up correctly.
Some online utilities took an STL file and turned it into a PNG, but they weren't great and most wouldn't output a PNG with the exact dimensions as the model (they printed too big or too small).
Here was my model:
If I tried exporting a PDF or SVG of the model (File > Export > Export as PDF...), it understandably didn't know what to do:
To get something exportable, I just added
projection() at the top of my model to turn the top-down view into a 2D projection, then Rendered the object. Now it shows up as a 2D plane drawing:
And now the 'Export as PDF...' option (as well as the other 2D options like SVG) works great, allowing me to save a to-scale PDF suitable for reference or printing:
I decided to put up this blog post in the hopes it might help someone else doing the same thing. My DDG searches weren't quite coming up with anything besides a few old GitHub issues.
Now I'm thinking of how much easier many of my Illustrator drawings would be if I just programmed them in OpenSCAD...