Reference·JavaScript · @bimworks/viewer3dJavaScript

Measuring

Class in @bimworks/viewer3d.

API catalogue · @bimworks/viewer3d · Class

TypeScript#
class Measuring

All measuring related methods are available on this class. Generally the Viewer3d has a reference to an instance of this class. There can only be one measurement "active" at a time. A measurement that is "active" is still being constructed by the user. When an active measurement is being "finished" it will stop being editable.

Members#

Member Kind Description
constructor Method Should be considered private, only the Viewer3d will create an instance
referenceObjectsVisible Property Whether the levels and grid lines are shown
magnifier Method Whether the magnifier is on: while a point tool aims with a mouse or pen, a round loupe beside the cursor shows the area under it enlarged, with the snap tar…
vertexSnapping Method Whether the point tools (point, length, area, angle) snap to vertices and edges, the session's choice set with setSnapping. Holding left Shift suspends it
addAngleMeasurement Method Add an angle measurement programmatically, for example a measurement that was stored in a database earlier
addAreaMeasurement Method Add an area measurement programmatically, for example a measurement that was stored in a database earlier
addDistanceMeasurement Method Add a distance measurement programmatically, for example a measurement that was stored in a database earlier
addLaserMeasurement Method Place a laser again where one stood (LaserMeasurement.placement): its beams are cast again against the geometry loaded now, so they end where the objects are…
addListener Method Add a new listener, a listener can have many methods implemented, but none of them are required
addObjectDistanceMeasurement Method Add a finished object distance measurement programmatically (e.g. restored from a database), without recomputing it
addPathMeasurement Method Add a path measurement programmatically, for example a measurement that was stored in a database earlier
addPointMeasurement Method Add a point measurement programmatically, for example a measurement that was stored in a database earlier
cancelEditPoint Method Ends a point drag and puts the point back, as Escape does; false when no drag was active
canFinishTouchMeasurement Method Whether the active touch measurement has enough points to finish (a path two, an area three)
canMagnify Method
canSnap Method
clearAllListeners Method Remove all existing measurement listeners
finishActiveMeasurement Method Finish the active measurement the way Enter or a double-click does: a length needs two points, an area three corners and an angle its three points; with fewe…
generateId Method
getActiveMeasurementKind Method What the active measurement measures (see kindOf), null when none runs or the move/rotate tool runs
getActiveTool Method The running tool, for a user interface that names it and offers its controls (the BIM.works mode bar), or null when nothing runs. Changes are announced with …
getCurrentMeasurement Method Get the active measurement
getEditingMeasurement Method The measurement whose point is being dragged, or the laser being moved; null when none
getHovered Method
getMeasurement Method Get the Measurement object for the given id
getObjectReference Method The reference geometry of an object from the reference figures the server wrote at check-in, cached; null when the object has none
getReferenceObjects Method The storey levels and grid lines setReferenceObjectsVisible loaded (measurement frame, mm), a copy; null before they are loaded
getSelected Method
getTouchState Method Where a touch measurement stands: "aiming" (a finger is down under the loupe), "pending" (a point is previewed and waits for its checkmark) or "idle"
hasActiveMeasurement Method
isSnapping Method
kindOf Method
listMeasurements Method List the measurements currently finished
loadReferenceObjects Method Load the levels (building storeys with an elevation) and grid lines of the loaded models, once per model set
measureObjectDistance Method Compute the shortest distance between the surfaces of two objects, without any interaction. The triangles of both objects are read back from the GPU and the …
modelOf Method The one model every point of a measurement was picked on (docs/drawing-scale-design.md §8.3), or null: points on different models, a point on nothing (the gr…
onActiveChange Method fn(active) is called whenever a measurement tool becomes active or stops
removeAllMeasurements Method Remove all the measurements
removeListener Method Remove an existing measurements listener
removeMeasurement Method Remove a measurement by its id
setAreaMode Method Gross, net or hull for the area measurement being taken (kept also where it does not apply yet, it takes effect on the face that is clicked), else for the se…
setBlur Method Programmatically set the given measurement to be blurred. This will be reflected in 3D View. Keep in mind that this will trigger any listeners (for blurring …
setHover Method Programmatically set the given measurement to be the "hovered" measurement. This will be reflected in 3D View and any currently "hovered" measurement will be…
setMagnifier Method Switch the magnifier on or off: the session's choice, for the running measurement and the ones that follow
setReferenceObjectsVisible Method Show or hide the levels and grid lines on the overlay (loading them first). While shown, the vertical laser stops at the levels and an object distance that i…
setSelected Method Programmatically set the given measurement to be the selected measurement. This will be reflected in 3D View and any currently selected measurement will be a…
setSnapping Method Switch snapping on or off. For the point tools this is the session's choice: it also holds for the measurements that follow, and left Shift keeps suspending …
startAngleMeasurement Method Start a new angle measurement. The user clicks exactly 3 points: the end of the first arm, the vertex (from where the angle bow is shown), and the end of the…
startAreaMeasurement Method Start a new area measurement. The user clicks a sequence of points forming a closed polygon, the enclosed area is shown at the centroid. Clicking the first p…
startDistanceMeasurement Method Start a new distance measurement
startLaserMeasurement Method Start a new 3-axis laser measurement. Keep in mind that this method is async, when first using the LaserMeasurement, the initial setup time can be longer
startObjectDistanceMeasurement Method Start a new object distance measurement: the user clicks two objects and the shortest distance between their surfaces is drawn as a dimension between the two…
startPathMeasurement Method Start a new path measurement
startPointMeasurement Method Start a new point measurement. A point measurement add's a label to a vertex
startScaleMeasurement Method Start the two clicks of a drawing's scale (docs/drawing-scale-design.md §8.1): a length of two points with the point tools' snapping, magnifier and touch lou…
startVerticalLaserMeasurement Method Start a new 1-axis (vertical) laser measurement. Keep in mind that this method is async, when first using the LaserMeasurement, the initial setup time can be…
stopActiveMeasurement Method Stops the currently active measurement and removes it. Clicks go back to the viewer's selection mode (rectangle selection included), also when no measurement…
toggleAreaHoles Method The O key ("toggleAreaHoles" key binding): cycle an area measurement through its modes gross, net and hull (see AreaMeasurement.cycleAreaMode), skipping the …
toggleReference Method Measure to the references (centre lines, axis planes) of the objects instead of their surfaces, or back: a choice for an object distance before its second ob…
toggleReferenceMode Method The O key: cycle the reference modes of the active or selected object distance measurement (surface / centre line per object). The area measurement's own O b…
undoLastPoint Method Take back the last point of the running length, area, distance, angle or object distance measurement. Taking back the first point returns the tool to where i…

constructor#

TypeScript#
constructor()

Should be considered private, only the Viewer3d will create an instance

referenceObjectsVisible#

TypeScript#
public referenceObjectsVisible: boolean

Whether the levels and grid lines are shown

magnifier#

TypeScript#
public magnifier(): boolean

Whether the magnifier is on: while a point tool aims with a mouse or pen, a round loupe beside the cursor shows the area under it enlarged, with the snap target. The session's choice, set with setMagnifier; on unless switched off

vertexSnapping#

TypeScript#
public vertexSnapping(): boolean

Whether the point tools (point, length, area, angle) snap to vertices and edges, the session's choice set with setSnapping. Holding left Shift suspends it

addAngleMeasurement#

TypeScript#
public addAngleMeasurement(id: number, coordinates: (vec3)[]): AngleMeasurement

Add an angle measurement programmatically, for example a measurement that was stored in a database earlier

Parameters#

Name Type Description
id number A unique id that can be used to reference this measurement later. The user is responsible to make sure the id's of all active measurements are unique
coordinates (vec3)[] Exactly 3 coordinates in 3D space: the end of the first arm, the vertex, the end of the second arm

Returns#

The AngleMeasurement object

addAreaMeasurement#

TypeScript#
public addAreaMeasurement(id: number, coordinates: (vec3)[], holes?: ((vec3)[])[], mode?: boolean | AreaMode): AreaMeasurement

Add an area measurement programmatically, for example a measurement that was stored in a database earlier

Parameters#

Name Type Description
id number A unique id that can be used to reference this measurement later. The user is responsible to make sure the id's of all active measurements are unique
coordinates (vec3)[] An array of coordinates in 3D space forming the polygon. The closing edge is implied, the first coordinate should not be repeated at the end
holes ((vec3)[])[] Optional openings of the face this measurement was taken from, each a closed ring with the same convention as coordinates
mode boolean | AreaMode Which figure the measurement reports, see AreaMeasurement.areaMode. Defaults to "net" when holes are given, "gross" otherwise; the boolean that predates the third mode is still accepted, true meaning "net". Both this and the holes are needed for a faithful round trip: the mode is a per-measurement choice, so the presence of openings does not by itself say which was in force

Returns#

The AreaMeasurement object

addDistanceMeasurement#

TypeScript#
public addDistanceMeasurement(id: number, coordinate1: vec3, coordinate2: vec3, normal?: vec3, constrain?: false): DistanceMeasurement

Add a distance measurement programmatically, for example a measurement that was stored in a database earlier

Parameters#

Name Type Description
id number A unique id that can be used to reference this measurement later. The user is responsible to make sure the id's of all active measurements are unique
coordinate1 vec3 The first coordinate in 3D space
coordinate2 vec3 The second coordinate in 3D space
normal vec3 The normal that was used on the first coordinate, this is not really used anywhere and can be left empty
constrain false Whether the original measurement was constrained, also not used anywhere to optional

Returns#

The DistanceMeasurement object

addLaserMeasurement#

TypeScript#
public addLaserMeasurement(id: number, coordinate: vec3, normal: vec3, options?: { onlyZ?: boolean; qid?: string | null; toReference?: boolean }): Promise<LaserMeasurement | null>

Place a laser again where one stood (LaserMeasurement.placement): its beams are cast again against the geometry loaded now, so they end where the objects are now

Parameters#

Name Type Description
id number A unique id, see addDistanceMeasurement
coordinate vec3 Where it stands, viewer measurement coordinates
normal vec3 The normal of the face it stands on
options { onlyZ?: boolean; qid?: string | null; toReference?: boolean } qid: the object of that face; onlyZ: a vertical laser; toReference: the beams end on references (see LaserMeasurement.toReference)

Returns#

The finished LaserMeasurement, or null when its beams could not be cast (nothing is left behind then)

addListener#

TypeScript#
public addListener(listener: MeasuringListener): void

Add a new listener, a listener can have many methods implemented, but none of them are required

Parameters#

Name Type Description
listener MeasuringListener

addObjectDistanceMeasurement#

TypeScript#
public addObjectDistanceMeasurement(id: number, result: ObjectDistanceResult): ObjectDistanceMeasurement

Add a finished object distance measurement programmatically (e.g. restored from a database), without recomputing it

Parameters#

Name Type Description
id number A unique id that can be used to reference this measurement later. The user is responsible to make sure the id's of all active measurements are unique
result ObjectDistanceResult The result as measureObjectDistance returned it: the distance in mm, the two closest points and the qids

Returns#

The ObjectDistanceMeasurement object

addPathMeasurement#

TypeScript#
public addPathMeasurement(id: number, coordinates: (vec3)[], normal?: vec3, constrain?: boolean): PathMeasurement

Add a path measurement programmatically, for example a measurement that was stored in a database earlier

Parameters#

Name Type Description
id number A unique id that can be used to reference this measurement later. The user is responsible to make sure the id's of all active measurements are unique
coordinates (vec3)[] An array of coordinates in 3D space
normal vec3 The normal that was used on the first coordinate, this is not really used anywhere and can be left empty
constrain boolean Whether the original measurement was constrained, also not used anywhere to optional

Returns#

The PathMeasurement object

addPointMeasurement#

TypeScript#
public addPointMeasurement(id: number, coordinate: vec3): PointMeasurement

Add a point measurement programmatically, for example a measurement that was stored in a database earlier

Parameters#

Name Type Description
id number A unique id, see addDistanceMeasurement
coordinate vec3 The point, viewer measurement coordinates

Returns#

The PointMeasurement object

cancelEditPoint#

TypeScript#
public cancelEditPoint(): boolean

Ends a point drag and puts the point back, as Escape does; false when no drag was active

canFinishTouchMeasurement#

TypeScript#
public canFinishTouchMeasurement(): boolean

Whether the active touch measurement has enough points to finish (a path two, an area three)

canMagnify#

TypeScript#
public canMagnify(): boolean

Returns#

Whether the running tool can use the magnifier: a point tool (point, length, area, angle) on a device with a mouse or pen. The Magnifier toggle is offered only then

canSnap#

TypeScript#
public canSnap(): boolean

Returns#

Whether the running tool can snap: to vertices and edges for the point tools, to 100 mm and 15° steps for move/rotate

clearAllListeners#

TypeScript#
public clearAllListeners(): void

Remove all existing measurement listeners

finishActiveMeasurement#

TypeScript#
public finishActiveMeasurement(): void

Finish the active measurement the way Enter or a double-click does: a length needs two points, an area three corners and an angle its three points; with fewer the measurement stays active. For the move/rotate tool this applies the change

generateId#

TypeScript#
public generateId(): number

Returns#

A fresh id for the add…Measurement methods, unique among the measurements of every viewer

getActiveMeasurementKind#

TypeScript#
public getActiveMeasurementKind(): string | null

What the active measurement measures (see kindOf), null when none runs or the move/rotate tool runs

getActiveTool#

TypeScript#
public getActiveTool(): ActiveTool | null

The running tool, for a user interface that names it and offers its controls (the BIM.works mode bar), or null when nothing runs. Changes are announced with MeasuringListener.toolChanged

getCurrentMeasurement#

TypeScript#
public getCurrentMeasurement(): Measurement

Get the active measurement

Returns#

The currently active measurement (being constructed), or null when no measurement is active

getEditingMeasurement#

TypeScript#
public getEditingMeasurement(): Measurement | null

The measurement whose point is being dragged, or the laser being moved; null when none

getHovered#

TypeScript#
public getHovered(): Measurement

Returns#

The currently hovered Measurement, null if no measurement is being hovered over

getMeasurement#

TypeScript#
public getMeasurement(id: number): Measurement

Get the Measurement object for the given id

Parameters#

Name Type Description
id number the Id of the measurement, must be a number (int)

getObjectReference#

TypeScript#
public getObjectReference(qid: string): Promise<ObjectReference | null>

The reference geometry of an object from the reference figures the server wrote at check-in, cached; null when the object has none

Parameters#

Name Type Description
qid string

getReferenceObjects#

TypeScript#
public getReferenceObjects(): { grids: ({ name: string; points: (vec3)[] })[]; levels: ({ name: string; z: number })[] } | null

The storey levels and grid lines setReferenceObjectsVisible loaded (measurement frame, mm), a copy; null before they are loaded

getSelected#

TypeScript#
public getSelected(): Measurement

Returns#

The currently selected Measurement, null if no measurement is selected

getTouchState#

TypeScript#
public getTouchState(): "idle" | "pending" | "aiming"

Where a touch measurement stands: "aiming" (a finger is down under the loupe), "pending" (a point is previewed and waits for its checkmark) or "idle"

hasActiveMeasurement#

TypeScript#
public hasActiveMeasurement(): boolean

Returns#

Whether a measurement is currently active (being constructed)

isSnapping#

TypeScript#
public isSnapping(): boolean

Returns#

Whether the running tool snaps right now, with Shift taken into account

kindOf#

TypeScript#
public kindOf(measurement: Measurement): "length" | "angle" | "scale" | "area" | "distance" | "point" | "laser" | "objectDistance" | null

Parameters#

Name Type Description
measurement Measurement

Returns#

What the measurement measures: "distance", "length", "point", "area", "angle", "objectDistance", "laser" or "scale" (the two clicks of a drawing's scale, see startScaleMeasurement); null for anything else

listMeasurements#

TypeScript#
public listMeasurements(): (Measurement)[]

List the measurements currently finished

Returns#

An array of Measurement

loadReferenceObjects#

TypeScript#
public loadReferenceObjects(): Promise<{ grids: (ReferenceObject)[]; levels: (ReferenceObject)[] }>

Load the levels (building storeys with an elevation) and grid lines of the loaded models, once per model set

measureObjectDistance#

TypeScript#
public measureObjectDistance(qidA: string, qidB: string, options?: { add?: boolean; mode?: ObjectDistanceMode; references?: (ReferenceMode)[] }): Promise<ObjectDistanceResult & { measurement?: ObjectDistanceMeasurement } | null>

Compute the shortest distance between the surfaces of two objects, without any interaction. The triangles of both objects are read back from the GPU and the closest pair is found in the browser; the result carries the two closest points

Parameters#

Name Type Description
qidA string The first object
qidB string The second object
options { add?: boolean; mode?: ObjectDistanceMode; references?: (ReferenceMode)[] } add: also add (and draw) the finished measurement, available as the result's measurement property

Returns#

The result, or null when either object has no surface geometry (or is the same object)

modelOf#

TypeScript#
public modelOf(measurement: Measurement): string | null

The one model every point of a measurement was picked on (docs/drawing-scale-design.md §8.3), or null: points on different models, a point on nothing (the grid), a measurement added with an add…Measurement method rather than measured, or an object distance. A measurement with a model moves with it when the model's alignment changes (Viewer3d.setModelAlignment, Viewer3d.updateModel); one across models stays where it is

Parameters#

Name Type Description
measurement Measurement

onActiveChange#

TypeScript#
public onActiveChange(fn: (active: boolean) => void): () => void

fn(active) is called whenever a measurement tool becomes active or stops

Parameters#

Name Type Description
fn (active: boolean) => void

Returns#

A function that unsubscribes

removeAllMeasurements#

TypeScript#
public removeAllMeasurements(): void

Remove all the measurements

removeListener#

TypeScript#
public removeListener(listener: MeasuringListener): void

Remove an existing measurements listener

Parameters#

Name Type Description
listener MeasuringListener

removeMeasurement#

TypeScript#
public removeMeasurement(id: number): void

Remove a measurement by its id

Parameters#

Name Type Description
id number The unique if of the measurement

setAreaMode#

TypeScript#
public setAreaMode(mode: AreaMode): boolean

Gross, net or hull for the area measurement being taken (kept also where it does not apply yet, it takes effect on the face that is clicked), else for the selected finished one (only when it applies)

Parameters#

Name Type Description
mode AreaMode

Returns#

Whether the mode was taken

setBlur#

TypeScript#
public setBlur(measurement: Measurement): void

Programmatically set the given measurement to be blurred. This will be reflected in 3D View. Keep in mind that this will trigger any listeners (for blurring measurements)

Parameters#

Name Type Description
measurement Measurement

setHover#

TypeScript#
public setHover(measurement: Measurement): void

Programmatically set the given measurement to be the "hovered" measurement. This will be reflected in 3D View and any currently "hovered" measurement will be automatically blurred. Keep in mind that this will trigger any listeners (both for blurring any current measurement and for hovering the new measurement)

Parameters#

Name Type Description
measurement Measurement

setMagnifier#

TypeScript#
public setMagnifier(on: boolean): void

Switch the magnifier on or off: the session's choice, for the running measurement and the ones that follow

Parameters#

Name Type Description
on boolean

setReferenceObjectsVisible#

TypeScript#
public setReferenceObjectsVisible(visible: boolean): Promise<boolean>

Show or hide the levels and grid lines on the overlay (loading them first). While shown, the vertical laser stops at the levels and an object distance that is picking takes a clicked level or grid line as one of its sides

Parameters#

Name Type Description
visible boolean

setSelected#

TypeScript#
public setSelected(measurement?: Measurement, triggerListeners?: boolean): void

Programmatically set the given measurement to be the selected measurement. This will be reflected in 3D View and any currently selected measurement will be automatically unselected. Keep in mind that this will trigger any listeners (both for unselecting any current measurement and for selecting the new measurement), depending on the triggerListeners parameter.

Parameters#

Name Type Description
measurement Measurement The measurement that you want to select. You can also pass null to unselect the currently selected measurement
triggerListeners boolean Indicate whether listeners should be called, the default value for this optional parameter = true. Regardless of the setting, listeners are only ever called when there is an actual change in selection

setSnapping#

TypeScript#
public setSnapping(on: boolean): void

Switch snapping on or off. For the point tools this is the session's choice: it also holds for the measurements that follow, and left Shift keeps suspending it while held. For move/rotate it is the tool's snapping: in Viewer3D-Next its stops (90°), suspended while Shift is held; in Viewer3D its steps, which Shift inverts

Parameters#

Name Type Description
on boolean

startAngleMeasurement#

TypeScript#
public startAngleMeasurement(): AngleMeasurement

Start a new angle measurement. The user clicks exactly 3 points: the end of the first arm, the vertex (from where the angle bow is shown), and the end of the second arm. The measurement finishes immediately when the third point is committed, Escape cancels it

Returns#

A reference to the started AngleMeasurement

startAreaMeasurement#

TypeScript#
public startAreaMeasurement(): AreaMeasurement

Start a new area measurement. The user clicks a sequence of points forming a closed polygon, the enclosed area is shown at the centroid. Clicking the first point again (or pressing Enter, with at least 3 points) closes the polygon and finishes the measurement, Escape cancels it. In 3D the first 3 (non-collinear) points define a plane, any further points are constrained to that plane

Returns#

A reference to the started AreaMeasurement

startDistanceMeasurement#

TypeScript#
public startDistanceMeasurement(constrain?: boolean): DistanceMeasurement

Start a new distance measurement

Parameters#

Name Type Description
constrain boolean Whether this measurement should be constrained (perpendiculair to the starting face)

Returns#

A reference to the started DistanceMeasurement

startLaserMeasurement#

TypeScript#
public startLaserMeasurement(): Promise<LaserMeasurement>

Start a new 3-axis laser measurement. Keep in mind that this method is async, when first using the LaserMeasurement, the initial setup time can be longer

Returns#

A reference to the started LaserMeasurement

startObjectDistanceMeasurement#

TypeScript#
public startObjectDistanceMeasurement(options?: { mode?: ObjectDistanceMode; qids?: (string)[]; references?: (ReferenceMode)[]; useSelection?: boolean }): ObjectDistanceMeasurement

Start a new object distance measurement: the user clicks two objects and the shortest distance between their surfaces is drawn as a dimension between the two closest points. When exactly two objects are selected the measurement is computed at once, without further clicks. It finishes by itself once the distance is known, Escape cancels it. Not editable, static afterwards. Objects that touch or intersect report 0

Parameters#

Name Type Description
options { mode?: ObjectDistanceMode; qids?: (string)[]; references?: (ReferenceMode)[]; useSelection?: boolean } sids or qids: measure these two objects instead of picking; useSelection: false ignores the current selection

Returns#

A reference to the started ObjectDistanceMeasurement

startPathMeasurement#

TypeScript#
public startPathMeasurement(): PathMeasurement

Start a new path measurement

Returns#

A reference to the started PathMeasurement

startPointMeasurement#

TypeScript#
public startPointMeasurement(): PointMeasurement

Start a new point measurement. A point measurement add's a label to a vertex

Returns#

A reference to the started PointMeasurement

startScaleMeasurement#

TypeScript#
public startScaleMeasurement(options?: { vid?: string }): ScaleMeasurement

Start the two clicks of a drawing's scale (docs/drawing-scale-design.md §8.1): a length of two points with the point tools' snapping, magnifier and touch loupe, both on one drawing (a PDF, or a DWG), finished by the second click (MeasuringListener.committed). A click on another model places nothing: toolChanged fires with ScaleMeasurement.refused set. It is not selected when it finishes; the caller keeps or removes it

Parameters#

Name Type Description
options { vid?: string } vid: only points on this drawing

startVerticalLaserMeasurement#

TypeScript#
public startVerticalLaserMeasurement(): Promise<LaserMeasurement>

Start a new 1-axis (vertical) laser measurement. Keep in mind that this method is async, when first using the LaserMeasurement, the initial setup time can be longer

Returns#

A reference to the started LaserMeasurement

stopActiveMeasurement#

TypeScript#
public stopActiveMeasurement(): void

Stops the currently active measurement and removes it. Clicks go back to the viewer's selection mode (rectangle selection included), also when no measurement was active

toggleAreaHoles#

TypeScript#
public toggleAreaHoles(): AreaMeasurement | null

The O key ("toggleAreaHoles" key binding): cycle an area measurement through its modes gross, net and hull (see AreaMeasurement.cycleAreaMode), skipping the modes that would not change anything. The target is the measurement being created, else the selected one; a target that is not an area measurement, or has neither openings nor a concave ring, is passed over

Returns#

The measurement whose mode changed, or null when there was nothing to cycle

toggleReference#

TypeScript#
public toggleReference(slot?: 0 | 1): Promise<void>

Measure to the references (centre lines, axis planes) of the objects instead of their surfaces, or back: a choice for an object distance before its second object is picked, a switch for a finished one or a laser (the O key). With a slot (0 the first object, 1 the second) an object distance's Centre line toggle of that one object (setReferenceMode)

Parameters#

Name Type Description
slot 0 | 1

toggleReferenceMode#

TypeScript#
public toggleReferenceMode(): ObjectDistanceMeasurement | null

The O key: cycle the reference modes of the active or selected object distance measurement (surface / centre line per object). The area measurement's own O behaviour (toggleAreaHoles) takes precedence when it applies

Returns#

The measurement being cycled (its recomputation is asynchronous), or null when there was none

undoLastPoint#

TypeScript#
public undoLastPoint(): boolean

Take back the last point of the running length, area, distance, angle or object distance measurement. Taking back the first point returns the tool to where it started

Returns#

Whether a point was taken back