build123d
A python CAD programming library
What it is and what it does
build123d is a Python library for writing CAD models as code using boundary representation (BREP) geometry. It wraps the Open Cascade geometric kernel and provides a clean, Pythonic interface for constructing 2D and 3D shapes through two complementary paradigms: Algebra Mode (stateless, operator-driven) and Builder Mode (state-tracked, context-aware). Both modes support creating edges, wires, faces, sketches, and solids through explicit geometry classes and algebraic operations like addition and subtraction, with selectors for filtering shapes by properties like area, length, or orientation.
The library is designed for manufacturing workflows—3D printing, CNC machining, laser cutting—and supports importing and exporting standard formats (SVG, STEP, STL). It emphasizes clean, maintainable code with minimal internal state, rich type hints, and extensibility through subclassing. The 17 runtime dependencies include numpy, scipy, and scikit-learn for numerical operations, plus specialized packages like ezdxf for DXF interchange and lib3mf for 3MF format support.
Use it for:
- Parametric part design for 3D printing: define dimensions as variables and regenerate models with different parameters.
- Laser cutting layouts: import SVG designs, convert to 2D faces, and export as DXF or STEP for cutting machines.
- CNC toolpath preparation: model complex geometries with fillets and chamfers, then export STEP for CAM software.
- Reusable component libraries: subclass geometry objects to create custom parametric parts (e.g., custom fasteners, brackets).
- Design automation: generate arrays of parts with GridLocations and conditional logic for batch manufacturing.
- Interoperability workflows: import STEP assemblies, modify specific components, and export back to FreeCAD or SolidWorks.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
build123d is a Python CAD framework for creating 2D and 3D models using boundary representation geometry, built on the Open Cascade kernel, with export to standard formats like STEP and STL.
Yes. build123d is actively maintained, has no known vulnerabilities, installs with low friction, and carries a permissive Apache-2.0 license. It is well-suited for developers who want to define CAD models programmatically rather than through a GUI. The large dependency footprint (17 packages) is typical for scientific Python and not a barrier. Start with the documentation and cheat sheet if you are new to BREP modeling or parametric CAD.
Install
build123d on PyPI
pip
pip install build123duv
uv add build123dpoetry
poetry add build123dInstalling build123d
Before you install
Low friction installation as a pure-wheel package. Actively maintained with a recent release (43 days old) and 2854 GitHub stars. Requires Python 3.10–3.14 and pulls in 17 runtime dependencies including numpy, scipy, and scikit-learn, which are standard scientific packages.
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions; you may use, modify, and distribute the code provided you include the license and copyright notice.
Quickstart
pip install build123d
from build123d import *
line = Line((0, -3), (6, -3))
line += JernArc(line @ 1, line % 1, radius=3, arc_size=180)
sketch = make_hull(line.edges())
part = extrude(sketch, amount=2)
Requires Python 3.10 or later (up to 3.14); Open Cascade geometric kernel is a compiled dependency bundled via cadquery-ocp-novtk.
Verify before relying
- Whether the 17 runtime dependencies (numpy, scipy, scikit-learn, etc.) are all required for basic usage or only for specific features.
- Performance characteristics and typical model complexity limits for real-world manufacturing workflows.
- Interoperability details with FreeCAD and SolidWorks export beyond the documented STEP/STL formats.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (<3.15,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 17 — cadquery-ocp-novtk, typing_extensions, numpy, svgpathtools, anytree, ezdxf, ipython, ocpsvg, ocp_gordon, trianglesolver, sympy, scipy, scikit-learn, webcolors, requests, lib3mf, py-lib3mf |
| Maintenance | actively maintained — 43 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 374,648/month — #7,144 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: build123d-0.11.1-py3-none-any.whl
Keywords: 3d models, 3d printing, 3d, brep, cad, cadquery, opencascade, python
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
cascadioConverts STEP files to GLB (glTF binary) format…
unclear · top 15,000 on PyPI
manifold3dManifold3d creates and operates on manifold…
permissive · top 5,000 on PyPI
ocp-tessellateConverts OCP (OpenCascade Python bindings) CAD…
permissive · top 15,000 on PyPI
cadqueryCadQuery is a Python library for writing…
permissive · top 15,000 on PyPI
cadquery-ocpcadquery-ocp provides Python bindings to the…
permissive · top 5,000 on PyPI
cadquery-ocp-novtkProvides Python bindings to the Open CASCADE…
permissive · top 15,000 on PyPI
ocp-gordonInterpolates networks of curves into smooth…
permissive · top 15,000 on PyPI
rhino3dmrhino3dm provides Python bindings to OpenNURBS…
permissive · top 15,000 on PyPI
pygmshpygmsh provides a Python interface to Gmsh, a…
copyleft · top 15,000 on PyPI
py-lib3mfProvides Python bindings to Lib3MF, enabling…
permissive · top 15,000 on PyPI