School of Engineering · Playlist

2D Sketching and Constraints

Sketch entities and planes, geometric relations, and fully defined sketches.

  1. Sketch Entities and Planes
  2. Geometric Relations in Sketches
  3. Fully Defined Sketches and Design Intent
Engineering Graphics and CAD/CAD Modeling

Sketch Entities and Planes

Choose where a 2D sketch lives, then build its shape from simple entities and construction geometry.

Choose the sketch plane before drawing the shape

Choose the sketch plane before drawing the shape

A 2D sketch is a set of points and curves on one plane. The plane places the sketch in the model; the sketch's origin and axes give you references for locating its geometry.

  • Standard plane: Front, Top, or Right is a useful starting reference for a new part. Choose the view that makes the intended profile easiest to describe.
  • Model face: use an existing planar face when the new sketch belongs on that face. A curved face is not itself a 2D sketch plane.
  • Reference plane: an added plane can locate a sketch where the standard planes and existing faces do not.

The origin is a point, not a plane. Starting a line or circle at the origin can anchor its position, but you still need a sketch plane. You may start elsewhere when that suits the design; then constrain the location relative to a deliberate reference.

Look normal to the sketch plane: straight at it, rather than at an angle. Horizontal and vertical refer to the sketch's axes, even when you rotate the model on screen.

Supporting detail: Addendum 1 — Sketch placement in Onshape.

Use the simplest entity that describes the shape

Use the simplest entity that describes the shape

Sketch entities and the information they need
EntityWhat it describesWhat to control
LineA straight segment between two endpoints.Position, direction, and length.
CircleA complete round curve.Center position and radius or diameter.
ArcPart of a circle.Center, radius, and where the arc begins and ends.
RectangleFour connected lines with right-angle corners.Position, orientation, width, and height. Tool-created relations often supply some of these.
SlotA constant-width path with rounded ends. A simple straight slot has two parallel sides and two semicircular ends.Path position and direction, width, and length. State whether length means overall length or distance between end centers.
SplineA curve shaped by fit points or control points and handles.Point locations and curve shape. Use it when a line or circular arc cannot express the intended contour.

Rectangle and slot tools create useful groups of geometry. They do not guarantee that the resulting sketch is fully defined. Inspect their relations before adding more.

Supporting detail: Addendum 2 — Find the tools by their software names.

Construction geometry guides the sketch without outlining material

Construction geometry guides the sketch without outlining material

A centerline is a common use of construction geometry: a reference for a center, symmetry, angle, or axis. Construction geometry participates in dimensions and relations, but does not serve as the ordinary boundary of a filled profile.

A circular profile with a construction centerline A solid circle surrounds an origin cross. A dashed line through its center is labeled construction; the circle is labeled profile. ProfileConstructionOrigin
The reference line and the profile have different jobs. A dashed line can still need constraints.

In SOLIDWORKS, Centerline creates construction geometry. In Onshape, use Construction to toggle selected sketch entities or to create construction geometry. Use a construction circle for a layout circle just as you would use a construction line for an axis.

Supporting detail: Addendum 3 — Vendor reference for construction geometry.

Check connections before moving on to a feature; Practice

Check connections before moving on to a feature

Two endpoints that look joined may still be separate. A tiny gap can prevent a profile from closing. Use a coincident relation to make the connection intentional, then inspect the sketch.

Closed and fully defined are different checks. A closed circle can still move or change size. A fully defined chain of lines can still be open. Later features such as extrude or revolve use sketches in different ways; choose the profile that the intended feature needs.

Continue with Geometric Relations in Sketches and Fully Defined Sketches and Design Intent. For view interpretation, see Orthographic Projection and the Glass Box; for drawing dimensions, see Dimension Anatomy and Placement.

Practice: choose a sketch reference

Engineering Graphics and CAD/CAD Modeling

Geometric Relations in Sketches

Match each relation to the motion it prevents, and distinguish shared position, direction, size, and curvature.

