Create a new line by bisecting the segment between the given points.
Namespace: Cognex.VisionProAssembly: Cognex.VisionPro.Core (in Cognex.VisionPro.Core.dll) Version: 87.0.0.0
Syntax
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: CogLineThe new line.
Exceptions
| Exception | Condition |
|---|---|
| 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