FC_ PointLine3DClosestPoint - General Information

Overview

Type:

Function

Available as of:

V1.0.0.0

Versions:

Current version

This chapter provides information on:

Description

The function evaluates the closest point between a 3D line and a 3D point, and it returns the coordinates of such point. The returned point is always on the line described by i_stLine.

Interface

Input

Data type

Description

i_stPoint

SE_MATH.ST_Vector3D

A 3D point.

i_stLine

SE_MATH.ST_Line3D

A 3D line on which the closest point is evaluated.

Output

Data type

Description

q_xError

BOOL

If this output is set to TRUE, an error has been detected. For details, refer to q_etResult and q_etResultMsg.

q_etResult

ET_Result

Provides diagnostic and status information.

If q_xError = FALSE, then q_etResult provides status information.

If q_xError = TRUE, then q_etResult provides diagnostic/error information.

The enumeration ET_Result contains the possible values of the POU operation results.

q_sResultMsg

STRING[80]

Provides additional information about the current status of the POU.

Return Value

Data type

Description

SE_MATH.ST_Vector3D

The function evaluates the coordinates of the closest point between a 3D point and a 3D line.

Diagnostic Messages

q_xError

q_etResult

Enumeration value

Description

FALSE

Ok

0

Success

TRUE

PointsIdentical

3

Two points have the same coordinates.

Ok

Enumeration name:

Ok

Enumeration value:

0

Description:

Success

PointsIdentical

Enumeration name:

PointsIdentical

Enumeration value:

3

Description:

Two points have the same coordinates.

Issue

Cause

Solution

Evaluation of the project point was not successful.

i_stLine.stPoint1 and i_stLine.stPoint2 have the same coordinates.

Verify that i_stLine.stPoint1 and i_stLine.stPoint2 have different coordinates.