Represents a base class that is common to most RhinoCommon curve types.

A curve represents an entity that can be all visited by providing a single parameter, usually called t.

Constructors

Curve

#
protected Curve(SerializationInfo info, StreamingContext context)
Protected serialization constructor for internal use.
info (SerializationInfo)Serialization data.
context (StreamingContext)Serialization stream.

Properties

Degree

#Since v5.0
public int Degree { get; }
Gets the maximum algebraic degree of any span or a good estimate if curve spans are not algebraic.

Dimension

#Since v5.0
public int Dimension { get; }
Gets the dimension of the object.

The dimension is typically three. For parameter space trimming curves the dimension is two. In rare cases the dimension can be one or greater than three.

Disposed

public bool Disposed { get; }
Indicates if this object has been disposed or the document it originally belonged to has been disposed.
inherited fromCommonObject

Domain

#Since v5.0
public Interval Domain { get; set; }
Gets or sets the domain of the curve.

HasBrepForm

public bool HasBrepForm { get; }
Returns true if the Brep.TryConvertBrep function will be successful for this object
inherited fromGeometryBase

HasUserData

public bool HasUserData { get; }
Gets true if this class has any custom information attached to it through UserData.
inherited fromCommonObject

IsClosed

#Since v5.0
public bool IsClosed { get; }
Gets a value indicating whether or not this curve is a closed curve.

IsDeformable

public bool IsDeformable { get; }
true if object can be accurately modified with "squishy" transformations like projections, shears, and non-uniform scaling.
inherited fromGeometryBase

IsDocumentControlled

public sealed override bool IsDocumentControlled { get; }
If true this object may not be modified. Any properties or functions that attempt to modify this object when it is set to "IsReadOnly" will throw a NotSupportedException.
inherited fromGeometryBase

IsPeriodic

#Since v5.0
public bool IsPeriodic { get; }
Gets a value indicating whether or not this curve is considered to be Periodic.

IsShallowDuplicate

public bool IsShallowDuplicate { get; }
Is this instance a 'shallow copy'. Shallow copies are no different than regular instances with the exception that they will convert to complete independent 'deep' copies if a non const operation is perform on the instance (something that mutates the internal data)
inherited fromGeometryBase

IsSubDFriendly

#Since v7.0
public bool IsSubDFriendly { get; }
Returns true if the curve is a cubic, non-rational, uniform NURBS curve that is either periodic or has natural end conditions. Otherwise, false is returned.
Remarks: A "natural" spline has zero 2nd derivatives (and hence zero curvature) at the start and end. A "periodic" spline has unclampled periodic knots and periodic control points.

IsValid

public virtual bool IsValid { get; }
Tests an object to see if it is valid.
inherited fromCommonObject

ObjectType

[CLSCompliant(false)] public ObjectType ObjectType { get; }
Useful for switch statements that need to differentiate between basic object types like points, curves, surfaces, and so on.
inherited fromGeometryBase

PointAtEnd

#Since v5.0
public Point3d PointAtEnd { get; }
Evaluates point at the end of the curve.

PointAtMid

#Since v8.14
public Point3d PointAtMid { get; }
Evaluates point at the middle, or mid, of the curve.

PointAtStart

#Since v5.0
public Point3d PointAtStart { get; }
Evaluates point at the start of the curve.

SpanCount

#Since v5.0
public int SpanCount { get; }
Gets the number of non-empty smooth (c-infinity) spans in the curve.

TangentAtEnd

#Since v5.0
public Vector3d TangentAtEnd { get; }
Evaluate unit tangent vector at the end of the curve.
Remarks: No error handling.
Unit tangent vector of the curve at the end point.

TangentAtStart

#Since v5.0
public Vector3d TangentAtStart { get; }
Evaluates the unit tangent vector at the start of the curve.
Remarks: No error handling.
Unit tangent vector of the curve at the start point.

UserData

public UserDataList UserData { get; }
List of custom information that is attached to this class.
inherited fromCommonObject

UserDictionary

public ArchivableDictionary UserDictionary { get; }
Dictionary of custom information attached to this class. The dictionary is actually user data provided as an easy to use shareable set of information.
inherited fromCommonObject

UserStringCount

public int UserStringCount { get; }
Gets the amount of user strings.
inherited fromGeometryBase

Methods

ChangeClosedCurveSeam

#Since v5.0
public bool ChangeClosedCurveSeam(double t)
If this curve is closed, then modify it so that the start/end point is at curve parameter t.
t (double)Curve parameter of new start/end point. The returned curves domain will start at t.
true on success, false on failure.

ChangeDimension

#Since v5.0
public bool ChangeDimension(int desiredDimension)
Changes the dimension of a curve.
desiredDimension (int)The desired dimension.
true if the curve's dimension was already desiredDimension or if the curve's dimension was successfully changed to desiredDimension; otherwise false.

ClosedCurveOrientation

#Since v6.0
[ConstOperation] public CurveOrientation ClosedCurveOrientation()
Determines the orientation (counterclockwise or clockwise) of a closed, planar curve in the world XY plane. Only works with simple (no self intersections) closed, planar curves.
The orientation of this curve with respect to world XY plane.

ClosedCurveOrientation

#Since v5.0
[ConstOperation] public CurveOrientation ClosedCurveOrientation(Plane plane)
Determines the orientation (counterclockwise or clockwise) of a closed, planar curve in a given plane. Only works with simple (no self intersections) closed, planar curves.
plane (Plane)The plane in which to solve the orientation.
The orientation of this curve in the given plane.

ClosedCurveOrientation

#Since v5.0
[ConstOperation] public CurveOrientation ClosedCurveOrientation(Transform xform)
Determines the orientation (counterclockwise or clockwise) of a closed, planar curve. Only works with simple (no self intersections) closed, planar curves.
xform (Transform)Transformation to map the curve to the world XY plane.
The orientation of this curve in the world XY-plane.

ClosedCurveOrientation

#Since v5.0
[ConstOperation] public CurveOrientation ClosedCurveOrientation(Vector3d upDirection)
Determines the orientation (counterclockwise or clockwise) of a closed, planar curve in a given plane. Only works with simple (no self intersections) closed, planar curves.
upDirection (Vector3d)A vector that is considered "up".
The orientation of this curve with respect to a defined up direction.

ClosestPoint

#Since v5.0
[ConstOperation] public bool ClosestPoint(Point3d testPoint, out double t, double maximumDistance)
Finds the parameter of the point on a curve that is closest to testPoint. If the maximumDistance parameter is > 0, then only points whose distance to the given point is <= maximumDistance will be returned. Using a positive value of maximumDistance can substantially speed up the search.
testPoint (Point3d)Point to project.
t (out double)parameter of local closest point returned here.
maximumDistance (double)The maximum allowed distance.

Past this distance, the search is given up and false is returned.

Use 0 to turn off this parameter.

true on success, false on failure.

ClosestPoint

#Since v5.0
[ConstOperation] public bool ClosestPoint(Point3d testPoint, out double t)
Finds parameter of the point on a curve that is closest to testPoint. If the maximumDistance parameter is > 0, then only points whose distance to the given point is <= maximumDistance will be returned. Using a positive value of maximumDistance can substantially speed up the search.
testPoint (Point3d)Point to search from.
t (out double)Parameter of local closest point.
true on success, false on failure.

ClosestPoints

#Since v5.0
[ConstOperation] public bool ClosestPoints(Curve otherCurve, out Point3d pointOnThisCurve, out Point3d pointOnOtherCurve)
Gets closest points between this and another curves.
otherCurve (Curve)The other curve.
pointOnThisCurve (out Point3d)The point on this curve. This out parameter is assigned during this call.
pointOnOtherCurve (out Point3d)The point on other curve. This out parameter is assigned during this call.
true on success; false on error.

ClosestPoints

#Since v5.0
[ConstOperation] public bool ClosestPoints(IEnumerable<GeometryBase> geometry, out Point3d pointOnCurve, out Point3d pointOnObject, out int whichGeometry, double maximumDistance)
Finds the object (and the closest point in that object) that is closest to this curve.

Breps, surfaces, curves and point clouds are examples of objects that can be passed to this function.

geometry (IEnumerable<GeometryBase>)A list, an array or any enumerable set of geometry to search.
pointOnCurve (out Point3d)The point on curve. This out parameter is assigned during this call.
pointOnObject (out Point3d)The point on geometry. This out parameter is assigned during this call.
whichGeometry (out int)The index of the geometry. This out parameter is assigned during this call.
maximumDistance (double)Maximum allowable distance. Past this distance, the research is given up and false is returned.
true on success; false if no object was found or selected.
ArgumentNullExceptionIf geometry is null.

ClosestPoints

#Since v5.0
[ConstOperation] public bool ClosestPoints(IEnumerable<GeometryBase> geometry, out Point3d pointOnCurve, out Point3d pointOnObject, out int whichGeometry)
Finds the object (and the closest point in that object) that is closest to this curve.

Breps, surfaces, curves and point clouds are examples of objects that can be passed to this function.

geometry (IEnumerable<GeometryBase>)A list, an array or any enumerable set of geometry to search.
pointOnCurve (out Point3d)The point on curve. This out parameter is assigned during this call.
pointOnObject (out Point3d)The point on geometry. This out parameter is assigned during this call.
whichGeometry (out int)The index of the geometry. This out parameter is assigned during this call.
true on success; false if no object was found or selected.
ArgumentNullExceptionIf geometry is null.

CombineShortSegments

#Since v7.8
public bool CombineShortSegments(double tolerance)
Looks for segments that are shorter than tolerance that can be combined. For NURBS of degree greater than 1, spans are combined by removing knots. Similarly for NURBS segments of polycurves. Otherwise, RemoveShortSegments() is called. Does not change the domain, but it will change the relative parameterization.
tolerance (double)
True if short segments were combined or removed. False otherwise.

ComponentIndex

[ConstOperation] public ComponentIndex ComponentIndex()
If this piece of geometry is a component in something larger, like a BrepEdge in a Brep, then this function returns the component index.
inherited fromGeometryBase
This object's component index. If this object is not a sub-piece of a larger geometric entity, then the returned index has m_type = ComponentIndex.InvalidType and m_index = -1.

ConstructConstObject

protected void ConstructConstObject(object parentObject, int subobjectIndex)
Assigns a parent object and a sub-object index to this.
inherited fromCommonObject
parentObject (object)The parent object.
subobjectIndex (int)The sub-object index.

Contains

#Since v5.0
[ConstOperation] public PointContainment Contains(Point3d testPoint, Plane plane, double tolerance)
Computes the relationship between a point and a closed curve region. This curve must be closed or the return value will be Unset.
testPoint (Point3d)Point to test.
plane (Plane)Plane in which to compare point and region.
tolerance (double)Tolerance to use during comparison.
Relationship between point and curve region.

Contains

#Since v5.0 Obsolete v6.0
[ConstOperation] public PointContainment Contains(Point3d testPoint, Plane plane)
obsoleteUse version that takes a tolerance
Computes the relationship between a point and a closed curve region. This curve must be closed or the return value will be Unset.
testPoint (Point3d)Point to test.
plane (Plane)Plane in which to compare point and region.
Relationship between point and curve region.

Contains

#Since v5.0 Obsolete v6.0
[ConstOperation] public PointContainment Contains(Point3d testPoint)
obsoleteUse version that takes a tolerance
Computes the relationship between a point and a closed curve region. This curve must be closed or the return value will be Unset. Both curve and point are projected to the World XY plane.
testPoint (Point3d)Point to test.
Relationship between point and curve region.

ControlPolygon

#Since v8.11
[ConstOperation] public Polyline ControlPolygon()
Gets the curve's control polygon.
The control polygon as a polyline if successful, null otherwise.

CreateArcBlend

#Since v6.1
public static Curve CreateArcBlend(Point3d startPt, Vector3d startDir, Point3d endPt, Vector3d endDir, double controlPointLengthRatio)
Creates a polycurve consisting of two tangent arc segments that connect two points and two directions.
startPt (Point3d)Start of the arc blend curve.
startDir (Vector3d)Start direction of the arc blend curve.
endPt (Point3d)End of the arc blend curve.
endDir (Vector3d)End direction of the arc blend curve.
controlPointLengthRatio (double)The ratio of the control polygon lengths of the two arcs. Note, a value of 1.0 means the control polygon lengths for both arcs will be the same.
The arc blend curve, or null on error.

CreateArcCornerRectangle

#Since v8.9
public static Curve CreateArcCornerRectangle(Rectangle3d rectangle, double radius)
Creates an arc-cornered (rounded) rectangular curve.
rectangle (Rectangle3d)The rectangle.
radius (double)The arc radius at each corner.
Aa arc-cornered rectangular curve if successful, null otherwise.

CreateArcLineArcBlend

#Since v7.9
public static Curve CreateArcLineArcBlend(Point3d startPt, Vector3d startDir, Point3d endPt, Vector3d endDir, double radius)
Creates an arc-line-arc blend curve between two curves. The output is generally a PolyCurve with three segments: arc, line, arc. In some cases, one or more of those segments will be absent because they would have 0 length. If there is only a single segment, the result will either be an ArcCurve or a LineCurve.
Remarks: The first arc segment will start at startPt, with starting tangent startDir. The second arc segment will end at endPt with end tangent endDir. The line segment will start from the end of the first arc segment and end at start of the second arc segment, and it will be tangent to both arcs at those points.
startPt (Point3d)Start of the blend curve.
startDir (Vector3d)Start direction of the blend curve.
endPt (Point3d)End of the blend curve.
endDir (Vector3d)End direction of the arc blend curve.
radius (double)The radius of the arc segments.
The blend curve if successful, false otherwise.

CreateBlendCurve

#Since v5.0
public static Curve CreateBlendCurve(Curve curve0, double t0, bool reverse0, BlendContinuity continuity0, Curve curve1, double t1, bool reverse1, BlendContinuity continuity1)
Makes a curve blend between two curves at the parameters specified with the directions and continuities specified.
curve0 (Curve)First curve to blend from.
t0 (double)Parameter on first curve for blend endpoint.
reverse0 (bool)If false, the blend will go in the natural direction of the curve. If true, the blend will go in the opposite direction to the curve.
continuity0 (BlendContinuity)Continuity for the blend at the start.
curve1 (Curve)Second curve to blend from.
t1 (double)Parameter on second curve for blend endpoint.
reverse1 (bool)If false, the blend will go in the natural direction of the curve. If true, the blend will go in the opposite direction to the curve.
continuity1 (BlendContinuity)Continuity for the blend at the end.
The blend curve on success, or null on failure.

CreateBlendCurve

#Since v5.0
public static Curve CreateBlendCurve(Curve curveA, Curve curveB, BlendContinuity continuity, double bulgeA, double bulgeB)
Create a Blend curve between two existing curves.
Remarks: Note: This function only blends with G0, G1, or G2 continuity.
curveA (Curve)Curve to blend from (blending will occur at curve end point).
curveB (Curve)Curve to blend to (blending will occur at curve start point).
continuity (BlendContinuity)Continuity of blend, either position (G0), tangency (G1), or curvature (G2).
bulgeA (double)Bulge factor at curveA end of blend. Values near 1.0 work best.
bulgeB (double)Bulge factor at curveB end of blend. Values near 1.0 work best.
A curve representing the blend between A and B or null on failure.

CreateBlendCurve

#Since v5.0
public static Curve CreateBlendCurve(Curve curveA, Curve curveB, BlendContinuity continuity)
Create a Blend curve between two existing curves.
Remarks: Note: This function only blends with G0, G1, or G2 continuity.
curveA (Curve)Curve to blend from (blending will occur at curve end point).
curveB (Curve)Curve to blend to (blending will occur at curve start point).
continuity (BlendContinuity)Continuity of blend, either position (G0), tangency (G1), or curvature (G2).
A curve representing the blend between A and B or null on failure.

CreateBooleanDifference

#Since v6.0
public static Curve[] CreateBooleanDifference(Curve curveA, Curve curveB, double tolerance)
Calculates the boolean difference between two closed, planar curves. Note, curves must be co-planar.
curveA (Curve)The first closed, planar curve.
curveB (Curve)The second closed, planar curve.
tolerance (double)
Result curves on success, empty array if no difference could be calculated.

CreateBooleanDifference

#Since v5.0 Obsolete v6.0
public static Curve[] CreateBooleanDifference(Curve curveA, Curve curveB)
obsoleteUse version that takes tolerance as input
Calculates the boolean difference between two closed, planar curves. Note, curves must be co-planar.
curveA (Curve)The first closed, planar curve.
curveB (Curve)The second closed, planar curve.
Result curves on success, empty array if no difference could be calculated.

CreateBooleanDifference

#Since v6.0
public static Curve[] CreateBooleanDifference(Curve curveA, IEnumerable<Curve> subtractors, double tolerance)
Calculates the boolean difference between a closed planar curve, and a list of closed planar curves. Note, curves must be co-planar.
curveA (Curve)The first closed, planar curve.
subtractors (IEnumerable<Curve>)curves to subtract from the first closed curve.
tolerance (double)
Result curves on success, empty array if no difference could be calculated.

CreateBooleanDifference

#Since v5.0 Obsolete v6.0
public static Curve[] CreateBooleanDifference(Curve curveA, IEnumerable<Curve> subtractors)
obsoleteUse version that takes tolerance as input
Calculates the boolean difference between a closed planar curve, and a list of closed planar curves. Note, curves must be co-planar.
curveA (Curve)The first closed, planar curve.
subtractors (IEnumerable<Curve>)curves to subtract from the first closed curve.
Result curves on success, empty array if no difference could be calculated.

