MeasurementAPI#
Interface MeasurementAPI
Hierarchy
- MeasurementAPI
Methods
change
- changeMeasurement(measurementID, properties): MeasurementProperties 
- 
Changes one or more properties of a Measurement with the specified id. Parameters- 
measurementID: numberThe id of the Measurement you want to change. 
- 
properties: MeasurementPropertiesThe properties of the Measurement you want change. 
 Returns MeasurementPropertiesAn Object with the changed Properties. 
- 
create
- createMeasurement<T>(type, targets, properties?): number 
- 
Creates a new Measurement. Type Parameters- 
T extends keyof MeasurementTypeToTargetMap
 Parameters- 
type: TThe type of the Measurement. 
- 
targets: MeasurementTypeToTargetMap[T]The targets of the Measurement. 
- 
Optionalproperties: MeasurementPropertiesThe properties of the Measurement. 
 Returns numberThe ID of the created Measurement. 
- 
get
measure
- measureBetween(target0, target1): Promise<BetweenMeasurementResult> 
- 
Measures the distance and if possible the angle between two measurement targets. Parameters- 
target0: MeasurementTargetThe first measurement target. 
- 
target1: MeasurementTargetThe second measurement target. 
 Returns Promise<BetweenMeasurementResult>The result of the Measurement between the two specified targets. 
- 
measure
- measureTangent(topology, point): Promise<TangentMeasurementResult> 
- 
Measures the tangent of an edge at the specified point. Parameters- 
topology: {
 class: TOPOLOGY;
 value: TopologyHandle;
 }The topological target. - 
class: TOPOLOGYDescribes the MeasurementTargetClass of the target. 
- 
value: TopologyHandleDescribes the value of the target depending on the specified class. 
 
- 
- 
point: {
 class: POINT;
 value: [number, number, number];
 }The point target. - 
class: POINTDescribes 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
- measureThickness(topology, point): Promise<ThicknessMeasurementResult> 
- 
Measures the thickness of a shape at the specified point. Parameters- 
topology: {
 class: TOPOLOGY;
 value: TopologyHandle;
 }The topological target. - 
class: TOPOLOGYDescribes the MeasurementTargetClass of the target. 
- 
value: TopologyHandleDescribes the value of the target depending on the specified class. 
 
- 
- 
point: {
 class: POINT;
 value: [number, number, number];
 }The point target. - 
class: POINTDescribes 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
- removeMeasurement(measurementID, safe?): RemoveState 
- 
Removes the Measurement from the scene and all related Snapshots. Parameters- 
measurementID: number
- 
Optionalsafe: booleanPerforms a safe remove which interrupt the removal process if the Measurement is part of one or more Snapshots. 
 Returns RemoveState
- 
request
- requestMeasurement Data(measurementID): Promise<MeasurementProperties> 
- 
Returns the MeasurementProperties for the specified Measurement id. Parameters- 
measurementID: numberThe 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