Add a distance measurement programmatically, for example a measurement that was stored in a database earlier
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
The first coordinate in 3D space
The second coordinate in 3D space
Optional
normal: vec3The normal that was used on the first coordinate, this is not really used anywhere and can be left empty
Optional
constrain: falseWhether the original measurement was constrained, also not used anywhere to optional
The DistanceMeasurement object
Add a path measurement programmatically, for example a measurement that was stored in a database earlier
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
An array of coordinates in 3D space
Optional
normal: vec3The normal that was used on the first coordinate, this is not really used anywhere and can be left empty
Optional
constrain: booleanWhether the original measurement was constrained, also not used anywhere to optional
The PathMeasurement object
Get the active measurement
The currently active measurement (being constructed), or null when no measurement is active
Get the Axis Aligned Bounding Box (AABB) of the main content. For most models (or model sets) these are just the bounds of all 3D geometry. In certain cases the "Main" bounds are smaller than the real bounds, for example in models that have line geometry that extends beyond the 3D geometry, als certain IFC types are generally regarded as not being part of the main bounds.
An AxisAlignedBoundingBox3D object
List the measurements currently finished
An array of Measurement
Start a new distance measurement
Optional
constrain: booleanWhether this measurement should be constrained (perpendiculair to the starting face)
A reference to the started DistanceMeasurement
Start a new path measurement
A reference to the started PathMeasurement
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.