CogMath CreateLineBisectingPointPoint Method Cognex VisionPro 9.7
Create a new line by bisecting the segment between the given points.

Namespace: Cognex.VisionPro
Assembly: Cognex.VisionPro.Core (in Cognex.VisionPro.Core.dll) Version: 73.0.0.0
Syntax

public static CogLine CreateLineBisectingPointPoint(
	double startX,
	double startY,
	double endX,
	double endY,
	string selectedSpaceName
)

Parameters

startX
Type: System Double

The x-coordinate of the start point.

startY
Type: System Double

The y-coordinate of the start point.

endX
Type: System Double

The x-coordinate of the end point.

endY
Type: System Double

The y-coordinate of the end point.

selectedSpaceName
Type: System String

The name of the CogCoordinateSpaceTree that the startX, startY, endX, and endY parameters are specified in.

Return Value

Type: CogLine

The new line.

Exceptions

ExceptionCondition
CogShapeCoordinatesMustDifferException

Start and endpoint coordinates must be different.

Remarks

Creates a new CogLine by bisecting the segment between the given points.

The new line has its reference point at the midpoint between (startX,startY) and (endX,endY). Its rotation is the rotation of the line segment (startX,startY) and (endX,endY) plus π/2 radians.

See Also