ArcGIS Pro 3.5 API Reference Guide
ArcGIS.Core.Geometry Namespace / IGeometryEngine Interface / Smooth Method
The multipart to convert.
The maximum allowed deviation. If maxDeviation is > 0, the multipart is generalized first by the Douglas-Peucker method using the maxDeviation value. Bezier curves are then created for each of the remaining segments. Otherwise, every segment of the input multipart becomes a separate Bezier curve. GeometryEngine Smooth
Example

In This Topic
    Smooth Method (IGeometryEngine)
    In This Topic
    Converts the multipart into a multipart containing only Bezier curves segments.
    Syntax

    Parameters

    multipart
    The multipart to convert.
    maxDeviation
    The maximum allowed deviation. If maxDeviation is > 0, the multipart is generalized first by the Douglas-Peucker method using the maxDeviation value. Bezier curves are then created for each of the remaining segments. Otherwise, every segment of the input multipart becomes a separate Bezier curve. GeometryEngine Smooth

    Return Value

    A multipart containing only Bezier curve segments.
    Exceptions
    ExceptionDescription
    The input multipart is null.
    Remarks
    The created Bezier curve multipart is an approximation of the original multipart. At each vertex, the adjoining Bezier curves have complementary tangents which create a continuous (smooth) transition between segments.
    Example
    Smooth a multipart
    // smooth with a maxDeviation of 0
    Polyline smoothPolyline = GeometryEngine.Instance.Smooth(polyline, 0) as Polyline;
    
    // smooth with a maxDeviation of 0.5
    smoothPolyline = GeometryEngine.Instance.Smooth(polyline, 0.5) as Polyline;
    
    // smooth a polygon with a maxDeviation of 0
    Polygon smoothPolygon = GeometryEngine.Instance.Smooth(polygon, 0) as Polygon;
    
    // maxDeviation < 0 behaves as if maxDeviation = 0
    smoothPolygon = GeometryEngine.Instance.Smooth(polygon, -1) as Polygon;
    
    // NaN maxDeviation behaves as if maxDeviation = 0
    smoothPolygon = GeometryEngine.Instance.Smooth(polygon, double.NaN) as Polygon;
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.5 or higher.
    See Also