Skip to main content

Distance

Extends Dimension

Inherited from Dimension

labelAt()​

labelAt(u: NumberParam, v: NumberParam): this

Places the dimension's value where it reads best. This is what the sketcher writes when a dimension is placed as it is drawn, or dragged afterwards; it only moves the annotation and never changes the geometry. Without it the value is laid out automatically.

The two numbers are sketch units in the dimension's own frame, so the placement follows the geometry when it moves or turns:

  • distance() and offsetFrom(): u slides the value along the dimension line from its middle, v is how far the dimension line stands off the span it measures (either side).
  • radius() and diameter(): the value sits (u, v) from the center along the sketch's x and y; the leader turns to pass through it. An ellipse's radius(el, r, 'x') reads like a distance instead: along and off its semi-axis.
  • angle(): the value sits u out along the bisector of the measured angle from the corner and v to its side; the arc is drawn through it.
ParameterTypeDescription
uNumberParamPosition along the dimension's frame, in sketch units
vNumberParamPosition across the dimension's frame, in sketch units
Inherited from SceneObject

name()​

name(value: string): this

Sets a custom display name for this object, overriding the default type-based name.

ParameterTypeDescription
valuestringThe display name to assign.

Methods​

max()​

max(): this

Measures to the FAR side of any circle/arc in the pair (the SolidWorks/Onshape arc-condition "max"): point–circle and line–circle measure center distance + radius, circle–circle measures between the far circumferences. Requires a circle or arc entity target. For a center distance, dimension the accessor instead: distance(l, a.center(), v).


min()​

min(): this

Measures to the NEAR side of the circumference — the default; an explicit .min() only documents intent.