CADML

Computer-Aided Design Markup Language

A declarative XML-based language for parametric solid modelling.

A C++ reference toolchain compiles .cadml to triangle meshes and exports STL, glTF, or 3MF. The same pipeline runs on this page as WebAssembly.

Loading editor…
Evaluating…

Revolved hub plus six main and six splitter blades, each a polyhedral loft of Lua-computed airfoil sections.

What CADML is

CADML is a language specification with a C++ reference implementation. A .cadml file is line-oriented frontmatter — version, params, imports — followed by an XML body of CSG operations, sketches, and modifiers (fillet, chamfer, shell). Expressions live in a compact {...} mini-language; a sandboxed Lua module handles cases the declarative grammar doesn't cover.

The reference toolchain is single-process and deterministic: parser → bundler → evaluator → STL / glTF / 3MF exporters.

Why another CAD DSL?

Proposing a new format invites the xkcd 927 problem — text-first CAD languages already exist, and the comparison table below covers the ones we know of.

LLMs author existing CAD DSLs competently today with a skill file. The open question is scale: complex assemblies, larger projects, less hand-holding. Markup is heavily represented in LLM training data and CAD DSLs less so; frontier models already author non-trivial SVGs from prose. The hunch is that the broader markup substrate scales further than a CAD-DSL skill file alone.

Compared to existing tools

ToolSourceEngineKernelSolverGUI
CADMLXML markupManifoldMesh
OpenSCADFunctional DSLCGAL / ManifoldMeshPreview
JSCADJavaScriptmanifold-3dMeshWeb
CadQueryPythonOpenCascadeB-rep
FreeCADPython · GUIOpenCascadeB-repSketcherNative
Zoo KCLImperative DSLHosted (Zoo)B-repZoo Studio
Onshape / Fusion / SolidWorksGUI onlyProprietaryB-repSketch + mateNative

Get started