Relations preserve geometry when dimensions change

Relations preserve geometry when dimensions change

A geometric relation is a rule the sketch must continue to satisfy: two lines stay parallel, two circles keep one center, or an endpoint stays on a curve. Onshape generally calls these rules constraints; SOLIDWORKS calls them relations.

Choose the entities carefully. Selecting a circle's center is different from selecting its circumference. A relation can remove some motion while leaving other motion available. The diagrams show only the named rule, not a complete dimensioning scheme.

The before/after drawings are original geometry diagrams, not software icons. Their line colors do not indicate sketch status.

Coincident connects a point; midpoint puts it halfway along

Coincident connects a point; midpoint puts it halfway along

Coincident

Two points share a location, or a point lies on a selected line or curve. Joining two endpoints closes their gap. A point on a line can still slide along it unless another rule locates it.

Before: separate line endpoints. After: one shared endpoint.

Coincident controls connection. It does not by itself set either line's length or angle.

Midpoint

A point stays halfway between a segment's endpoints. It is more specific than simply putting the point somewhere on the line. Onshape also supports midpoint on an arc.

Before: a point above a line. After: the point lies at the line midpoint.

The two halves stay equal as the line changes length.

Supporting detail: Addendum 4 — Point selection and vendor names.

Collinear shares a line; parallel shares only its direction

Collinear shares a line; parallel shares only its direction

Collinear

Two straight segments lie on the same infinite line. They may have a gap between them; collinear does not join their endpoints.

Before: two differently directed segments. After: both lie on one dashed extended line, still separated.

Same underlying line does not mean same length or touching endpoints.

Parallel

Two lines keep the same direction. Their spacing, lengths, and positions along that direction still need other rules.

Before: two lines with different slopes. After: two separated lines with matching slopes.

Parallel lines can rotate together; neither must be horizontal.

Software vocabulary: SOLIDWORKS has a Collinear relation. Onshape's documented toolbar has no separate Collinear entry. For two nonzero straight segments, placing both endpoints of one coincident with the other's underlying line enforces the same geometric condition. This is a construction from point-on-line constraints, not an Onshape command name.

Horizontal and vertical use the axes; perpendicular uses another line

Horizontal and vertical use the axes; perpendicular uses another line

Horizontal

A line's endpoints have the same vertical coordinate. For two selected points, horizontal aligns their heights without joining them.

Before: a sloping line. After: a line parallel to the sketch x axis.

Length and position can still change.

Vertical

A line's endpoints have the same horizontal coordinate. Two selected points can likewise be aligned vertically.

Before: a sloping line. After: a line parallel to the sketch y axis.

Use the sketch axes, not the edges of the rotated screen view.

Perpendicular

Two line directions form a right angle. They may rotate together while preserving that angle. The relation does not require their finite segments to meet.

Before: oblique crossing lines. After: two lines whose directions are 90 degrees apart.

If a joint is required, also connect the intended endpoints.

Supporting detail: Addendum 5 — Why horizontal plus vertical can already supply a right angle.

Concentric shares a center; equal shares size; coradial shares both

Concentric shares a center; equal shares size; coradial shares both

Concentric

Circles or circular arcs share a center. They can have different radii. For arcs, their endpoints and sweep angles are not determined by this relation.

Before: two circles with different centers. After: nested circles with one center and different radii.

Concentric suits two circular boundaries around the same axis.

Equal

Selected line segments keep equal lengths; selected circles or circular arcs keep equal radii. Equal does not move their centers together. Equal arc radii do not imply equal arc lengths when the sweep angles differ.

Before: short and long segments. After: two equally long segments at different locations.

Dimension one size and relate the other to it when they must change together.

Coradial

Two circular arcs share both center and radius: they belong to the same underlying circle. They need not touch or have equal sweep angles. SOLIDWORKS names this relation Coradial. In Onshape, concentric plus equal radius expresses this condition.

Before: arcs on different circles. After: separate arcs on the same dashed supporting circle.

