This repo is first of all a demo of a Code-first CAD pipline, and secondly is a brace for my microphone (needed something to demo).
In short it's a paradigm where designs are made from code, rather than made in a GUI, allowing for teams to leverage software development patterns. Think git, CI/CD pipelines and friends.
The source of truth for our brace is in main.scad
. It uses OpenSCAD, which is long standing example of a modeling tool using a Code-first approach)
When changes are made to main.scad
a github workflow is triggered that outputs our part as an STL and also generates a screen shot, then KittyCAD is used to convert to obj and step files.
Lastly all of these file are added to a Github release. Meaning that we also get a history of how the output files have changed. We can also point to the latest release so that our documentation always stays up-to-date, i.e. this README has links for the lastest files
And the rendered image above will also automatically update as changes are made to main.scad
.
Have a look at the workflow for the details.
Aside from producing STLs and STEP files etc, the code-first paradigm lends itself to automatically producing BOMs, or running FEM and other simulations on parts as part of a pipeline, saving countless hours of re-work which is typical with GUI CAD packages.
If you're interested in this paradigm here are some links:
- KittyCAD is bulding Code-First APIs for hardware teams, and aim's is to make Code-First dream a reality. Read one of the co-founder's break down of the history of CAD.
- Splitflap is another project that Leverages OpenSCAD as part of Github actions.
- The OpenFlexure microscope also uses OpenSCAD in CI/CD pipelines, as well as the team publishing "HardOps: utilising the software development toolchain for hardware design"
In lieu of a package manager for OpenSCAD, run dependencies.sh
or simply put this file into lib/polyround.scad
Then open main.scad
with OpenSCAD as usual.