FC_DistancePointFromPlane - General Information
|
Type: |
Function |
|
Available as of: |
V1.0.3.0 |
|
Versions: |
Current version |
Calculates the distance of a point from a plane in a 3-dimensional space.
This calculates the distance of the point i_stPoint from the plane i_stPlane. The calculated distance is marked with a sign. The sign states in which of the half spaces defined by the plane i_stPlane the point i_stPoint is located. In addition, the perpendicular of the point onto the plane is calculated.
|
Input |
Data type |
Description |
|---|---|---|
|
i_stPoint |
Point |
|
|
i_stPlane |
Plane |
|
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 plane i_stPlane. |
|
q_lrParameter1 |
LREAL |
First parameter of the perpendicular q_stPerpendicular in the general parameter representation of the plane i_stPlane (see ST_Plane). |
|
q_lrParameter2 |
LREAL |
Second parameter of the perpendicular q_stPerpendicular in the general parameter representation of the plane i_stPlane (see ST_Plane). |
|
q_stPerpendicular |
Perpendicular of the point i_stPoint onto the plane i_stPlane |
|
q_etDiag |
q_etDiagExt |
Enumeration value |
Description |
|---|---|---|---|
|
OK |
0 |
Ok |
|
|
InputParameterInvalid |
45 |
The definition of Plane is not correct. |
|
Enumeration name: |
DefinitionPlane |
|
Enumeration value: |
45 |
|
Description: |
The definition of Plane is not correct. |
|
Issue |
Cause |
Solution |
|---|---|---|
|
- |
At the inputs i_stPlane.stSpanPoint1 and i_stPlane.stBasePoint, the same point has been transferred. |
The distance between i_stPlane.stSpanPoint1 and i_stPlane.stBasePoint must be at least Gc_lrZeroTolerance. |
|
- |
At the inputs i_stPlane.stSpanPoint2 and i_stPlane.stBasePoint, the same point has been transferred. |
The distance between i_stPlane.stSpanPoint2 and i_stPlane.stBasePoint must be at least Gc_lrZeroTolerance. |
|
- |
The points i_stPlane.stSpanPoint1, i_stPlane.stSpanPoint2 and i_stPlane.stBasePoint lie on a straight line. |
The points i_stPlane.stSpanPoint1, i_stPlane.stSpanPoint2 and i_stPlane.stBasePoint must not lie on a common straight line. |
|
Enumeration name: |
Ok |
|
Enumeration value: |
0 |
|
Description: |
Ok |
The distance has been calculated successfully.