What is build123d?
build123d is a Python library for 2D and 3D CAD. A model is a Python program: shapes are made, placed and combined in code, dimensions are variables, and changing one and running the program again gives the new part. It is built on the Open Cascade geometric kernel, the boundary representation (BREP) kernel behind FreeCAD, so its models are exact geometry, suitable for 3D printing, CNC machining and laser cutting, and can be exported as STEP to FreeCAD, SolidWorks and other CAD systems.
This tea cup is about forty lines of Python. See how it is made, in both of the styles build123d can be written in.
Where to start
This documentation is organized on the Diátaxis framework, which sorts documentation by what the reader needs at the time: tutorials for learning, how-to guides for getting a task done, reference for looking something up, and explanation for understanding.
New to build123d? Getting Started covers installation, a first model, and the two modes a model can be written in.
Learning it? The Tutorials each build a complete part, step by step.
Working on a design? The How-to Guides are organized by task, and the Cheat Sheet lists everything on one page.
Deciding whether to use it, or wondering why it works the way it does? Start with Why build123d.
Looking for ideas? The Examples are finished models with their code.
Want to test what you have learned? The Challenges each give a drawing of a part to model, and the mass your result should come to.
Note
There is a Discord server (shared with CadQuery) where you can ask for help in the build123d channel.
Table Of Contents
- Getting Started
- Tutorials
- Sketch, then extrude
- Drawing outlines
- Placing features
- Selecting and finishing
- Beyond extrude
- Combining solids
- A parametric part
- Designing a Part
- From a drawing to a sketch
- A Lego block
- A key cap
- A hinged box
- Materials for the hinged box
- A technical drawing
- Rebuilding a part from an STL
- A sheet metal enclosure
- A lid for the enclosure
- A heart token
- A Spitfire wing
- An embossed chalice
- A bicycle tire
- How-to Guides
- Drawing lines and curves
- Drawing with constraints
- Sketching
- Placing sketches
- Building parts
- Moving and rotating objects
- Making your own objects
- Selecting features
- Sheet Metal
- Projection
- Assemblies
- Joints
- Arranging parts for printing
- Materials
- Importing and exporting
- Tips
- Frequently asked questions
- Debugging a model
- Reference
- Explanation
- Examples
- Challenges
- Party Pack 01-01 Bearing Bracket
- Party Pack 01-02 Post Cap
- Party Pack 01-03 C Clamp Base
- Party Pack 01-04 Angle Bracket
- Party Pack 01-05 Paste Sleeve
- Party Pack 01-06 Bearing Jig
- Party Pack 01-07 Flanged Hub
- Party Pack 01-08 Tie Plate
- Party Pack 01-09 Corner Tie
- Party Pack 01-10 Light Cap
- 23-02-02 SM Hanger
- 23-T-24 Curved Support
- 24-SPO-06 Buffer Stand