A CAD sketch starts as loose geometry — lines and arcs roughly where you drew them. Constraints and dimensions turn that rough drawing into an exact, intentional profile that behaves predictably when edited.
Geometric constraints
Constraints declare relationships that must always hold:
- Coincident — two points touch (endpoints join into a chain).
- Horizontal / Vertical — a line locks to an axis direction.
- Parallel / Perpendicular — angular relationships between lines.
- Tangent — a line or arc meets a circle smoothly.
- Equal — two lines share a length, or two circles share a radius.
- Concentric — circles and arcs share a center.
- Symmetric — entities mirror across a line.
- Midpoint, Colinear, Lock — a point sits at a segment's middle; lines lie on the same infinite line; geometry is pinned in place.
Driving dimensions
Dimensions are constraints with a number attached: a length of 40 mm, a radius of 8 mm, an angle of 30°. In a good sketcher you can type arithmetic directly — 25.4/2 for half an inch — and the geometry moves to satisfy the value. Because they drive the geometry (not just annotate it), changing the number later updates the profile.
Degrees of freedom: the mental model
Every sketch point can move in X and Y — two degrees of freedom (DOF). Each constraint removes DOF. When none remain, the sketch is fully defined: nothing can move except as you intend. Under-defined sketches still work — you can drag the loose parts and the constrained parts follow — but fully defined profiles are the professional standard because they cannot drift accidentally.
A well-designed CAD app shows this state at a glance. In OpenShape3D, the sketch pill turns green when the sketch reaches 0 DOF and stays blue with a live DOF count while under-defined; dragging an under-defined point re-solves the sketch in real time. Its solver is a pure-Swift variational solver (Levenberg–Marquardt), and conflicting constraints are refused with a message instead of corrupting the sketch.
Practical tips
- Constrain shape first (coincident, tangent, symmetric), then size (dimensions).
- Anchor something to the origin early so the whole profile can't float.
- Prefer symmetry constraints over duplicated dimensions — fewer numbers to maintain.
- Use construction geometry as scaffolding: reference lines that guide constraints but don't become part of the profile.