Compare all three: same center, same size, or both.

Supporting detail: Addendum 6 — Check the circular relation definitions.

Tangent controls direction at contact; Fix holds a reference in place

Tangent controls direction at contact; Fix holds a reference in place

Tangent

A line and a circle touch without crossing: the line is perpendicular to the radius at contact. Curves meeting tangentially have a common tangent direction. Tangency alone does not necessarily join the endpoints you intended; add endpoint coincidence when a continuous profile needs it.

Before: a line cuts through a circle. After: the line touches the circle at the end of a perpendicular radius.

A smooth-looking connection still needs the correct relations. Tangency does not require equal radii.

Fix

Fix grounds selected geometry at its current location. Fixing a point removes its freedom to move in the sketch plane. It is useful for a deliberate fixed reference, but does not explain why an arbitrary location or size is correct.

Before: a point can move relative to the origin. After: a lock marks the point held at its current position.

The example fixes a point. Do not generalize it to every entity's endpoints.

SOLIDWORKS qualification: its relation reference says endpoints of a fixed line can still move along the underlying infinite line, and arc endpoints can move along the supporting circle. Check the entity and its endpoints. Onshape describes Fix as grounding the selected entity on the sketch plane.

Supporting detail: Addendum 7 — Vendor help for tangent and fixed geometry.

Watch automatic relations, then check what was stored; Practice

Watch automatic relations, then check what was stored

Sketching tools can add relations while you draw. A visual alignment is useful feedback; inspect the resulting relation icons before assuming the intended rule is present.

  • SOLIDWORKS: with Automatic Relations enabled, its documented cursor cues include horizontal, vertical, coincident, midpoint, perpendicular, and tangent. Hold Ctrl while sketching to suppress automatic relations temporarily.
  • Onshape: Automatic Inferencing documents horizontal, vertical, midpoint, parallel, and coincident as common inferences. Hover near existing geometry to activate the relevant inference; Shift suppresses inferencing while dragging.

These are documented examples, not an exhaustive promise for every tool. For equal, concentric, coradial, collinear, or fix, deliberately apply or verify the required rule. Rectangle, slot, and other creation tools can supply their own relations.

If an unwanted rule was stored, remove that specific rule before adding a conflicting dimension. Continue with Fully Defined Sketches and Design Intent.

Supporting detail: Addendum 8 — Automatic behavior depends on the tool and settings.

Practice: distinguish circular relations

Engineering Graphics and CAD/CAD Modeling

Fully Defined Sketches and Design Intent

Remove unwanted freedom with relations and dimensions, then test whether edits preserve the intended shape.

Predict how an anchored rectangle grows, then test its remaining motion; Interactive; Practice

Predict how an anchored rectangle grows, then test its remaining motion

Rectangle constraint lab. Start with a 64 × 22 mm rectangular label blank. Predict where its left and right edges will be when the driving width changes to 80 mm. Compare a lower-left corner at the origin with a center at the origin.

Dashed: 64 mm width. Solid: 80 mm width. Left: corner anchored. Right: centered. Both retain 22 mm height.
Width changes from 64 to 80 mm; both sketches are fully defined before and after
Origin choiceLeft x (mm)Right x (mm)Free motion
Lower-left corner0 → 064 → 800 DOF
Center−32 → −4032 → 400 DOF

Diagnose the freedom: keep width and height driving, but remove only the horizontal anchor. The rectangle can translate horizontally: 1 DOF remains. Remove the width instead while retaining both anchors and height; the corner-anchored rectangle's right edge can move, or the centered rectangle can grow symmetrically. Restore the conditions before testing the intended size edit.

Measure versus constrain: a top-edge reference dimension reports the current width and adds no equation. A second driving width that agrees with the first repeats the same equation: five displayed conditions can still have only four independent conditions. A different second driving width contradicts the first; there is no feasible rectangle, so the lab retains its last valid drawing rather than displaying an invented solution.

Bounded model: one closed axis-aligned rectangle, with four variables [left x, right x, bottom y, top y]. Closure, rectangular shape and orientation are built in. For a feasible set, DOF = 4 − rank (the independent equation count). Width and height stay between 1 and 120 mm; these bounds restrict admissible sizes and do not count as equality constraints. The lab projects toward the nearest solution of the active equalities and rejects changes outside its size range. It models no rotation or other sketch entities and does not reproduce a vendor's solver or error colors.

With JavaScript enabled, use the prediction, size controls and two draggable corners. Keyboard: focus a corner and press arrow keys; Shift changes the requested step from 1 to 5 mm. Undo diagnostic motion restores the previous drawing.

Practice: predict centered growth Practice: reference dimensions and freedom

Count independent ways the geometry can still change

Count independent ways the geometry can still change

A degree of freedom (DOF) is one independent variable still available to change. Constraints remove freedom. Count the geometry's possible motion, not the number of icons.

Simple, isolated 2D entities before any dimensions or relations
EntityFree variablesDOF
Pointx and y position2
Nonzero line segmentx and y for each endpoint4
CircleCenter x, center y, radius3
Circular arcCenter x, center y, radius, two endpoint angles5

A circle's diameter dimension removes one DOF; its center can still move in two directions. Making its center coincident with the origin removes those two. A line with one endpoint at the origin still has length and direction to determine.

Supporting detail: Addendum 9 — Why subtracting one per relation gives wrong answers.

A driving dimension controls size; a driven dimension reports it

A driving dimension controls size; a driven dimension reports it

A driving dimension is a constraint: changing its value asks the solver to change the geometry while keeping the other rules. Length, angle, radius, diameter, and location dimensions can all supply constraints.

A driven or reference dimension measures a result already controlled elsewhere. It does not remove another DOF. For example, a circle whose size is set by a 24 mm driving diameter already has a 12 mm radius; a second driving radius dimension duplicates that control.

Use a relation for an enduring geometric rule and a dimension for the independent value you intend to change. Two lengths that must remain equal need an equal relation and one driving length, rather than two unrelated numbers that happen to match today.

Onshape automatically makes a newly added dimension driven if it would over-define the sketch. Check whether a displayed value is driving before expecting it to control geometry.

Supporting detail: Addendum 10 — Software treatment of redundant dimensions.

For drawing presentation and dimension placement, see Dimension Anatomy and Placement.

Read the sketch state in the software you are using

Read the sketch state in the software you are using

  • Under-defined / underconstrained: some position, orientation, or size remains free.
  • Fully defined / fully constrained: no free motion remains with the current driving values. Editing those values can still change the sketch.
  • Over-defined / overconstrained: dimensions or relations conflict or add control the solver treats as redundant. Repair the conflicting set.
Documented colors for sketch geometry while editing; selection and hover highlighting are separate
SoftwareUnder-definedFully definedProblems
SOLIDWORKS 2026BlueBlackGeometry-status help identifies yellow for conflicting or invalid items and red for unsolvable items; a redundant driving dimension can be red.
OnshapeBlueBlackRed geometry indicates a constraint problem. A problem constraint icon is white on red.

Read status messages and inspect relations as well as color. One black edge does not prove that the entire sketch is fully defined. An under-defined construction line or endpoint can be easy to overlook.

Supporting detail: Addendum 11 — Current vendor references for status colors.

Fully define a sketch in a repeatable order; Checklist

Fully define a sketch in a repeatable order

  • State what must stay aligned, centered, equal, or tangent when the size changes.
  • Choose the plane and an origin reference that suit that intent. Confirm the working units.
  • Draw the simplest useful entities. Check the automatic relations and remove unintended ones.
  • Connect the intended endpoints and apply the geometric relations that describe the shape.
  • Anchor the sketch's position to the origin or other stable references; control its orientation.
  • Add independent driving dimensions for the remaining sizes and locations.
  • Inspect the remaining free points and curves. Drag gently to diagnose motion, then undo the diagnostic move.
  • Resolve conflicts before adding more constraints. Inspect the whole sketch, including construction geometry.
  • Change one intended driving value, check that the sketch behaves correctly, then restore the value.

