Mesh to CadQuery STEP Export

Paramesh AI uses CadQuery to build a parametric solid from your mesh data, then exports it as STEP. The pipeline extracts the 2D profile, extrudes it, cuts holes at detected positions, and applies chamfers. The result is a clean STEP file with analytic faces — not a tessellated mesh wrapped in STEP format.

What is CadQuery?

CadQuery is a Python CAD scripting library built on OCCT (the OpenCascade kernel). It creates proper B-rep solids programmatically — the same kernel that powers FreeCAD. STEP files exported from CadQuery are fully compatible with SolidWorks, Fusion 360, and Onshape.

How the export works

  1. Profile extraction — slices the mesh at multiple cross-sections, takes the largest polygon
  2. Profile simplification — reduces the polygon to corner vertices only (removes collinear points)
  3. Extrusion — creates a CadQuery Workplane, draws the profile, extrudes to depth
  4. Hole cutting — for each detected hole, creates a cylinder at the exact 3D position and subtracts it
  5. Chamfers — applies edge chamfers to all edges (progressive size fallback for stability)
  6. STEP exportcq.exporters.export(solid, "output.step")