This document is archived and information here might be outdated.  Recommended version.


IRing.Close Method (ArcObjects .NET 10.6 SDK)
ArcObjects Library Reference (Geometry)  

IRing.Close Method

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
);

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

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.

Remarks

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.

See Also

IRing Interface

.NET Samples

3D multipatch examples (Code Files: CompositeExamples ExtrusionExamples RingGroupExamples)