FindIntersectionPoint Method

NI Vision for Visual Basic

FindIntersectionPoint Method

Syntax

CWIMAQVision.FindIntersectionPoint Line1, Line2, IntersectionPoint

Return Type

Long

On success, this method returns 0. On failure, this method returns a negative number.

Purpose

Computes the intersection of two lines.

Parameters

Line1 As CWIMAQLine

Defines the first line.

Line2 As CWIMAQLine

Defines the second line.

IntersectionPoint As CWIMAQPoint

On return, the intersection point of the two lines.

Example

Dim line1 As New CWIMAQLine
Dim line2 As New CWIMAQLine
Dim point As New CWIMAQPoint

' Initialize the lines
line1.Initialize 10, 10, 100, 100
line2.Initialize -40, -100, 20, 30

' Find the intersection
CWIMAQVision1.FindIntersectionPoint line1, line2, point