CAD as Code

Parametric Modeling and Engineering with Python

Cover of CAD as Code

A textbook on building CAD models as Python programs. It covers modeling techniques, the geometric and topological foundations underneath them, and the workflow around a model: version control, tests, assemblies, data exchange, meshing, finite element simulation and parameter optimization. Twelve chapters with exercises, 121 pages; it assumes basic Python and no prior CAD experience. It grew out of my course on programming CAx systems and serves as companion reading for it.

Coming soon

The first release will appear in September 2026 as an open access PDF, published under CC BY 4.0 through the HM library, with the sources in a public GitHub repository for corrections and suggestions.

Contents

Part I – Parts from Code

  1. The Case for CAD as Code
  2. First Parts
  3. Profiles into Solids
  4. Designing with Parameters

Part II – Under the Hood

  1. Anatomy of a Solid
  2. The Mathematics of Shape
  3. Freeform Modeling

Part III – Engineering as Software

  1. Models You Can Trust
  2. Assemblies and Release Pipelines
  3. From Solids to Meshes
  4. Simulation
  5. Searching the Design Space