This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IR > IRing Interface > IRing.Close Method (ArcObjects .NET 10.5 SDK) |
Makes sure that this ring is closed by adding a line segment between the ring's 'to' and 'from' points if necessary.
[Visual Basic .NET]
Public Sub Close ( _
)
[C#] public void Close ( );
[C++]
HRESULT Close(
void
);
Checks whether or not the From and To Points of the Path occur at the same Point. If the From and To Point have the same X and Y coordinates, the Ring is considered closed, and no action is taken. However, if the From and To Points are not at the same X and Y coordinates, a Line segment is added at the end of the Ring between the To Point and the From Point. This Line segment completes the Ring making it closed.
This method should generally not be called in a 3D context, due to the fact that Close() only compares X and Y and not Z vertex values. Instead, the first point in the point collection should be manually re-added as the last point in the point collection to close the geometry.