CreateBooleanIntersection

#Since v6.0
public static Curve[] CreateBooleanIntersection(Curve curveA, Curve curveB, double tolerance)
Calculates the boolean intersection of two closed, planar curves. Note, curves must be co-planar.
curveA (Curve)The first closed, planar curve.
curveB (Curve)The second closed, planar curve.
tolerance (double)
Result curves on success, empty array if no intersection could be calculated.

CreateBooleanIntersection

#Since v5.0 Obsolete v6.0
public static Curve[] CreateBooleanIntersection(Curve curveA, Curve curveB)
obsoleteUse version that takes tolerance as input
Calculates the boolean intersection of two closed, planar curves. Note, curves must be co-planar.
curveA (Curve)The first closed, planar curve.
curveB (Curve)The second closed, planar curve.
Result curves on success, empty array if no intersection could be calculated.

CreateBooleanRegions

#Since v7.0
public static CurveBooleanRegions CreateBooleanRegions(IEnumerable<Curve> curves, Plane plane, bool combineRegions, double tolerance)
Calculates curve Boolean regions, which trims and splits curves based on their overlapping regions.
curves (IEnumerable<Curve>)The input curves.
plane (Plane)Regions will be found in the projection of the curves to this plane.
combineRegions (bool)If true, then adjacent regions will be combined.
tolerance (double)Function tolerance. When in doubt, use the document's model absolute tolerance.
The curve Boolean regions if successful, null of no successful.

CreateBooleanRegions

#Since v7.0
public static CurveBooleanRegions CreateBooleanRegions(IEnumerable<Curve> curves, Plane plane, IEnumerable<Point3d> points, bool combineRegions, double tolerance)
Curve Boolean method, which trims and splits curves based on their overlapping regions.
curves (IEnumerable<Curve>)The input curves.
plane (Plane)Regions will be found in the projection of the curves to this plane.
points (IEnumerable<Point3d>)These points will be projected to plane. All regions that contain at least one of these points will be found.
combineRegions (bool)If true, then adjacent regions will be combined.
tolerance (double)Function tolerance. When in doubt, use the document's model absolute tolerance.
The curve Boolean regions if successful, null of no successful.

CreateBooleanUnion

#Since v9.0
public static Curve[] CreateBooleanUnion(IEnumerable<Curve> curves, double tolerance, out int[] indexMap)
Calculates the boolean union of two or more closed, planar curves, and reports which input curve ended up in which output curve. Note, curves must be co-planar.
curves (IEnumerable<Curve>)The co-planar curves to union.
tolerance (double)The 3d fitting and intersecting tolerance.
indexMap (out int[])An array with one entry per input curve. The value at index i is the index, in the returned array, of the union result that input curve i contributed to (the outer boundary curve of that result), or -1 if the input curve was not matched to any output curve. The input curves are indexed in the order they are enumerated curves.
Result curves on success, empty array if no union could be calculated.

CreateBooleanUnion

#Since v6.0
public static Curve[] CreateBooleanUnion(IEnumerable<Curve> curves, double tolerance)
Calculates the boolean union of two or more closed, planar curves. Note, curves must be co-planar.
curves (IEnumerable<Curve>)The co-planar curves to union.
tolerance (double)
Result curves on success, empty array if no union could be calculated.

CreateBooleanUnion

#Since v5.0 Obsolete v6.0
public static Curve[] CreateBooleanUnion(IEnumerable<Curve> curves)
obsoleteUse version that takes tolerance as input
Calculates the boolean union of two or more closed, planar curves. Note, curves must be co-planar.
curves (IEnumerable<Curve>)The co-planar curves to union.
Result curves on success, empty array if no union could be calculated.

CreateCatenaryCurveFromApex

#Since v9.0
public static Curve CreateCatenaryCurveFromApex(Point3d catenary_start, Point3d catenary_end, Vector3d axis_dir, Point3d catenary_apex, bool bSmooth, int point_count, out Point3d apex_out, out double parameter_out, out double length_out, out double max_deviation_out)
Generate a catenary curve through catenary apex.
catenary_start (Point3d)catenary start point
catenary_end (Point3d)catenary end point
axis_dir (Vector3d)catenary axis/gravity direction
catenary_apex (Point3d)desired catenary apex point
bSmooth (bool)if false generates polyline output
point_count (int)number of points in the output curve
apex_out (out Point3d)apex point of the output catenary curve
parameter_out (out double)output catenary parameter "a" in the formula y = a * cosh(x/a)
length_out (out double)output catenary length
max_deviation_out (out double)sampled max deviation between the output curve and the analytic catenary
A catenary Curve or null if unsuccessful

CreateCatenaryCurveFromLength

#Since v9.0
public static Curve CreateCatenaryCurveFromLength(Point3d catenary_start, Point3d catenary_end, Vector3d axis_dir, double catenary_length, bool bSmooth, int point_count, out Point3d apex_out, out double parameter_out, out double length_out, out double max_deviation_out)
Generate a catenary curve of specific length.
catenary_start (Point3d)catenary start point
catenary_end (Point3d)catenary end point
axis_dir (Vector3d)catenary axis/gravity direction
catenary_length (double)the desired catenary length
bSmooth (bool)if false generates polyline output
point_count (int)number of points in the output curve
apex_out (out Point3d)apex point of the output catenary curve
parameter_out (out double)output catenary parameter "a" in the formula y = a * cosh(x/a)
length_out (out double)output catenary length
max_deviation_out (out double)sampled max deviation between the output curve and the analytic catenary
A catenary Curve or null if unsuccessful

CreateCatenaryCurveFromParameter

#Since v9.0
public static Curve CreateCatenaryCurveFromParameter(Point3d catenary_start, Point3d catenary_end, Vector3d axis_dir, double catenary_parameter, bool bSmooth, int point_count, out Point3d apex_out, out double parameter_out, out double length_out, out double max_deviation_out)
Generate a catenary curve from catenary parameter.
catenary_start (Point3d)catenary start point
catenary_end (Point3d)catenary end point
axis_dir (Vector3d)catenary axis/gravity direction
catenary_parameter (double)catenary parameter
bSmooth (bool)if false generates polyline output
point_count (int)number of points in the output curve
apex_out (out Point3d)apex point of the output catenary curve
parameter_out (out double)output catenary parameter "a" in the formula y = a * cosh(x/a)
length_out (out double)output catenary length
max_deviation_out (out double)sampled max deviation between the output curve and the analytic catenary
A catenary Curve or null if unsuccessful

CreateCatenaryCurveThroughPoint

#Since v9.0
public static Curve CreateCatenaryCurveThroughPoint(Point3d catenary_start, Point3d catenary_end, Vector3d axis_dir, Point3d through_point, bool bSmooth, int point_count, out Point3d apex_out, out double parameter_out, out double length_out, out double max_deviation_out)
Generate a catenary curve through a point
catenary_start (Point3d)catenary start point
catenary_end (Point3d)catenary end point
axis_dir (Vector3d)catenary axis/gravity direction
through_point (Point3d)point on the catenary between catenary_start and catenary_end
bSmooth (bool)if false generates polyline output
point_count (int)number of points in the output curve
apex_out (out Point3d)apex point of the output catenary curve
parameter_out (out double)output catenary parameter "a" in the formula y = a * cosh(x/a)
length_out (out double)output catenary length
max_deviation_out (out double)sampled max deviation between the output curve and the analytic catenary
A catenary Curve or null if unsuccessful

CreateConicCornerRectangle

#Since v8.9
public static Curve CreateConicCornerRectangle(Rectangle3d rectangle, double rho)
Creates a conic-corned (rounded) rectangular curve.
rectangle (Rectangle3d)The rectangle.
rho (double)The rho value at each corner, in the exclusive range (0.0, 1.0).
A conic-cornered rectangular curve if successful, null otherwise.

CreateControlPointCurve

#Since v5.0
public static Curve CreateControlPointCurve(IEnumerable<Point3d> points, int degree)
Constructs a curve from a set of control-point locations.
points (IEnumerable<Point3d>)Control points.
degree (int)Degree of curve. The number of control points must be at least degree+1.

CreateControlPointCurve

#Since v5.0
public static Curve CreateControlPointCurve(IEnumerable<Point3d> points)
Constructs a control-point of degree=3 (or less).
points (IEnumerable<Point3d>)Control points of curve.

CreateCurve2View

#Since v6.0
public static Curve[] CreateCurve2View(Curve curveA, Curve curveB, Vector3d vectorA, Vector3d vectorB, double tolerance, double angleTolerance)
Creates a third curve from two curves that are planar in different construction planes. The new curve looks the same as each of the original curves when viewed in each plane.
curveA (Curve)The first curve.
curveB (Curve)The second curve.
vectorA (Vector3d)A vector defining the normal direction of the plane which the first curve is drawn upon.
vectorB (Vector3d)A vector defining the normal direction of the plane which the second curve is drawn upon.
tolerance (double)The tolerance for the operation.
angleTolerance (double)The angle tolerance for the operation.
An array containing one or more curves if successful.

CreateFillet

#Since v5.0
public static Arc CreateFillet(Curve curve0, Curve curve1, double radius, double t0Base, double t1Base)
Computes the fillet arc for a curve filleting operation.
curve0 (Curve)First curve to fillet.
curve1 (Curve)Second curve to fillet.
radius (double)Fillet radius.
t0Base (double)Parameter on curve0 where the fillet ought to start (approximately).
t1Base (double)Parameter on curve1 where the fillet ought to end (approximately).
The fillet arc on success, or Arc.Unset on failure.

CreateFilletCornersCurve

#Since v6.0
public static Curve CreateFilletCornersCurve(Curve curve, double radius, double tolerance, double angleTolerance)
Rounds the corners of a kinked curve with arcs of a single, specified radius.
curve (Curve)The curve to fillet.
radius (double)The fillet radius.
tolerance (double)The tolerance. When in doubt, use the document's model space absolute tolerance.
angleTolerance (double)The angle tolerance in radians. When in doubt, use the document's model space angle tolerance.
The filleted curve if successful. null on failure.

CreateFilletCurves

#ExampleSince v5.10
public static Curve[] CreateFilletCurves(Curve curve0, Point3d point0, Curve curve1, Point3d point1, double radius, bool join, bool trim, bool arcExtension, double tolerance, double angleTolerance)
Creates a tangent arc between two curves and trims or extends the curves to the arc.
curve0 (Curve)The first curve to fillet.
point0 (Point3d)A point on the first curve that is near the end where the fillet will be created.
curve1 (Curve)The second curve to fillet.
point1 (Point3d)A point on the second curve that is near the end where the fillet will be created.
radius (double)The radius of the fillet.
join (bool)Join the output curves.
trim (bool)Trim copies of the input curves to the output fillet curve.
arcExtension (bool)Applies when arcs are filleted but need to be extended to meet the fillet curve or chamfer line. If true, then the arc is extended maintaining its validity. If false, then the arc is extended with a line segment, which is joined to the arc converting it to a polycurve.
tolerance (double)The tolerance, generally the document's absolute tolerance.
angleTolerance (double)
The results of the fillet operation. The number of output curves depends on the input curves and the values of the parameters that were used during the fillet operation. In most cases, the output array will contain either one or three curves, although two curves can be returned if the radius is zero and join = false. For example, if both join and trim = true, then the output curve will be a polycurve containing the fillet curve joined with trimmed copies of the input curves. If join = false and trim = true, then three curves, the fillet curve and trimmed copies of the input curves, will be returned. If both join and trim = false, then just the fillet curve is returned.

CreateInterpolatedCurve

#Since v5.0
public static Curve CreateInterpolatedCurve(IEnumerable<Point3d> points, int degree, CurveKnotStyle knots, Vector3d startTangent, Vector3d endTangent)
Interpolates a sequence of points. Used by InterpCurve Command This routine works best when degree=3.
points (IEnumerable<Point3d>)Points to interpolate. For periodic curves if the final point is a duplicate of the initial point it is ignored. (Count must be >=2)
degree (int)The degree of the curve >=1. Note: Even degree > 3 periodic interpolation results in a non-periodic closed curve.
knots (CurveKnotStyle)Knot-style to use and specifies if the curve should be periodic.
startTangent (Vector3d)A starting tangent.
endTangent (Vector3d)An ending tangent.
interpolated curve on success. null on failure.

CreateInterpolatedCurve

#Since v5.0
public static Curve CreateInterpolatedCurve(IEnumerable<Point3d> points, int degree, CurveKnotStyle knots)
Interpolates a sequence of points. Used by InterpCurve Command This routine works best when degree=3.
points (IEnumerable<Point3d>)Points to interpolate. For periodic curves if the final point is a duplicate of the initial point it is ignored. (Count must be >=2)
degree (int)The degree of the curve >=1. Note: Even degree > 3 periodic interpolation results in a non-periodic closed curve.
knots (CurveKnotStyle)Knot-style to use and specifies if the curve should be periodic.
interpolated curve on success. null on failure.

CreateInterpolatedCurve

#Since v5.0
public static Curve CreateInterpolatedCurve(IEnumerable<Point3d> points, int degree)
Interpolates a sequence of points. Used by InterpCurve Command This routine works best when degree=3.
points (IEnumerable<Point3d>)Points to interpolate (Count must be >= 2)
degree (int)The degree of the curve >=1. Degree must be odd.
interpolated curve on success. null on failure.

CreateMatchCurve

#Since v7.6
public static Curve[] CreateMatchCurve(Curve curve0, bool reverse0, BlendContinuity continuity, Curve curve1, bool reverse1, PreserveEnd preserve, bool average)
Changes a curve end to meet a specified curve with a specified continuity.
curve0 (Curve)The open curve to change.
reverse0 (bool)Reverse the direction of the curve to change before matching.
continuity (BlendContinuity)The continuity at the curve end.
curve1 (Curve)The open curve to match.
reverse1 (bool)Reverse the direction of the curve to match before matching.
preserve (PreserveEnd)Prevent modification of the curvature at the end opposite the match for curves with fewer than six control points.
average (bool)Adjust both curves to match each other.
The results of the curve matching, if successful, otherwise an empty array.

CreateMeanCurve

#Since v5.0
public static Curve CreateMeanCurve(Curve curveA, Curve curveB, double angleToleranceRadians)
Constructs a mean, or average, curve from two curves.
curveA (Curve)A first curve.
curveB (Curve)A second curve.
angleToleranceRadians (double)The angle tolerance, in radians, used to match kinks between curves. If you are unsure how to set this parameter, then either use the document's angle tolerance RhinoDoc.AngleToleranceRadians, or the default value (RhinoMath.UnsetValue)
The average curve, or null on error.
ArgumentNullExceptionIf curveA or curveB are null.

CreateMeanCurve

#Since v5.0
public static Curve CreateMeanCurve(Curve curveA, Curve curveB)
Constructs a mean, or average, curve from two curves.
curveA (Curve)A first curve.
curveB (Curve)A second curve.
The average curve, or null on error.
ArgumentNullExceptionIf curveA or curveB are null.

CreateNurbsCurveFit

#Since v9.0
public static NurbsCurve CreateNurbsCurveFit(Curve curve, Interval domain, NurbsCurveFitParameters rebuildOptions, out Line maximumSeparation, out double thisSeparationParameter, out double nurbsSeparationParameter)
Rebuilds the curve to a NURBS curve with the specified options.
curve (Curve)The input curve you would like to rebuild
domain (Interval)The domain to process
rebuildOptions (NurbsCurveFitParameters)Specifies how to rebuild the curve
maximumSeparation (out Line)
thisSeparationParameter (out double)
nurbsSeparationParameter (out double)
The resulting curveb

CreatePeriodicCurve

#Since v6.0
public static Curve CreatePeriodicCurve(Curve curve, bool smooth)
Removes kinks from a curve. Periodic curves deform smoothly without kinks.
curve (Curve)The curve to make periodic. Curve must have degree >= 2.
smooth (bool)If true, smooths any kinks in the curve and moves control points to make a smooth curve. If false, control point locations are not changed or changed minimally (only one point may move) and only the knot vector is altered.
The resulting curve if successful, null otherwise.

CreatePeriodicCurve

#Since v6.0
public static Curve CreatePeriodicCurve(Curve curve)
Removes kinks from a curve. Periodic curves deform smoothly without kinks.
curve (Curve)The curve to make periodic. Curve must have degree >= 2.
The resulting curve if successful, null otherwise.

CreateRevisionCloud

#Since v8.4
public static Curve CreateRevisionCloud(Curve curve, int segmentCount, double angle, bool flip)
Creates a revision cloud curve from a planar curve.
curve (Curve)The input planar curve.
segmentCount (int)The number of segments in the output revision cloud curve. If zero, the number of segments in the output revision cloud curve is based on the NURB form of the input curve.
angle (double)The angle in radians, between PI/2.0 and PI radians (90 and 180 degrees). This angle indicates the amount of bulge in the segments.
flip (bool)The arc segments in output revision cloud curve will be in the opposite direction to the input curve.
A revision cloud curve is successful, false otherwise.

CreateRevisionCloud

