FC_DistanceTwoLines3D - General Information
Type: |
Function |
Available as of: |
V1.0.3.0 |
Versions: |
Current version |
Calculates the distance between two straight lines in the 3-dimensional space.
Calculates the distance between the straight lines i_stLine1 and i_stLine2 in the 3-dimensional space. In addition, the base point of the common perpendicular will be calculated for both straight lines.
Output |
Data type |
Description |
---|---|---|
q_etDiag |
General library-independent statement on the diagnostic. A value not equal to ET_Diag.Ok corresponds to an diagnostic message. |
|
q_etDiagExt |
POU-specific output on the diagnostic. q_etDiag = ET_Diag.Ok -> Status message q_etDiag <> ET_Diag.Ok -> Diagnostic message |
|
q_lrDistance |
LREAL |
Calculated distance between the straight lines i_stLine1 and i_stLine2. |
q_lrParameterLine1 |
LREAL |
Parameter of the point q_stPerpendicularLine1 in the general parameter representation of the straight line i_stLine1 (see ST_Line3D). |
q_stPerpendicularLine1 |
Base point of the common perpendicular of the two straight lines on straight line 1 |
|
q_lrParameterLine2 |
LREAL |
Parameter of the point q_stPerpendicularLine2 in the general parameter representation of the straight line i_stLine2 (see ST_Line3D). |
q_stPerpendicularLine2 |
Base point of the common perpendicular of the two straight lines on straight line 2 |
q_etDiag |
q_etDiagExt |
Enumeration value |
Description |
---|---|---|---|
OK |
0 |
Ok |
|
InputParameterInvalid |
32 |
The definition of Line1 is not correct. |
|
InputParameterInvalid |
33 |
The definition of Line2 is not correct. |
Enumeration name: |
DefinitionLine1 |
Enumeration value: |
32 |
Description: |
The definition of Line1 is not correct. |
Issue |
Cause |
Solution |
---|---|---|
- |
At the inputs i_stLine1.stPoint1 and i_stLine1.stPoint2, the same point has been transferred. |
The distance between the points stPoint1 and stPoint2 which define the straight line i_stLine1 must be at least Gc_lrZeroTolerance. |
Enumeration name: |
DefinitionLine2 |
Enumeration value: |
33 |
Description: |
The definition of Line2 is not correct. |
Issue |
Cause |
Solution |
---|---|---|
- |
At the inputs i_stLine2.stPoint1 and i_stLine2.stPoint2, the same point has been transferred. |
The distance between the points stPoint1 and stPoint2 which define the straight line i_stLine2 must be at least Gc_lrZeroTolerance. |
Enumeration name: |
Ok |
Enumeration value: |
0 |
Description: |
Ok |
The distance has been calculated successfully.