Polygon NumVertices Property Cognex VisionPro 9.22
Get

Number of vertices in this polygon.

Set

Sets NumVertices.

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

public int NumVertices { get; set; }

Property Value

Type: Int32
Default Value: 0
Exceptions

ExceptionCondition
ArgumentExceptionThe number of vertices is < 0.
Remarks

Gets the number of vertices in this polygon. The following table describes what happens when you set the number of vertices. Changing the number of vertices

Operation

Effect

New value > current Cognex.Vision.Polygon.NumVertices

New vertices with coordinates (0,0) are added to the end of the list of vertices.

New value < current Cognex.Vision.Polygon.NumVertices

Existing vertices are removed from the end of the list of vertices.

New value = 0

All vertices removed.

Remarks

Changed Raised when the number of vertices changes.

See Also