FC_DistancePointFromLine3D - General Information
Type: |
Function |
Available as of: |
V1.0.3.0 |
Versions: |
Current version |
Calculates the distance of a point from a straight line in a 3-dimensional space.
This calculates the distance of the point i_stPoint from the straight line i_stLine. In addition, the perpendicular of the point onto the straight line is calculated.
Input |
Data type |
Description |
---|---|---|
i_stPoint |
Point |
|
i_stLine |
Straight |
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 of the point i_stPoint from the straight line i_stLine. |
q_lrParameter |
LREAL |
Parameter of the perpendicular iq_stPerpendicular in the general parameter representation of the straight line i_stLine (see ST_Line3D). |
q_stPerpendicular |
Perpendicular of the point i_stPoint onto the straight line i_stLine. |
q_etDiag |
q_etDiagExt |
Enumeration value |
Description |
---|---|---|---|
OK |
0 |
Ok |
|
InputParameterInvalid |
31 |
The definition of Line is not correct. |
Enumeration name: |
DefinitionLine |
Enumeration value: |
31 |
Description: |
The definition of Line is not correct. |
Issue |
Cause |
Solution |
---|---|---|
- |
At the inputs i_stLine.stPoint1 and i_stLine.stPoint2, the same point has been transferred. |
The distance between the points stPoint1 and stPoint2 which define the straight line i_stLine must be at least Gc_lrZeroTolerance. |
Enumeration name: |
Ok |
Enumeration value: |
0 |
Description: |
Ok |
The distance has been calculated successfully.