OpenSCAD: 3D modelling with code instead of a mouse
Not every repository on my GitHub is a program. OpenSCADModles (sic — the name stuck) holds my OpenSCAD models: 3D objects described in a text language, compiled into STL files, and printed on a 3D printer.
Why code instead of CAD
OpenSCAD is "the programmer's 3D modeller". Instead of dragging shapes, you write:
difference() {
cube([40, 20, 4], center = true);
cylinder(h = 10, r = 3, $fn = 64); // a hole through the plate
}
difference() subtracts shapes; union() and
intersection() complete the boolean set. Because the model is text, you get
everything programmers already know: version control, parameters, loops and
reuse. Need the bracket 10% bigger? Change a variable and re-render.
What lives in this repository
Mounting brackets, clips, cases and adapters — the practical household hardware that a
printer earns its keep with, plus the G-code exports used for printing. Each model is a
.scad file with parameters at the top (thickness, hole diameter, clearance) so it
can be re-sized for a different printer's tolerances.
Lessons that transfer back to software
- Tolerances are a parameter, not an afterthought. Real-world fits need 0.2–0.5 mm clearance; model it once as a variable.
- Iterate small. Print a 20 mm calibration piece before a 4-hour bracket, the same way you prototype a function before a module.
- Version everything. A printed part that works is worthless if you cannot reproduce or modify it — exactly like deployed software.
Repository: github.com/bobhuang1/OpenSCADModles