Editing an engineering drawing is rarely about moving a line. Change one dimension and a web of relationships — symmetry, alignment, hole spacing, cross-view consistency — has to hold. We built a system that lets an engineer describe a change in plain language ("make the width 150mm, keep the holes centered") and have the geometry update while those relationships are preserved.
A multi-agent pipeline
Rather than ask a single model to do everything, we decomposed the problem into cooperating agents, each with a narrow job:
- Intent parser — turns the natural-language request into a structured edit.
- Constraint analyzer — identifies which geometric relationships are in play.
- Operation planner — sequences the concrete geometry operations.
- Validation — checks the result against the original constraints before it is committed.
The models run locally via Ollama, keeping proprietary CAD data on-prem — an important property for engineering teams.
A real constraint engine
Language alone isn't enough; the system needs to understand the geometry. We built 17 constraint detectors covering symmetry, alignment, collinearity, parallelism and perpendicularity, concentricity, dimensional ratios, and cross-view synchronization. Detected relationships are expressed in the SketchGraphs format (29 constraint types spanning geometric, dimensional, and pattern constraints), giving the system a rigorous, ML-compatible representation of the sketch.
Why it's hard
Constraint preservation is a genuinely difficult geometry problem. Naively resizing a part breaks symmetry and misaligns features; the value is in re-solving the whole relationship graph so the edit stays valid.
Seeing the relationships
The interface is dual-pane: a live SVG editor with immediate preview beside a D3.js force-directed graph of the sketch's constraint network. Engineers can watch how a single change ripples through the relationship graph — making an otherwise invisible structure tangible and debuggable.
The result
The system turns constraint-aware editing — normally the domain of expert CAD users — into a conversational workflow, while keeping the underlying geometry rigorous and the data local. It's a clear example of pairing LLM reasoning with a real domain solver rather than asking the model to guess.