---
title: "Parametric Part → STEP — an editable BREP solid for any CAD tool"
tier: hero
format: 3d-asset
theme: cad engineering parametric step freecad cadquery manufacturing pro-tool-spine
persona: mechanical engineer, product designer, hardware team, CAD user
duration: "1 brief → an editable parametric STEP solid in ~10–30s"
budget_usd: "$0.02 per part (CadQuery/OCC render; LLM authoring is cheap)"
caps: ["cad-step"]
verbs: ["create_cad_step"]
skills: ["cad-pipeline"]
showcases: ["/chapters/parametric-cad-to-step-example.html"]
status: "live (2026-06-20) — cad-step (CadQuery/OpenCASCADE) on tool-staging-1; the bracket below rendered E2E as a true BREP solid (14 ADVANCED_FACE, MANIFOLD_SOLID_BREP)."
requires: "PRO_PIPELINE_ENABLED on the MCP server (the create_cad_step verb)."
reliability: 4.4 # deterministic OCC kernel; −0.3 LLM CadQuery authoring can need a refine pass; −0.3 complex parts; +0.5 proven E2E (parametric bracket)
---

# Parametric Part → STEP (the FreeCAD-family path)

Describe a part → get a **true parametric STEP solid** (BREP, editable in
Fusion / FreeCAD / SolidWorks / Onshape) — not a mesh. Powered by **CadQuery**,
the OpenCASCADE kernel FreeCAD uses, run headless.

## Why this and not `idea-to-printable-part`?

| | `idea-to-printable-part` (OpenSCAD) | **this** (`create_cad_step`, CadQuery) |
|---|---|---|
| Output | mesh STL (triangles) | **parametric BREP solid** + STEP |
| Edit later | no (it's a mesh) | **yes — real faces, fillets, holes** |
| For | quick 3D print | CAD interchange, manufacturing, assemblies |

`convert stl→step` gives a *tessellated shell* (mesh wrapped in STEP). This
gives a *real solid* (ADVANCED_FACE / MANIFOLD_SOLID_BREP) — the difference
between a STEP a CAD tool can edit and one it can only display.

## What you'll get

- **An editable STEP solid** — a true BREP (ADVANCED_FACE / MANIFOLD_SOLID_BREP) you can open in Fusion / FreeCAD / SolidWorks / Onshape and keep modelling, not a mesh you can only display
- **The CadQuery source** — the part as parametric Python, so the next revision is an edited number instead of a new part
- **A validation report** — `brep_solid`, `n_solids`, `bbox_mm`, `watertight`, `volume_mm3`
- **A preview STL** — for a quick look or a test print, alongside the STEP
- **A refine loop** — hand the returned `code` back with a one-line `refine_instruction` ("thicken the wall to 8mm") and re-render

## Fill in your BRIEF

```yaml
part_brief:            # the part, WITH exact mm and named features — e.g. "wall bracket,
                       # 80×40×5mm base, 30mm wall, four M4 holes, 3mm fillets". A wrong
                       # dimension is worse than a wrong image, so be specific.
cadquery_code:         # OPTIONAL — paste your own CadQuery python to skip LLM authoring
                       # (cadquery + math only; no imports / file IO / network)
refine_instruction:    # OPTIONAL — a one-line change against cadquery_code, e.g.
                       # "thicken the wall to 8mm", "add a 6mm slot on the long edge"
material_or_process:   # OPTIONAL — where it's going, e.g. "3-axis milled 6061 aluminium",
                       # "laser-cut 5mm steel", "FDM PLA". Shapes fillets + wall choices.
tolerance_notes:       # OPTIONAL — fits that matter, e.g. "M4 holes at 4.3mm clearance",
                       # "press-fit a 12h7 bearing"
deliver_formats: step+stl  # step only | step+stl (default — STEP for CAD, STL for print/preview)
```

## The verb

```
create_cad_step  prompt="<part_brief>"        # "wall bracket, 80×40×5mm base, 30mm wall, four M4 holes, 3mm fillets"
create_cad_step  code="<cadquery_code>"                                   # skip authoring
create_cad_step  code="<cadquery_code>"  instruction="<refine_instruction>"   # refine
```

CLI: `livepeer cad-step "wall bracket, 80×40×5mm, four M4 holes"` · `livepeer cad-step --code part.py`

The brief maps straight onto the verb: `part_brief` → `prompt`, `cadquery_code` →
`code`, `refine_instruction` → `instruction`.

Returns: `step_url` (the editable solid), the CadQuery `code` (so you can tweak +
refine), and a validation report (brep_solid, n_solids, bbox_mm, watertight,
volume_mm3). A preview STL is produced too (`return_file:"stl"`).

## How the agent should run this (interaction contract)

1. **CONFIRM + RESTATE DIMENSIONS (≤1 line)** — exact mm + features. A wrong
   dimension is worse than a wrong image.
2. **AUTHOR + RENDER** — `create_cad_step` writes CadQuery, runs the cad-step
   cap, returns the STEP + report.
3. **CHECK the report** — `brep_solid: true` confirms a real solid; surface
   `watertight` + `volume_mm3`. If the LLM's first attempt errors, pass the
   returned `code` back with an `instruction` to refine.
4. **DELIVER** — hand over the STEP (CAD) + the STL (print/preview).

## Proven E2E (see the example)

A parametric wall bracket → STEP with **14 ADVANCED_FACE, 1 MANIFOLD_SOLID_BREP,
8 CYLINDRICAL_SURFACE (the M4 holes), watertight, 15,643 mm³** — a genuine BREP
solid, zero triangulation.

## Notes / honesty

- CadQuery = OpenCASCADE (the FreeCAD kernel), headless + LLM-writable. It's the
  right engine for parametric solids; raw FreeCAD scripting is heavier + less
  LLM-friendly.
- Security: authored code runs in a restricted namespace (cadquery + math only;
  no imports / file IO / network) on a non-root container — a staging posture.
- Very complex / organic shapes are still better as mesh (`idea-to-printable-part`
  or AI mesh caps). This path is for precise, dimensioned, editable parts.
