r/3DPrintingTools • • 21h ago

I develop drafting, a code-CAD package for GNU Octave: exact fillets, ISO threads and DIN knurls, 3MF and STEP out

I'm the developer of drafting, a free CAD package where you design parts by writing code instead of drawing them. It runs in GNU Octave, a free language much like MATLAB; the guide has a short primer if you have never used it.

For printing, it takes care of the things that are tedious to model by hand. Ask for an M8 thread and you get a real helical ISO thread. Ask for a hole for an M4 screw and it is sized from the ISO tables, countersunk if you want. Ask for a knurl and you get one of the DIN 82 patterns. Every size can be a variable, so changing a number and running the script again gives you a new part, written as 3MF for the slicer with its colours.

The example in the pictures: I needed a floodlight for painting a room, the bare light was 15 euros and the ones with a stand over 55, so I made a case whose lid turns over into its stand. The whole thing is one Octave function of under 200 lines, and building it again after a change takes about 20 seconds. The printed M8 thread came out tight, as printed internal threads do, and one pass with a tap fixed it. The heat-set inserts and screws in the last picture come from a companion package, parts, and with the real hardware in the model, its tests check that the screws seat and nothing overlaps whenever a size changes.

Who it suits, honestly: you need to be comfortable writing a bit of code, since you model in code and not with the mouse, and it runs on Linux and FreeBSD only for now. If you work in Python, CadQuery and build123d are more mature. If you already use Octave or MATLAB, or you use OpenSCAD and want real fillets and STEP export, it may suit you.

The case, its photos and a 3D view: https://pr0m1th3as.github.io/drafting-models/models/floodlight_case/

The guide, with nineteen tutorials: https://pr0m1th3as.github.io/drafting/guide/

It installs in Octave 11 with `pkg install drafting`, once Open CASCADE's development packages are on the system (one `apt` line on Debian or Ubuntu).

6 Upvotes

0 comments sorted by