Parametric sketcher
Apply dimensional and geometric constraints to section geometry — 13 constraint types including parallel, perpendicular, coincident, and tangent, with live constraint inference while drawing.
Overview
The parametric sketcher lets you attach dimensional and geometric constraints to your section geometry so it stays correct as you edit. Once a constraint is in place you can change a single dimension and the solver propagates the change through all connected geometry — no need to manually reposition every vertex.
Constraints are additive — you can mix and match any of the 13 supported types on the same section. There are two ways to add a constraint:
- Constraint tools: select a type from the Constraints tab or use a keyboard shortcut, then click the target geometry.
- Selection-driven: click one entity — or Shift-click several — on the canvas. A floating action bar appears showing only the constraint types that are compatible with your selection.
| Selected entities | Available constraints |
|---|---|
| One straight edge | Horizontal, Vertical |
| One vertex | Fix |
| Two vertices | Linear dimension, Coincident |
| Two straight edges | Parallel, Perpendicular, Equal length |
| Two arc edges | Equal radius, Tangent (arc-arc) |
| One straight edge + one arc | Tangent (line-arc) |
| Two cross-ring vertices | Coincident |
| One vertex + one edge | Midpoint, Symmetric |
The Constraints tab in the left sidebar is accessible at any time for inspecting and managing the active constraint set.
Constraint types
Linear dimension
A linear dimension fixes the distance between two vertices (or between a vertex and a line). Click Add Linear in the Constraints tab, then click two vertices on the canvas. The solver places a dimension label on the canvas; type a new value to change the constrained distance.
Linear dimensions can be horizontal, vertical, or aligned (parallel to the chord between the two points). Choose the type from the Add Linear dropdown before clicking.
| Type | Constrains |
|---|---|
| Horizontal | Horizontal separation () |
| Vertical | Vertical separation () |
| Aligned | Full chord distance |
Equality constraint
An equality constraint forces two edges to have identical lengths. Select two edges (hold Shift to select the second) then click Add Equality. Equality marks appear on both edges (double tick marks). When you resize one edge, the other follows.
Equality constraints are useful for symmetric sections where you want opposite flanges or legs to stay the same size without adding two independent linear dimensions.
Tangent constraint
A tangent constraint forces an arc segment and an adjacent straight segment to be tangent at their shared vertex — no kink at the join. Select the arc and the adjacent edge, then click Add Tangent. The solver adjusts the straight edge’s endpoint to lie on the arc’s tangent line, and thereafter the two stay tangent as you resize the arc.
Tangent constraints are essential for smooth fillet-corner sections (hollow circular, lipped channel, rounded rectangle).
Symmetry constraint
A symmetry constraint mirrors two vertices or two edges about a selected axis. Click Add Symmetry, pick the axis (horizontal, vertical, or an existing edge), then click the two vertices or edges to mirror. The solver keeps both sides equidistant from the axis in perpetuity.
Coincident
A coincident constraint forces two vertices to occupy exactly the same position. Shift-click two vertices on the canvas and choose Coincident from the floating action bar.
Cross-ring coincident: when the two vertices belong to different element rings (for example, an outer solid ring and a void cutout ring), the constraint couples both rings through a constraint-linked group (union-find). Both rings move as a single rigid body whenever either constrained vertex is relocated. The coupling appears in the Constraint List Panel with a chain-link glyph and differs from same-ring coincident in that the solver propagates translations across the ring boundary.
Parallel
A parallel constraint forces two straight edges to be parallel. Shift-click both edges and choose Parallel from the action bar. The solver adjusts the edge directions to match; which edge is treated as the reference and which moves is determined by the existing constraint priority in the DOF count.
Perpendicular
A perpendicular constraint forces two straight edges to intersect at 90°. Shift-click both edges and choose Perpendicular. The same priority logic as parallel applies.
Equal length
An equal-length constraint forces two straight edges to have the same length. Shift-click both straight edges and choose Equal Length from the action bar. Resizing either edge propagates to the other. Equal-length and equal-radius constraints both appear under “equality” in the Constraint List Panel.
Equal radius
An equal-radius constraint forces two arc edges to share the same radius. Shift-click both arcs and choose Equal Radius. Useful for maintaining identical fillet radii across a symmetric section without entering a specific value.
Midpoint
A midpoint constraint pins a vertex to the midpoint of an edge. Shift-click the vertex then the edge (order matters: vertex first) and choose Midpoint. The vertex stays equidistant from both endpoints of the edge as the rest of the sketch is modified.
Tangent (line-arc, non-adjacent)
A tangent-line-arc constraint enforces tangency between a straight edge and an arc where the two entities are not adjacent at a shared vertex. Shift-click one straight edge and one arc, then choose Tangent from the action bar. The solver repositions the straight edge so it lies along the tangent to the arc at the nearest point.
This is distinct from the existing Tangent constraint above, which enforces tangency at a shared vertex between adjacent entities — that type remains available from the Constraints tab and is required for fillet joins.
Tangent (arc-arc)
A tangent-arc-arc constraint forces two arc edges to be tangent at their shared endpoint — no kink at the join. Shift-click both arcs and choose Tangent. The solver adjusts arc positions so their centres and the shared endpoint are collinear, eliminating any angular discontinuity.
Symmetric
A symmetric constraint keeps two vertices equidistant from a reference axis. Shift-click the two vertices and an axis edge (or choose a coordinate axis from the Constraints tab), then choose Symmetric. The Stage-2 symmetric constraint is complementary to the Stage-1 symmetry constraint: it operates through the multi-select workflow and can reference any straight edge as the axis, not only the horizontal and vertical axes.
Driven vs. driving dimensions
Every linear dimension is either driving or driven:
- Driving (blue label) — the dimension controls the geometry. Typing a new value moves the constrained vertices to match.
- Driven (grey label, lock icon) — the dimension reports the current value but is controlled by other constraints or by the geometry directly. You cannot type a new value into a driven dimension.
A dimension becomes driven automatically when the solver determines its value is fully determined by other constraints. For example, if you constrain the total width of a section with one linear dimension and then add an equality constraint between the two halves, the per-half dimension becomes driven (it will always equal total width ÷ 2).
Click a driven dimension’s lock icon to promote it to driving — this removes one other constraint to avoid over-constraining the sketch.
Conflict dialog
The sketcher detects constraint conflicts before applying them. A conflict occurs when a new constraint is incompatible with the existing set — for example, adding a horizontal dimension of 100 mm when an equality constraint and an existing 50 mm dimension together already fix the same distance to 100.5 mm.
When a conflict is detected the Conflict dialog opens:
- The conflicting constraint is highlighted in the canvas and listed at the top of the dialog.
- The existing constraints that conflict with it are shown below, with their values.
- You can choose to Remove one of the existing constraints to make room for the new one, or Cancel to discard the new constraint without changing anything.
No constraint is ever silently discarded. Every conflict requires an explicit user decision.
Managing constraints
Constraint list panel
Every active constraint is listed in the Constraint List Panel, accessible from the General tab in the left sidebar. Each row shows:
- A type glyph (parallel arrows, right-angle mark, equals sign, chain link, etc.)
- A state badge: satisfied (green), driven (grey), or conflicting (red)
- A delete button — removes the constraint; the constrained geometry is freed
- A driven toggle (dimensional constraints only) — click to demote a driving dimension to driven, or to promote a driven dimension to driving (removing one other constraint to maintain consistency)
Clickable canvas badges
Each constraint shows a badge directly on the affected edge or arc. Clicking a badge:
- Selects that constraint in the Constraint List Panel.
- Highlights all geometry entities participating in the constraint.
- Opens the constraint’s detail row for editing the value (dimensional) or deletion.
Cascade on topology changes
When you delete a vertex, split an edge, or switch an arc to a straight segment, the sketcher identifies constraints that are no longer satisfiable and removes them with a toast notification listing each removed constraint by type. No constraint is silently discarded (§874).
Constraint inference while drawing
The inference engine proposes a constraint for each edge you draw in polygon-draw mode, based on how closely the live draft edge approaches a horizontal, vertical, parallel, perpendicular, or tangent relationship with the committed geometry.
How inference works
-
As you move the pointer, the engine computes the draft edge direction from the last-placed vertex to the current pointer position.
-
It tests the draft bearing against the following candidates, in priority order:
Candidate Tolerance Horizontal or vertical ≤ 2° from the axis Parallel to an existing edge ≤ 2° from that edge’s bearing Perpendicular to an existing edge ≤ 2° from 90° off that edge Tangent to an existing arc ≤ one grid step (linear) -
The top candidate is shown as a live glyph at the cursor (reusing the
ConstraintBadgevocabulary). The draft edge preview snaps to satisfy the inferred constraint exactly — horizontal inference locks the endpoint toy = start.y; parallel inference rotates the endpoint to the matching bearing; and so on. -
On commit (click or Enter), the inferred constraint is added as a real, visible, deletable constraint record through the normal adapter+solver gate — it is never invisible magic. You can see and remove it in the Constraint List Panel.
Inference toggle
A topbar button (toggle state visible via aria-pressed) turns inference on or off. The setting is persisted per-browser in localStorage:
- On (default) — proposals are shown, the edge snaps, and constraints are added on commit.
- Off — the edge is placed exactly as drawn; no inference runs and no constraints are added automatically.
Turn inference off when you intentionally want a freehand edge at an angle not near any existing geometry.
Keyboard shortcuts
| Key | Action |
|---|---|
| C | Open Constraints tab |
| L | Add linear dimension (aligned) |
| H | Add horizontal linear dimension |
| V | Add vertical linear dimension |
| E | Add equality constraint (after selecting two edges) |
| T | Add tangent constraint (after selecting arc + edge) |
| S | Add symmetry constraint (after selecting axis + two vertices) |
| Delete | Remove selected constraint |
| ESC | Cancel in-progress constraint placement |
Tips
- Add constraints after you are happy with the rough geometry — constraints preserve ratios, not specific values, so starting with a close-to-correct sketch gives the solver less to rearrange.
- Use equality on symmetric sections early: it halves the number of driving dimensions you need to maintain.
- If a dimension label is in the way of the canvas, drag it to a convenient position — the label position is independent of the constraint value.
- The DOF count badge in the Constraints tab header shows N constraints (M driving) so you always know how over- or under-constrained the sketch is.
- A fully constrained sketch (all dimensions driven except the position anchor) is ideal for parametric studies — change one driving dimension and all geometry updates instantly.
- Inference + Shift-click work together: inference adds constraints as you draw; Shift-click adds constraints between existing edges after the fact. Combining both workflows is the fastest path to a fully constrained sketch.
Next steps
- Drawing tools — freehand drawing, snapping, vertex editing, region roles
- Section properties — the output reference once your constrained geometry is committed