SolidCraft Sketch Constraints

Run SolidCraft in your browser

The official web build, loaded right here. No install, no account. Desktop browser with a mouse recommended.

Loads the open-source web build (a few MB). Your models stay in your browser.

Next: get the desktop app

We picked your system. Files come straight from the official GitHub release (always the latest version).

Latest release: v0.53.0 (30 November 2026)

The installers are not code-signed yet, so Windows or macOS may warn you the first time. How to get past the warning.

Draw two lines in SolidCraft above, then press C for Coincident or D for a dimension — that's the whole workflow this page explains. SolidCraft is a free, open-source (MIT or Apache-2.0) parametric CAD app, and its sketches are driven entirely by constraints and dimensions, not free-hand lines. New here? Start with the SolidCraft tutorial for a first sketch, or SolidCraft Parametric CAD for how constraints feed the parameter system. This page goes deeper into constraints on their own: every type, AutoConstrain, and what the solver does when a sketch can't be satisfied.

Why constraints instead of free-hand lines

A SolidCraft sketch is never just geometry sitting on a plane. Every line, arc, circle, spline and point can carry constraints that fix its relationship to other geometry, and dimensions that fix its size through a parameter. Drag a constrained line and the sketch resolves every frame as you move the cursor, then the whole model rebuilds once when you release — so you see the result live, not after a recompute. This is the same mechanism that makes SolidCraft's parametric timeline work: change a dimension later, and the sketch (and everything built on it) follows the constraints back to a valid shape instead of needing to be redrawn.

Every constraint type

The SKETCH › CONSTRAINTS group in SolidCraft's command registry lists these geometric constraints:

Dimensions are tracked separately but use the same undo step and the same D shortcut (Sketch Dimension: press D, click the geometry, type the value, press Enter). The dimension types are linear, aligned, horizontal, vertical, point-to-line, line-to-circle, point-to-circle, circle-to-circle, radius, diameter, angle, arc sweep, arc length and slot length — and every one of them can be driven by a parameter expression instead of a fixed number, the same unit-aware expressions SolidCraft's parameter system uses elsewhere (2 * width + 5 mm, angle / 2).

AutoConstrain: let SolidCraft add the obvious ones

Rather than clicking Coincident, Horizontal and Tangent by hand on every segment, AutoConstrain (SKETCH › CONSTRAINTS) scans the sketch you've already drawn and adds the relationships it can infer on its own. AutoConstrain from Datum does the same thing relative to a reference datum instead of the sketch's own geometry. Neither command adds dimensions — they only add the geometric relationships; you still dimension the sketch yourself to fix its actual size, since AutoConstrain has no way to know what size you want.

How the solver actually works

SolidCraft's constraint solver is its own, not a wrapped third-party library. Points that the constraints fix relative to already-known geometry are placed exactly by construction — using loci intersections and rigid-cluster decomposition, following the Owen (1991) and Fudos-Hoffmann (1997) methods. Whatever is left after that is solved by Levenberg-Marquardt, a numerical least-squares method, and the rank of its Jacobian matrix tells SolidCraft exactly how many degrees of freedom are still unconstrained. That number is what drives the fully-constrained check: once there are zero degrees of freedom left, the geometry turns black. Anything still able to move under a drag keeps its normal color, so a quick drag test shows you precisely which lines or points are still free — useful when a sketch "looks" finished but a feature built on it keeps shifting.

Over-constraining is refused, not silently broken

Add a constraint that conflicts with what's already fixed, and SolidCraft refuses it outright instead of quietly leaving the sketch in a bad state. The exact message from the modeling reference is that the new constraint "conflicts with the sketch: neither entity can move to satisfy it." A concrete example from SolidCraft's own documentation: if a symmetry constraint already forces two circles to be equal in size, and you'd already fixed their radii apart with separate dimensions, SolidCraft blocks the new constraint rather than breaking one of the old ones. In practice this means a sketch can't drift into an inconsistent state through normal editing — a rejected constraint is a signal to remove or loosen something that's already there, not a bug to work around.

Where constraints show up next

Constraints aren't limited to 2D sketches on a plane. The same relationships extend into SolidCraft's assembly workflow as joints and mates between components, and sketch dimensions are exactly what the SolidCraft Parameters and configurations system exposes as editable variables across a whole design. If you're coming from a mesh-first workflow instead, SolidCraft's mesh.convert command reconstructs closed meshes as parametric solids that you can then constrain and dimension like any native sketch.

FAQ

What sketch constraints does SolidCraft support?

Coincident, point on curve, horizontal, vertical, horizontal/vertical, parallel, perpendicular, tangent, curvature (G2), equal, concentric, collinear, midpoint, symmetry and fix. Dimensions are a separate set: linear, aligned, horizontal, vertical, point-to-line, line-to-circle, point-to-circle, circle-to-circle, radius, diameter, angle, arc sweep, arc length and slot length, all driven by parameters.

What does AutoConstrain do in SolidCraft?

It scans the sketch you've drawn and adds constraints on its own — the SKETCH › CONSTRAINTS group has both AutoConstrain and AutoConstrain from Datum. It's a shortcut for the coincident, horizontal, vertical, tangent and similar relationships you'd otherwise click one at a time, not a replacement for dimensions that fix size.

How do I know when a sketch is fully constrained in SolidCraft?

Fully constrained geometry turns black. Anything still able to move under a drag stays a different color, and dragging shows you exactly which lines or points are still free, since the solver re-solves the sketch every frame while you drag and rebuilds the model once you let go.

What happens if I add a constraint that over-constrains the sketch?

SolidCraft rejects it rather than silently breaking the sketch. The modeling reference gives the exact message: a conflicting constraint is refused because "neither entity can move to satisfy it" — for example, adding symmetry when it would force two circles to be equal that a separate constraint has already fixed apart.

Does SolidCraft use the same constraint solver as FreeCAD or SolidWorks?

No — it's SolidCraft's own solver, not a wrapped third-party one. Points the constraints fix relative to known geometry are placed exactly by construction (loci intersections and rigid-cluster decomposition, following Owen 1991 and Fudos-Hoffmann 1997); Levenberg-Marquardt solves whatever is left, and the rank of its Jacobian is how the app knows how many degrees of freedom remain.

Sources

Last updated: