Skip to main content

Measure API

Measure.MeasureScene

Scene with objects being measured. Brep files are required

Methods​

areaFromPolygon​

â–¸ areaFromPolygon(vertices, normals): Object

Calculates the area from polygon. Treat polygon as closed. y is treated as height and is ignored.

Parameters​

NameType
verticesReadonlyVec3[]
normalsReadonlyVec3[]

Returns​

Object

NameType
areanumber
polygonReadonlyVec3[]

collision​

â–¸ collision(a, b, setting?): Promise<CollisionValues>

Returns collision values between 2 entities currently only works for two cylinders

Parameters​

NameType
aSelectedEntity
bSelectedEntity
setting?MeasureSettings

Returns​

Promise<CollisionValues>


followParametricObjectFromPosition​

â–¸ followParametricObjectFromPosition(id, selectionPosition, setting?): Promise<FollowParametricObject>

Returns an object that can be used to calculate camera posisiotns that follow the object Supports Edges, curve segments and cylinder

Parameters​

NameType
idObjectId
selectionPositionReadonlyVec3
setting?MeasureSettings

Returns​

Promise<FollowParametricObject>


followParametricObjects​

â–¸ followParametricObjects(ids, setting?): Promise<FollowParametricObject>

Returns an object that can be used to calculate camera posisiotns that follow the objects Supports multiple cylinder, In case of one object, and that object only containing one curve segment it will return curve segment

Parameters​

NameType
idsObjectId[]
setting?MeasureSettings

Returns​

Promise<FollowParametricObject>


getCameraValues​

â–¸ getCameraValues(a, cameraDir): Promise<CameraValues>

Get suggested camea values for selected object For cylinder values snap to the closest axis on the cylinder

Parameters​

NameType
aMeasureEntity
cameraDirvec3

Returns​

Promise<CameraValues>


getCrossSections​

â–¸ getCrossSections(roadIds, profileNumber): Promise<RoadCrossSection[]>

Parameters​

NameType
roadIdsstring[]
profileNumbernumber

Returns​

Promise<RoadCrossSection[]>


getCrossSlope​

â–¸ getCrossSlope(roadId): Promise<CrossSlope>

Parameters​

NameType
roadIdstring

Returns​

Promise<CrossSlope>


getParametricProduct​

â–¸ getParametricProduct(id): Promise<any>

Returns the entire parametric hierarchy, returns undefined upon abort

Parameters​

NameType
idObjectId

Returns​

Promise<any>


getProfileViewFromEntity​

â–¸ getProfileViewFromEntity(entity, setting?): Promise<Profile>

Returns the profile view of a linestrip where x is the length of the line and y is the height

Parameters​

NameType
entityMeasureEntity
setting?MeasureSettings

Returns​

Promise<Profile>


getProfileViewFromMultiSelect​

â–¸ getProfileViewFromMultiSelect(ids, setting?): Promise<Profile>

Returns the profile view of selected objects where x is the length of the line and y is the height, currently only supports cylinders

Parameters​

NameType
idsObjectId[]
setting?MeasureSettings

Returns​

Promise<Profile>


getRoadProfile​

â–¸ getRoadProfile(roadId): Promise<RoadProfiles>

Parameters​

NameType
roadIdstring

Returns​

Promise<RoadProfiles>


inspectObject​

â–¸ inspectObject(productId, objectType): Promise<ManholeMeasureValues>

Object inspection, where the entire parametric object is treated as the input object type

Parameters​

NameType
productIdnumber
objectType"manhole"

Returns​

Promise<ManholeMeasureValues>


measure​

â–¸ measure(a, b?, settingA?, settingB?): Promise<MeasurementValues>

Measure objet, if b is undefined then single measure values are returned else the measurement between 2 objects

Parameters​

NameType
aMeasureEntity
b?MeasureEntity
settingA?MeasureSettings
settingB?MeasureSettings

Returns​

Promise<MeasurementValues>


measureLineStrip​

â–¸ measureLineStrip(vertices): LineStripMeasureValues

Measure between multiple points.

Parameters​

NameType
verticesReadonlyVec3[]

Returns​

LineStripMeasureValues


measureToPoint​

â–¸ measureToPoint(a, b, setting?): Promise<DuoMeasurementValues>

Measure distance between a measurement object an a 3d point

Parameters​

NameType
aMeasureEntity
bReadonlyVec3
setting?MeasureSettings

Returns​

Promise<DuoMeasurementValues>


pickMeasureEntity​

â–¸ pickMeasureEntity(id, selectionPosition, tolerance?): Promise<{ connectionPoint?: vec3 ; entity: MeasureEntity ; status: BrepStatus }>

Returns the measure entity for given object and location*

Parameters​

NameType
idObjectId
selectionPositionReadonlyVec3
tolerance?SnapTolerance

Returns​

Promise<{ connectionPoint?: vec3 ; entity: MeasureEntity ; status: BrepStatus }>


pickMeasureEntityOnCurrentObject​

â–¸ pickMeasureEntityOnCurrentObject(id, selectionPosition, tolerance): Promise<{ connectionPoint?: vec3 ; entity: MeasureEntity ; status: BrepStatus }>

Returns the measure entity for given object and location if the current object is selected This is much faster than pickMeasureEntity and can be used for hover*

Parameters​

NameType
idObjectId
selectionPositionReadonlyVec3
toleranceSnapTolerance

Returns​

Promise<{ connectionPoint?: vec3 ; entity: MeasureEntity ; status: BrepStatus }>


pointToPoint​

â–¸ pointToPoint(a, b): DuoMeasurementValues

Measure distance between 2 points

Parameters​

NameType
aReadonlyVec3
bReadonlyVec3

Returns​

DuoMeasurementValues


reverseProfile​

â–¸ reverseProfile(inProfile): Profile

Return reveresed input profile

Parameters​

NameType
inProfileProfile

Returns​

Profile


swapCylinder​

â–¸ swapCylinder(entity, to): Promise<MeasureEntity>

Swaps between inner and outer cylinder, returns undefined if there is only one

Parameters​

NameType
entityMeasureEntity
to"inner" | "outer"

Returns​

Promise<MeasureEntity>