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.
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
| Tool | Source | Engine | Kernel | Solver | GUI |
|---|---|---|---|---|---|
| CADML | XML markup | Manifold | Mesh | — | — |
| OpenSCAD | Functional DSL | CGAL / Manifold | Mesh | — | Preview |
| JSCAD | JavaScript | manifold-3d | Mesh | — | Web |
| CadQuery | Python | OpenCascade | B-rep | — | — |
| FreeCAD | Python · GUI | OpenCascade | B-rep | Sketcher | Native |
| Zoo KCL | Imperative DSL | Hosted (Zoo) | B-rep | — | Zoo Studio |
| Onshape / Fusion / SolidWorks | GUI only | Proprietary | B-rep | Sketch + mate | Native |
Get started
- docs/spec/language.md — the normative language specification.
- examples/ — curated examples exercising major language feature.
- miosal/cadml — source code and build instructions.