FC_CommonPointsOfParallelogramAndLine
FC_CommonPointsOfParallelogramAndLine - General Information
Type: |
Function |
Available as of: |
V1.0.3.0 |
Versions: |
Current version |
Calculates the intersections of a straight line and a parallelogram in the 2-dimensional space.
Calculates the intersections of the straight line i_stLine and the parallelogram i_stParallelogram. If a straight line coincides with one of the parallelogram's edges, the number of common points is 99. If the straight line does not intersect with the parallelogram at all, the number of common points is 0.
Input |
Data type |
Description |
---|---|---|
i_stParallelogram |
Parallelogram |
|
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_diNumberOfCommonPoints |
DINT |
Number of intersections of i_stParallelogram and i_stLine. Possible values: 0, 1, 2 and 99 (an infinite number of intersections, i_stLine coincides with one edge of i_stParallelogram). |
q_astCommonPoints |
ARRAY[1..2] OF ST_Vector2D |
Array which contains the intersections of i_stParallelogram and i_stLine (only the first iq_diNumberOfCommonPoints entries are valid). |
q_etDiag |
q_etDiagExt |
Enumeration value |
Description |
---|---|---|---|
OK |
0 |
Ok |
|
InputParameterInvalid |
31 |
The definition of Line is not correct. |
|
InputParameterInvalid |
37 |
The definition of Parallelogram is not correct. |
|
UnexpectedProgramBehavior |
1 |
An unintended detected error occurred during execution. |
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: |
DefinitionParallelogram |
Enumeration value: |
37 |
Description: |
The definition of Parallelogram is not correct. |
Issue |
Cause |
Solution |
---|---|---|
- |
At the inputs i_stParallelogram.stSpanPoint1 and i_stParallelogram.stBasePoint, the same point has been transferred. |
The distance between i_stParallelogram.stSpanPoint1 and i_stParallelogram.stBasePoint must be at least Gc_lrZeroTolerance. |
- |
At the inputs i_stParallelogram.stSpanPoint2 and i_stParallelogram.stBasePoint, the same point has been transferred. |
The distance between i_stParallelogram.stSpanPoint2 and i_stParallelogram.stBasePoint must be at least Gc_lrZeroTolerance. |
Enumeration name: |
Ok |
Enumeration value: |
0 |
Description: |
Ok |
The intersections have been calculated successfully.
Enumeration name: |
UnexpectedFeedback |
Enumeration value: |
1 |
Description: |
An unintended detected error occurred during execution. |
Issue |
Cause |
Solution |
---|---|---|
- |
An error occurred in the internal execution. |
Please inform the support team about this error. |