MeasurementAPI#
Interface MeasurementAPI
Hierarchy
- MeasurementAPI
Methods
change Measurement
- change
Measurement(measurementID, properties): MeasurementProperties -
Changes one or more properties of a Measurement with the specified id.
Parameters
-
measurementID: number
The id of the Measurement you want to change.
-
properties: MeasurementProperties
The properties of the Measurement you want change.
Returns MeasurementProperties
An Object with the changed Properties.
-
create Measurement
- create
Measurement<T>(type, targets, properties?): number -
Creates a new Measurement.
Type Parameters
-
T extends keyof MeasurementTypeToTargetMap
Parameters
-
type: T
The type of the Measurement.
-
targets: MeasurementTypeToTargetMap[T]
The targets of the Measurement.
-
Optional
properties: MeasurementPropertiesThe properties of the Measurement.
Returns number
The ID of the created Measurement.
-
get Measurements
measure Between
- measure
Between(target0, target1): Promise<BetweenMeasurementResult> -
Measures the distance and if possible the angle between two measurement targets.
Parameters
-
target0: MeasurementTarget
The first measurement target.
-
target1: MeasurementTarget
The second measurement target.
Returns Promise<BetweenMeasurementResult>
The result of the Measurement between the two specified targets.
-
measure Tangent
- measure
Tangent(topology, point): Promise<TangentMeasurementResult> -
Measures the tangent of an edge at the specified point.
Parameters
-
topology: {
class: TOPOLOGY;
value: TopologyHandle;
}The topological target.
-
class: TOPOLOGY
Describes the MeasurementTargetClass of the target.
-
value: TopologyHandle
Describes the value of the target depending on the specified class.
-
-
point: {
class: POINT;
value: [number, number, number];
}The point target.
-
class: POINT
Describes the MeasurementTargetClass of the target.
-
value: [number, number, number]
Describes the value of the target depending on the specified class.
-
Returns Promise<TangentMeasurementResult>
The result of the tangent measurement.
-
measure Thickness
- measure
Thickness(topology, point): Promise<ThicknessMeasurementResult> -
Measures the thickness of a shape at the specified point.
Parameters
-
topology: {
class: TOPOLOGY;
value: TopologyHandle;
}The topological target.
-
class: TOPOLOGY
Describes the MeasurementTargetClass of the target.
-
value: TopologyHandle
Describes the value of the target depending on the specified class.
-
-
point: {
class: POINT;
value: [number, number, number];
}The point target.
-
class: POINT
Describes the MeasurementTargetClass of the target.
-
value: [number, number, number]
Describes the value of the target depending on the specified class.
-
Returns Promise<ThicknessMeasurementResult>
The result of the thickness measurement.
-
remove Measurement
- remove
Measurement(measurementID, safe?): RemoveState -
Removes the Measurement from the scene and all related Snapshots.
Parameters
-
measurementID: number
-
Optional
safe: booleanPerforms a safe remove which interrupt the removal process if the Measurement is part of one or more Snapshots.
Returns RemoveState
-
request Measurement Data
- request
Measurement Data(measurementID): Promise<MeasurementProperties> -
Returns the MeasurementProperties for the specified Measurement id.
Parameters
-
measurementID: number
The id of the Measurement you want to request the data for.
Returns Promise<MeasurementProperties>
The requested Measurement properties.
-
These functions allow the creation of Measurements.
Example