build123d

Parametric CAD written as plain Python. build123d takes the idea behind CadQuery — define a part as code, not clicks — and rebuilds it as an independent framework over the same industrial geometry kernel that powers FreeCAD.

Licence · Apache-2.0 (free) Platforms · Python 3.10–3.14, any OS Core · OpenCASCADE via OCP AI angle · text-to-CAD target
TL;DR

If your parts are really configurations — driven by maths, loops or a spreadsheet of dimensions — build123d lets you describe them in ordinary Python and get a precise B-rep solid you can export to STEP or STL. It is the modern, more Pythonic successor to CadQuery, and it is the most natural target for code-generating AI. It is still pre-1.0 (v0.10.0, November 2025) and under active development, so pin your version. If you prefer dragging a mouse over writing code, reach for FreeCAD instead.

What it is

build123d is a parametric boundary-representation (B-rep) CAD library for Python. Instead of sketching in a GUI, you build geometry with code: one-dimensional wires with BuildLine, planar profiles with BuildSketch, and solids with BuildPart. Because the model is a script, the full Python toolbox comes with it — variables, for loops, functions, imports, version control and tests all apply to your CAD.

Under the hood it drives the mature open-source OpenCASCADE kernel through the OCP Python bindings — the same kernel FreeCAD uses — so the geometry is real, watertight B-rep, not a mesh. build123d is "derived from portions of CadQuery, but extensively refactored and restructured into an independent framework over Open Cascade," and it is released under the permissive Apache-2.0 licence.

It offers two interchangeable styles. Builder mode uses Python context managers (with blocks) that track state, so objects add themselves to the active sketch or part as you create them. Algebra mode is stateless: objects are values combined with operators (+, -, &) like an equation. The two can be mixed, and both produce identical geometry.

Where it wins

Where it still hurts

The AI angle

Code-CAD is the cleanest bridge between a language model and a physical object. An LLM is already fluent in Python, so "describe the bracket, get a parametric part" maps directly onto build123d: the model writes a script, you run it headless, and you inspect or print the result — no GUI automation required. Because the output is text, an agent can read its own model back, reason about it, and iterate, and because it is real B-rep you can hand the STEP file straight to a CAM or FEA tool. That combination — Pythonic, headless, precise, version-controlled — is why build123d (alongside its ancestor CadQuery) keeps showing up as the back-end for emerging text-to-CAD experiments. It pairs naturally with FreeCAD, whose own Python core makes it a fine place to open and refine what an agent generates.

Start here

← More CAD & modelling tools