Polygon NearestVertex Method Cognex VisionPro 9.10

Return the index number of the vertex nearest to the supplied X,Y coordinates. Generates an error if there are no vertices.

Namespace: Cognex.Vision
Assembly: Cognex.Vision.Core.Net (in Cognex.Vision.Core.Net.dll) Version: 9.10.0.0
Syntax

public int NearestVertex(
	double x,
	double y
)

Return Value

Type: Int32

Index or the nearest vertex.

Exceptions

ExceptionCondition
ShapeExceptionNumVertices < 1.
Remarks

Returns the index number of the vertex nearest to the supplied (x,y) coordinates.

See Also