Represents a measurement with various settings and properties.

Hierarchy

  • Measurement

Accessors

  • get color(): RGB
  • Gets the color of the measurement.

    Returns

    The color of the measurement.

    Returns RGB

  • get elementId(): Int64
  • Gets the element ID associated with the measurement.

    Returns

    The element ID associated with the measurement.

    Returns Int64

  • set elementId(elementId: Int64): void
  • Sets the element ID associated with the measurement.

    Parameters

    • elementId: Int64

      The element ID to set.

    Returns void

  • get highlighted(): boolean
  • Gets whether the measurement is highlighted.

    Returns

    Whether the measurement is highlighted.

    Returns boolean

  • get id(): Int64
  • Gets the unique identifier of the measurement.

    Returns

    The unique identifier of the measurement.

    Returns Int64

  • get negative(): boolean
  • Gets whether the measurement is negative.

    Returns

    Whether the measurement is negative.

    Returns boolean

  • set negative(negative: boolean): void
  • Sets whether the measurement is negative.

    Parameters

    • negative: boolean

      Whether the measurement is negative.

    Returns void

  • get pattern(): BIM_MEASUREMENT2D_FILL_PATTERN
  • Gets the pattern of the measurement.

    Returns

    The pattern of the measurement.

    Returns BIM_MEASUREMENT2D_FILL_PATTERN

  • get pointColor(): RGB
  • Gets the point color of the measurement.

    Returns

    The point color of the measurement.

    Returns RGB

  • get pointIds(): number[]
  • Gets the point IDs of the measurement.

    Returns

    The point IDs of the measurement.

    Returns number[]

  • get type(): MEASUREMENT_TYPE
  • Gets the type of the measurement.

    Returns

    The type of the measurement.

    Returns MEASUREMENT_TYPE

