M_Rhino_Geometry_Curve_Fit - mcneel/rhinocommon-api-docs GitHub Wiki

Curve.Fit Method

Fits a new curve through an existing curve.

Namespace: Rhino.Geometry
Assembly: RhinoCommon (in RhinoCommon.dll) Version: Rhino 6.0

Syntax

C#

public Curve Fit(
	int degree,
	double fitTolerance,
	double angleTolerance
)

VB

Public Function Fit ( 
	degree As Integer,
	fitTolerance As Double,
	angleTolerance As Double
) As Curve

Parameters

 

degree
Type: System.Int32
The degree of the returned Curve. Must be bigger than 1.
fitTolerance
Type: System.Double
The fitting tolerance. If fitTolerance is RhinoMath.UnsetValue or <=0.0, the document absolute tolerance is used.
angleTolerance
Type: System.Double
The kink smoothing tolerance in radians. If angleTolerance is 0.0, all kinks are smoothed

If angleTolerance is >0.0, kinks smaller than angleTolerance are smoothed

If angleTolerance is RhinoMath.UnsetValue or <0.0, the document angle tolerance is used for the kink smoothing

Return Value

Type: Curve
Returns a new fitted Curve if successful, null on failure.

Version Information

Supported in: 6.0.16224.21491, 5D58w

See Also

Reference

Curve Class
Rhino.Geometry Namespace

⚠️ **GitHub.com Fallback** ⚠️