Background¶
As a 3D printing hobbyist, I have a growing collection of personal 3D models. As with personal software projects, I enjoy publishing my models for others to use. I discovered build123d after modeling with OpenSCAD.
From OpenSCAD to build123d¶
build123d has some great advantages over OpenSCAD:
- Better geometry (STEP file export) than OpenSCAD's mesh of vertexes
- Common CAD operations like
chamferandfilletare simple - build123d models are Python programs, whereas OpenSCAD uses its own modeling language
Comparatively, build123d's development experience was lacking. OpenSCAD shines in several other areas:
- Models are previewed automatically on save or hotkey
- Exporting model renders is simple (two key presses)
- OpenSCAD even provides a GUI for setting toplevel variables!
- Sharing models is as simple as publishing
*.scadfiles. Sharing a build123d model which is an arbitrary Python program has a bit more friction. Users need to install build123d (perhaps in a virtualenv), OCP CAD Viewer using VSCode or standalone with its own instructions, and potentially edit variables in the model source for customization, etc. This is especially cumbersome for folks who aren't familiar with the Python ecosystem.
Competing responsibilities¶
Additionally, I didn't like how build123d models needed to both define the
model geometry and decide what to do with it (e.g. viewing with
ocp_vscode.show() or exporting with build123d.export_step).
Models are code, which should be tracked in source control. Why should tracked model geometry code need to be cluttered with miscellaneous actions? The code should describe what the model is, not what is done with it afterward.
Finding my footing¶
I first created some one-off tools to ease model preview/reload/export, but they were disorganized, fragile, and I frequently had to relearn how to use them when I worked on a model. I realized the overall development experience was dissuading me from modeling with build123d, but the geometry advantages of build123d are compelling enough that I didn't want to develop new models in OpenSCAD. I also figured anyone with a similar workflow would need to build their own duct-taped workflow tools.
Enter bdbox¶
I built bdbox to be that missing tool. A model is just geometry and
optional parameters. bdbox lets you use a model: preview, live reload,
parameters panel, CLI, and render export with simple commands.