FC_CommonPointsOfParallelogramAndCircle

 

FC_CommonPointsOfParallelogramAndCircle - General Information

Overview

Type:

Function

Available as of:

V1.0.3.0

Versions:

Current version

Task

Calculates the intersections of a circle and a parallelogram in the 2-dimensional space.

Description

This calculates the intersections of the circle i_stCircle and the parallelogram i_stParal­lelogram. If there are no intersections, it will be additionally checked whether one object is contained in the other.

Interface

Input

Data type

Description

i_stParallelogram

ST_Parallelogram

Parallelogram

i_stCircle

ST_Circle2D

circle

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 intersections of i_stParallelogram and i_stCircle. Possible values: 0 ... 8

q_astCommonPoints

ARRAY[1..8] OF ST_Vector2D

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

Diagnostic Messages

q_etDiag

q_etDiagExt

Enumeration value

Description

OK

CircleInsideParallelogram

50

The circle lies inside of the parallelogram.

OK

Ok

0

Ok

OK

ParallelogramInsideCircle

51

Parallelogram lies inside the circle.

InputParameterInvalid

DefinitionParallelogram

37

The definition of Parallelogram is not correct.

InputParameterInvalid

RadiusRangeCircle

26

The radius of the circle is outside the valid range.

UnexpectedProgramBehavior

UnexpectedFeedback

1

An unintended detected error occurred during execution.

CircleInsideParallelogram

Enumeration name:

CircleInsideParallelogram

Enumeration value:

50

Description:

The circle lies inside of the parallelogram.

No intersections have been calculated since the entire circle lies inside the parallelogram.

DefinitionParallelogram

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.

Ok

Enumeration name:

Ok

Enumeration value:

0

Description:

Ok

The intersections have been calculated successfully.

ParallelogramInsideCircle

Enumeration name:

ParallelogramInsideCircle

Enumeration value:

51

Description:

Parallelogram lies inside the circle.

No intersections have been calculated since the entire parallelogram lies inside the circle.

RadiusRangeCircle

Enumeration name:

RadiusRangeCircle

Enumeration value:

26

Description:

The radius of the circle is outside the valid range.

Issue

Cause

Solution

-

At the input i_stCircle.lrRadius, a number <= 0 has been transferred.

The radius of the circle must be greater than zero.

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.