ClosestPointsBF

Find the closest distance between two 2d point sets of the same type, using a brute force approach.

Syntax

Definition:

HRESULT ClosestPointsBF(
    HRESULT           hrPrev,
    ITcVnContainer*   ipPointSet1,
    ITcVnContainer*   ipPointSet2,
    double&           fMinDist,
    TcVnPoint2_LREAL& aPoint1,
    TcVnPoint2_LREAL& aPoint2
)

Parameters

Name

Type

Description

hrPrev

HRESULT

HRESULT indicating the result of previous operations (If SUCCEEDED(hrPrev) equals false, no operation is executed.)

ipPointSet1

ITcVnContainer*

Container with 1st set of 2d points

ipPointSet2

ITcVnContainer*

Container with 2nd set of 2d points

fMinDist

double&

Returns the minimum distance between 2 points of the different point sets

aPoint1

TcVnPoint2_LREAL&

Returns the point out of ipPointSet1, for which fMinDist is achieved

aPoint2

TcVnPoint2_LREAL&

Returns the point out of ipPointSet2, for which fMinDist is achieved

ClosestPointsBF 1: Return value

HRESULT

Required License

TC3 Vision Metrology 2D

System Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT V3.1.4024.54 or later

PC or CX (x64) with PL50, e.g. Intel 4-core Atom CPU

Tc3_Vision