#Since v8.4
public static Curve CreateRevisionCloud(IEnumerable<Point3d> points, double angle, bool flip)
Creates a revision cloud curve from points that make up a planar polyline.
points (IEnumerable<Point3d>)The input points.
angle (double)The angle in radians, between PI/2.0 and PI radians (90 and 180 degrees). This angle indicates the amount of bulge in the segments.
flip (bool)The arc segments in output revision cloud curve will be in the opposite direction to the input curve.
A revision cloud curve is successful, false otherwise.

CreateSoftEditCurve

#Since v6.0
public static Curve CreateSoftEditCurve(Curve curve, double t, Vector3d delta, double length, bool fixEnds)
Creates a soft edited curve from an existing curve using a smooth field of influence.
curve (Curve)The curve to soft edit.
t (double)A parameter on the curve to move from. This location on the curve is moved, and the move is smoothly tapered off with increasing distance along the curve from this parameter.
delta (Vector3d)The direction and magnitude, or maximum distance, of the move.
length (double)The distance along the curve from the editing point over which the strength of the editing falls off smoothly.
fixEnds (bool)
The soft edited curve if successful. null on failure.

CreateTextOutlines

#Since v6.0
public static Curve[] CreateTextOutlines(string text, string font, double textHeight, int textStyle, bool closeLoops, Plane plane, double smallCapsScale, double tolerance)
Creates outline curves created from a text string. The functionality is similar to what you find in Rhino's TextObject command or TextEntity.Explode() in RhinoCommon.
text (string)The text from which to create outline curves.
font (string)The text font. If the font does not exist on the system. Rhino will use a substitute with similar properties.
textHeight (double)The text height.
textStyle (int)The font style. The font style can be any number of the following: 0 - Normal, 1 - Bold, 2 - Italic
closeLoops (bool)Set this value to True when dealing with normal fonts and when you expect closed loops. You may want to set this to False when specifying a single-stroke font where you don't want closed loops.
plane (Plane)The plane on which the outline curves will lie.
smallCapsScale (double)Displays lower-case letters as small caps. Set the relative text size to a percentage of the normal text.
tolerance (double)The tolerance for the operation.
An array containing one or more curves if successful.

CreateTweenCurves

#Since v6.0
public static Curve[] CreateTweenCurves(Curve curve0, Curve curve1, int numCurves, double tolerance)
Creates curves between two open or closed input curves. Uses the control points of the curves for finding tween curves. That means the first control point of first curve is matched to first control point of the second curve and so on. There is no matching of curves direction. Caller must match input curves direction before calling the function.
curve0 (Curve)The first, or starting, curve.
curve1 (Curve)The second, or ending, curve.
numCurves (int)Number of tween curves to create.
tolerance (double)
An array of tween curves. This array can be empty.

CreateTweenCurves

#Since v5.2 Obsolete v6.0
public static Curve[] CreateTweenCurves(Curve curve0, Curve curve1, int numCurves)
obsoleteUse version that takes tolerance as input
Creates curves between two open or closed input curves. Uses the control points of the curves for finding tween curves. That means the first control point of first curve is matched to first control point of the second curve and so on. There is no matching of curves direction. Caller must match input curves direction before calling the function.
curve0 (Curve)The first, or starting, curve.
curve1 (Curve)The second, or ending, curve.
numCurves (int)Number of tween curves to create.
An array of tween curves. This array can be empty.

CreateTweenCurvesWithMatching

#Since v6.0
public static Curve[] CreateTweenCurvesWithMatching(Curve curve0, Curve curve1, int numCurves, double tolerance)
Creates curves between two open or closed input curves. Make the structure of input curves compatible if needed. Refits the input curves to have the same structure. The resulting curves are usually more complex than input unless input curves are compatible and no refit is needed. There is no matching of curves direction. Caller must match input curves direction before calling the function.
curve0 (Curve)The first, or starting, curve.
curve1 (Curve)The second, or ending, curve.
numCurves (int)Number of tween curves to create.
tolerance (double)
An array of tween curves. This array can be empty.

CreateTweenCurvesWithMatching

#Since v5.2 Obsolete v6.0
public static Curve[] CreateTweenCurvesWithMatching(Curve curve0, Curve curve1, int numCurves)
obsoleteUse version that takes tolerance as input
Creates curves between two open or closed input curves. Make the structure of input curves compatible if needed. Refits the input curves to have the same structure. The resulting curves are usually more complex than input unless input curves are compatible and no refit is needed. There is no matching of curves direction. Caller must match input curves direction before calling the function.
curve0 (Curve)The first, or starting, curve.
curve1 (Curve)The second, or ending, curve.
numCurves (int)Number of tween curves to create.
An array of tween curves. This array can be empty.

CreateTweenCurvesWithSampling

#Since v6.0
public static Curve[] CreateTweenCurvesWithSampling(Curve curve0, Curve curve1, int numCurves, int numSamples, double tolerance)
Creates curves between two open or closed input curves. Use sample points method to make curves compatible. This is how the algorithm works: Divides the two curves into an equal number of points, finds the midpoint between the corresponding points on the curves and interpolates the tween curve through those points. There is no matching of curves direction. Caller must match input curves direction before calling the function.
curve0 (Curve)The first, or starting, curve.
curve1 (Curve)The second, or ending, curve.
numCurves (int)Number of tween curves to create.
numSamples (int)Number of sample points along input curves.
tolerance (double)The tolerance. When in doubt, use the document's model absolute tolerance.
>An array of tween curves. This array can be empty.

CreateTweenCurvesWithSampling

#Since v5.2 Obsolete v6.0
public static Curve[] CreateTweenCurvesWithSampling(Curve curve0, Curve curve1, int numCurves, int numSamples)
obsoleteUse version that takes tolerance as input
Creates curves between two open or closed input curves. Use sample points method to make curves compatible. This is how the algorithm works: Divides the two curves into an equal number of points, finds the midpoint between the corresponding points on the curves and interpolates the tween curve through those points. There is no matching of curves direction. Caller must match input curves direction before calling the function.
curve0 (Curve)The first, or starting, curve.
curve1 (Curve)The second, or ending, curve.
numCurves (int)Number of tween curves to create.
numSamples (int)Number of sample points along input curves.
>An array of tween curves. This array can be empty.

CurvatureAt

#ExampleSince v5.0
[ConstOperation] public Vector3d CurvatureAt(double t)
Evaluate the curvature vector at a curve parameter.
Remarks: No error handling.
t (double)Evaluation parameter.
Curvature vector of the curve at the parameter t.

DataCRC

[CLSCompliant(false)] public uint DataCRC(uint currentRemainder)
Returns a CRC calculated from the information that defines the object. This CRC can be used as a quick way to see if two objects are not identical.
inherited fromGeometryBase
currentRemainder (uint)The current remainder value.
CRC of the information the defines the object.

DeleteAllUserStrings

public void DeleteAllUserStrings()
inherited fromGeometryBase

DeleteUserString

public bool DeleteUserString(string key)
inherited fromGeometryBase
key (string)

DerivativeAt

#Since v5.0
[ConstOperation] public Vector3d[] DerivativeAt(double t, int derivativeCount, CurveEvaluationSide side)
Evaluate the derivatives at the specified curve parameter.
t (double)Curve parameter to evaluate.
derivativeCount (int)Number of derivatives to evaluate, must be at least 0.
side (CurveEvaluationSide)Side of parameter to evaluate. If the parameter is at a kink, it makes a big difference whether the evaluation is from below or above.
An array of vectors that represents all the derivatives starting at zero.

DerivativeAt

#Since v5.0
[ConstOperation] public Vector3d[] DerivativeAt(double t, int derivativeCount)
Evaluate the derivatives at the specified curve parameter.
t (double)Curve parameter to evaluate.
derivativeCount (int)Number of derivatives to evaluate, must be at least 0.
An array of vectors that represents all the derivatives starting at zero.

Dispose

public void Dispose()
Actively reclaims unmanaged resources that this instance uses.
inherited fromCommonObject

Dispose

#
protected override void Dispose(bool disposing)
For derived class implementers.

This method is called with argument true when class user calls Dispose(), while with argument false when the Garbage Collector invokes the finalizer, or Finalize() method.

You must reclaim all used unmanaged resources in both cases, and can use this chance to call Dispose on disposable fields if the argument is true.

Also, you must call the base virtual method within your overriding method.

disposing (bool)true if the call comes from the Dispose() method; false if it comes from the Garbage Collector finalizer.

DivideAsContour

#Since v5.0
[ConstOperation] public Point3d[] DivideAsContour(Point3d contourStart, Point3d contourEnd, double interval)
Divides this curve at fixed steps along a defined contour line.
contourStart (Point3d)The start of the contouring line.
contourEnd (Point3d)The end of the contouring line.
interval (double)A distance to measure on the contouring axis.
An array of points; or null on error.

DivideByCount

#Since v5.0
[ConstOperation] public double[] DivideByCount(int segmentCount, bool includeEnds, out Point3d[] points)
Divide the curve into a number of equal-length segments.
segmentCount (int)Segment count. Note that the number of division points may differ from the segment count.
includeEnds (bool)If true, then the point at the start of the first division segment is returned.
points (out Point3d[])A list of division points. If the function returns successfully, this point-array will be filled in.
Array containing division curve parameters on success, null on failure.

DivideByCount

#Since v5.0
[ConstOperation] public double[] DivideByCount(int segmentCount, bool includeEnds)
Divide the curve into a number of equal-length segments.
segmentCount (int)Segment count. Note that the number of division points may differ from the segment count.
includeEnds (bool)If true, then the point at the start of the first division segment is returned.
List of curve parameters at the division points on success, null on failure.

DivideByLength

#ExampleSince v6.0
[ConstOperation] public double[] DivideByLength(double segmentLength, bool includeEnds, bool reverse, out Point3d[] points)
Divide the curve into specific length segments.
segmentLength (double)The length of each and every segment (except potentially the last one).
includeEnds (bool)If true, then the point at the start of the first division segment is returned.
reverse (bool)If true, then the divisions start from the end of the curve.
points (out Point3d[])If function is successful, points at each parameter value are returned in points.
Array containing division curve parameters if successful, null on failure.

DivideByLength

#ExampleSince v6.0
[ConstOperation] public double[] DivideByLength(double segmentLength, bool includeEnds, bool reverse)
Divide the curve into specific length segments.
segmentLength (double)The length of each and every segment (except potentially the last one).
includeEnds (bool)If true, then the point at the start of the first division segment is returned.
reverse (bool)If true, then the divisions start from the end of the curve.
Array containing division curve parameters if successful, null on failure.

DivideByLength

#ExampleSince v5.0
[ConstOperation] public double[] DivideByLength(double segmentLength, bool includeEnds, out Point3d[] points)
Divide the curve into specific length segments.
segmentLength (double)The length of each and every segment (except potentially the last one).
includeEnds (bool)If true, then the point at the start of the first division segment is returned.
points (out Point3d[])If function is successful, points at each parameter value are returned in points.
Array containing division curve parameters if successful, null on failure.

DivideByLength

#ExampleSince v5.0
[ConstOperation] public double[] DivideByLength(double segmentLength, bool includeEnds)
Divide the curve into specific length segments.
segmentLength (double)The length of each and every segment (except potentially the last one).
includeEnds (bool)If true, then the point at the start of the first division segment is returned.
Array containing division curve parameters if successful, null on failure.

DivideEquidistant

#Since v8.14
public Point3d[] DivideEquidistant(double distance, out double[] curveParameters)
Calculates 3d points on a curve where the linear distance between the points is equal.
Remarks: Unlike the other divide methods, which divides a curve based on arc length, or the distance along the curve between two points, this function divides a curve based on the linear distance between points.
distance (double)The distance between division points.
curveParameters (out double[])If successful, an array of curve parameters at the point locations.
An array of equidistant points, or null on error.

DivideEquidistant

#Since v5.0
[ConstOperation] public Point3d[] DivideEquidistant(double distance)
Calculates 3d points on a curve where the linear distance between the points is equal.
Remarks: Unlike the other divide methods, which divides a curve based on arc length, or the distance along the curve between two points, this function divides a curve based on the linear distance between points.
distance (double)The distance between division points.
An array of equidistant points, or null on error.

DoDirectionsMatch

#Since v5.0
public static bool DoDirectionsMatch(Curve curveA, Curve curveB)
Determines whether two curves travel more or less in the same direction.
curveA (Curve)First curve to test.
curveB (Curve)Second curve to test.
true if both curves more or less point in the same direction, false if they point in the opposite directions.

Duplicate

#Since v5.0
public override GeometryBase Duplicate()
Constructs an exact duplicate of this Curve.

DuplicateCurve

#ExampleSince v5.0
public Curve DuplicateCurve()
Constructs an exact duplicate of this curve.
An exact copy of this curve.

DuplicateSegments

#Since v5.0
public Curve[] DuplicateSegments()
Duplicates curve segments. Explodes polylines, polycurves and G1 discontinuous NURBS curves. Single segment curves, such as lines, arcs, unkinked NURBS curves, are duplicated.
Remarks: Unlike GetSubCurves(), this method produces results based on the curve's data structure.
An array of all the segments that make up this curve.

DuplicateShallow

public GeometryBase DuplicateShallow()
Constructs a light copy of this object. By "light", it is meant that the same underlying data is used until something is done to attempt to change it. For example, you could have a shallow copy of a very heavy mesh object and the same underlying data will be used when doing things like inspecting the number of faces on the mesh. If you modify the location of one of the mesh vertices, the shallow copy will create a full duplicate of the underlying mesh data and the shallow copy will become a deep copy.
inherited fromGeometryBase
An object of the same type as this object.

This behavior is overridden by implementing classes.

EnsurePrivateCopy

public void EnsurePrivateCopy()
If you want to keep a copy of this class around by holding onto it in a variable after a command completes, call EnsurePrivateCopy to make sure that this class is not tied to the document. You can call this function as many times as you want.
inherited fromCommonObject

Extend

#ExampleSince v5.0
[ConstOperation] public Curve Extend(CurveEnd side, CurveExtensionStyle style, IEnumerable<GeometryBase> geometry)
Extends a curve until it intersects a collection of objects.
side (CurveEnd)The end of the curve to extend.
style (CurveExtensionStyle)The style or type of extension to use.
geometry (IEnumerable<GeometryBase>)A collection of objects. Allowable object types are Curve, Surface, Brep.
New extended curve result on success, null on failure.

Extend

#Since v5.0
[ConstOperation] public Curve Extend(CurveEnd side, CurveExtensionStyle style, Point3d endPoint)
Extends a curve to a point.
side (CurveEnd)The end of the curve to extend.
style (CurveExtensionStyle)The style or type of extension to use.
endPoint (Point3d)A new end point.
New extended curve result on success, null on failure.

Extend

#Since v5.0
[ConstOperation] public Curve Extend(CurveEnd side, double length, CurveExtensionStyle style)
Extends a curve by a specific length.
side (CurveEnd)Curve end to extend.
length (double)Length to add to the curve end.
style (CurveExtensionStyle)Extension style.
A curve with extended ends or null on failure.

Extend

#Since v5.0
[ConstOperation] public Curve Extend(double t0, double t1)
Where possible, analytically extends curve to include the given domain. This will not work on closed curves. The original curve will be identical to the restriction of the resulting curve to the original curve domain.
t0 (double)Start of extension domain, if the start is not inside the Domain of this curve, an attempt will be made to extend the curve.
t1 (double)End of extension domain, if the end is not inside the Domain of this curve, an attempt will be made to extend the curve.
Extended curve on success, null on failure.

Extend

#Since v5.0
[ConstOperation] public Curve Extend(Interval domain)
Where possible, analytically extends curve to include the given domain. This will not work on closed curves. The original curve will be identical to the restriction of the resulting curve to the original curve domain.
domain (Interval)Extension domain.
Extended curve on success, null on failure.

ExtendByArc

#Since v5.0
[ConstOperation] public Curve ExtendByArc(CurveEnd side, IEnumerable<GeometryBase> geometry)
Extends a curve by an Arc until it intersects a collection of objects.
side (CurveEnd)The end of the curve to extend.
geometry (IEnumerable<GeometryBase>)A collection of objects. Allowable object types are Curve, Surface, Brep.
New extended curve result on success, null on failure.

ExtendByLine

#Since v5.0
[ConstOperation] public Curve ExtendByLine(CurveEnd side, IEnumerable<GeometryBase> geometry)
Extends a curve by a line until it intersects a collection of objects.
side (CurveEnd)The end of the curve to extend.
geometry (IEnumerable<GeometryBase>)A collection of objects. Allowable object types are Curve, Surface, Brep.
New extended curve result on success, null on failure.

ExtendOnSurface

#Since v5.0
[ConstOperation] public Curve ExtendOnSurface(CurveEnd side, BrepFace face)
Extends a curve on a surface.
side (CurveEnd)The end of the curve to extend.
face (BrepFace)BrepFace that contains the curve.
New extended curve result on success, null on failure.

ExtendOnSurface

#Since v5.0
[ConstOperation] public Curve ExtendOnSurface(CurveEnd side, Surface surface)
Extends a curve on a surface.
side (CurveEnd)The end of the curve to extend.
surface (Surface)Surface that contains the curve.
New extended curve result on success, null on failure.

ExtremeParameters

#Since v6.0
[ConstOperation] public double[] ExtremeParameters(Vector3d direction)
Returns the parameter values of all local extrema. Parameter values are in increasing order so consecutive extrema define an interval on which each component of the curve is monotone. Note, non-periodic curves always return the end points.
direction (Vector3d)The direction in which to perform the calculation.
The parameter values of all local extrema.

