Skip to content

Actions

bdbox provides actions for your build123d models!

  • Easily view or export models with bdbox!

  • Regular build123d models must both build and determine how to use model geometry.

  • With bdbox, a model only needs to build its geometry, leaving bdbox to perform actions on that geometry.

  • Optionally specify model geometry, or let bdbox locate model geometry from a model's global variables automatically.

Available actions

Action Description
export Export model geometry to a STEP or STL file
view View model geometry with OCP CAD Viewer
run (default) No geometry processing. Model is responsible for using its own geometry.

Invocation modes

Actions work the same way whether models are run with bdbox or directly:

The bdbox command works with any build123d model, including models without any bdbox imports:

bdbox model.py                      # Run (default)
bdbox model.py view                 # View in OCP CAD Viewer
bdbox model.py export output.step   # Export to STEP

The CLI is automatically provided on any model with a Params or Model subclass. Run the model file itself to use the CLI:

python model.py                     # Run (default)
python model.py view                # View in OCP CAD Viewer
python model.py export output.step  # Export to STEP