Sketches, constraints and dimensions
Every parametric part starts as a 2D sketch. Learn how geometric constraints and dimensions remove degrees of freedom until a sketch is fully defined.
Lesson 2 of 6 · 35 min · Self-paced · Free
Why sketches matter so much
Almost every feature in a parametric part begins as a sketch: a 2D drawing of lines, arcs and circles on a flat plane. The sketch is then extruded, revolved or cut to make 3D shape. If the sketch is vague, the part is vague. If the sketch behaves badly when a dimension changes, the whole part does. Getting sketches right is the most important habit in CAD, and it rests on one idea borrowed from mechanics: degrees of freedom.
Sketch geometry can move
When you first draw a rectangle in a CAD sketch, the software does not yet know that you meant a rectangle. It just sees four lines whose ends happen to be near each other. You can usually drag a corner and watch the shape distort. Each piece of geometry has degrees of freedom (DOF): independent ways it can move or change.
- A point in a plane has 2 DOF: it can move in x and in y.
- A line segment is defined by its two end points, so it has 4 DOF.
- A circle has 3 DOF: the x and y of its centre, plus its radius.
The job of a sketch is to remove those freedoms on purpose, using two tools: geometric constraints and dimensions.
Geometric constraints
A geometric constraint states a relationship rather than a number. Common ones, found in almost every CAD tool, include:
- Coincident: two points are in the same place (for example, where two lines meet).
- Horizontal and vertical: a line lies along the x- or y-direction.
- Parallel and perpendicular: two lines are at 0° or 90° to each other.
- Tangent: a line and an arc (or two arcs) meet smoothly, without a corner.
- Equal: two lines have the same length, or two circles the same radius.
- Concentric: two circles or arcs share a centre.
- Symmetric: two points are mirror images about a line.
- Fixed (or locked): a point cannot move at all; often the sketch's origin.
Constraints capture design intent directly. Saying "these two holes are equal" is better than giving them both a diameter of 5.5 mm, because if one changes, the other must follow.
Dimensions
A dimension fixes a size with a number: a length, a distance, a radius or an angle. In a parametric sketch, dimensions are driving: change the number and the geometry moves to match. Many tools also allow reference (or driven) dimensions, which only display a measurement and cannot be edited. They are useful for checking, but they do not constrain anything.
Worked example: counting a rectangle down to zero
Let us count the freedoms in a rectangle and remove them one by one.
- Four separate line segments: 4 × 4 = 16 DOF.
- Make the four corners coincident. Each coincident constraint joins two end points, removing 2 DOF. Four corners: 16 − 4 × 2 = 8 DOF. That matches four free corner points, 4 × 2 = 8.
- Make two opposite sides horizontal and the other two vertical. Each removes 1 DOF: 8 − 4 = 4 DOF. The shape is now always a rectangle, but its width, its height and its position can still change.
- Add a width dimension (60 mm) and a height dimension (40 mm): 4 − 2 = 2 DOF. The size is fixed, but the rectangle can still slide around.
- Make one corner coincident with the sketch origin, which is fixed: 2 − 2 = 0 DOF.
At zero, the sketch is fully constrained (also called fully defined): nothing can move unless you change a dimension. Many CAD tools show this by changing the colour of the geometry, and many display the remaining DOF count, though the exact display differs between tools.
Now add a hole. A circle has 3 DOF. A diameter dimension removes 1. Two position dimensions from the rectangle's edges remove the other 2. Back to zero.
Under-, fully and over-constrained
- An under-constrained sketch still has DOF left. It may look right, but a later edit can drag geometry somewhere unexpected. Most tools allow this, which is convenient while you are exploring and dangerous when you are finished.
- A fully constrained sketch has exactly zero DOF, with every freedom removed exactly once. This is the goal for finished work.
- An over-constrained sketch has more constraints than freedoms, so some constraints repeat or contradict each other. If a rectangle is already constrained with horizontal and vertical sides, adding "perpendicular" to a corner is redundant: it says nothing new. Adding a third dimension that disagrees with the other two is a conflict. CAD tools usually warn you and refuse to solve until you delete one.
Choosing which dimensions to give
There is often more than one way to fully constrain a sketch, and the choice matters. Suppose a plate has two holes that must line up with bolts on a robot frame, 40 mm apart. You could dimension each hole from the left edge (10 mm and 50 mm), or dimension the first hole from the edge and then dimension the hole spacing directly as 40 mm.
Both are fully constrained today. But if the plate later becomes longer, or the first hole moves, only the second scheme guarantees the 40 mm spacing that actually matters. Dimension what matters for function, from the features that matter, such as a mounting face, a centre line or the other hole. This is design intent again.
Some further habits that make sketches robust:
- Keep sketches simple. One clear profile per sketch is easier to fix than a tangle of shapes. Add details such as fillets as 3D features later.
- Use symmetry. If a part is symmetric, constrain it about a centre line through the origin. Then changing one dimension keeps it centred.
- Anchor to the origin. Tie at least one point of each sketch to the origin or to existing geometry, so the part has a stable reference.
- Avoid tiny gaps. A line that almost touches another but is not coincident leaves an open profile that cannot be extruded.
Recap
- Sketch geometry has degrees of freedom: points 2, line segments 4, circles 3.
- Geometric constraints (coincident, horizontal, equal, tangent…) and dimensions remove DOF.
- A fully constrained sketch has zero DOF; aim for this in finished work, and avoid redundant or conflicting constraints.
- Choose dimensions that express function, such as hole spacing, rather than whatever is quickest to click.
Project
Paper project: constrain a robot bracket sketch
On squared paper (or in any free parametric CAD tool if you have one):
- Draw the outline of an L-shaped bracket made of six straight lines, with two mounting holes in each leg.
- Count the starting degrees of freedom of all the lines and circles.
- List the geometric constraints you would add (coincident, horizontal, vertical, equal, and so on) and subtract their DOF step by step, as in the rectangle example.
- Add dimensions until the count reaches zero. Mark on your drawing which dimensions are functional (for example, hole spacing) and explain why you chose them.
- Find one constraint that would be redundant and one dimension that would conflict, and explain why.
Deliverables
- A labelled bracket sketch
- A step-by-step DOF count reaching zero
- A short explanation of which dimensions express the design intent
Knowledge check
Check your understanding
Go further
- Degrees of freedom (mechanics) (Wikipedia) ↗
The same counting idea applied to rigid bodies, which you will need for assemblies.
Lesson materials · free to download
Sign in to track your progress. Reading is free without an account.