BIM.works SDKs - v3.0.0-b.115
    Preparing search index...

    Class DistanceMeasurement

    Hierarchy (View Summary)

    Index

    Constructors

    Accessors

    • get constrain(): boolean

      Returns boolean

      Whether this measure is constrained

    • get coordinate1(): vec3

      Returns vec3

      The first coordinate

    • get coordinate2(): vec3

      Returns vec3

      The second coordinate

    • get editable(): boolean

      Whether the points of this measurement can be dragged to a new position after it has been finalized (default true). Supported for area, path and point measurements, and for the laser, which is dragged as a whole by its instrument (a click on it selects it instead); the other types have no draggable points. The points show a pointer cursor on hover; while dragging, vertex snapping applies as during measuring (Shift temporarily disables it) and the label (area/length/position) is updated in realtime. Dropping the point fires the committed listener event, Escape cancels the drag

      Returns boolean

    • set editable(editable: boolean): void

      Parameters

      • editable: boolean

      Returns void

    • get editState(): | {
          index: number
          | null;
          moved: boolean;
          originalText: string | null;
      }
      | null

      The point being dragged (see editable): its index, whether it moved yet, and the measurement's value before the drag as its label shows it. Null when no point is dragged. A right-click during the drag puts the point back, like Escape. For a laser, index is the beam end dragged along its beam (0-2 the ends along the axes, 3-5 those opposite), null while it moves as a whole by its instrument; originalText is null

      Returns { index: number | null; moved: boolean; originalText: string | null } | null

    • get finished(): boolean

      Returns boolean

      Whether this measurement is finished

    • get id(): number

      Get the unique identifier of this measurement

      Returns number

    • get length(): number

      Returns number

      The length of this measurement (the distance), always in millimeters

    • get normal(): vec3

      Returns vec3

      The normal of the first coordinate

    • get pointCount(): number

      Returns number

      The points placed so far while this measurement is being taken (objects picked, for an object distance)

    • get snapsToVertices(): boolean

      Returns boolean

      Whether the points of this measurement snap to vertices and edges (point, length, area, angle)

    Methods

    • Returns boolean

      Whether finish() would complete this measurement now (enough points for a length or an area)

    • Returns vec3[] | null

      The points (viewer measurement coordinates) a camera fit on this measurement encloses, or null when it has none yet

    • Returns boolean

      Whether this measurement is hovered

    • Returns boolean

      Whether this measurement is selected

    • Returns void

      Remove this Measurement

    • Remove the last placed point while this measurement is being taken, see Measuring.undoLastPoint

      Returns boolean

      Whether a point was taken back