Ruler
Measures a distance on the bench and labels it, with Markdown and LaTeX in the label.
Open in the canvas →In the real world
Figures of optical setups state the distances that matter: a lens placed one focal length from a pinhole, the separation of a 4f relay, the length of a delay arm. A dimension line with its value says it on the figure itself.
In OpticalSetup
Select the ruler and drag one of the round handles at its ends: that end moves and the other stays where it is. Dragging the line or the label moves the whole ruler, and the inspector sets the length by number. Shift keeps the line to 45° steps.
With auto clamp, on by default, a handle clicks into place near what a measurement usually starts from: a component's centre or its optically active point (a laser's aperture, an objective's tip), another ruler's or goniometer's handle, a bend in a beam such as its fold at a mirror, or a beam's axis; away from these it falls back to the grid when Snap is on. The beam axis is the central ray of each traced beam, a ray drawn on its own (a laser drawn as a line, each ray of an object's fan), or an arrow drawn as a beam; a point source has no single axis, so only its centre is a target. Hold Alt to place freely.
The label is Markdown, as in a text label, with LaTeX formulas between dollar signs, and {value} in it is replaced by the measurement with the chosen number of decimal places. Inside a formula the unit is set upright, and a label without {value} shows no number at all.
The distance is in bench millimetres, the coordinates the tracer computes in. $f = {value}$ reads f = 100.0 mm. The label runs along the line, above or below it, and turns so it never reads upside down. The line can carry arrowheads and graduation ticks at a 1-2-5 step. For an angle, use the goniometer.
The example reads a lens's focal length off the bench, from the lens to where the beam crosses.
The ruler measures the drawing: the straight distance between its two handles, not an optical path length, which would also depend on the indices of the media between them. It does not attach to a component or follow a beam: a handle clamped to a part stays where it was put when the part moves. The ruler is diagram-only and never absorbs or redirects rays.