FindBisectingLine Method

NI Vision for Visual Basic

FindBisectingLine Method

Syntax

CWIMAQVision.FindBisectingLine Line1, Line2, BisectingLine

Return Type

Long

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

Purpose

Computes a line that bisects the two lines specified by Line1 and Line2.

Parameters

Line1 As CWIMAQLine

Defines the first line.

Line2 As CWIMAQLine

Defines the second line.

BisectingLine As CWIMAQLine

On return, the line that bisects Line1 and Line2.

Example

Dim line1 As New CWIMAQLine
Dim line2 As New CWIMAQLine
Dim bisectingLine As New CWIMAQLine

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

' Find the bisecting line
CWIMAQVision1.FindBisectingLine line1, line2, bisectingLine