FC_CommonPointsOfTwoParallelograms

 

FC_CommonPointsOfTwoParallelograms - General Information

Overview

Type:

Function

Available as of:

V1.0.3.0

Versions:

Current version

Task

Calculates the intersections of two parallelograms in the 2-dimensional space.

Description

Calculates the intersections of the parallelograms i_stParallelogram1 and i_stParallel­ogram2. If there are no intersections, an additional verification is performed to determine whether one of the objects is contained in the other.

Interface

Input

Data type

Description

i_stParallelogram1

ST_Parallelogram

Parallelogram 1

i_stParallelogram2

ST_Parallelogram

Parallelogram 2

Output

Data type

Description

q_etDiag

GD.ET_Diag

General library-independent statement on the diagnostic.

A value not equal to ET_Diag.Ok corresponds to an diagnostic message.

q_etDiagExt

ET_DiagExt

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 the intersections of i_stParallelogram1 and i_stParallelogram2

q_astCommonPoints

ARRAY[1..8] OF ST_Vector2D

Array which contains the intersections of i_stParallelogram1 and i_stParallelogram2 (only the first q_diNumberOfCommonPoints entries are valid).

Diagnostic Messages

q_etDiag

q_etDiagExt

Enumeration value

Description

OK

Ok

0

Ok

OK

Parallelogram1InsideParallelogram2

48

Parallelogram 1 lies inside parallelogram 2.

OK

Parallelogram2InsideParallelogram1

49

Parallelogram 2 lies inside parallelogram 1.

InputParameterInvalid

DefinitionParallelogram1

38

The definition of Parallelogram1 is not correct.

InputParameterInvalid

DefinitionParallelogram2

39

The definition of Parallelogram2 is not correct.

UnexpectedProgramBehavior

UnexpectedFeedback

1

An unintended detected error occurred during execution.

DefinitionParallelogram1

Enumeration name:

DefinitionParallelogram1

Enumeration value:

38

Description:

The definition of Parallelogram1 is not correct.

Issue

Cause

Solution

-

At the inputs i_stParallelogram1.stSpanPoint1 and i_stParallelogram1.stBasePoint, the same point has been transferred.

The distance between i_stParallelogram1.stSpanPoint1 and i_stParallelogram1.stBasePoint must be at least Gc_lrZeroTolerance.

-

At the inputs i_stParallelogram1.stSpanPoint2 and i_stParallelogram1.stBasePoint, the same point has been transferred.

The distance between i_stParallelogram1.stSpanPoint2 and i_stParallelogram1.stBasePoint must be at least Gc_lrZeroTolerance.

DefinitionParallelogram2

Enumeration name:

DefinitionParallelogram2

Enumeration value:

39

Description:

The definition of Parallelogram2 is not correct.

Issue

Cause

Solution

-

At the inputs i_stParallelogram2.stSpanPoint1 and i_stParallelogram2.stBasePoint, the same point has been transferred.

The distance between i_stParallelogram2.stSpanPoint1 and i_stParallelogram2.stBasePoint must be at least Gc_lrZeroTolerance.

-

At the inputs i_stParallelogram2.stSpanPoint2 and i_stParallelogram2.stBasePoint, the same point has been transferred.

The distance between i_stParallelogram2.stSpanPoint2 and i_stParallelogram2.stBasePoint must be at least Gc_lrZeroTolerance.

Ok

Enumeration name:

Ok

Enumeration value:

0

Description:

Ok

The intersections have been calculated successfully.

Parallelogram1InsideParallelogram2

Enumeration name:

Parallelogram1InsideParallelogram2

Enumeration value:

48

Description:

Parallelogram 1 lies inside parallelogram 2.

No intersections have been calculated since parallelogram 1 entirely lies inside parallelogram 2.

Parallelogram2InsideParallelogram1

Enumeration name:

Parallelogram2InsideParallelogram1

Enumeration value:

49

Description:

Parallelogram 2 lies inside parallelogram 1.

No intersections have been calculated since parallelogram 2 entirely lies inside parallelogram 1.

UnexpectedFeedback

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.