Re:Code CAD – Use code to create CAD models
by sgtnoodle on Tuesday October 19, 2021 @02:25AM
(#28915371)
I'm an embedded software engineer and into 3D printing useful/functional things. I've made a lot of cool complicated stuff with OpenSCAD. There's a lot of problems that are solved nicely in code. For example, I made a two stage 80:1 gear box for a force feedback steering wheel project, and I fully parameterized the gearbox geometry based on the tooth count, gear metric, and extrinsic mounting constraints. As a result, I could very easily try out different ratios and metrics across the whole assembly.
It's sometimes more painful to use code for quick "all I need is a funny shaped..." projects. Some projects really benefit from having a for loop, though.
I tend to agree, having done both programming and mechanical design. Drawing by writing code is pounding a screw.
The major CAD systems have some scripting capability, for when you need to generate a gear or a geodesic dome or something that needs procedural generation. They also have constraint solvers, so you can specify constraints and let the system find a solution that satisfies them. Try the demo version of Fusion 360 for that.