Polygon DistanceToPoint Method Cognex VisionPro 9.10

Shortest distance from a boundary of this shape to the given point. Points within closed shapes return a distance less than zero.

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

public double DistanceToPoint(
	double x,
	double y
)

Return Value

Type: Double

The distance from the point ( x , y ) to the shape.

Implements

IShape DistanceToPoint(Double, Double)
Remarks

Returns the shortest distance from this shape to the given point in the shape's selected coordinate space. Points within closed shapes return a distance less than zero. The distance is measured to a meaningful part of the shape. For example, in measuring the distance to a PointMarker, only its center is considered meaningful, not the distance to one of the arms.

See Also