ICurveAssistant
ReferencesBase interface for curve-like type assistants. Do not implement this interface from scratch, instead inherit from CurveAssistant.
Properties
Methods
ConvertToNurbsCurve
#Convert the instance into a Rhino NURBS curve type which best describes the original instance. Note this method need not return a duplicate of the input, if a duplicate is required by the caller then a ReferenceEquals check must be performed.
Returns: A Rhino NURBS curve or null if there is no way to describe the curve geometry as NURBS.
ConvertToPolyline
#Convert the instance into a polyline.
ConvertToRhinoCurve
#Convert the instance into a Rhino curve type which best describes the original instance. Note this method need not return a duplicate of the input, if a duplicate is required by the caller then a ReferenceEquals check must be performed.
Returns: A Rhino curve or null if there is no Rhino curve type which remotely describes this instance of T.
DivideByCount
#Divide the curve into a number of equal length segments.
Returns: Array of division parameters, including the start and end of the domain.
DivideByDistance
#Divide a curve into segments whose end-points are a fixed distance apart.
Returns: Array of division parameters. The parameter at the end of the domain is not included if there's a remainder segment.
DivideByLength
#Divide the curve into equal length segments.
Returns: Array of division parameters. The parameter at the end of the domain is not included if there's a remainder segment.
EvaluateCurvature
#Evaluate the curvature of the curve at the given parameter.
Vector3d EvaluateCurvature()
instance,
Instance of T.
parameter,
Curve parameter.
side
Side of parameter to evaluate.
Returns: Curvature at parameter, or Vector3d.None if the curve cannot be evaluated at the given parameter.
EvaluateDerivatives
#Evaluate the first N derivatives of the curve at the given parameter.
Vector3d[] EvaluateDerivatives()
instance,
Instance of T.
parameter,
Curve parameter.
side,
Side of parameter to evaluate.
count
Number of derivatives to compute.
Returns: An array of N+1 derivatives, where the first element describes the position vector.
EvaluatePerpendicular
#Evaluate the perpendicular plane of the curve at the given parameter.
Plane EvaluatePerpendicular()
instance,
Instance of T.
parameter,
Curve parameter.
side
Side of parameter to evaluate.
Returns: Perpendicular at parameter, or Plane.None if the curve cannot be evaluated at the given parameter.
EvaluatePosition
#Evaluate the position of the curve at the given parameter.
Returns: Point at parameter, or Point3d.None if the curve cannot be evaluated at the given parameter.
EvaluateTangent
#Evaluate the tangent of the curve at the given parameter.
Vector3d EvaluateTangent()
instance,
Instance of T.
parameter,
Curve parameter.
side
Side of parameter to evaluate.
Returns: Tangent at parameter, or Vector3d.None if the curve cannot be evaluated at the given parameter.
Explode
#Explode a curve into smaller segments, each representing a subtype of curve.
Returns: Array of subcurves.
Extend
#Extend the curve.
object Extend()
instance,
Instance of T.
start,
Extension properties at start.
end
Extension properties at end.
Returns: Modified curve.
FindClosestParameter
#Find the point on the curve closest to a test point.
Returns: Parameter or double.NaN if no parameter could be found.
FindCurvatureExtremes
#Find the two parameters with the lowest and highest curvature.
FindDiscontinuities
#Find all discontinuities along the curve up to and including a target continuity.
Discontinuity[] FindDiscontinuities()
instance,
Instance.
order
Hint for maximum level of discontinuity to search for. Note that assistants may return arrays containing disocntinuities of higher order than the provided limit. It is up to the caller to filter out unwanted reports.
Returns: Array of curve discontinuities.
FindFurthestParameter
#Find the point on the curve furthest from a test point.
Returns: Parameter or double.NaN if no parameter could be found.
FindPositionExtremes
#Find the two parameters closest to and furthest away from a plane.
GetEndPoints
#Get the end-points of a curve.
GetEndTangents
#Get the tangents at the ends of a curve.
GetSpans
#Gets an array of curve domain spans. A span is a section of the curve that is reasonably simple in shape. Discontinuities in curves typically signal transitions from one span to another, but it depends on the curve type how it divides itself up.
Returns: Span domains.
IntersectWith
#Find all the intersection parameters between this curve and a plane.
Returns: Collection of zero or more curve parameters.
IsLinear
#Determine the best fit line for this curve.
IsPlanar
#Determine the best fit plane for this curve.
LengthAtParameter
#Measure the length of a curve from the start to a specific parameter.
Returns: True if length measurement was possible.
ParameterAtLength
#Gets the parameter at a specific length along the curve.
Returns: Success or failure.
Split
#Split a curve into two parts.