Fair

#Since v5.0
[ConstOperation] public Curve Fair(double distanceTolerance, double angleTolerance, int clampStart, int clampEnd, int iterations)
Fairs a curve object. Fair works best on degree 3 (cubic) curves. Attempts to remove large curvature variations while limiting the geometry changes to be no more than the specified tolerance.
distanceTolerance (double)Maximum allowed distance the faired curve is allowed to deviate from the input.
angleTolerance (double)(in radians) kinks with angles <= angleTolerance are smoothed out 0.05 is a good default.
clampStart (int)The number of (control vertices-1) to preserve at start.

0 = preserve start point

1 = preserve start point and 1st derivative

2 = preserve start point, 1st and 2nd derivative

clampEnd (int)Same as clampStart.
iterations (int)The number of iterations to use in adjusting the curve.
Returns new faired Curve on success, null on failure.

FilletSurfaceToCurve

#Since v8.0
public bool FilletSurfaceToCurve(BrepFace face, double t, double u, double v, double radius, int alignToCurve, int railDegree, int arcDegree, IEnumerable<double> arcSliders, int numBezierSrfs, double tolerance, List<Brep> out_fillets, out double[] fitResults)
Creates a constant-radius fillet surface between a surface and the curve.
face (BrepFace)the face being filleted.
t (double)A parameter on the curve, indicating region of fillet.
u (double)A parameter in the u direction of the face indicating which side of the curve to fillet.
v (double)A parameter in the v direction of the face indicating which side of the curve to fillet.
radius (double)The radius of the constant-radius fillet desired. NOTE: using arcSliders will change the shape of the arcs themselves
alignToCurve (int)Does the user want the fillet to align to the curve? 0 - No, ignore the curve's b-spline structure 1 - Yes, match the curves's degree, spans, CVs as much as possible 2 - Same as 1, but iterate to fit to tolerance Note that a value of 1 or 2 will cause nBezierSrfs to be ignored
railDegree (int)Desired fillet degree (3 or 5) in the u-direction, along the curve
arcDegree (int)Desired fillet degree (2, 3, 4, or 5) in the v-direction, along the fillet arcs.If 2, then the surface is rational in v
arcSliders (IEnumerable<double>)Array of 2 sliders to shape the fillet in the arc direction, used for arcDegree = 3, 4, or 5; input { 0.0, 0.0 } to ignore [0] (-1 to 1) slides tangent arms from base (-1) to theoretical(1) [1] (-1 to 1) slides inner CV(s) from base (-1) to theoretical(1)
numBezierSrfs (int)If >0, this indicates the number of equally-spaced fillet surfaces to be output in the rail direction, each surface Bézier in u.
tolerance (double)The tolerance. In in doubt, the document's absolute tolerance.
out_fillets (List<Brep>)he results of the fillet calculation.
fitResults (out double[])array of doubles indicating fitting results: [0] max 3d point deviation along curve [1] max 3d point deviation along face [2] max angle deviation along face(in degrees) [3] max angle deviation between Bézier surfaces(in degrees) [4] max curvature difference between Bézier surfaces
true if successful, false otherwise.

FilletSurfaceToRail

#Since v8.0
[ConstOperation] public bool FilletSurfaceToRail(BrepFace faceWithCurve, BrepFace secondFace, double u1, double v1, int railDegree, int arcDegree, IEnumerable<double> arcSliders, int numBezierSrfs, bool extend, FilletSurfaceSplitType split_type, double tolerance, List<Brep> out_fillets, List<Brep> out_breps0, List<Brep> out_breps1, out double[] fitResults)
Creates a surface between two surfaces, with a fixed rail curve on the first surface.
Remarks: The trim or split input Breps are in OutBreps0, and OutBreps1. If the input faces are from the same Brep, nothing will be added to OutBreps1.If you specified a split type of RhinoFilletSurfaceSplitType::Nothing, then nothing will be added to either OutBreps0 or OutBreps1.
faceWithCurve (BrepFace)The first face on which the curve exists
secondFace (BrepFace)The second face
u1 (double)A parameter in the u direction of the second face at the side you want to keep after filleting.
v1 (double)A parameter in the v direction of the second face at the side you want to keep after filleting.
railDegree (int)Desired fillet degree (3 or 5) in the u-direction, along the rails
arcDegree (int)esired fillet degree (2, 3, 4, or 5) in the v-direction, along the fillet arcs.If 2, then the surface is rational in v
arcSliders (IEnumerable<double>)Array of 2 sliders to shape the fillet in the arc direction, used for arcDegree = 3, 4, or 5; input { 0.0, 0.0 } to ignore [0] (-1 to 1) slides tangent arms from base (-1) to theoretical(1) [1] (-1 to 1) slides inner CV(s) from base (-1) to theoretical(1)
numBezierSrfs (int)If >0, this indicates the number of equally-spaced fillet surfaces to be output in the rail direction, each surface Bézier in u.
extend (bool)If true, then when one input surface is longer than the other, the fillet surface is extended to the input surface edges.
split_type (FilletSurfaceSplitType)The split type
tolerance (double)The tolerance. In in doubt, the document's absolute tolerance.
out_fillets (List<Brep>)The results of the fillet calculation.
out_breps0 (List<Brep>)The trim or split results of the Brep owned by faceWithCurve.
out_breps1 (List<Brep>)The trim or split results of the Brep owned by pFace1.
fitResults (out double[])array of doubles indicating fitting results: [0] max 3d point deviation along surface 0 [1] max 3d point deviation along surface 1 [2] max angle deviation along surface 0 (in degrees) [3] max angle deviation along surface 1 (in degrees) [4] max angle deviation between Bézier surfaces(in degrees) [5] max curvature difference between Bézier surfaces
true if successful, false otherwise.

FindLocalInflection

#Since v8.0
public bool FindLocalInflection(Vector3d N, Interval subDomain, double seed, out double curveParameter, out double angleError)
Local minimization for point on a curve with tangent perpendicular to N.
Remarks: The algorithm minimizes the square of the dot product of N with the curve tangent. It is possible that the result will not be close to zero.
N (Vector3d)This vector and the curve tangent define a plane. In this plane, there is a vector V perpendicular to the tangent.
subDomain (Interval)Subdomain of curve to evaluate. This must not be empty.
seed (double)A seed parameter, which must be included in the subdomain.
curveParameter (out double)The parameter on the curve if successful, RhinoMath.UnsetValue if unsuccessful.
angleError (out double)The measure, in radians, of the angle between N and V. The angle will be zero when the result is an inflection.
true if the minimization succeeds, regardless of angle_error, false if unsuccessful.

Fit

#Since v5.0
[ConstOperation] public Curve Fit(int degree, double fitTolerance, double angleTolerance)
Fits a new curve through an existing curve.
degree (int)The degree of the returned Curve. Must be bigger than 1.
fitTolerance (double)The fitting tolerance. If fitTolerance is RhinoMath.UnsetValue or <=0.0, the document absolute tolerance is used.
angleTolerance (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

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

FrameAt

#Since v5.0
[ConstOperation] public bool FrameAt(double t, out Plane plane)
Returns a 3d frame at a parameter.
t (double)Evaluation parameter.
plane (out Plane)The frame is returned here.
true on success, false on failure.

GetBoundingBox

[ConstOperation] public BoundingBox GetBoundingBox(bool accurate)
Bounding box solver. Gets the world axis aligned bounding box for the geometry.
inherited fromGeometryBase
accurate (bool)If true, a physically accurate bounding box will be computed. If not, a bounding box estimate will be computed. For some geometry types there is no difference between the estimate and the accurate bounding box. Estimated bounding boxes can be computed much (much) faster than accurate (or "tight") bounding boxes. Estimated bounding boxes are always similar to or larger than accurate bounding boxes.
The bounding box of the geometry in world coordinates or BoundingBox.Empty if not bounding box could be found.

GetBoundingBox

[ConstOperation] public BoundingBox GetBoundingBox(Plane plane, out Box worldBox)
Aligned Bounding box solver. Gets the plane aligned bounding box.
inherited fromGeometryBase
plane (Plane)Orientation plane for BoundingBox.
worldBox (out Box)Aligned box in World coordinates.
A BoundingBox in plane coordinates.

GetBoundingBox

[ConstOperation] public BoundingBox GetBoundingBox(Plane plane)
Aligned Bounding box solver. Gets the plane aligned bounding box.
inherited fromGeometryBase
plane (Plane)Orientation plane for BoundingBox.
A BoundingBox in plane coordinates.

GetBoundingBox

[ConstOperation] public virtual BoundingBox GetBoundingBox(Transform xform)
Aligned Bounding box solver. Gets the world axis aligned bounding box for the transformed geometry.
inherited fromGeometryBase
xform (Transform)Transformation to apply to object prior to the BoundingBox computation. The geometry itself is not modified.
The accurate bounding box of the transformed geometry in world coordinates or BoundingBox.Empty if not bounding box could be found.

GetConicSectionType

#Since v6.0
[ConstOperation] public ConicSectionType GetConicSectionType()
Returns the type of conic section based on the curve's shape.

GetConicSectionType

#Since v6.0
[ConstOperation] public ConicSectionType GetConicSectionType(out Point3d focus1, out Point3d focus2, out Point3d center)
Returns the type of conic section based on the curve's shape.
focus1 (out Point3d)The first focus point, if applicable.
focus2 (out Point3d)The second focus point, if applicable.
center (out Point3d)The center point, if applicable.

GetCurveParameterFromNurbsFormParameter

#Since v5.0
[ConstOperation] public bool GetCurveParameterFromNurbsFormParameter(double nurbsParameter, out double curveParameter)
Convert a NURBS curve parameter to a curve parameter.
Remarks: If HasNurbForm returns 2, this function converts the curve parameter to the NURBS curve parameter.
nurbsParameter (double)NURBS form parameter.
curveParameter (out double)Curve parameter.
true on success, false on failure.

GetDistancesBetweenCurves

#ExampleSince v5.0
public static bool GetDistancesBetweenCurves(Curve curveA, Curve curveB, double tolerance, out double maxDistance, out double maxDistanceParameterA, out double maxDistanceParameterB, out double minDistance, out double minDistanceParameterA, out double minDistanceParameterB)
Calculates the minimum and maximum distances between two curves. This function is useful for computing curve deviation. If you are not computing curve deviation, use ClosestPoints(Curve, Point3d, Point3d).
curveA (Curve)A curve.
curveB (Curve)Another curve.
tolerance (double)A tolerance value.
maxDistance (out double)The maximum distance value. This is an out reference argument.
maxDistanceParameterA (out double)The maximum distance parameter on curve A. This is an out reference argument.
maxDistanceParameterB (out double)The maximum distance parameter on curve B. This is an out reference argument.
minDistance (out double)The minimum distance value. This is an out reference argument.
minDistanceParameterA (out double)The minimum distance parameter on curve A. This is an out reference argument.
minDistanceParameterB (out double)The minimum distance parameter on curve B. This is an out reference argument.
true if the operation succeeded; otherwise false.

GetFilletPoints

#Since v5.0
public static bool GetFilletPoints(Curve curve0, Curve curve1, double radius, double t0Base, double t1Base, out double t0, out double t1, out Plane filletPlane)
Finds points at which to cut a pair of curves so that a fillet of given radius can be inserted.
Remarks: A fillet point is a pair of curve parameters (t0,t1) such that there is a circle of radius point3 tangent to curve c0 at t0 and tangent to curve c1 at t1. Of all possible fillet points this function returns the one which is the closest to the base point t0Base, t1Base. Distance from the base point is measured by the sum of arc lengths along the two curves.
curve0 (Curve)First curve to fillet.
curve1 (Curve)Second curve to fillet.
radius (double)Fillet radius.
t0Base (double)Parameter value for base point on curve0.
t1Base (double)Parameter value for base point on curve1.
t0 (out double)Parameter value of fillet point on curve 0.
t1 (out double)Parameter value of fillet point on curve 1.
filletPlane (out Plane)The fillet is contained in this plane with the fillet center at the plane origin.
true on success, false on failure.

GetLength

#ExampleSince v5.0
[ConstOperation] public double GetLength()
Gets the length of the curve with a fractional tolerance of 1.0e-8.
The length of the curve on success, or zero on failure.

GetLength

#Since v5.0
[ConstOperation] public double GetLength(double fractionalTolerance, Interval subdomain)
Get the length of a sub-section of the curve.
fractionalTolerance (double)Desired fractional precision. fabs(("exact" length from start to t) - arc_length)/arc_length <= fractionalTolerance.
subdomain (Interval)The calculation is performed on the specified sub-domain of the curve (must be non-decreasing).
The length of the sub-curve on success, or zero on failure.

GetLength

#Since v5.0
[ConstOperation] public double GetLength(double fractionalTolerance)
Get the length of the curve.
fractionalTolerance (double)Desired fractional precision. fabs(("exact" length from start to t) - arc_length)/arc_length <= fractionalTolerance.
The length of the curve on success, or zero on failure.

GetLength

#Since v5.0
[ConstOperation] public double GetLength(Interval subdomain)
Get the length of a sub-section of the curve with a fractional tolerance of 1e-8.
subdomain (Interval)The calculation is performed on the specified sub-domain of the curve (must be non-decreasing).
The length of the sub-curve on success, or zero on failure.

GetLocalPerpPoint

#Since v6.0
[ConstOperation] public bool GetLocalPerpPoint(Point3d testPoint, double seedParmameter, Interval subDomain, out double curveParameter)
Search for a location on the curve, near seedParmameter, that is perpendicular to a test point.
testPoint (Point3d)The test point.
seedParmameter (double)A "seed" parameter on the curve.
subDomain (Interval)The sub-domain of the curve to search.
curveParameter (out double)The parameter value at the perpendicular point
True if a solution is found, false otherwise.

GetLocalPerpPoint

#Since v6.0
[ConstOperation] public bool GetLocalPerpPoint(Point3d testPoint, double seedParmameter, out double curveParameter)
Search for a location on the curve, near seedParmameter, that is perpendicular to a test point.
testPoint (Point3d)The test point.
seedParmameter (double)A "seed" parameter on the curve.
curveParameter (out double)The parameter value at the perpendicular point
True if a solution is found, false otherwise.

GetLocalTangentPoint

#Since v6.0
[ConstOperation] public bool GetLocalTangentPoint(Point3d testPoint, double seedParmameter, Interval subDomain, out double curveParameter)
Search for a location on the curve, near seedParmameter, that is tangent to a test point.
testPoint (Point3d)The test point.
seedParmameter (double)A "seed" parameter on the curve.
subDomain (Interval)The sub-domain of the curve to search.
curveParameter (out double)The parameter value at the tangent point
True if a solution is found, false otherwise.

GetLocalTangentPoint

#Since v6.0
[ConstOperation] public bool GetLocalTangentPoint(Point3d testPoint, double seedParmameter, out double curveParameter)
Search for a location on the curve, near seedParmameter, that is tangent to a test point.
testPoint (Point3d)The test point.
seedParmameter (double)A "seed" parameter on the curve.
curveParameter (out double)The parameter value at the tangent point
True if a solution is found, false otherwise.

GetNextDiscontinuity

#Since v7.4
[ConstOperation] public bool GetNextDiscontinuity(Continuity continuityType, double t0, double t1, double cosAngleTolerance, double curvatureTolerance, out double t)
Searches for a derivative, tangent, or curvature discontinuity.
continuityType (Continuity)Type of continuity to search for.
t0 (double)Search begins at t0. If there is a discontinuity at t0, it will be ignored. This makes it possible to repeatedly call GetNextDiscontinuity() and step through the discontinuities.
t1 (double)(t0 != t1) If there is a discontinuity at t1 it will be ignored unless continuityType is a locus discontinuity type and t1 is at the start or end of the curve.
cosAngleTolerance (double)default = cos(1 degree) Used only when continuity is G1_continuous or G2_continuous. If the cosine of the angle between two tangent vectors is <= cosAngleTolerance, then a G1 discontinuity is reported. For G2, values tighter than cos(1 degree) are treated as cos(1 degree), and angles less than about 18 degrees are doubled for the curvature direction test. With the default, a G2 discontinuity is reported if the curvature vectors differ by more than 2 degrees.
curvatureTolerance (double)(default = RhinoMath.SqrtEpsilon) Used only when continuity is G2_continuous. If K0 and K1 are curvatures evaluated from above and below and |K0 - K1| <= curvatureTolerance, then the curvature is considered continuous. Otherwise, a curvature discontinuity is reported if the curvature direction test fails or ||K0| - |K1|| > 0.05 * max(|K0|, |K1|). Increasing curvatureTolerance can only loosen the test.
t (out double)If a discontinuity is found, then t reports the parameter at the discontinuity.
Parametric continuity tests c = (C0_continuous, ..., G2_continuous): true if a parametric discontinuity was found strictly between t0 and t1. Note well that all curves are parametrically continuous at the ends of their domains. Locus continuity tests c = (C0_locus_continuous, ...,G2_locus_continuous): true if a locus discontinuity was found strictly between t0 and t1 or at t1 is the at the end of a curve. Note well that all open curves (IsClosed()=false) are locus discontinuous at the ends of their domains. All closed curves (IsClosed()=true) are at least C0_locus_continuous at the ends of their domains.

GetNextDiscontinuity

#Since v5.0
[ConstOperation] public bool GetNextDiscontinuity(Continuity continuityType, double t0, double t1, out double t)
Searches for a derivative, tangent, or curvature discontinuity.
Remarks: G1 uses a 1 degree tangent angle tolerance. G2 reports a discontinuity if the curvature vectors differ in direction by more than 2 degrees or in magnitude by more than 5%. These tolerances do not depend on the document's angle tolerance.
continuityType (Continuity)Type of continuity to search for.
t0 (double)Search begins at t0. If there is a discontinuity at t0, it will be ignored. This makes it possible to repeatedly call GetNextDiscontinuity() and step through the discontinuities.
t1 (double)(t0 != t1) If there is a discontinuity at t1 it will be ignored unless continuityType is a locus discontinuity type and t1 is at the start or end of the curve.
t (out double)If a discontinuity is found, then t reports the parameter at the discontinuity.
Parametric continuity tests c = (C0_continuous, ..., G2_continuous): true if a parametric discontinuity was found strictly between t0 and t1. Note well that all curves are parametrically continuous at the ends of their domains. Locus continuity tests c = (C0_locus_continuous, ...,G2_locus_continuous): true if a locus discontinuity was found strictly between t0 and t1 or at t1 is the at the end of a curve. Note well that all open curves (IsClosed()=false) are locus discontinuous at the ends of their domains. All closed curves (IsClosed()=true) are at least C0_locus_continuous at the ends of their domains.

GetNurbsFormParameterFromCurveParameter

#Since v5.0
[ConstOperation] public bool GetNurbsFormParameterFromCurveParameter(double curveParameter, out double nurbsParameter)
Convert a curve parameter to a NURBS curve parameter.
Remarks: If GetNurbForm returns 2, this function converts the curve parameter to the NURBS curve parameter.
curveParameter (double)Curve parameter.
nurbsParameter (out double)NURBS form parameter.
true on success, false on failure.

GetObjectData

[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.SerializationFormatter)] public virtual void GetObjectData(SerializationInfo info, StreamingContext context)
Populates a System.Runtime.Serialization.SerializationInfo with the data needed to serialize the target object.
inherited fromCommonObject
info (SerializationInfo)The System.Runtime.Serialization.SerializationInfo to populate with data.
context (StreamingContext)The destination (see System.Runtime.Serialization.StreamingContext) for this serialization.

