Back to projects
v0.1.0 · earlyRustMIT / Apache-2.0Open source

Chamferaparametric CAD, from scratch

Parametric 3D CAD in Rust with its own B-rep kernel and sketch solver: sketch, model, assemble, draw, machine and render

Chamfera's welcome screen with its sample designs
190k+
lines of Rust, from scratch
1,350+
tests against hand-derived values
5
workspaces in one program
v0.1
first public release

What it is

A Fusion-style CAD application with nothing borrowed underneath

Sketch with constraints, build features on a timeline, change a parameter and the model rebuilds. It runs on Linux, Windows and macOS, and in the browser through WebGPU or WebGL 2.

Its own kernel

Sketch solver, feature timeline and B-rep kernel written from textbooks and papers. Model decisions use exact geometry; meshes are only for display and export.

Everything is a command

The UI, the command line, JSON scripts and an MCP server all call the same command registry, so an agent can build a part, measure it and screenshot the result.

Never crashes

No unwrap, panic or unsafe outside tests; every error is a Result and all input is treated as hostile. Strict crate layers are checked by CI.

Workspaces

Sketch, model, assemble, draw, machine and render

One program, one design file. Click a screenshot to see it larger.

  • Lines, arcs, circles, slots, ellipses and splines with snaps and typed values
  • 18 geometric constraints, dimensions driven by expressions with units
  • Extrude, revolve, hole, sweep, loft, patterns, fillet, chamfer, shell, press pull
  • Surfaces and sheet metal with flat patterns
Sketches on faces, extrudes and a hole on the timeline
A fully constrained sketch
Shell: a solid hollowed with open faces
A sheet metal bracket with bends and reliefs

Parametric

Change a number, the model follows

Every feature value can be a named parameter or an expression with units. Edit, suppress, reorder or roll back any feature on the timeline; an incremental rebuild makes undo and late edits take under a millisecond.

Named parameters with units and expressions
The timeline rolled back to an earlier feature

AI agents

Ask Claude to build the part

The assistant panel sends your request to Claude, which runs the same commands you would, then measures the result. Here it built a 60 × 40 × 8 mm plate with four holes and checked its volume against 19200 − 242π mm³.

  • In-app assistant, bring your own API key; destructive commands are confirmed
  • MCP server so agents like Claude Code can model from outside
  • chamfera-cli runs JSON scripts and takes snapshots headless
The assistant building and checking a plate

The kernel

A B-rep kernel, built one exact rung at a time

Exact for planes, cylinders, cones, spheres, tori and extruded splines. What it cannot do exactly yet, it refuses with a message naming the faces, rather than guessing.

  1. K0–K1Frames, exact predicates, curves, planar intersections
  2. K2B-rep topology with Euler operators and validity checks
  3. K3–K4Curved surfaces; exact extrude and revolve of profiles with arcs
  4. K5Watertight tessellation for display and export
  5. K6Surface-surface intersection, point-in-solid classification
  6. K7Booleans: join, cut and intersect
  7. K8Robust topological naming with stored signatures
  8. K9STEP AP214 export and import
  9. K10NURBS curves and extruded spline solids
  10. K11–K12Fillets, chamfers and shell
Oracle tests
Analytic volumes, areas and centres of mass
STEP in and out
AP214, plus STL, OBJ, 3MF and DXF
Clean room
No GPL CAD code read or used

The hard part

Writing a B-rep kernel, a constraint solver and a feature timeline from scratch without reading any GPL CAD code, keeping topology names stable when an early feature changes, and never crashing on hostile input from files, scripts or AI agents.

How it is solved

Built the kernel up a ladder of exact steps (predicates, topology, curved surfaces, intersections, booleans, fillets, shell) from textbooks and papers, with one resolver for topological names and stored signatures. Every action is a command returning a Result, with no unwrap or panic outside tests, and every test compares a result with a value derived by hand: analytic volumes, areas and centres of mass.

Built with

The stack

RustwgpueguiWebAssemblyWebGPUNURBSB-repSTEP AP214G-codeMCPClaude API
Share: