ReadonlydegreeGets the maximum algebraic degree of any span or a good estimate if curve spans are not algebraic.
ReadonlydimensionGets 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.
Gets or sets the domain of the curve.
ReadonlyedgeBrep edge this trim belongs to. This will be null for singular trims
ReadonlyendBrepVertex at end of trim
ReadonlyfaceBrep face this trim belongs to
ReadonlyhasReturns true if the Brep.TryConvertBrep function will be successful for this object
ReadonlyhasGets true if this class has any custom information attached to it through UserData.
ReadonlyisGets a value indicating whether or not this curve is a closed curve.
Readonlyistrue if object can be accurately modified with "squishy" transformations like projections, shears, and non-uniform scaling.
ReadonlyisGets a value indicating whether or not this curve is considered to be Periodic.
ReadonlyisTests an object to see if it is valid.
ReadonlyloopLoop that this trim belongs to
ReadonlyobjectUseful for switch statements that need to differentiate between basic object types like points, curves, surfaces, and so on.
ReadonlypointEvaluates point at the end of the curve.
ReadonlypointEvaluates point at the start of the curve.
ReadonlyproxyTrue if "this" is a curve is reversed from the "real" curve geometry
ReadonlyspanGets the number of non-empty smooth (c-infinity) spans in the curve.
ReadonlystartBrepVertex at start of trim
ReadonlytangentEvaluate unit tangent vector at the end of the curve.
No error handling.
ReadonlytangentEvaluates the unit tangent vector at the start of the curve.
No error handling.
ReadonlytrimGets the Brep.Curves2D 2d curve index of the 2d curve geometry used by this trim, or -1.
ReadonlytrimGets the index of this trim in the Brep.Trims collection.
Type of trim
ReadonlyuserGets the amount of user strings.
Determines the orientation (counterclockwise or clockwise) of a closed, planar curve. Only works with simple (no self intersections) closed, planar curves.
Transformation to map the curve to the world XY plane.
The orientation of this curve in the world XY-plane.
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.
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.
The plane in which to solve the orientation.
The orientation of this curve in the given 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.
A vector that is considered "up".
The orientation of this curve with respect to a defined up direction.
If this piece of geometry is a component in something larger, like a BrepEdge in a Brep, then this function returns the component index.
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.
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.
The current remainder value.
CRC of the information the defines the object.
Evaluate the derivatives at the specified curve parameter.
Curve parameter to evaluate.
Number of derivatives to evaluate, must be at least 0.
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.
Evaluate the derivatives at the specified curve parameter.
Curve parameter to evaluate.
Number of derivatives to evaluate, must be at least 0.
An array of vectors that represents all the derivatives starting at zero.
Aligned Bounding box solver. Gets the world axis aligned bounding box for the transformed geometry.
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.
Aligned Bounding box solver. Gets the plane aligned bounding box.
Orientation plane for BoundingBox.
A BoundingBox in plane coordinates.
Bounding box solver. Gets the world axis aligned bounding box for the geometry.
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.
Convert a NURBS curve parameter to a curve parameter.
If HasNurbForm returns 2, this function converts the curve parameter to the NURBS curve parameter.
NURBS form parameter.
true on success, false on failure.
Searches for a derivative, tangent, or curvature discontinuity.
Type of continuity to search for.
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.
(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.
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.
(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.
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.
Searches for a derivative, tangent, or curvature discontinuity.
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.
Type of continuity to search for.
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.
(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.
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.
Convert a curve parameter to a NURBS curve parameter.
If GetNurbForm returns 2, this function converts the curve parameter to the NURBS curve parameter.
Curve parameter.
true on success, false on failure.
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.
Test a curve to see if it can be represented by an arc or circle within the given tolerance.
Tolerance to use when checking.
true if the curve can be represented by an arc or a circle within tolerance.
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.
Test a curve to see if it can be represented by a circle within the given tolerance.
Tolerance to use when checking.
true if the curve can be represented by a circle to within tolerance.
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.
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.
Maximum allowable distance between start and end. If start - end gap is greater than tolerance, this function will return false.
If greater than 0.0 and none of the interior sampled points are at least minimumAbsoluteSize from start, this function will return false.
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.
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.
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.
Test continuity at a curve parameter value.
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.
Type of continuity to test for.
Parameter to test.
true if the curve has at least the c type continuity at the parameter t.
Test a curve to see if it can be represented by an ellipse within a given tolerance.
Tolerance to use for checking.
true if the Curve can be represented by an ellipse within tolerance.
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.
Test a curve to see if it lies in a specific plane.
Plane to test for.
Tolerance to use when checking.
true if the maximum distance from the curve to the testPlane is <= tolerance.
Test a curve to see if it lies in a specific plane.
Plane to test for.
true if the maximum distance from the curve to the testPlane is <= RhinoMath.ZeroTolerance.
Test a curve to see if it is linear to within the custom tolerance.
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.
Test a curve to see if it is linear to within RhinoMath.ZeroTolerance units (1e-12).
true if the curve is linear.
Test a curve for planarity.
Tolerance to use when checking.
true if there is a plane such that the maximum distance from the curve to the plane is <= tolerance.
Test a curve for planarity.
true if the curve is planar (flat) to within RhinoMath.ZeroTolerance units (1e-12).
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.
If possible, converts the object into a form that can be accurately modified with "squishy" transformations like projections, shears, an non-uniform scaling.
false if object cannot be converted to a deformable object. true if object was already deformable or was converted into a deformable object.
Forces the curve to end at a specified point. Not all curve types support this operation.
Some end points cannot be moved. Be sure to check return code
New end point of curve.
true on success, false on failure.
Forces the curve to start at a specified point. Not all curve types support this operation.
Some start points cannot be moved. Be sure to check return code.
New start point of curve.
true on success, false on failure.
The values in tolerance[] record the accuracy of the parameter space trimming curves.
tolerance[0] = accuracy of parameter space curve in first ("u") parameter
tolerance[1] = accuracy of parameter space curve in second ("v") parameter
A value of RhinoMath.UnsetValue indicates that the tolerance should be computed. If the value >= 0.0, then the tolerance is set. If the value is RhinoMath.UnsetValue, then the tolerance needs to be computed.
If the trim is not singular, then the trim must have an edge. If P is a 3d point on the edge's curve and surface(u,v) = Q is the point on the surface that is closest to P, then there must be a parameter t in the interval [m_t[0], m_t[1]] such that |u - curve2d(t)[0]| <= tolerance[0] and |v - curve2d(t)[1]| <= tolerance[1]
If P is the 3d point for the vertex brep.m_V[m_vi[k]] and (uk,vk) is the corresponding end of the trim's parameter space curve, then there must be a surface parameter (u,v) such that:
Set 2d curve geometry used by a b-rep trim.
index of 2d curve in m_C2[] array
true if successful
Constructs a NURBS curve representation of this curve.
NURBS representation of the curve on success, null on failure.
Constructs a NURBS curve representation of this curve.
The NURBS representation for this portion of the curve is returned.
NURBS representation of the curve on success, null on failure.
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.
See Barrett O'Neill, Elementary Differential Geometry, page 69.
The evaluation parameter.
The torsion if successful.
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.
Transformation to apply to geometry.
true if geometry successfully transformed.
Translates the object along the specified vector.
A moving vector.
true if geometry successfully translated.
Translates the object along the specified vector.
The X component.
The Y component.
The Z component.
true if geometry successfully translated.
Removes portions of the curve outside the specified interval.
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.
Start of the trimming interval.
End of the trimming interval.
Trimmed portion of this curve is successful, null on failure.
Removes portions of the curve outside the specified interval.
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.
Trimming interval.
Trimmed curve if successful, null on failure.
Trims the curve in-place by removing portions of the curve outside the specified interval.
Portions of the curve before curve(domain[0]) and after curve(domain[1]) are removed.
Start of the trimming interval.
End of the trimming interval.
True if successful, false otherwise.
Trims the curve in-place by removing portions of the curve outside the specified interval.
Portions of the curve before curve(domain[0]) and after curve(domain[1]) are removed.
Trimming interval.
True if successful, false otherwise.
Try to convert this curve into an Arc using a custom tolerance.
Plane in which the comparison is performed.
Tolerance to use when checking.
true if the curve could be converted into an arc within the given plane.
Try to convert this curve into an Arc using a custom tolerance.
Tolerance to use when checking.
true if the curve could be converted into an arc.
Try to convert this curve into an Arc using RhinoMath.ZeroTolerance.
Plane in which the comparison is performed.
true if the curve could be converted into an arc within the given plane.
Try to convert this curve into an Arc using RhinoMath.ZeroTolerance.
true if the curve could be converted into an arc.
Try to convert this curve into a Circle using a custom tolerance.
Tolerance to use when checking.
true if the curve could be converted into a Circle within tolerance.
Try to convert this curve into a circle using RhinoMath.ZeroTolerance.
true if the curve could be converted into a Circle.
Try to convert this curve into an Ellipse using a custom tolerance.
Plane in which the comparison is performed.
Tolerance to use when checking.
true if the curve could be converted into an Ellipse within the given plane.
Try to convert this curve into an Ellipse using a custom tolerance.
Tolerance to use when checking.
true if the curve could be converted into an Ellipse.
Try to convert this curve into an Ellipse within RhinoMath.ZeroTolerance.
Plane in which the comparison is performed.
true if the curve could be converted into an Ellipse within the given plane.
Try to convert this curve into an Ellipse within RhinoMath.ZeroTolerance.
true if the curve could be converted into an Ellipse.
Test a curve for planarity and return the plane.
Tolerance to use when checking.
true if there is a plane such that the maximum distance from the curve to the plane is <= tolerance.
Test a curve for planarity and return the plane.
true if there is a plane such that the maximum distance from the curve to the plane is <= RhinoMath.ZeroTolerance.
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.
StaticcomputeComputes an estimate of the number of bytes that this object is using in memory.
This is the same as calling GeometryBase.MemoryEstimate, but works for all CommonObject derived classes.
An estimated memory footprint.
StaticcreateConstructs a curve from a set of control-point locations.
Control points.
Degree of curve. The number of control points must be at least degree+1.
Constructs a control-point of degree=3 (or less).
Control points of curve.
StaticdecodeThe object a dict from Encode describes (rhino3dm only).
A dict as Encode returns it.
Brep trim information is stored in BrepTrim classes. Brep.Trims is an array of all the trims in the brep. A BrepTrim is derived from CurveProxy so the trim can supply easy to use evaluation tools via the Curve virtual member functions. Note well that the domains and orientations of the curve m_C2[trim.m_c2i] and the trim as a curve may not agree.