Constraints and Driving Dimensions
PiQ keeps relationships the way the rest of a drawing works: by defining a point from others. Edit › Constrain does that for you, so the relationship holds as the drawing changes, and a dimension can be made to drive the drawing: its value a variable, change the variable and the drawing follows.
Constrain
Select what to constrain, then choose from Edit › Constrain:
| Command | Select | What it does |
|---|---|---|
| Horizontal | One or more lines | Each line's end is defined at its start's height, its X kept: [(…).X,P1.Y]. |
| Vertical | One or more lines | Each line's end is defined straight above or below its start. |
| Parallel | Two lines | The second is turned to run the way the first does (or the opposite way, whichever is nearer), its length kept. |
| Perpendicular | Two lines | The second is turned square to the first, its length kept. |
| Equal Length | Two lines | The second is made as long as the first, its direction kept. |
| Coincident | Two points, or two lines | The later point is defined on the earlier (P7=P3); for two lines, their nearest ends. |
The first line selected is the one gone by; the second is the one changed. The end that moves is the one not shared with the first line, so a corner stays joined. Whatever the point was defined from is kept where it can be: a line made horizontal still follows its X.
A constraint that would make a point depend on itself (a line whose start is defined from its end, say) is refused, and the drawing is left as it was. Each constraint is undone in one with Undo. Look at, or change, what it did in the Points panel: the point's new definition is there.
Driving dimensions
Select a dimension and choose Edit › Constrain › Drive Dimension… (Ctrl+Shift+D). Give it a value and a variable
(a new one, DIM1, DIM2 …, or one the drawing has, to share it). The dimension's end point is then defined from its
start so that it measures the variable:
| Dimension | Its end point |
|---|---|
| Horizontal | Across from its start by the variable (left or right, as it was). |
| Vertical | Above or below its start by the variable. |
| Aligned | Along the way it goes from its start, the variable away: POLAR(P1,RTOD(ANGLE(…-P1)),DIM1). |
| Radius, Diameter | Out from the centre by the variable (half of it for a diameter). |
Change the variable in the Variables panel (or Run View, or Run Parametric if you label it) and the drawing follows. Angular and ordinate dimensions can't drive.
With no dimension selected and two points selected, the same command keeps the points a variable's distance apart.