CadQuery — The Complete Guide: Free Parametric CAD in Python Code, With STEP Export
CadQuery is an open-source Python library (Apache 2.0) for building 3D models. Unlike tools that produce a triangle mesh, it works with exact geometry (B-rep) through OpenCascade — so the output is real STEP that opens in any CAD program.

CadQuery
CadQuery Project
Parametric CAD scripted in Python, on a proper solid-modelling kernel.
Get it from the vendorWhat you get
- Models in code — sketches, extrusions, holes and chamfers in a readable chain of commands.
- Parameters — change one dimension and the whole model updates.
- Assemblies — joining parts with constraints.
- Export — STEP, STL, DXF and SVG.
- CQ-editor — an editor with a live 3D view, or work from Jupyter.
When it pays off
When there is a family of parts — the same bracket, connector or profile in many sizes — or when dimensions come from a calculation. One script generates every version, and it can be kept in Git.
Related tools
For code-based modelling in a simpler language — OpenSCAD. For graphical CAD on the same kernel — FreeCAD. For the calculations that feed the dimensions — Python.

OpenSCAD
OpenSCAD
Code-based 3D modelling where every dimension is a real parameter. Popular in 3D printing.
Get it from the vendor
FreeCAD
FreeCAD Project
Open-source parametric 3D modeller with workbenches for solid modelling, FEM, drafting and BIM.
Get it from the vendor
Python
Python Software Foundation
The language behind most modern engineering computation, and its full ecosystem.
Get it from the vendor
Git
Git project
Version control for code, scripts and input files — who changed what and when, and return to any version.
Get it from the vendorThe bottom line
CadQuery brings the precision of professional CAD into the world of scripts — completely free and open.