Methods

  • Adds a 3D arc point to the measurement.

    Returns

    A promise that resolves to a boolean indicating success or failure.

    Parameters

    • x: number

      The x-coordinate of the arc point.

    • y: number

      The y-coordinate of the arc point.

    • z: number

      The z-coordinate of the arc point.

    • useElevation: boolean

      Whether to use elevation for the arc point.

    • faceId: Int64 = null

      Optional face ID associated with the arc point.

    Returns Promise<boolean>

  • Adds a length override for the last point in the measurement.

    Parameters

    • length: number

      The length to override.

    Returns void

  • Adds a 3D point to the measurement.

    Returns

    A promise that resolves to the segment ID of the added point.

    Parameters

    • x: number

      The x-coordinate of the point.

    • y: number

      The y-coordinate of the point.

    • z: number

      The z-coordinate of the point.

    • useElevation: boolean

      Whether to use elevation for the point.

    • faceId: Int64 = null

      Optional face ID associated with the point.

    • is_control: boolean = false

      Whether the point is a control point.

    Returns Promise<number>

  • Clears the 3D coordinates of the arc point.

    Returns void

  • Clears the labels of the measurement.

    Returns void

  • Closes the measurement.

    Returns

    A promise that resolves to a boolean indicating success or failure.

    Parameters

    • closeIfLength: boolean

      Whether to close if length is present.

    Returns Promise<false | BR_FunctionOutput>

  • Computes the perpendicular points on a line.

    Returns

    A promise that resolves to an array of perpendicular points.

    Parameters

    • lineData: number[]

      The line data.

    • skipCurrentPoint: boolean

      Whether to skip the current point.

    Returns Promise<Vector3D[]>

  • Computes the perpendicular points on a line, excluding a specified point.

    Returns

    A promise that resolves to an array of perpendicular points.

    Parameters

    • lineData: number[]

      The line data.

    • pointToExclude: number

      The point to exclude.

    • skipCurrentPoint: boolean

      Whether to skip the current point.

    Returns Promise<Vector3D[]>

  • Checks if the measurement contains a point with the specified coordinates.

    Returns

    A promise that resolves to the point ID if the point is found, or -1 if not found.

    Parameters

    • xe: number

      The x-coordinate of the point.

    • ye: number

      The y-coordinate of the point.

    • ze: number

      The z-coordinate of the point.

    Returns Promise<number>

  • Deletes the current point in the measurement.

    Returns

    A promise that resolves to a boolean indicating success or failure.

    Returns Promise<boolean>

  • Deletes a point in the measurement at the given screen coordinates.

    Returns

    A promise that resolves to a boolean indicating success or failure.

    Parameters

    • screenX: number

      The x-coordinate of the screen.

    • screenY: number

      The y-coordinate of the screen.

    Returns Promise<boolean>

  • Destroys the measurement.

    Returns Promise<void>

  • Finds the element ID in faces.

    Returns

    A promise that resolves to the element ID in faces.

    Returns Promise<Int64>

  • Finds or updates the normal vector behind the measurement.

    Returns

    A promise that resolves to the normal vector.

    Parameters

    • doUpdate: boolean = true

      Optional flag to force the update.

    Returns Promise<Vector3D>

  • Gets the 3D coordinates of the arc point.

    Returns

    The 3D coordinates of the arc point.

    Returns Vector3D

  • Gets the bounding box of the measurement.

    Returns

    A promise that resolves to the bounding box of the measurement.

    Returns Promise<BoundingBox3D>

  • Gets the length of the closest segment point to the given coordinates.

    Returns

    A promise that resolves to an object containing the point ID and length of the closest segment point.

    Parameters

    • x: number

      The x-coordinate.

    • y: number

      The y-coordinate.

    Returns Promise<{ length: number; pointId: number }>

  • Gets the current point in the measurement.

    Returns

    A promise that resolves to the current point in the measurement.

    Returns Promise<Vector3D>

  • Gets the current point ID in the measurement.

    Returns

    The current point ID in the measurement.

    Returns number

  • Gets the points of the current segment in the measurement.

    Returns

    A promise that resolves to an array of points in the current segment.

    Returns Promise<Vector3D[]>

  • Gets the data of the measurement.

    Returns

    A promise that resolves to the data of the measurement.

    Returns Promise<string>

  • Gets the first point ID in the measurement.

    Returns

    The first point ID in the measurement.

    Returns number

  • Gets the isometric lengths of the measurement.

    Returns

    The isometric lengths of the measurement.

    Returns number[]

  • Gets the dimensions of the last line image in the measurement.

    Returns

    A promise that resolves to an object containing the dimensions of the last line image.

    Returns Promise<{ x1: number; x2: number; y1: number; y2: number }>

  • Gets the last point ID in the measurement.

    Returns

    The last point ID in the measurement.

    Returns number

  • Gets the number of points in the measurement.

    Returns

    The number of points in the measurement.

    Returns number

  • Gets the pixel center of the measurement.

    Returns

    A promise that resolves to the pixel center of the measurement.

    Returns Promise<Point2D>

  • Gets the previous point ID of a given point ID.

    Returns

    A promise that resolves to the previous point ID.

    Parameters

    • point_id: number

      The point ID to find the previous point for.

    Returns Promise<number>

  • Gets the rectangle of the measurement.

    Returns

    A promise that resolves to the rectangle of the measurement.

    Returns Promise<Rectangle>

  • Gets the total area of the measurement in square meters.

    Returns

    A promise that resolves to the total area in square meters.

    Returns Promise<number>

  • Gets the total area of the measurement in square millimeters.

    Returns

    A promise that resolves to the total area in square millimeters.

    Parameters

    • extraPoint: Vector3D = null

      Optional extra point to include in the calculation.

    Returns Promise<number>

  • Gets the total length of the measurement in meters.

    Returns

    A promise that resolves to the total length in meters.

    Returns Promise<number>

  • Gets the total length of the measurement in millimeters.

    Returns

    A promise that resolves to the total length in millimeters.

    Parameters

    • extraPoint: Vector3D = null

      Optional extra point to include in the calculation.

    Returns Promise<number>

  • Isometric Lengtgs contain Lenght Overrides

    Returns

    true if an isometric style measurement

    Returns boolean

  • Inserts a point into the measurement at the given coordinates.

    Parameters

    • x: number

      The x-coordinate of the point.

    • y: number

      The y-coordinate of the point.

    • faceId: Int64 = null

      Optional face ID associated with the point.

    • is_control: boolean = false

      Whether the point is a control point.

    Returns Promise<void>

  • Checks if the measurement is closed.

    Returns

    Whether the measurement is closed.

    Returns boolean

  • Checks if the specified screen coordinates are over a point in the measurement.

    Returns

    A promise that resolves to a boolean indicating whether the coordinates are over a point.

    Parameters

    • screenX: number

      The x-coordinate of the screen.

    • screenY: number

      The y-coordinate of the screen.

    Returns Promise<boolean>

  • Checks if the specified screen coordinates are over a segment in the measurement.

    Returns

    A promise that resolves to a boolean indicating whether the coordinates are over a segment.

    Parameters

    • screenX: number

      The x-coordinate of the screen.

    • screenY: number

      The y-coordinate of the screen.

    Returns Promise<boolean>

  • Checks if a point is accepted for addition to the measurement.

    Returns

    A promise that resolves to a boolean indicating whether the point is accepted for addition.

    Parameters

    • cur_point_id: number

      The current point ID.

    Returns Promise<boolean>

  • Moves the current point in the measurement to the specified screen coordinates.

    Parameters

    • screenX: number

      The x-coordinate of the screen.

    • screenY: number

      The y-coordinate of the screen.

    • Optional degreeSnapping: boolean

      Optional degree snapping flag.

    Returns Promise<void>

  • Moves the current point in the measurement to the specified 3D coordinates.

    Returns

    A promise that resolves to a boolean indicating success or failure.

    Parameters

    • x: number

      The x-coordinate to move the point to.

    • y: number

      The y-coordinate to move the point to.

    • z: number

      The z-coordinate to move the point to.

    Returns Promise<boolean>

  • Moves the current segment in the measurement to the specified coordinates.

    Returns

    A promise that resolves to a boolean indicating success or failure.

    Parameters

    • x: number

      The x-coordinate to move the segment to.

    • y: number

      The y-coordinate to move the segment to.

    Returns Promise<boolean>

  • Moves the points of the current segment in the measurement to the specified coordinates.

    Returns

    A promise that resolves to a boolean indicating success or failure.

    Parameters

    Returns Promise<boolean>

  • Moves the measurement to the specified offset.

    Parameters

    • offset: SceneOffset

      The offset to move the measurement to.

    Returns Promise<void>

  • Gets the face ID associated with a point in the measurement.

    Returns

    The face ID associated with the point.

    Parameters

    • pointId: number

      The point ID.

    Returns Int64

  • Reconstructs the labels of the measurement.

    Returns Promise<void>

  • Removes the last point from the measurement.

    Returns Promise<void>

  • Sets whether the measurement is closed.

    Parameters

    • closed: boolean

      Whether the measurement is closed.

    Returns void

  • Sets the color of the measurement.

    Parameters

    • color: RGB

      The color to set.

    • Optional pointColor: RGB

      Optional point color to set.

    Returns Promise<void>

  • Sets the current point in the measurement to the point at the specified screen coordinates.

    Returns

    A promise that resolves to a boolean indicating success or failure.

    Parameters

    • screenX: number

      The x-coordinate of the screen.

    • screenY: number

      The y-coordinate of the screen.

    Returns Promise<boolean>

  • Sets the current point in the measurement to the first point.

    Returns

    A promise that resolves to a boolean indicating success or failure.

    Returns Promise<boolean>

  • Sets the draw order of the measurement.

    Parameters

    • order: number

      The draw order to set.

    Returns Promise<void>

  • Sets whether the measurement is highlighted.

    Parameters

    • highlighted: boolean

      Whether the measurement is highlighted.

    • force: boolean = false

      Optional flag to force the update.

    Returns Promise<void>

  • Sets the isometric lengths of the measurement.

    Parameters

    • lengths: number[]

      The isometric lengths to set.

    Returns Promise<void>

  • Sets the length of a segment point in the measurement.

    Parameters

    • pointId: number

      The point ID of the segment point.

    • length: number

      The length to set.

    Returns void

  • Terminates the 3D arc point.

    Returns Promise<void>

  • Updates the labels of the measurement.

    Returns Promise<boolean>

  • Creates a new measurement instance.

    Returns

    A promise that resolves to the new measurement instance.

    Parameters

    • id: Int64

      The unique identifier for the measurement.

    • renderer: BaseRenderer

      The renderer associated with the measurement.

    • Optional settings: MeasurementSettings

      Optional settings for the measurement.

    • Optional data: MeasurementData

      Optional data for the measurement.

    Returns Promise<Measurement>