CadQuery

CadQuery is a Python-based tool for creating parametric CAD geometry. In the context of engineering agents, it is the scripting interface the model uses to generate and repair CAD designs expressed as executable code rather than direct geometry manipulation.

Role in engineering agent pipelines

In the FEA-in-the-loop pattern, the agent writes CadQuery code; the deterministic controller executes it, exports a STEP artifact, and runs validation. The model never touches geometry directly — it writes and repairs programs.

This separation is architecturally important: the model owns code, the controller owns execution and measurement. Validation errors produce typed repair instructions that target specific regions of the CadQuery program.

Why code over geometry

  • Parameterizability — geometric dimensions and relationships are explicit variables that can be targeted by repair instructions
  • Auditability — the program is a legible record of design intent and every repair decision
  • Reproducibility — the same CadQuery program produces the same STEP artifact deterministically
  • Version control — code diffs show exactly what changed between repair iterations

Output

CadQuery programs export STEP artifacts — the standard 3D product-data exchange format used across CAD/CAM/PLM systems. STEP artifacts can be loaded into any conforming CAD system and passed to FEA solvers.

Boundary

CadQuery-generated artifacts must not be used for safety-critical, regulated, or manufactured designs without independent human engineering review and validation. See FEAInTheLoop for the full validation pattern and known limits.