GetPerpendicularFrames

#Since v5.0
[ConstOperation] public Plane[] GetPerpendicularFrames(IEnumerable<double> parameters)
Gets a collection of perpendicular frames along the curve. Perpendicular frames are also known as 'Zero-twisting frames' and they minimize rotation from one frame to the next.
parameters (IEnumerable<double>)A collection of strictly increasing curve parameters to place perpendicular frames on.
An array of perpendicular frames on success or null on failure.
InvalidOperationExceptionThrown when the curve parameters are not increasing.

GetSubCurves

#Since v8.0
public Curve[] GetSubCurves()
Gets subcurves from a curve. The results will be similar to what is produced by Rhino's Explode command.
Remarks: Unlike DuplicateSegments(), this method produces results based on the curve's geometry.
An array of subcurves that make up this curve.

GetUserString

public string GetUserString(string key)
Gets user string from this geometry.
inherited fromGeometryBase
key (string)id used to retrieve the string.
string associated with the key if successful. null if no key was found.

GetUserStrings

public NameValueCollection GetUserStrings()
Gets a copy of all (user key string, user value string) pairs attached to this geometry.
inherited fromGeometryBase
A new collection.

HasNurbsForm

#Since v5.0
[ConstOperation] public int HasNurbsForm()
Does a NURBS curve representation of this curve exist?
0 unable to create NURBS representation with desired accuracy. 1 success - NURBS parameterization matches the curve's to the desired accuracy 2 success - NURBS point locus matches the curve's and the domain of the NURBS curve is correct. However, This curve's parameterization and the NURBS curve parameterization may not match. This situation happens when getting NURBS representations of curves that have a transcendental parameterization like circles.

InflectionPoints

#Since v7.0
[ConstOperation] public Point3d[] InflectionPoints()
Returns a curve's inflection points. An inflection point is a location on a curve at which the sign of the curvature (i.e., the concavity) changes. The curvature at these locations is always 0.
An array of points if successful, null if not successful or on error.

InflectionPoints

#Since v8.4
[ConstOperation] public Point3d[] InflectionPoints(out double[] curveParameters)
Returns a curve's inflection points. An inflection point is a location on a curve at which the sign of the curvature (i.e., the concavity) changes. The curvature at these locations is always 0.
curveParameters (out double[])An array of curve parameters at the inflection points.
An array of points if successful, null if not successful or on error.

IsArc

#Since v5.0
public bool IsArc()
Test a curve to see if it can be represented by an arc or circle within RhinoMath.ZeroTolerance.
true if the curve can be represented by an arc or a circle within tolerance.

IsArc

#Since v5.0
public bool IsArc(double tolerance)
Test a curve to see if it can be represented by an arc or circle within the given tolerance.
tolerance (double)Tolerance to use when checking.
true if the curve can be represented by an arc or a circle within tolerance.

IsCircle

#Since v5.0
public bool IsCircle()
Test a curve to see if it can be represented by a circle within RhinoMath.ZeroTolerance.
true if the Curve can be represented by a circle within tolerance.

IsCircle

#Since v5.0
public bool IsCircle(double tolerance)
Test a curve to see if it can be represented by a circle within the given tolerance.
tolerance (double)Tolerance to use when checking.
true if the curve can be represented by a circle to within tolerance.

IsClosable

#Since v5.0
[ConstOperation] public bool IsClosable(double tolerance, double minimumAbsoluteSize, double minimumRelativeSize)
Decide if it makes sense to close off this curve by moving the endpoint to the start based on start-end gap size and length of curve as approximated by chord defined by 6 points.
tolerance (double)Maximum allowable distance between start and end. If start - end gap is greater than tolerance, this function will return false.
minimumAbsoluteSize (double)If greater than 0.0 and none of the interior sampled points are at least minimumAbsoluteSize from start, this function will return false.
minimumRelativeSize (double)If greater than 1.0 and chord length is less than minimumRelativeSize*gap, this function will return false.
true if start and end points are close enough based on above conditions.

IsClosable

#Since v5.0
[ConstOperation] public bool IsClosable(double tolerance)
Decide if it makes sense to close off this curve by moving the endpoint to the start based on start-end gap size and length of curve as approximated by chord defined by 6 points.
tolerance (double)Maximum allowable distance between start and end. If start - end gap is greater than tolerance, this function will return false.
true if start and end points are close enough based on above conditions.

IsContinuous

#Since v5.0
[ConstOperation] public bool IsContinuous(Continuity continuityType, double t)
Test continuity at a curve parameter value.
Remarks: G1 uses a 1 degree tangent angle tolerance. G2 reports a discontinuity if the curvature vectors differ in direction by more than 2 degrees or in magnitude by more than 5%. These tolerances do not depend on the document's angle tolerance.
continuityType (Continuity)Type of continuity to test for.
t (double)Parameter to test.
true if the curve has at least the c type continuity at the parameter t.

IsEllipse

#Since v5.0
public bool IsEllipse()
Test a curve to see if it can be represented by an ellipse within RhinoMath.ZeroTolerance.
true if the Curve can be represented by an ellipse within tolerance.

IsEllipse

#Since v5.0
public bool IsEllipse(double tolerance)
Test a curve to see if it can be represented by an ellipse within a given tolerance.
tolerance (double)Tolerance to use for checking.
true if the Curve can be represented by an ellipse within tolerance.

IsInPlane

#Since v5.0
public bool IsInPlane(Plane testPlane, double tolerance)
Test a curve to see if it lies in a specific plane.
testPlane (Plane)Plane to test for.
tolerance (double)Tolerance to use when checking.
true if the maximum distance from the curve to the testPlane is <= tolerance.

IsInPlane

#Since v5.0
public bool IsInPlane(Plane testPlane)
Test a curve to see if it lies in a specific plane.
testPlane (Plane)Plane to test for.
true if the maximum distance from the curve to the testPlane is <= RhinoMath.ZeroTolerance.

IsLinear

#ExampleSince v5.0
public bool IsLinear()
Test a curve to see if it is linear to within RhinoMath.ZeroTolerance units (1e-12).
true if the curve is linear.

IsLinear

#Since v5.0
public bool IsLinear(double tolerance)
Test a curve to see if it is linear to within the custom tolerance.
tolerance (double)Tolerance to use when checking linearity.
true if the ends of the curve are farther than tolerance apart and the maximum distance from any point on the curve to the line segment connecting the curve ends is <= tolerance.

IsPlanar

#ExampleSince v5.0
public bool IsPlanar()
Test a curve for planarity.
true if the curve is planar (flat) to within RhinoMath.ZeroTolerance units (1e-12).

IsPlanar

#Since v5.0
public bool IsPlanar(double tolerance)
Test a curve for planarity.
tolerance (double)Tolerance to use when checking.
true if there is a plane such that the maximum distance from the curve to the plane is <= tolerance.

IsPolyline

#ExampleSince v5.0
public bool IsPolyline()
Several types of Curve can have the form of a polyline including a degree 1 NurbsCurve, a PolylineCurve, and a PolyCurve all of whose segments are some form of polyline. IsPolyline tests a curve to see if it can be represented as a polyline.
true if this curve can be represented as a polyline; otherwise, false.

IsShort

#Since v5.0
[ConstOperation] public bool IsShort(double tolerance, Interval subdomain)
Used to quickly find short curves.
Remarks: Faster than calling Length() and testing the result.
tolerance (double)Length threshold value for "shortness".
subdomain (Interval)The test is performed on the interval that is the intersection of sub-domain with Domain()
true if the length of the curve is <= tolerance.

IsShort

#ExampleSince v5.0
[ConstOperation] public bool IsShort(double tolerance)
Used to quickly find short curves.
Remarks: Faster than calling Length() and testing the result.
tolerance (double)Length threshold value for "shortness".
true if the length of the curve is <= tolerance.

IsValidWithLog

public bool IsValidWithLog(out string log)
Determines if an object is valid. Also provides a report on errors if this object happens not to be valid.
inherited fromCommonObject
log (out string)A textual log. This out parameter is assigned during this call.
true if this object is valid; false otherwise.

JoinCurves

#Since v8.12
public static Curve[] JoinCurves(IEnumerable<Curve> inputCurves, double joinTolerance, bool preserveDirection, bool simpleJoin, out int[] key)
Joins a collection of curve segments together.
inputCurves (IEnumerable<Curve>)An array, a list or any enumerable set of curve segments to join.
joinTolerance (double)Joining tolerance, i.e. the distance between segment end-points that is allowed.
preserveDirection (bool)

If true, curve endpoints will be compared to curve start points.

If false, all start and endpoints will be compared and copies of input curves may be reversed in output.

simpleJoin (bool)Set true to use the simple joining method. In general, set this parameter to false.
key (out int[])inputCurves[i] is part of returnValue[key[i]]
An array of joined curves. This array can be empty.
ArgumentNullExceptionIf inputCurves is null.

JoinCurves

#Since v8.4
public static Curve[] JoinCurves(IEnumerable<Curve> inputCurves, double joinTolerance, bool preserveDirection, out int[] key)
Joins a collection of curve segments together.
inputCurves (IEnumerable<Curve>)An array, a list or any enumerable set of curve segments to join.
joinTolerance (double)Joining tolerance, i.e. the distance between segment end-points that is allowed.
preserveDirection (bool)

If true, curve endpoints will be compared to curve start points.

If false, all start and endpoints will be compared and copies of input curves may be reversed in output.

key (out int[])inputCurves[i] is part of returnValue[key[i]]
An array of joined curves. This array can be empty.
ArgumentNullExceptionIf inputCurves is null.

JoinCurves

#Since v5.0
public static Curve[] JoinCurves(IEnumerable<Curve> inputCurves, double joinTolerance, bool preserveDirection)
Joins a collection of curve segments together.
inputCurves (IEnumerable<Curve>)An array, a list or any enumerable set of curve segments to join.
joinTolerance (double)Joining tolerance, i.e. the distance between segment end-points that is allowed.
preserveDirection (bool)

If true, curve endpoints will be compared to curve start points.

If false, all start and endpoints will be compared and copies of input curves may be reversed in output.

An array of joined curves. This array can be empty.
ArgumentNullExceptionIf inputCurves is null.

JoinCurves

#ExampleSince v5.0
public static Curve[] JoinCurves(IEnumerable<Curve> inputCurves, double joinTolerance)
Joins a collection of curve segments together.
inputCurves (IEnumerable<Curve>)An array, a list or any enumerable set of curve segments to join.
joinTolerance (double)Joining tolerance, i.e. the distance between segment end-points that is allowed.
An array of joined curves. This array can be empty.
ArgumentNullExceptionIf inputCurves is null.

JoinCurves

#Since v5.0
public static Curve[] JoinCurves(IEnumerable<Curve> inputCurves)
Joins a collection of curve segments together.
inputCurves (IEnumerable<Curve>)Curve segments to join.
An array of joined curves. This array can be empty.

LcoalClosestPoint

#Since v6.3 Obsolete v6.18
[ConstOperation] [EditorBrowsable(EditorBrowsableState.Never)] public bool LcoalClosestPoint(Point3d testPoint, double seed, out double t)
obsoleteTypo: use LocalClosestPoint
Find parameter of the point on a curve that is locally closest to the testPoint. The search for a local close point starts at a seed parameter.
testPoint (Point3d)A point to test against.
seed (double)The seed parameter.
t (out double)>Parameter of the curve that is closest to testPoint.
true if the search is successful, false if the search fails.

LengthParameter

#Since v5.0
[ConstOperation] public bool LengthParameter(double segmentLength, out double t, double fractionalTolerance, Interval subdomain)
Gets the parameter along the curve which coincides with a given length along the curve.
segmentLength (double)Length of segment to measure. Must be less than or equal to the length of the sub-domain.
t (out double)Parameter such that the length of the curve from the start of the sub-domain to t is s.
fractionalTolerance (double)Desired fractional precision. fabs(("exact" length from start to t) - arc_length)/arc_length <= fractionalTolerance.
subdomain (Interval)The calculation is performed on the specified sub-domain of the curve rather than the whole curve.
true on success, false on failure.

LengthParameter

#Since v5.0
[ConstOperation] public bool LengthParameter(double segmentLength, out double t, double fractionalTolerance)
Gets the parameter along the curve which coincides with a given length along the curve.
segmentLength (double)Length of segment to measure. Must be less than or equal to the length of the curve.
t (out double)Parameter such that the length of the curve from the curve start point to t equals s.
fractionalTolerance (double)Desired fractional precision. fabs(("exact" length from start to t) - arc_length)/arc_length <= fractionalTolerance.
true on success, false on failure.

LengthParameter

#Since v5.0
[ConstOperation] public bool LengthParameter(double segmentLength, out double t, Interval subdomain)
Gets the parameter along the curve which coincides with a given length along the curve. A fractional tolerance of 1e-8 is used in this version of the function.
segmentLength (double)Length of segment to measure. Must be less than or equal to the length of the sub-domain.
t (out double)Parameter such that the length of the curve from the start of the sub-domain to t is s.
subdomain (Interval)The calculation is performed on the specified sub-domain of the curve rather than the whole curve.
true on success, false on failure.

LengthParameter

#Since v5.0
[ConstOperation] public bool LengthParameter(double segmentLength, out double t)
Gets the parameter along the curve which coincides with a given length along the curve. A fractional tolerance of 1e-8 is used in this version of the function.
segmentLength (double)Length of segment to measure. Must be less than or equal to the length of the curve.
t (out double)Parameter such that the length of the curve from the curve start point to t equals length.
true on success, false on failure.

LocalClosestPoint

#Since v6.18
[ConstOperation] public bool LocalClosestPoint(Point3d testPoint, double seed, out double t)
Find parameter of the point on a curve that is locally closest to the testPoint. The search for a local close point starts at a seed parameter.
testPoint (Point3d)A point to test against.
seed (double)The seed parameter.
t (out double)>Parameter of the curve that is closest to testPoint.
true if the search is successful, false if the search fails.

MakeClosed

#Since v5.0
public bool MakeClosed(double tolerance)
If IsClosed, just return true. Otherwise, decide if curve can be closed as follows: Linear curves polylinear curves with 2 segments, NURBS with 3 or less control points cannot be made closed. Also, if tolerance > 0 and the gap between start and end is larger than tolerance, curve cannot be made closed. Adjust the curve's endpoint to match its start point.
tolerance (double)If nonzero, and the gap is more than tolerance, curve cannot be made closed.
true on success, false on failure.

MakeDeformable

public bool MakeDeformable()
If possible, converts the object into a form that can be accurately modified with "squishy" transformations like projections, shears, an non-uniform scaling.
inherited fromGeometryBase
false if object cannot be converted to a deformable object. true if object was already deformable or was converted into a deformable object.

MakeEndsMeet

#Since v5.0
public static bool MakeEndsMeet(Curve curveA, bool adjustStartCurveA, Curve curveB, bool adjustStartCurveB)
Makes adjustments to the ends of one or both input curves so that they meet at a point.
curveA (Curve)1st curve to adjust.
adjustStartCurveA (bool)Which end of the 1st curve to adjust: true is start, false is end.
curveB (Curve)2nd curve to adjust.
adjustStartCurveB (bool)which end of the 2nd curve to adjust true==start, false==end.
true on success.

MaxCurvaturePoints

#Since v7.0
[ConstOperation] public Point3d[] MaxCurvaturePoints()
Returns a curve's maximum curvature points. The maximum curvature points identify where the curvature starts to decrease in both directions from the points.
An array of points if successful, null if not successful or on error.

MaxCurvaturePoints

#Since v8.4
[ConstOperation] public Point3d[] MaxCurvaturePoints(out double[] curveParameters)
Returns a curve's maximum curvature points. The maximum curvature points identify where the curvature starts to decrease in both directions from the points.
curveParameters (out double[])An array of curve parameters at the maximum curvature points.
An array of points if successful, null if not successful or on error.

MemoryEstimate

[CLSCompliant(false)] [ConstOperation] public uint MemoryEstimate()
Computes an estimate of the number of bytes that this object is using in memory.
inherited fromGeometryBase
An estimated memory footprint.

NonConstOperation

#
protected override void NonConstOperation()
For derived classes implementers.

Defines the necessary implementation to free the instance from being constant.

NormalizedLengthParameter

#Since v5.0
[ConstOperation] public bool NormalizedLengthParameter(double s, out double t, double fractionalTolerance, Interval subdomain)
Input the parameter of the point on the curve that is a prescribed arc length from the start of the curve.
s (double)Normalized arc length parameter. E.g., 0 = start of curve, 1/2 = midpoint of curve, 1 = end of curve.
t (out double)Parameter such that the length of the curve from its start to t is arc_length.
fractionalTolerance (double)Desired fractional precision. fabs(("exact" length from start to t) - arc_length)/arc_length <= fractionalTolerance.
subdomain (Interval)The calculation is performed on the specified sub-domain of the curve.
true on success, false on failure.

NormalizedLengthParameter

#Since v5.0
[ConstOperation] public bool NormalizedLengthParameter(double s, out double t, double fractionalTolerance)
Input the parameter of the point on the curve that is a prescribed arc length from the start of the curve.
s (double)Normalized arc length parameter. E.g., 0 = start of curve, 1/2 = midpoint of curve, 1 = end of curve.
t (out double)Parameter such that the length of the curve from its start to t is arc_length.
fractionalTolerance (double)Desired fractional precision. fabs(("exact" length from start to t) - arc_length)/arc_length <= fractionalTolerance.
true on success, false on failure.

NormalizedLengthParameter

#Since v5.0
[ConstOperation] public bool NormalizedLengthParameter(double s, out double t, Interval subdomain)
Input the parameter of the point on the curve that is a prescribed arc length from the start of the curve. A fractional tolerance of 1e-8 is used in this version of the function.
s (double)Normalized arc length parameter. E.g., 0 = start of curve, 1/2 = midpoint of curve, 1 = end of curve.
t (out double)Parameter such that the length of the curve from its start to t is arc_length.
subdomain (Interval)The calculation is performed on the specified sub-domain of the curve.
true on success, false on failure.

NormalizedLengthParameter

#Since v5.0
[ConstOperation] public bool NormalizedLengthParameter(double s, out double t)
Input the parameter of the point on the curve that is a prescribed arc length from the start of the curve. A fractional tolerance of 1e-8 is used in this version of the function.
s (double)Normalized arc length parameter. E.g., 0 = start of curve, 1/2 = midpoint of curve, 1 = end of curve.
t (out double)Parameter such that the length of the curve from its start to t is arc_length.
true on success, false on failure.

NormalizedLengthParameters

#Since v5.0
[ConstOperation] public double[] NormalizedLengthParameters(double[] s, double absoluteTolerance, double fractionalTolerance, Interval subdomain)
Input the parameter of the point on the curve that is a prescribed arc length from the start of the curve.
s (double[])Array of normalized arc length parameters. E.g., 0 = start of curve, 1/2 = midpoint of curve, 1 = end of curve.
absoluteTolerance (double)If absoluteTolerance > 0, then the difference between (s[i+1]-s[i])*curve_length and the length of the curve segment from t[i] to t[i+1] will be <= absoluteTolerance.
fractionalTolerance (double)Desired fractional precision for each segment. fabs("true" length - actual length)/(actual length) <= fractionalTolerance.
subdomain (Interval)The calculation is performed on the specified sub-domain of the curve. A 0.0 s value corresponds to sub-domain->Min() and a 1.0 s value corresponds to sub-domain->Max().
If successful, array of curve parameters such that the length of the curve from its start to t[i] is s[i]*curve_length. Null on failure.

NormalizedLengthParameters

#Since v5.0
[ConstOperation] public double[] NormalizedLengthParameters(double[] s, double absoluteTolerance, double fractionalTolerance)
Input the parameter of the point on the curve that is a prescribed arc length from the start of the curve.
s (double[])Array of normalized arc length parameters. E.g., 0 = start of curve, 1/2 = midpoint of curve, 1 = end of curve.
absoluteTolerance (double)If absoluteTolerance > 0, then the difference between (s[i+1]-s[i])*curve_length and the length of the curve segment from t[i] to t[i+1] will be <= absoluteTolerance.
fractionalTolerance (double)Desired fractional precision for each segment. fabs("true" length - actual length)/(actual length) <= fractionalTolerance.
If successful, array of curve parameters such that the length of the curve from its start to t[i] is s[i]*curve_length. Null on failure.

NormalizedLengthParameters

#Since v5.0
[ConstOperation] public double[] NormalizedLengthParameters(double[] s, double absoluteTolerance, Interval subdomain)
Input the parameter of the point on the curve that is a prescribed arc length from the start of the curve. A fractional tolerance of 1e-8 is used in this version of the function.
s (double[])Array of normalized arc length parameters. E.g., 0 = start of curve, 1/2 = midpoint of curve, 1 = end of curve.
absoluteTolerance (double)If absoluteTolerance > 0, then the difference between (s[i+1]-s[i])*curve_length and the length of the curve segment from t[i] to t[i+1] will be <= absoluteTolerance.
subdomain (Interval)The calculation is performed on the specified sub-domain of the curve. A 0.0 s value corresponds to sub-domain->Min() and a 1.0 s value corresponds to sub-domain->Max().
If successful, array of curve parameters such that the length of the curve from its start to t[i] is s[i]*curve_length. Null on failure.

NormalizedLengthParameters

#Since v5.0
[ConstOperation] public double[] NormalizedLengthParameters(double[] s, double absoluteTolerance)
Input the parameter of the point on the curve that is a prescribed arc length from the start of the curve. A fractional tolerance of 1e-8 is used in this version of the function.
s (double[])Array of normalized arc length parameters. E.g., 0 = start of curve, 1/2 = midpoint of curve, 1 = end of curve.
absoluteTolerance (double)If absoluteTolerance > 0, then the difference between (s[i+1]-s[i])*curve_length and the length of the curve segment from t[i] to t[i+1] will be <= absoluteTolerance.
If successful, array of curve parameters such that the length of the curve from its start to t[i] is s[i]*curve_length. Null on failure.

Offset

#Since v5.0
[ConstOperation] public Curve[] Offset(Plane plane, double distance, double tolerance, CurveOffsetCornerStyle cornerStyle)
Offsets this curve. If you have a nice offset, then there will be one entry in the array. If the original curve had kinks or the offset curve had self intersections, you will get multiple segments in the output array.
plane (Plane)Offset solution plane.
distance (double)The positive or negative distance to offset.
tolerance (double)The offset or fitting tolerance.
cornerStyle (CurveOffsetCornerStyle)Corner style for offset kinks.
Offset curves on success, null on failure.

Offset

#Since v5.0
[ConstOperation] public Curve[] Offset(Point3d directionPoint, Vector3d normal, double distance, double tolerance, CurveOffsetCornerStyle cornerStyle)
Offsets this curve. If you have a nice offset, then there will be one entry in the array. If the original curve had kinks or the offset curve had self intersections, you will get multiple segments in the output array.
directionPoint (Point3d)A point that indicates the direction of the offset.
normal (Vector3d)The normal to the offset plane.
distance (double)The positive or negative distance to offset.
tolerance (double)The offset or fitting tolerance.
cornerStyle (CurveOffsetCornerStyle)Corner style for offset kinks.
Offset curves on success, null on failure.

Offset

#Since v7.0
[ConstOperation] public Curve[] Offset(Point3d directionPoint, Vector3d normal, double distance, double tolerance, double angleTolerance, bool loose, CurveOffsetCornerStyle cornerStyle, CurveOffsetEndStyle endStyle)
Offsets this curve. If you have a nice offset, then there will be one entry in the array. If the original curve had kinks or the offset curve had self intersections, you will get multiple segments in the output array.
directionPoint (Point3d)A point that indicates the direction of the offset.
normal (Vector3d)The normal to the offset plane.
distance (double)The positive or negative distance to offset.
tolerance (double)The offset or fitting tolerance.
angleTolerance (double)The angle tolerance, in radians, used to decide whether to split at kinks.
loose (bool)If false, offset within tolerance. If true, offset by moving edit points.
cornerStyle (CurveOffsetCornerStyle)Corner style for offset kinks.
endStyle (CurveOffsetEndStyle)End style for non-loose, non-closed curve offsets.
Offset curves on success, null on failure.

OffsetNormalToSurface

#Since v5.0
[ConstOperation] public Curve OffsetNormalToSurface(Surface surface, double height)
Finds a curve by offsetting an existing curve normal to a surface. The caller is responsible for ensuring that the curve lies on the input surface.
surface (Surface)Surface from which normals are calculated.
height (double)Offset distance.
Curve offset normal to the surface, if successful, null otherwise. The offset curve is interpolated through a small number of points so if the surface is irregular or complicated, the result will not be a very accurate offset.

OffsetOnSurface

#Since v5.0
[ConstOperation] public Curve[] OffsetOnSurface(BrepFace face, double distance, double fittingTolerance)
Offset this curve on a brep face surface. This curve must lie on the surface.
face (BrepFace)The brep face on which to offset.
distance (double)A distance to offset (+)left, (-)right.
fittingTolerance (double)A fitting tolerance.
Offset curves on success, or null on failure.
ArgumentNullExceptionIf face is null.

OffsetOnSurface

#Since v5.0
[ConstOperation] public Curve[] OffsetOnSurface(BrepFace face, double[] curveParameters, double[] offsetDistances, double fittingTolerance)
Offset a curve on a brep face surface. This curve must lie on the surface.

This overload allows to specify different offsets for different curve parameters.

face (BrepFace)The brep face on which to offset.
curveParameters (double[])Curve parameters corresponding to the offset distances.
offsetDistances (double[])distances to offset (+)left, (-)right.
fittingTolerance (double)A fitting tolerance.
Offset curves on success, or null on failure.
ArgumentNullExceptionIf face, curveParameters or offsetDistances are null.

OffsetOnSurface

#Since v5.0
[ConstOperation] public Curve[] OffsetOnSurface(BrepFace face, Point2d throughPoint, double fittingTolerance)
Offset a curve on a brep face surface. This curve must lie on the surface.

This overload allows to specify a surface point at which the offset will pass.

face (BrepFace)The brep face on which to offset.
throughPoint (Point2d)2d point on the brep face to offset through.
fittingTolerance (double)A fitting tolerance.
Offset curves on success, or null on failure.
ArgumentNullExceptionIf face is null.

OffsetOnSurface

#Since v5.0
[ConstOperation] public Curve[] OffsetOnSurface(Surface surface, double distance, double fittingTolerance)
Offset a curve on a surface. This curve must lie on the surface.
surface (Surface)A surface on which to offset.
distance (double)A distance to offset (+)left, (-)right.
fittingTolerance (double)A fitting tolerance.
Offset curves on success, or null on failure.
ArgumentNullExceptionIf surface is null.

OffsetOnSurface

#Since v5.0
[ConstOperation] public Curve[] OffsetOnSurface(Surface surface, double[] curveParameters, double[] offsetDistances, double fittingTolerance)
Offset this curve on a surface. This curve must lie on the surface.

This overload allows to specify different offsets for different curve parameters.

surface (Surface)A surface on which to offset.
curveParameters (double[])Curve parameters corresponding to the offset distances.
offsetDistances (double[])Distances to offset (+)left, (-)right.
fittingTolerance (double)A fitting tolerance.
Offset curves on success, or null on failure.
ArgumentNullExceptionIf surface, curveParameters or offsetDistances are null.

OffsetOnSurface

#Since v5.0
[ConstOperation] public Curve[] OffsetOnSurface(Surface surface, Point2d throughPoint, double fittingTolerance)
Offset a curve on a surface. This curve must lie on the surface.

This overload allows to specify a surface point at which the offset will pass.

surface (Surface)A surface on which to offset.
throughPoint (Point2d)2d point on the brep face to offset through.
fittingTolerance (double)A fitting tolerance.
Offset curves on success, or null on failure.
ArgumentNullExceptionIf surface is null.

OffsetTangentToSurface

#Since v8.3
[ConstOperation] public Curve OffsetTangentToSurface(Surface surface, double height)
Finds a curve by offsetting an existing curve tangent to a surface. The caller is responsible for ensuring that the curve lies on the input surface.
surface (Surface)Surface from which tangents are calculated.
height (double)Offset distance.
Curve offset tangent to the surface, if successful, null otherwise. The offset curve is interpolated through a small number of points so if the surface is irregular or complicated, the result will not be a very accurate offset.

OnSwitchToNonConst

protected override void OnSwitchToNonConst()
Is called when a non-constant operation occurs.
inherited fromGeometryBase

PerpendicularFrameAt

#Since v5.0
[ConstOperation] public bool PerpendicularFrameAt(double t, out Plane plane)
Return a 3d frame at a parameter. This is slightly different than FrameAt in that the frame is computed in a way so there is minimal rotation from one frame to the next.
t (double)Evaluation parameter.
plane (out Plane)The frame is returned here.
true on success, false on failure.

PlanarClosedCurveRelationship

#Since v5.0
public static RegionContainment PlanarClosedCurveRelationship(Curve curveA, Curve curveB, Plane testPlane, double tolerance)
Determines whether two coplanar simple closed curves are disjoint or intersect; otherwise, if the regions have a containment relationship, discovers which curve encloses the other.
curveA (Curve)A first curve.
curveB (Curve)A second curve.
testPlane (Plane)A plane.
tolerance (double)A tolerance value.
A value indicating the relationship between the first and the second curve.

PlanarCurveCollision

#Since v5.0
public static bool PlanarCurveCollision(Curve curveA, Curve curveB, Plane testPlane, double tolerance)
Determines if two coplanar curves collide (intersect).
curveA (Curve)A curve.
curveB (Curve)Another curve.
testPlane (Plane)A valid plane containing the curves.
tolerance (double)A tolerance value for intersection.
true if the curves intersect, otherwise false

PointAt

#ExampleSince v5.0
[ConstOperation] public Point3d PointAt(double t)
Evaluates point at a curve parameter.
Remarks: No error handling.
t (double)Evaluation parameter.
Point (location of curve at the parameter t).

PointAtLength

#ExampleSince v5.0
[ConstOperation] public Point3d PointAtLength(double length)
Gets a point at a certain length along the curve. The length must be non-negative and less than or equal to the length of the curve. Lengths will not be wrapped when the curve is closed or periodic.
length (double)Length along the curve between the start point and the returned point.
Point on the curve at the specified length from the start point or Poin3d.Unset on failure.

PointAtNormalizedLength

#Since v5.0
[ConstOperation] public Point3d PointAtNormalizedLength(double length)
Gets a point at a certain normalized length along the curve. The length must be between or including 0.0 and 1.0, where 0.0 equals the start of the curve and 1.0 equals the end of the curve.
length (double)Normalized length along the curve between the start point and the returned point.
Point on the curve at the specified normalized length from the start point or Poin3d.Unset on failure.

ProjectToBrep

#Since v5.0
public static Curve[] ProjectToBrep(Curve curve, Brep brep, Vector3d direction, double tolerance)
Projects a Curve onto a Brep along a given direction.
curve (Curve)Curve to project.
brep (Brep)Brep to project onto.
direction (Vector3d)Direction of projection.
tolerance (double)Tolerance to use for projection.
An array of projected curves or empty array if the projection set is empty.

ProjectToBrep

#Since v5.0
public static Curve[] ProjectToBrep(Curve curve, IEnumerable<Brep> breps, Vector3d direction, double tolerance, out int[] brepIndices)
Projects a Curve onto a collection of Breps along a given direction.
curve (Curve)Curve to project.
breps (IEnumerable<Brep>)Breps to project onto.
direction (Vector3d)Direction of projection.
tolerance (double)Tolerance to use for projection.
brepIndices (out int[])(out) Integers that identify for each resulting curve which Brep it was projected onto.
An array of projected curves or null if the projection set is empty.

ProjectToBrep

#Since v5.0
public static Curve[] ProjectToBrep(Curve curve, IEnumerable<Brep> breps, Vector3d direction, double tolerance)
Projects a Curve onto a collection of Breps along a given direction.
curve (Curve)Curve to project.
breps (IEnumerable<Brep>)Breps to project onto.
direction (Vector3d)Direction of projection.
tolerance (double)Tolerance to use for projection.
An array of projected curves or empty array if the projection set is empty.

ProjectToBrep

