Hide menu
Loading...
Searching...
No Matches
Angle

Computes angles between supported geometric entities.

Angles can be computed for the following inputs:

  • two planar B-Rep faces;
  • two linear B-Rep edges;
  • three B-Rep vertices;
  • three 3D points.

Returns NaN if the angle cannot be computed for the provided inputs.

Constructors

Constructor

new Angle(): Angle

Returns

Angle

Methods

compute()

Call Signature

static compute(firstFace, secondFace, firstFaceTransformation?, secondFaceTransformation?): number

Computes the angle between two planar B-Rep faces.

The result is the smaller geometric angle between the underlying planes in the range [0, PI / 2]. Returns NaN if one of the faces is not based on a plane or if the measurement cannot be evaluated from the available data.

Parameters

firstFace

Face

First face.

secondFace

Face

Second face.

firstFaceTransformation?

Transformation | null

Optional transformation applied to the first face.

secondFaceTransformation?

Transformation | null

Optional transformation applied to the second face.

Returns

number

Call Signature

static compute(firstEdge, secondEdge, firstEdgeTransformation?, secondEdgeTransformation?): number

Computes the angle between two linear B-Rep edges.

The result is in the range [0, PI]. Returns NaN if one of the edges is not based on a line or if the measurement cannot be evaluated from the available data.

Parameters

firstEdge

Edge

First edge.

secondEdge

Edge

Second edge.

firstEdgeTransformation?

Transformation | null

Optional transformation applied to the first edge.

secondEdgeTransformation?

Transformation | null

Optional transformation applied to the second edge.

Returns

number

Call Signature

static compute(firstVertex, secondVertex, thirdVertex, firstVertexTransformation?, secondVertexTransformation?, thirdVertexTransformation?): number

Computes the angle defined by three B-Rep vertices.

The angle vertex is the second argument. The result is in the range [0, PI]. Returns NaN if the angle is undefined.

Parameters

firstVertex

Vertex

First vertex.

secondVertex

Vertex

Vertex at which the angle is measured.

thirdVertex

Vertex

Third vertex.

firstVertexTransformation?

Transformation | null

Optional transformation applied to the first vertex.

secondVertexTransformation?

Transformation | null

Optional transformation applied to the second vertex.

thirdVertexTransformation?

Transformation | null

Optional transformation applied to the third vertex.

Returns

number

Call Signature

static compute(firstPoint, secondPoint, thirdPoint, firstPointTransformation?, secondPointTransformation?, thirdPointTransformation?): number

Computes the angle defined by three 3D points.

The angle point is the second argument. The result is in the range [0, PI]. Returns NaN if the angle is undefined.

Parameters

firstPoint

Point

First point.

secondPoint

Point

Point at which the angle is measured.

thirdPoint

Point

Third point.

firstPointTransformation?

Transformation | null

Optional transformation applied to the first point.

secondPointTransformation?

Transformation | null

Optional transformation applied to the second point.

thirdPointTransformation?

Transformation | null

Optional transformation applied to the third point.

Returns

number