CoordinateFrame
Type alias in @bimworks/viewer3d.
API catalogue · @bimworks/viewer3d · Type alias
TypeScript#
type CoordinateFrame = "model" | "measurement" | "render";The coordinate frames points cross the API in, all in millimetres unless a member says otherwise (docs/ui-api-wp4/1-frames-and-placement.md):
- model: a version's own coordinates, before its alignment and placement (its IFC
coordinates times its length unit,
Viewer3d.getModelLengthUnitMm). Overlays and quantity figures are in this frame. - measurement: what the measurement tools show. In LOCAL mode the aligned model frame, the same for every model; in GEO mode east/north/up around the reference model's georeference anchor. ViewPoint is in this frame, in metres.
- render: what is drawn and picked: the measurement frame plus an offset the viewer keeps for precision. PickResult.coordinate, Annotation.position, the camera's eye/target and section planes are in this frame. It moves when the first loaded model is unloaded or the mode changes, so render coordinates must not be stored.
Convert with Viewer3d.modelToMeasurementCoordinates, Viewer3d.measurementToModelCoordinates,
Viewer3d.measurementToRenderCoordinates and Viewer3d.renderToMeasurementCoordinates.