draw.Drawing

Methods

Method Reference: draw.Drawing.dim

draw.Drawing: D = dim (D, P1, P2, OFFSET)
draw.Drawing: D = dim (D, P1, P2, OFFSET, DIRECTION)
draw.Drawing: D = dim (D, P1, P2, OFFSET, DIRECTION, LABEL)

Append a dimension measuring between P1 and P2.

OFFSET is the perpendicular distance in millimetres from the measured points to the dimension line. Its sign selects which side the dimension line falls on: positive offsets lie to the left of the direction of travel from P1 to P2.

DIRECTION selects what is being measured and defaults to 'aligned':

  • 'aligned' — the distance between the two points.
  • 'horizontal' — the difference in x alone.
  • 'vertical' — the difference in y alone.

A horizontal dimension between two points at the same x, or a vertical one between two points at the same y, measures nothing and is an error.

LABEL overrides the measured value with a literal string, for the cases every drawing eventually has — a nominal size, a range, a note in place of a number. Without it the backend formats the measurement it computes. A dimension therefore carries no text of its own by default, which is precisely what keeps it truthful when the geometry changes.

Source Code: draw.Drawing