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


IConstructCurve2.ApproximateByBeziers Method (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (Geometry)  

IConstructCurve2.ApproximateByBeziers Method

Constructs a curve which approximates the input curve by a small number of Bezier segments.

[Visual Basic .NET]
Public Sub ApproximateByBeziers ( _
    ByVal pInCurve As IPolycurve, _
    [ByRef pMaxDistance As Object], _
    [ByRef smoothClosedParts As Object] _
)
[C#]
public void ApproximateByBeziers (
    IPolycurve pInCurve,
    ref object pMaxDistance,
    ref object smoothClosedParts
);
[C#]

Optional Values

pMaxDistance   To indicate that this parameter is undefined, first define a variable object Missing=Type.Missing; then pass this in as ref Missing.
smoothClosedParts   To indicate that this parameter is undefined, first define a variable object Missing=Type.Missing; then pass this in as ref Missing.
[C++]
HRESULT ApproximateByBeziers(
  IPolycurve* pInCurve,
  VARIANT* pMaxDistance,
  VARIANT* smoothClosedParts
);
[C++]

Parameters pInCurve
pInCurve is a parameter of type IPolycurve pMaxDistance [optional] pMaxDistance is a parameter of type VARIANT
To indicate this parameter is undefined pass a reference to a VARIANT with type VT_ERROR and scode value of DISP_E_PARAMNOTFOUND. smoothClosedParts [optional] smoothClosedParts is a parameter of type VARIANT
To indicate this parameter is undefined pass a reference to a VARIANT with type VT_ERROR and scode value of DISP_E_PARAMNOTFOUND.

Product Availability

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

Description

ApproximateByBeziers constructs a curve consisting Bezier segments that being the approximation of input polycurve inCurve.  The maxDistance parameter defines the maximum distance between the vertices of the input curve to the generated curve.  If maxDistance is zero then for each segment of inCurve there is one Bezier segment created for this geometry.  The parameter smoothClosedParts defines whether or not the last segment of the input polyline curve which is closed should be smoothed with the first segment of the curve.  The smoothClosedParts parameter is only used if both this geometry and inCurve are polylines.  If this geometry or inCurve is a polygon then smoothClosedParts is overwritten and set to true.

The resulting geometry is a polygon or polyline depending on the type of "this geometry" rather than the type of inCurve.  If "this geometry" is a polygon and inCurve is a polyline with any open path, an error is returned (result is an empty polygon).

See Also

IConstructCurve2 Interface