Return the index number of the vertex nearest to the supplied X,Y coordinates. Generates an error if there are no vertices.
Namespace: Cognex.VisionProAssembly: Cognex.VisionPro.Core (in Cognex.VisionPro.Core.dll) Version: 93.1.0.0
Syntax
Parameters
- x
- Type: System Double
X-coordinate.
- y
- Type: System Double
X-coordinate.
Return Value
Type: Int32Index or the nearest vertex.
Exceptions
| Exception | Condition |
|---|---|
| CogShapeDegeneratePolygonException | NumVertices < 1. |
Remarks
Returns the index number of the vertex nearest to the supplied (x,y) coordinates.
See Also