#Since v8.17
public static Curve[] ProjectToBrep(IEnumerable<Curve> curves, IEnumerable<Brep> breps, Vector3d direction, double tolerance, bool loose, out int[] curveIndices, out int[] brepIndices)
Projects a collection of Curves onto a collection of Breps along a given direction.
curves (IEnumerable<Curve>)Curves to project.
breps (IEnumerable<Brep>)Breps to project onto.
direction (Vector3d)Direction of projection.
tolerance (double)Tolerance to use for projection.
loose (bool)If true, then project curve edit points onto Brep surfaces.
curveIndices (out int[])Index of which curve in the input list was the source for a curve in the return array.
brepIndices (out int[])Index of which brep was used to generate a curve in the return array.
An array of projected curves. Array is empty if the projection set is empty.

ProjectToBrep

#Since v5.0
public static Curve[] ProjectToBrep(IEnumerable<Curve> curves, IEnumerable<Brep> breps, Vector3d direction, double tolerance, out int[] curveIndices, out int[] brepIndices)
Projects a collection of Curves onto a collection of Breps along a given direction.
curves (IEnumerable<Curve>)Curves to project.
breps (IEnumerable<Brep>)Breps to project onto.
direction (Vector3d)Direction of projection.
tolerance (double)Tolerance to use for projection.
curveIndices (out int[])Index of which curve in the input list was the source for a curve in the return array.
brepIndices (out int[])Index of which brep was used to generate a curve in the return array.
An array of projected curves. Array is empty if the projection set is empty.

ProjectToBrep

#Since v5.0
public static Curve[] ProjectToBrep(IEnumerable<Curve> curves, IEnumerable<Brep> breps, Vector3d direction, double tolerance)
Projects a collection of Curves onto a collection of Breps along a given direction.
curves (IEnumerable<Curve>)Curves to project.
breps (IEnumerable<Brep>)Breps to project onto.
direction (Vector3d)Direction of projection.
tolerance (double)Tolerance to use for projection.
An array of projected curves or empty array if the projection set is empty.

ProjectToMesh

#Since v5.0
public static Curve[] ProjectToMesh(Curve curve, IEnumerable<Mesh> meshes, Vector3d direction, double tolerance)
Projects a curve to a set of meshes using a direction and tolerance.
curve (Curve)A curve.
meshes (IEnumerable<Mesh>)A list, an array, or any enumerable of meshes.
direction (Vector3d)A direction vector.
tolerance (double)A tolerance value.
An array of curves if successful, an empty array otherwise.

ProjectToMesh

#Since v5.0
public static Curve[] ProjectToMesh(Curve curve, Mesh mesh, Vector3d direction, double tolerance)
Projects a curve to a mesh using a direction and tolerance.
curve (Curve)A curve.
mesh (Mesh)A mesh.
direction (Vector3d)A direction vector.
tolerance (double)A tolerance value.
An array of curves if successful, an empty array otherwise.

ProjectToMesh

#Since v8.17
public static Curve[] ProjectToMesh(IEnumerable<Curve> curves, IEnumerable<Mesh> meshes, Vector3d direction, double tolerance, bool loose)
Projects a curve to a set of meshes using a direction and tolerance.
curves (IEnumerable<Curve>)A list, an array, or any enumerable of curves.
meshes (IEnumerable<Mesh>)A list, an array, or any enumerable of meshes.
direction (Vector3d)A direction vector.
tolerance (double)A tolerance value.
loose (bool)If true, then project curve edit points onto meshes.
An array of curves if successful, an empty array otherwise.

ProjectToMesh

#Since v5.0
public static Curve[] ProjectToMesh(IEnumerable<Curve> curves, IEnumerable<Mesh> meshes, Vector3d direction, double tolerance)
Projects a curve to a set of meshes using a direction and tolerance.
curves (IEnumerable<Curve>)A list, an array, or any enumerable of curves.
meshes (IEnumerable<Mesh>)A list, an array, or any enumerable of meshes.
direction (Vector3d)A direction vector.
tolerance (double)A tolerance value.
An array of curves if successful, an empty array otherwise.

ProjectToPlane

#Since v5.0
public static Curve ProjectToPlane(Curve curve, Plane plane)
Constructs a curve by projecting an existing curve to a plane.
curve (Curve)A curve.
plane (Plane)A plane.
The projected curve on success; null on failure.

PullToBrepFace

#Since v5.0
[ConstOperation] public Curve[] PullToBrepFace(BrepFace face, double tolerance)
Pulls this curve to a brep face and returns the result of that operation.
face (BrepFace)A brep face.
tolerance (double)A tolerance value.
An array containing the resulting curves after pulling. This array could be empty.
ArgumentNullExceptionIf face is null.

PullToBrepFace

#Since v8.17
public static Curve[] PullToBrepFace(Curve curve, BrepFace face, double tolerance, bool loose)
Pull a curve to a BrepFace using closest point projection.
curve (Curve)Curve to pull.
face (BrepFace)Brep face that pulls.
tolerance (double)Tolerance to use for pulling.
loose (bool)If true, the curve's edit points are pulled back to the Brep face's underlying surface. If any edit point misses the surface, the curve will not be created.
An array of pulled curves, or an empty array on failure.

PullToBrepFace

#Since v5.0
public static Curve[] PullToBrepFace(Curve curve, BrepFace face, double tolerance)
Pull a curve to a BrepFace using closest point projection.
curve (Curve)Curve to pull.
face (BrepFace)Brep face that pulls.
tolerance (double)Tolerance to use for pulling.
An array of pulled curves, or an empty array on failure.

PullToMesh

#Since v8.17
[ConstOperation] public Curve PullToMesh(Mesh mesh, double tolerance, bool loose)
Projects this curve onto a mesh.
mesh (Mesh)Mesh to project onto.
tolerance (double)Input tolerance. When in doubt, the document's model absolute tolerance.
loose (bool)If true, the curve's edit points are pulled back to the mesh. If any edit point misses the mesh, the curve will not be created.
A curve if success, or null on failure.

PullToMesh

#Since v5.0
[ConstOperation] public PolylineCurve PullToMesh(Mesh mesh, double tolerance)
Makes a polyline approximation of the curve and gets the closest point on the mesh for each point on the curve. Then it "connects the points" so that you have a polyline on the mesh.
mesh (Mesh)Mesh to project onto.
tolerance (double)Input tolerance. When in doubt, the document's model absolute tolerance.
A curve if success, or null on failure.

Rebuild

#Since v5.0
[ConstOperation] public NurbsCurve Rebuild(int pointCount, int degree, bool preserveTangents)
Rebuild a curve with a specific point count.
pointCount (int)Number of control points in the rebuild curve.
degree (int)Degree of curve. Valid values are between and including 1 and 11.
preserveTangents (bool)If true, the end tangents of the input curve will be preserved.
A NURBS curve on success or null on failure.

RebuildToMatchTemplateCurve

#Since v9.0
[ConstOperation] public NurbsCurve RebuildToMatchTemplateCurve(Curve templateCurve, bool flipSourceDirection, bool preserveEndTangents, bool makeSubDFriendly, out Line maximumDeviation)
Rebuilds this curve so it takes on the degree, knot vector, and control point count of a template curve.
templateCurve (Curve)The curve to match.
flipSourceDirection (bool)If true and this curve is open, its direction is flipped (reversed) before sampling. Set this when this curve runs opposite the template.
preserveEndTangents (bool)If true and the result is open with at least 4 control points, the interior end control points are adjusted so the result's end tangents match this curve's.
makeSubDFriendly (bool)If true, the result is converted to a SubD friendly curve.
maximumDeviation (out Line)A line from this curve to the rebuilt curve at the point of maximum separation (the "from" point is on this curve, the "to" point is on the rebuilt curve), or Line.Unset if it cannot be computed.
The rebuilt NURBS curve, or null if the template curve is unusable or the rebuild fails.

RemoveShortSegments

#Since v5.0
public bool RemoveShortSegments(double tolerance)
Looks for segments that are shorter than tolerance that can be removed. Does not change the domain, but it will change the relative parameterization.
tolerance (double)Tolerance which defines "short" segments.
true if removable short segments were found. false if no removable short segments were found.

Repair

#Since v8.12
public bool Repair(double tolerance)
Repairs a curve.
tolerance (double)The repair tolerance.
true if successful, false otherwise.

Reparameterize

#Since v8.14
public Curve Reparameterize()
Reparameterizes a curve using automatic parameterization.
Remarks: Poorly parameterized objects may not intersect and trim properly when combined with other objects. "Poorly parameterized" means the curve's domain or the surface's u or v spaces are tiny or huge compared to the size of the object. When curves are parameterized with a [0,1] domain, both the accuracy and the precision of geometric calculations like intersections and closest points are reduced, sometimes dramatically. Ideally the domain of a curve is close to it's length.
The reparameterized curve if successful, null otherwise.

Reverse

#ExampleSince v5.0
public bool Reverse()
Reverses the direction of the curve.
Remarks: If reversed, the domain changes from [a,b] to [-b,-a]
true on success, false on failure.

RibbonOffset

#Since v7.0
public Curve RibbonOffset(double distance, double blendRadius, Point3d directionPoint, Vector3d normal, double tolerance, out Curve[] crossSections, out Surface[] ruledSurfaces)
Offsets a closed curve in the following way: pProject the curve to a plane with given normal. Then, loose Offset the projection by distance + blend_radius and trim off self-intersection. THen, Offset the remaining curve back in the opposite direction by blend_radius, filling gaps with blends. Finally, use the elevations of the input curve to get the correct elevations of the result.
distance (double)The positive distance to offset the curve.
blendRadius (double)Positive, typically the same as distance. When the offset results in a self-intersection that gets trimmed off at a kink, the kink will be blended out using this radius.
directionPoint (Point3d)A point that indicates the direction of the offset. If the offset is inward, the point's projection to the plane should be well within the curve. It will be used to decide which part of the offset to keep if there are self-intersections.
normal (Vector3d)A vector that indicates the normal of the plane in which the offset will occur.
tolerance (double)Used to determine self-intersections, not offset error.
crossSections (out Curve[])Contains lines between input and the offset that might be useful as input to Brep.CreateFromSweep or some other surface creation tool.
ruledSurfaces (out Surface[])Contain ruled surfaces between the input and the parts of the offset that correspond exactly. Note, there will be gaps between these at blends.
The offset curve if successful.

RibbonOffset

#Since v7.0
public Curve RibbonOffset(double distance, double blendRadius, Point3d directionPoint, Vector3d normal, double tolerance, out double[] outputParameters, out double[] curveParameters)
Offsets a closed curve in the following way: pProject the curve to a plane with given normal. Then, loose Offset the projection by distance + blend_radius and trim off self-intersection. THen, Offset the remaining curve back in the opposite direction by blend_radius, filling gaps with blends. Finally, use the elevations of the input curve to get the correct elevations of the result.
distance (double)The positive distance to offset the curve.
blendRadius (double)Positive, typically the same as distance. When the offset results in a self-intersection that gets trimmed off at a kink, the kink will be blended out using this radius.
directionPoint (Point3d)A point that indicates the direction of the offset. If the offset is inward, the point's projection to the plane should be well within the curve. It will be used to decide which part of the offset to keep if there are self-intersections.
normal (Vector3d)A vector that indicates the normal of the plane in which the offset will occur.
tolerance (double)Used to determine self-intersections, not offset error.
outputParameters (out double[])A list of parameter, paired with curveParameters, from the output curve for creating cross sections.
curveParameters (out double[])A list of parameter, paired with outputParameters, from the input curve for creating cross sections.
The offset curve if successful.

RibbonOffset

#Since v7.0
public Curve RibbonOffset(double distance, double blendRadius, Point3d directionPoint, Vector3d normal, double tolerance)
Offsets a closed curve in the following way: pProject the curve to a plane with given normal. Then, loose Offset the projection by distance + blend_radius and trim off self-intersection. THen, Offset the remaining curve back in the opposite direction by blend_radius, filling gaps with blends. Finally, use the elevations of the input curve to get the correct elevations of the result.
distance (double)The positive distance to offset the curve.
blendRadius (double)Positive, typically the same as distance. When the offset results in a self-intersection that gets trimmed off at a kink, the kink will be blended out using this radius.
directionPoint (Point3d)A point that indicates the direction of the offset. If the offset is inward, the point's projection to the plane should be well within the curve. It will be used to decide which part of the offset to keep if there are self-intersections.
normal (Vector3d)A vector that indicates the normal of the plane in which the offset will occur.
tolerance (double)Used to determine self-intersections, not offset error.
The offset curve if successful.

RibbonOffset

#Since v8.9
public Curve RibbonOffset(RibbonOffsetParameters ribbonParameters, out Curve[] railCurves, out Curve[] crossSectionCurves, out Brep[] brepSurfaces)
Ribbon offset method to mimic RibbonOffset command
ribbonParameters (RibbonOffsetParameters)The ribbon offset parameters
railCurves (out Curve[])on success an array of split curves representing the sweep rail segments, null on failure
crossSectionCurves (out Curve[])on success an array of cross section curves used during brep creation, null on failure
brepSurfaces (out Brep[])on success and array of breps representing the ribbon surfaces, null on failure
return an offset curve on success, null on failure

Rotate

public bool Rotate(double angleRadians, Vector3d rotationAxis, Point3d rotationCenter)
Rotates the object about the specified axis. A positive rotation angle results in a counter-clockwise rotation about the axis (right hand rule).
inherited fromGeometryBase
angleRadians (double)Angle of rotation in radians.
rotationAxis (Vector3d)Direction of the axis of rotation.
rotationCenter (Point3d)Point on the axis of rotation.
true if geometry successfully rotated.

Scale

public bool Scale(double scaleFactor)
Scales the object by the specified factor. The scale is centered at the origin.
inherited fromGeometryBase
scaleFactor (double)The uniform scaling factor.
true if geometry successfully scaled.

SetEndPoint

#Since v5.0
public bool SetEndPoint(Point3d point)
Forces the curve to end at a specified point. Not all curve types support this operation.
Remarks: Some end points cannot be moved. Be sure to check return code
point (Point3d)New end point of curve.
true on success, false on failure.

SetStartPoint

#Since v5.0
public bool SetStartPoint(Point3d point)
Forces the curve to start at a specified point. Not all curve types support this operation.
Remarks: Some start points cannot be moved. Be sure to check return code.
point (Point3d)New start point of curve.
true on success, false on failure.

SetUserString

public bool SetUserString(string key, string value)
Attach a user string (key,value combination) to this geometry.
inherited fromGeometryBase
key (string)id used to retrieve this string.
value (string)string associated with key.
true on success.

Simplify

#Since v5.0
[ConstOperation] public Curve Simplify(CurveSimplifyOptions options, double distanceTolerance, double angleToleranceRadians)
Returns a geometrically equivalent PolyCurve.

The PolyCurve has the following properties

1. All the PolyCurve segments are LineCurve, PolylineCurve, ArcCurve, or NurbsCurve.

2. The NURBS Curves segments do not have fully multiple interior knots.

3. Rational NURBS curves do not have constant weights.

4. Any segment for which IsLinear() or IsArc() is true is a Line, Polyline segment, or an Arc.

5. Adjacent co-linear or co-circular segments are combined.

6. Segments that meet with G1-continuity have there ends tuned up so that they meet with G1-continuity to within machine precision.

options (CurveSimplifyOptions)Simplification options.
distanceTolerance (double)A distance tolerance for the simplification.
angleToleranceRadians (double)An angle tolerance for the simplification.
New simplified curve on success, null on failure.

SimplifyEnd

#Since v5.0
[ConstOperation] public Curve SimplifyEnd(CurveEnd end, CurveSimplifyOptions options, double distanceTolerance, double angleToleranceRadians)
Same as SimplifyCurve, but simplifies only the last two segments at "side" end.
end (CurveEnd)If CurveEnd.Start the function simplifies the last two start side segments, otherwise if CurveEnd.End the last two end side segments are simplified.
options (CurveSimplifyOptions)Simplification options.
distanceTolerance (double)A distance tolerance for the simplification.
angleToleranceRadians (double)An angle tolerance for the simplification.
New simplified curve on success, null on failure.

Smooth

#Since v6.0
public Curve Smooth(double smoothFactor, bool bXSmooth, bool bYSmooth, bool bZSmooth, bool bFixBoundaries, SmoothingCoordinateSystem coordinateSystem, Plane plane)
Smooths a curve by averaging the positions of control points in a specified region.
smoothFactor (double)The smoothing factor, which controls how much control points move towards the average of the neighboring control points. Note that this smoothFactor is equivalent to twice the smooth factor used in the Smooth command: on a polyline, Rhino _Smooth with a factor of 0.2 is the same as Polyline.Smooth(double) with a factor of 0.4.
bXSmooth (bool)When true control points move in X axis direction.
bYSmooth (bool)When true control points move in Y axis direction.
bZSmooth (bool)When true control points move in Z axis direction.
bFixBoundaries (bool)When true the curve ends don't move.
coordinateSystem (SmoothingCoordinateSystem)The coordinates to determine the direction of the smoothing.
plane (Plane)If SmoothingCoordinateSystem.CPlane specified, then the construction plane.
The smoothed curve if successful, null otherwise.

Smooth

