Sketcher Constraints Tutorial
Constraint types, solver messages and the order that keeps a profile editable.
Open tutorialFreeCAD US · Modeling reference
A working reference for sketches that stay stable, feature trees that stay readable, and files that survive the trip to a 3D printer or a CNC shop. Written for FreeCAD 0.21 and 1.0 users working in millimeters.
Introduction
A model that reopens in six months without errors is the result of decisions made in the first ten minutes. Most broken FreeCAD projects trace back to a sketch drawn with the mouse instead of constrained with the solver, or a feature tree built in the order the part was imagined rather than the order it is manufactured. The rules below are not stylistic preferences; each one removes a specific class of failure.
FreeCAD stores a model as a history of operations, not as a finished mesh. Every Pad, Pocket, Revolution and Fillet re-evaluates the sketches beneath it. When a sketch is under-constrained, the solver is free to select a different solution after an edit, and downstream features attach to geometry that has moved. That is why the same file can look correct on Monday and throw a rebuild error on Friday.
The sequence used here follows the rest of this site: build the sketch, constrain it fully, pad it, then refine and export. If you are starting from zero, work through the setup and first sketch walkthrough before applying the rules on this page.
01 / Sketcher
A fully constrained sketch in FreeCAD shows green geometry and reports "Fully constrained" in the Sketcher status bar. Reaching that state is not a formality: it locks every degree of freedom so a later change to one dimension cannot drag unrelated geometry with it. The solver reports the remaining degrees of freedom in the same bar, which tells you exactly how many constraints are still missing.
Apply geometric constraints first — coincident, horizontal, vertical, tangent, equal, symmetric — and add dimensions last, only for values a machinist or a customer would actually specify. A profile with twelve dimensions and no symmetry constraint is harder to edit than the same profile with four dimensions and a symmetry constraint across the centerline.
The full constraint-by-constraint walkthrough is in the Sketcher constraints tutorial.
The tree reads from top to bottom, and every operation is applied to what sits above it. Model the stock first, then the roughing cuts, then the finishing details — the same order a machinist would follow on the shop floor. Fillets and chamfers belong at the bottom of the tree, because they consume edges that earlier features create.
Name features as you go. "Pad001" tells you nothing inside a 40-feature part; "Boss_M8_mount" tells you where to look when a rebuild fails. Rename in the tree view with F2 and keep a consistent prefix scheme across the document.
Attach sketches to base planes or datum planes rather than to faces of the solid. Face-based attachment is the most common cause of topological naming breakage in FreeCAD: change an earlier feature and the referenced face no longer exists, so the sketch loses its support. The Pad and Pocket workflow guide shows the plane-first approach in practice.
02 / Part Design
03 / Fit and finish
Model nominal dimensions, then apply clearance through a sketch constraint or a spreadsheet parameter — never by nudging the model until it looks right. On a calibrated FDM printer, 0.2 mm radial clearance on a mating pin produces a sliding fit; 0.3 mm is the safer first test. For CNC work, model to nominal and put the tolerance in the drawing, because the shop works from the STEP file plus the print.
Walls thinner than 0.8 mm — two 0.4 mm perimeters — usually print with gaps. Holes under 3 mm tend to close up, so either drill them after printing or model them 0.15 mm oversize. Threads are cut, not modeled, unless the part is going to a resin process.
A master sketch holds the profile and the key dimensions for a family of parts. Clone it with Draft Clone or bring it into another body with a ShapeBinder so a single edit propagates through every variant. Spreadsheets hold the values that appear more than once: plate thickness, bolt spacing, clearance, corner radius.
Alias the cells — A2 becomes "thickness" — so expressions read as Spreadsheet.thickness instead of Spreadsheet.A2. That is the difference between a model a colleague can edit next quarter and one only you can maintain. The spreadsheet parametric workflow covers the setup step by step.
Keep a single source of truth per dimension. If the same number is typed into two sketches, one of them will eventually be wrong, and the error surfaces only after the part is cut.
04 / Reuse
Tutorial series
Each guide covers one stage of the pipeline and links back to the rules on this page.
Constraint types, solver messages and the order that keeps a profile editable.
Open tutorialAdding and removing material on a body without breaking the tree below.
Open tutorialDeviation values, unit checks and file naming that machine shops accept.
Open tutorialIf a dimension appears twice in the model, it belongs in a spreadsheet. If a sketch is not fully constrained, it is not finished.
05 / Before export
Run this list on every part that leaves your machine. It takes about four minutes and prevents most rejected files.
The exact export settings are documented in the STL and STEP export guide.
Use Part Design for anything that will be edited — it keeps a parametric body with a readable history. Use Part for one-off boolean geometry that will never change.
Almost always a reference to a face or edge that no longer exists. Reattach the sketch to a base plane or datum plane and rebuild the feature.
For FDM, about 0.05 mm of interference per side gives a press fit and 0.2 mm gives a slip fit. For CNC, specify an H7/h6 pair on the drawing instead of modeling the clearance.
For production parts, yes. During concept exploration a partially constrained sketch is acceptable if you note the missing constraints and finish them before export.
Start with a fully constrained sketch on the origin, build the tree in manufacturing order, and run the checklist before the file leaves your machine. The full pipeline is covered across the guides on this site, beginning with the beginner walkthrough.