BIM.works SDKs - v1.5.0-b164
    Preparing search index...

    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.

    Index

    Constructors

    Methods

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

      Parameters

      • 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

      • Optionalnormal: vec3

        The normal that was used on the first coordinate, this is not really used anywhere and can be left empty

      • Optionalconstrain: false

        Whether the original measurement was constrained, also not used anywhere to optional

      Returns DistanceMeasurement

      The DistanceMeasurement object

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

      Parameters

      • 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

      • Optionalnormal: vec3

        The normal that was used on the first coordinate, this is not really used anywhere and can be left empty

      • Optionalconstrain: boolean

        Whether the original measurement was constrained, also not used anywhere to optional

      Returns PathMeasurement

      The PathMeasurement object

    • Remove all existing measurement listeners

      Returns void

    • Get the active measurement

      Returns Measurement

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

    • Get the Measurement object for the given id

      Parameters

      • id: number

        the Id of the measurement, must be a number (int)

      Returns Measurement

    • Returns boolean

      Whether a measurement is currently active (being constructed)

    • Remove all the measurements

      Returns void

    • Remove a measurement by its id

      Parameters

      • id: number

        The unique if of the measurement

      Returns 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

      Returns 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

      Returns 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

      • Optionalmeasurement: Measurement

        The measurement that you want to select. You can also pass null to unselect the currently selected measurement

      • OptionaltriggerListeners: 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

      Returns void

    • Start a new distance measurement

      Parameters

      • Optionalconstrain: boolean

        Whether this measurement should be constrained (perpendiculair to the starting face)

      Returns DistanceMeasurement

      A reference to the started DistanceMeasurement

    • Stops the currently active measurement and removes it

      Returns void