Constraints
Rules that hold a sketch in shape, such as horizontal, parallel, equal or tangent, so it stays right when sizes change.
- Tie loose endsSketch toolbar
- Auto-constrainSketch toolbar
- CoincidentSketch toolbar: constraints
- HorizontalSketch toolbar: constraints
- VerticalSketch toolbar: constraints
- ParallelSketch toolbar: constraints
- PerpendicularSketch toolbar: constraints
- EqualSketch toolbar: constraints
- MidpointSketch toolbar: constraints
- TangentSketch toolbar: constraints
- ConcentricSketch toolbar: constraints
- CollinearSketch toolbar: constraints
- SymmetricSketch toolbar: constraints
- FixSketch toolbar: constraints
| SchoolCAD | Onshape | Fusion | SOLIDWORKS |
|---|---|---|---|
| Tie loose ends | Coincident (open ends) | Coincident | Repair Sketch |
| Auto-constrain | Inferences | AutoConstrain | Fully Define Sketch |
| Coincident | Coincident | Coincident | Coincident Collinear Coradial |
| Horizontal | Horizontal | Horizontal/Vertical | Horizontal |
| Vertical | Vertical | Horizontal/Vertical | Vertical |
| Parallel | Parallel | Parallel | Parallel |
| Perpendicular | Perpendicular | Perpendicular | Perpendicular |
| Equal | Equal | Equal | Equal |
| Midpoint | Midpoint | Midpoint | Midpoint |
| Tangent | Tangent | Tangent | Tangent |
| Concentric | Concentric | Concentric | Concentric |
| Collinear | Coincident (two lines) | Collinear | Collinear |
| Symmetric | Symmetric | Symmetry | Symmetric |
| Fix | Fix | Fix/Unfix | Fix |
A constraint is a rule about how lines, circles and points sit together: this line is horizontal, these two lines are the same length, this point is in the middle of that line. A dimension sets a size; a constraint sets a relationship. (SOLIDWORKS calls constraints relations.) Together they make a sketch fully defined, so it keeps its shape when you change a size.
How to use it#
- With Select, click the first thing, then Shift-click the others.
- Click the constraint in the sketch toolbar. The constraint buttons are the small symbols •, H, V, ∥, ⊥, =, M, T, ◎, ⇹ and ⚓. Hover over one to see its name and what to select.
A button stays grey until what you have selected fits it. Most constraints then show as a small symbol by the line, such as H. Coincident and Concentric show no symbol: the points simply sit together.
The twelve constraints#
| Constraint | Select | What it does |
|---|---|---|
| • Coincident | Two points, or a point and a line, or a point and a circle or arc, or two lines | Joins the two points into one, or puts the point on the line or curve. Two lines go in line with each other, as parts of one straight line (Onshape: Coincident · SOLIDWORKS: Collinear): they get ∥ and an end on the other's line. Two arcs or circles go on one circle, the same centre and size (SOLIDWORKS: Coradial). |
| H Horizontal | One or more lines, or two points | Makes each line level, or puts the two points level with each other. |
| V Vertical | One or more lines, or two points | Makes each line upright, or puts one point straight above the other. |
| ∥ Parallel | Two lines | Makes the lines run the same way, like railway tracks. |
| ⊥ Perpendicular | Two lines | Puts the lines at a right angle (90°) to each other. |
| = Equal | Two or more lines, or two or more circles or arcs | Makes the lines the same length, or the circles and arcs the same size. |
| M Midpoint | A point and a line | Puts the point in the middle of the line. |
| T Tangent | A line and a circle or arc, two circles or arcs, or a line, circle or arc and an ellipse | Makes them touch smoothly, without a corner. |
| ◎ Concentric | Two or more circles or arcs, or one circle or arc and a point | Gives them the same centre, like a washer, or puts the point on the centre. |
| ⋯ Collinear | Two or more lines | Puts the lines in line with each other, as parts of one straight line (Fusion and SOLIDWORKS: Collinear). Coincident on two lines does the same. |
| ⇹ Symmetric | Two points and a line | Puts the points the same distance either side of the line, like mirror images. |
| ⚓ Fix | One or more points | Pins the points where they are now. |
Constraints added for you#
SchoolCAD adds many constraints as you draw:
- A line drawn nearly level or upright gets H or V.
- A line or shape that starts on a point is joined to it, and one that starts on a line stays on that line.
- A rectangle's sides stay horizontal and vertical (an aligned rectangle's stay at right angles), a polygon's sides stay equal, and a slot's ends stay tangent and equal.
- A tangent arc and a sketch fillet stay tangent to their lines.
- Mirror and Pattern tie their copies to the originals.
Auto-constrain and Tie loose ends#
Two buttons beside the constraints (in Constraints ▾ on a narrow screen, or ` Search tools) do the fiddly part for you:
- Auto-constrain adds H or V to lines that are nearly level or upright, joins ends that nearly meet, and makes a line and an arc that leave a corner the same way T tangent. It only adds what the sketch nearly has already, so nothing jumps. Then add the dimensions it still needs (SOLIDWORKS: Fully Define Sketch · Fusion: AutoConstrain).
- Tie loose ends joins line ends that stop just short of each other, or just short of a line or arc, so the shape closes and can be extruded. Use it when a sketch says it has a gap. Ends that are far apart are left for you to draw the missing line.
Using the origin and the parts#
You can select the origin (the point where the dashed axis lines cross), and the dashed orange edges and corners of parts, as part of a constraint. For example:
- Select the origin and the bottom line of a shape, then click Midpoint (M) to centre the shape left to right.
- Select a corner of your shape and a corner of the part, then click Coincident (•) to join them.
Removing a constraint#
Click a constraint's symbol to select it, then press Delete. Ctrl+Z takes back one you have just added.
Tips#
- With Select, drag a blue point to see how it can still move. That shows which dimension or constraint is missing.
- Use Equal instead of typing the same size twice: change one size and the others follow.
- For a symmetric design, draw a construction centre line and use Symmetric, or Mirror.
- A point made Coincident with a line can slide along the line, even past its end. Add a dimension to hold it where you want it.
If it does not work#
- The button is grey: what you selected does not fit. Check the table: Midpoint, for example, needs one point and one line. Press Esc to clear the selection and start again.
- Already constrained that way, so nothing was added. It was already true, for example a line you drew horizontal.
- That constraint fights the ones already there, so it was not added. Delete one of the others first.
- Horizontal on that line would squash the shape flat. Did you mean Vertical? You picked Horizontal for an upright line, or Vertical for a level one.
- Red lines and symbols: two rules or sizes fight each other. Click the red one and press Delete, or press Ctrl+Z.