CogGeneralContour RemoveSegments Method Cognex VisionPro 9.20
Removes all segments from StartSegment up to, but not including EndSegment, possibly disconnecting at StartSegment's start point, and/or EndSegment's start point. If EndSegment is Nothing, segments are removed from StartSegment to the end.

Namespace: Cognex.VisionPro
Assembly: Cognex.VisionPro.Core (in Cognex.VisionPro.Core.dll) Version: 80.0.0.0
Syntax

public void RemoveSegments(
	CogGeneralContourSegmentIterator startSegment,
	CogGeneralContourSegmentIterator endSegment
)

Parameters

startSegment
Type: Cognex.VisionPro CogGeneralContourSegmentIterator

The first segment to remove.

endSegment
Type: Cognex.VisionPro CogGeneralContourSegmentIterator

The ending segment. This segment is not removed. If this value is Nothing, all segments from startSegment to the end are removed.

Events

Event TypeReason
CogGeneralContour Changed

Fires when the segments are removed.

The following state flags may be affected:

    Exceptions

    ExceptionCondition
    ArgumentException

    startSegment is Nothing.

    CogIteratorInvalidIteratorException

    startSegment is invalid.

    CogShapeBadContourSegmentSetException

    startSegment is positioned after endSegment.

    Remarks

    Removes all segments from startSegment up to, but not including endSegment. RemoveSegments(CogGeneralContourSegmentIterator, CogGeneralContourSegmentIterator) may disconnect the contour at startSegment's or endSegment's start point. If endSegment is Nothing, all of the segments from startSegment to the end of the contour shape are removed.

    Note: Any CogGeneralContourSegmentIterator positioned at startSegment through the segment before endSegment become invalid. Other iterators are unchanged.

    See Also