#Since v6.0
public Curve Smooth(double smoothFactor, bool bXSmooth, bool bYSmooth, bool bZSmooth, bool bFixBoundaries, SmoothingCoordinateSystem coordinateSystem)
Smooths a curve by averaging the positions of control points in a specified region.
smoothFactor (double)The smoothing factor, which controls how much control points move towards the average of the neighboring control points. Note that this smoothFactor is equivalent to twice the smooth factor used in the Smooth command: on a polyline, Rhino _Smooth with a factor of 0.2 is the same as Polyline.Smooth(double) with a factor of 0.4.
bXSmooth (bool)When true control points move in X axis direction.
bYSmooth (bool)When true control points move in Y axis direction.
bZSmooth (bool)When true control points move in Z axis direction.
bFixBoundaries (bool)When true the curve ends don't move.
coordinateSystem (SmoothingCoordinateSystem)The coordinates to determine the direction of the smoothing.
The smoothed curve if successful, null otherwise.

SortCurves

#
public static bool SortCurves(ICollection<Curve> inputCurves, double tolerance, out IList<IList<SortedSegment>> groups)
Sorts the curves into joinable segment groups. No joining is performed, the curves are only analyzed for start/end proximity.
inputCurves (ICollection<Curve>)The curves to sort
tolerance (double)The tolerance to bridge any gaps between curves
groups (out IList<IList<Curve.SortedSegment>>)The groups of curves that can be formed upon joining. A curve that cannot be joined to any other curve forms a group of size 1. No joining is performed.

SpanDomain

#Since v5.0
[ConstOperation] public Interval SpanDomain(int spanIndex)
Get the domain of the curve span with the given index. Use the SpanCount property to test how many spans there are.
spanIndex (int)Index of span.
Interval of the span with the given index.

SpanVector

#Since v8.13
public double[] SpanVector()
Returns the vector of span division parameters for this curve.
An array of parameter values that mark the boundaries between spans of the curve.

Split

#Since v6.0
[ConstOperation] public Curve[] Split(Brep cutter, double tolerance, double angleToleranceRadians)
Splits a curve into pieces using a polysurface.
cutter (Brep)A cutting surface or polysurface.
tolerance (double)Tolerance for computing intersections.
angleToleranceRadians (double)Angle tolerance in radians.
An array of curves. This array can be empty.

Split

#Since v5.0 Obsolete v6.0
[ConstOperation] public Curve[] Split(Brep cutter, double tolerance)
obsoleteUse version that takes an angle tolerance
Splits a curve into pieces using a polysurface.
cutter (Brep)A cutting surface or polysurface.
tolerance (double)A tolerance for computing intersections.
An array of curves. This array can be empty.

Split

#Since v5.0
[ConstOperation] public Curve[] Split(double t)
Splits (divides) the curve at the specified parameter. The parameter must be in the interior of the curve's domain.
t (double)Parameter to split the curve at in the interval returned by Domain().
Two curves on success, null on failure.

Split

#Since v5.0
[ConstOperation] public Curve[] Split(IEnumerable<double> t)
Splits (divides) the curve at a series of specified parameters. The parameter must be in the interior of the curve domain.
t (IEnumerable<double>)Parameters to split the curve at in the interval returned by Domain().
Multiple curves on success, null on failure.

Split

#Since v9.0
[ConstOperation] public Curve[] Split(Plane plane, double tolerance, double angleToleranceRadians)
Splits a curve into pieces using a cutting plane.
plane (Plane)A cutting plane.
tolerance (double)Tolerance for computing intersections.
angleToleranceRadians (double)Angle tolerance in radians.
An array of curves. This array can be empty.

Split

#Since v6.0
[ConstOperation] public Curve[] Split(Surface cutter, double tolerance, double angleToleranceRadians)
Splits a curve into pieces using a surface.
cutter (Surface)A cutting surface or polysurface.
tolerance (double)Tolerance for computing intersections.
angleToleranceRadians (double)Angle tolerance in radians.
An array of curves. This array can be empty.

Split

#Since v5.0 Obsolete v6.0
[ConstOperation] public Curve[] Split(Surface cutter, double tolerance)
obsoleteUse version that takes an angle tolerance
Splits a curve into pieces using a surface.
cutter (Surface)A cutting surface or polysurface.
tolerance (double)Tolerance for computing intersections.
An array of curves. This array can be empty.

TangentAt

#Since v5.0
[ConstOperation] public Vector3d TangentAt(double t)
Evaluates the unit tangent vector at a curve parameter.
Remarks: No error handling.
t (double)Evaluation parameter.
Unit tangent vector of the curve at the parameter t.

ToArcsAndLines

#Since v6.0
[ConstOperation] public PolyCurve ToArcsAndLines(double tolerance, double angleTolerance, double minimumLength, double maximumLength)
Converts a curve into polycurve consisting of arc segments. Sections of the input curves that are nearly straight are converted to straight-line segments.
tolerance (double)The tolerance. This is the maximum deviation from arc midpoints to the curve. When in doubt, use the document's model space absolute tolerance.
angleTolerance (double)The angle tolerance in radians. This is the maximum deviation of the arc end directions from the curve direction. When in doubt, use the document's model space angle tolerance.
minimumLength (double)The minimum segment length.
maximumLength (double)The maximum segment length.
PolyCurve on success, null on error.

ToJSON

public string ToJSON(SerializationOptions options)
Create a JSON string representation of this object
inherited fromCommonObject
options (SerializationOptions)

ToNurbsCurve

#Since v5.0
[ConstOperation] public NurbsCurve ToNurbsCurve()
Constructs a NURBS curve representation of this curve.
NURBS representation of the curve on success, null on failure.

ToNurbsCurve

#Since v5.0
[ConstOperation] public NurbsCurve ToNurbsCurve(Interval subdomain)
Constructs a NURBS curve representation of this curve.
subdomain (Interval)The NURBS representation for this portion of the curve is returned.
NURBS representation of the curve on success, null on failure.

ToPolyline

#Since v6.0
[ConstOperation] public PolylineCurve ToPolyline(double tolerance, double angleTolerance, double minimumLength, double maximumLength)
Gets a polyline approximation of a curve.
tolerance (double)The tolerance. This is the maximum deviation from line midpoints to the curve. When in doubt, use the document's model space absolute tolerance.
angleTolerance (double)The angle tolerance in radians. This is the maximum deviation of the line directions. When in doubt, use the document's model space angle tolerance.
minimumLength (double)The minimum segment length.
maximumLength (double)The maximum segment length.
PolyCurve on success, null on error.

ToPolyline

#Since v5.0
[ConstOperation] public PolylineCurve ToPolyline(int mainSegmentCount, int subSegmentCount, double maxAngleRadians, double maxChordLengthRatio, double maxAspectRatio, double tolerance, double minEdgeLength, double maxEdgeLength, bool keepStartPoint, Interval curveDomain)
Gets a polyline approximation of a curve.
mainSegmentCount (int)If mainSegmentCount <= 0, then both subSegmentCount and mainSegmentCount are ignored. If mainSegmentCount > 0, then subSegmentCount must be >= 1. In this case the NURBS will be broken into mainSegmentCount equally spaced chords. If needed, each of these chords can be split into as many subSegmentCount sub-parts if the subdivision is necessary for the mesh to meet the other meshing constraints. In particular, if subSegmentCount = 0, then the curve is broken into mainSegmentCount pieces and no further testing is performed.
subSegmentCount (int)An amount of subsegments.
maxAngleRadians (double)( 0 to pi ) Maximum angle (in radians) between unit tangents at adjacent vertices.
maxChordLengthRatio (double)Maximum permitted value of (distance chord midpoint to curve) / (length of chord).
maxAspectRatio (double)If maxAspectRatio < 1.0, the parameter is ignored. If 1 <= maxAspectRatio < sqrt(2), it is treated as if maxAspectRatio = sqrt(2). This parameter controls the maximum permitted value of (length of longest chord) / (length of shortest chord).
tolerance (double)If tolerance = 0, the parameter is ignored. This parameter controls the maximum permitted value of the distance from the curve to the polyline.
minEdgeLength (double)The minimum permitted edge length.
maxEdgeLength (double)If maxEdgeLength = 0, the parameter is ignored. This parameter controls the maximum permitted edge length.
keepStartPoint (bool)If true the starting point of the curve is added to the polyline. If false the starting point of the curve is not added to the polyline.
curveDomain (Interval)This sub-domain of the NURBS curve is approximated.
PolylineCurve on success, null on error.

ToPolyline

#Since v5.0
[ConstOperation] public PolylineCurve ToPolyline(int mainSegmentCount, int subSegmentCount, double maxAngleRadians, double maxChordLengthRatio, double maxAspectRatio, double tolerance, double minEdgeLength, double maxEdgeLength, bool keepStartPoint)
Gets a polyline approximation of a curve.
mainSegmentCount (int)If mainSegmentCount <= 0, then both subSegmentCount and mainSegmentCount are ignored. If mainSegmentCount > 0, then subSegmentCount must be >= 1. In this case the NURBS will be broken into mainSegmentCount equally spaced chords. If needed, each of these chords can be split into as many subSegmentCount sub-parts if the subdivision is necessary for the mesh to meet the other meshing constraints. In particular, if subSegmentCount = 0, then the curve is broken into mainSegmentCount pieces and no further testing is performed.
subSegmentCount (int)An amount of subsegments.
maxAngleRadians (double)( 0 to pi ) Maximum angle (in radians) between unit tangents at adjacent vertices.
maxChordLengthRatio (double)Maximum permitted value of (distance chord midpoint to curve) / (length of chord).
maxAspectRatio (double)If maxAspectRatio < 1.0, the parameter is ignored. If 1 <= maxAspectRatio < sqrt(2), it is treated as if maxAspectRatio = sqrt(2). This parameter controls the maximum permitted value of (length of longest chord) / (length of shortest chord).
tolerance (double)If tolerance = 0, the parameter is ignored. This parameter controls the maximum permitted value of the distance from the curve to the polyline.
minEdgeLength (double)The minimum permitted edge length.
maxEdgeLength (double)If maxEdgeLength = 0, the parameter is ignored. This parameter controls the maximum permitted edge length.
keepStartPoint (bool)If true the starting point of the curve is added to the polyline. If false the starting point of the curve is not added to the polyline.
PolylineCurve on success, null on error.

TorsionAt

#Since v7.10
[ConstOperation] public double TorsionAt(double t)
Evaluate the torsion of a curve at a parameter. Sometimes also called the "second curvature", torsion is the rate of change of a curve's osculating plane.
Remarks: See Barrett O'Neill, Elementary Differential Geometry, page 69.
t (double)The evaluation parameter.
The torsion if successful.

Transform

public bool Transform(Transform xform)
Transforms the geometry. If the input Transform has a SimilarityType of OrientationReversing, you may want to consider flipping the transformed geometry after calling this function when it makes sense. For example, you may want to call Flip() on a Brep after transforming it.
inherited fromGeometryBase
xform (Transform)Transformation to apply to geometry.
true if geometry successfully transformed.

Translate

public bool Translate(double x, double y, double z)
Translates the object along the specified vector.
inherited fromGeometryBase
x (double)The X component.
y (double)The Y component.
z (double)The Z component.
true if geometry successfully translated.

Translate

public bool Translate(Vector3d translationVector)
Translates the object along the specified vector.
inherited fromGeometryBase
translationVector (Vector3d)A moving vector.
true if geometry successfully translated.

Trim

#Since v5.1
[ConstOperation] public Curve Trim(CurveEnd side, double length)
Shortens a curve by a given length
side (CurveEnd)
length (double)
Trimmed curve if successful, null on failure.

Trim

#Since v5.0
[ConstOperation] public Curve Trim(double t0, double t1)
Removes portions of the curve outside the specified interval.
Remarks: If curve is open, then trimming interval must be an increasing interval. If curve is closed, and trimming interval is a decreasing interval, then the portion of the curve across the start/end is returned.
t0 (double)Start of the trimming interval.
t1 (double)End of the trimming interval.
Trimmed portion of this curve is successful, null on failure.

Trim

#Since v5.0
[ConstOperation] public Curve Trim(Interval domain)
Removes portions of the curve outside the specified interval.
Remarks: If curve is open, then trimming interval must be an increasing interval. If curve is closed, and trimming interval is a decreasing interval, then the portion of the curve across the start/end is returned.
domain (Interval)Trimming interval.
Trimmed curve if successful, null on failure.

TrimInterval

#Since v8.25
public bool TrimInterval(double t0, double t1)
Trims the curve in-place by removing portions of the curve outside the specified interval.
Remarks: Portions of the curve before curve(domain[0]) and after curve(domain[1]) are removed.
t0 (double)Start of the trimming interval.
t1 (double)End of the trimming interval.
True if successful, false otherwise.

TrimInterval

#Since v8.25
public bool TrimInterval(Interval domain)
Trims the curve in-place by removing portions of the curve outside the specified interval.
Remarks: Portions of the curve before curve(domain[0]) and after curve(domain[1]) are removed.
domain (Interval)Trimming interval.
True if successful, false otherwise.

TryGetArc

#Since v5.0
public bool TryGetArc(out Arc arc, double tolerance)
Try to convert this curve into an Arc using a custom tolerance.
arc (out Arc)On success, the Arc will be filled in.
tolerance (double)Tolerance to use when checking.
true if the curve could be converted into an arc.

TryGetArc

#Since v5.0
public bool TryGetArc(out Arc arc)
Try to convert this curve into an Arc using RhinoMath.ZeroTolerance.
arc (out Arc)On success, the Arc will be filled in.
true if the curve could be converted into an arc.

TryGetArc

#Since v5.0
public bool TryGetArc(Plane plane, out Arc arc, double tolerance)
Try to convert this curve into an Arc using a custom tolerance.
plane (Plane)Plane in which the comparison is performed.
arc (out Arc)On success, the Arc will be filled in.
tolerance (double)Tolerance to use when checking.
true if the curve could be converted into an arc within the given plane.

TryGetArc

#Since v5.0
public bool TryGetArc(Plane plane, out Arc arc)
Try to convert this curve into an Arc using RhinoMath.ZeroTolerance.
plane (Plane)Plane in which the comparison is performed.
arc (out Arc)On success, the Arc will be filled in.
true if the curve could be converted into an arc within the given plane.

TryGetCircle

#ExampleSince v5.0
public bool TryGetCircle(out Circle circle, double tolerance)
Try to convert this curve into a Circle using a custom tolerance.
circle (out Circle)On success, the Circle will be filled in.
tolerance (double)Tolerance to use when checking.
true if the curve could be converted into a Circle within tolerance.

TryGetCircle

#ExampleSince v5.0
public bool TryGetCircle(out Circle circle)
Try to convert this curve into a circle using RhinoMath.ZeroTolerance.
circle (out Circle)On success, the Circle will be filled in.
true if the curve could be converted into a Circle.

TryGetEllipse

#Since v5.0
public bool TryGetEllipse(out Ellipse ellipse, double tolerance)
Try to convert this curve into an Ellipse using a custom tolerance.
ellipse (out Ellipse)On success, the Ellipse will be filled in.
tolerance (double)Tolerance to use when checking.
true if the curve could be converted into an Ellipse.

TryGetEllipse

#Since v5.0
public bool TryGetEllipse(out Ellipse ellipse)
Try to convert this curve into an Ellipse within RhinoMath.ZeroTolerance.
ellipse (out Ellipse)On success, the Ellipse will be filled in.
true if the curve could be converted into an Ellipse.

TryGetEllipse

#Since v5.0
public bool TryGetEllipse(Plane plane, out Ellipse ellipse, double tolerance)
Try to convert this curve into an Ellipse using a custom tolerance.
plane (Plane)Plane in which the comparison is performed.
ellipse (out Ellipse)On success, the Ellipse will be filled in.
tolerance (double)Tolerance to use when checking.
true if the curve could be converted into an Ellipse within the given plane.

TryGetEllipse

#Since v5.0
public bool TryGetEllipse(Plane plane, out Ellipse ellipse)
Try to convert this curve into an Ellipse within RhinoMath.ZeroTolerance.
plane (Plane)Plane in which the comparison is performed.
ellipse (out Ellipse)On success, the Ellipse will be filled in.
true if the curve could be converted into an Ellipse within the given plane.

TryGetPlane

#Since v5.0
public bool TryGetPlane(out Plane plane, double tolerance)
Test a curve for planarity and return the plane.
plane (out Plane)On success, the plane parameters are filled in.
tolerance (double)Tolerance to use when checking.
true if there is a plane such that the maximum distance from the curve to the plane is <= tolerance.

TryGetPlane

#ExampleSince v5.0
public bool TryGetPlane(out Plane plane)
Test a curve for planarity and return the plane.
plane (out Plane)On success, the plane parameters are filled in.
true if there is a plane such that the maximum distance from the curve to the plane is <= RhinoMath.ZeroTolerance.

TryGetPolyline

#Since v5.0
public bool TryGetPolyline(out Polyline polyline, out double[] parameters)
Several types of Curve can have the form of a polyline including a degree 1 NurbsCurve, a PolylineCurve, and a PolyCurve all of whose segments are some form of polyline. IsPolyline tests a curve to see if it can be represented as a polyline.
polyline (out Polyline)If true is returned, then the polyline form is returned here.
parameters (out double[])if true is returned, then the parameters of the polyline points are returned here.
true if this curve can be represented as a polyline; otherwise, false.

TryGetPolyline

#Since v5.0
public bool TryGetPolyline(out Polyline polyline)
Several types of Curve can have the form of a polyline including a degree 1 NurbsCurve, a PolylineCurve, and a PolyCurve all of whose segments are some form of polyline. IsPolyline tests a curve to see if it can be represented as a polyline.
polyline (out Polyline)If true is returned, then the polyline form is returned here.
true if this curve can be represented as a polyline; otherwise, false.