Fully defined is a useful check, not proof of good design intent. Fixing a misplaced point can remove freedom without giving it the correct location. A sketch can be completely constrained by dimensions that make future edits awkward.

Test design intent with a change, not just the starting shape; Practice

Test design intent with a change, not just the starting shape

Fresh practice part: a circular inspection plate. Sketch two circular boundaries for an annular plate. Put their common center at the origin; use concentric and separate diameter dimensions of 46 mm and 18 mm. Increasing the outer diameter to 58 mm should leave the inner opening centered and unchanged in size.

Fresh practice part: a rectangular label blank. Use an axis-aligned rectangle with its lower-left corner at the origin, width 64 mm, and height 22 mm. Increasing the width to 80 mm should move the right edge while the left edge stays at the origin. If the intended part must grow equally left and right, choose a centered construction instead.

These two origin choices describe different editing behavior. There is no single best anchor for every part. Decide what should stay put before dimensioning.

Practice: count remaining freedom Practice: spot duplicate control

Repair the unwanted rule, then check the intended change again

Repair the unwanted rule, then check the intended change again

When an added dimension causes an error, inspect what already controls that measurement. Keep the relation or dimension that expresses the intended design. Remove the duplicate, or make a measurement driven if it is only there to report a result.

A horizontal line cannot also have a nonzero vertical separation between its endpoints. Equal circles cannot have different driving diameters. These are contradictions; adding still more dimensions will not solve them.

SOLIDWORKS offers Display/Delete Relations and SketchXpert for diagnosis. Onshape's Constraint manager filters constraints and dimensions to help locate problems. A suggested deletion is still a design decision: check what behavior you would lose.

Supporting detail: Addendum 12 — Redundancy is not the same as contradiction.

Return to Geometric Relations in Sketches to compare rules, or Sketch Entities and Planes to review the geometry they act on.

Supporting detail

Addendum

Additional evidence, standards context, and background referenced from the main text.

  1. Engineering Graphics and CAD/CAD Modeling/Sketch Entities and Planes

    Addendum 1. Sketch placement in Onshape

    Onshape creates sketches in a Part Studio and lets you choose a plane, a planar part face, or a mate connector that supplies a coordinate system. This page uses ordinary planes and faces. See Onshape: Sketch Basics.

    Back to reference 1

  2. Engineering Graphics and CAD/CAD Modeling/Sketch Entities and Planes

    Addendum 2. Find the tools by their software names

    Onshape names include Line, Corner rectangle, Center point rectangle, Center point circle, 3 point circle, Tangent arc, 3 point arc, Spline, Point, and Construction. Its Slot tool builds around selected sketch curves. See Sketch Tools and Slot. These names describe ways to create geometry, not different rules for constraining it.

    Back to reference 2

  3. Engineering Graphics and CAD/CAD Modeling/Fully Defined Sketches and Design Intent

    Addendum 9. Why subtracting one per relation gives wrong answers

    Coinciding a free point with a fixed point supplies two coordinate conditions. Putting a free point on a fixed line supplies only one. A repeated rule may supply no new independent condition. These counts assume ordinary, nondegenerate geometry: nonzero line lengths and positive radii. At special configurations, independent equations and usable motion require more care; do not assign a universal DOF reduction to each icon.

    Back to reference 9

  4. Engineering Graphics and CAD/CAD Modeling/Fully Defined Sketches and Design Intent

    Addendum 12. Redundancy is not the same as contradiction

    A repeated condition may agree mathematically yet be rejected as a second driving control. Some redundant geometric relations are tolerated: SOLIDWORKS documents a redundant perpendicular relation that leaves a sketch fully defined. Do not assume that every extra icon causes an error. See SOLIDWORKS: FAQ Sketch Relations and Onshape: Working with Constraints.

    Back to reference 12