ICurveAssistant

References
public interface ICurveAssistant
Base interface for curve-like type assistants. Do not implement this interface from scratch, instead inherit from CurveAssistant.

Properties

IsReimplementation

#
Gets whether or not this assistant is a type-safe re-implementation of a more generic assistant.
bool IsReimplementation { get; }

ReimplementationBase

#
Gets the base assistant (if any) this assistant is a re-implementation of.
ICurveAssistant ReimplementationBase { get; }

Type

#
Gets the type associated with this assistant.
Type Type { get; }

Methods

BoundingBox

#
Gets the bounding box of a curve.
BoundingBox BoundingBox(
instance
Curve instance.
)
World axis aligned bounding box.

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.
NurbsCurve ConvertToNurbsCurve(
instance
Instance to convert.
)
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.
Polyline ConvertToPolyline(
instance,
Instance to convert.
deviation,
Maximum allowed deviation (absolute tolerance) between original curve and resulting polyline.
angle
Maximum allowed angle between original curve tangents and polyline corners.
)

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.
Curve ConvertToRhinoCurve(
instance
Instance to convert.
)
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.
double[] DivideByCount(
instance,
Instance.
count
Number of segments.
)
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.
double[] DivideByDistance(
instance,
Instance.
distance
Distance between segment start and end-points.
)
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.
double[] DivideByLength(
instance,
Instance.
length
Tier length.
)
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.
)
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.
)
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.
)
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.
Point3d EvaluatePosition(
instance,
Instance of T.
parameter
Curve parameter.
)
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.
)
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.
object[] Explode(
instance
Instance.
)
Array of subcurves.

ExplodeRecursive

#
Explode a curve into the smallest possible segments.
object[] ExplodeRecursive(
instance
Instance.
)
Array of subcurves.

Extend

#
Extend the curve.
object Extend(
instance,
Instance of T.
start,
Extension properties at start.
end
Extension properties at end.
)
Modified curve.

FindClosestParameter

#
Find the point on the curve closest to a test point.
double FindClosestParameter(
instance,
Instance of T.
point
Test point.
)
Parameter or double.NaN if no parameter could be found.

FindCurvatureExtremes

#
Find the two parameters with the lowest and highest curvature.
void FindCurvatureExtremes(
instance,
Instance.
out double
minimum,
The (or one of the) parameters on the curve with the lowest curvature.
out double
maximum
The (or one of the) parameters on the curve with the 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.
)
Array of curve discontinuities.

FindFurthestParameter

#
Find the point on the curve furthest from a test point.
double FindFurthestParameter(
instance,
Instance of T.
point
Test point.
)
Parameter or double.NaN if no parameter could be found.

FindInflections

#
Find all inflection points along the curve.
double[] FindInflections(
instance
Instance.
)
Array of curve parameters.

FindPositionExtremes

#
Find the two parameters closest to and furthest away from a plane.
void FindPositionExtremes(
instance,
Instance.
plane,
Plane.
out double
minimum,
The (or one of the) parameters on the curve closest to the plane.
out double
maximum
The (or one of the) parameters on the curve furthest from the plane.
)

FlipDirection

#
Flip the curve.
object FlipDirection(
instance
Instance to flip.
)
Flipped curve.

GetDomain

#
Get the domain of an instance of T.
Interval GetDomain(
instance
Instance of T.
)
Domain of curve.

GetEndPoints

#
Get the end-points of a curve.
void GetEndPoints(
instance,
Instance.
out Point3d
start,
Point at start.
out Point3d
end
Point at end.
)

GetEndTangents

#
Get the tangents at the ends of a curve.
void GetEndTangents(
instance,
Instance.
start,
Tangent at start.
end
Tangent at end.
)

GetLength

#
Measure the total length of this curve.
double GetLength(
instance
Instance.
)
Length.

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.
Interval[] GetSpans(
instance
Instance.
)
Span domains.

IntersectWith

#
Find all the intersection parameters between this curve and a plane.
double[] IntersectWith(
instance,
Curve.
plane
Plane.
)
Collection of zero or more curve parameters.

IsClosed

#
Determine whether the curve is closed.
bool IsClosed(
instance
Instance of T.
)
Boolean value indicating closedness.

IsLinear

#
Determine whether the curve is linear.
bool IsLinear(
instance,
Instance.
tolerance
Maximum allowed linearity deviation.
)
True if curve is linear.

IsLinear

#
Determine the best fit line for this curve.
void IsLinear(
instance,
Instance.
out Line
line,
Line which best approximates curve.
out double
deviation
Maximum deviation from line.
)

IsPeriodic

#
Determine whether the curve is periodic.
bool IsPeriodic(
instance
Instance of T.
)
Boolean value indicating periodicity.

IsPlanar

#
Determine whether the curve is planar.
bool IsPlanar(
instance,
Instance of T.
tolerance
Maximum allowed planarity deviation.
)
Boolean value indicating planarity.

IsPlanar

#
Determine the best fit plane for this curve.
void IsPlanar(
instance,
Instance of T.
out Plane
plane,
Plane of curve or Plane.None if curve is not planar.
out double
deviation
Maximum deviation from plane.
)

LengthAtParameter

#
Measure the length of a curve from the start to a specific parameter.
bool LengthAtParameter(
instance,
Instance.
parameter,
Parameter for length measurement.
out double
length
Length of curve form start to parameter.
)
True if length measurement was possible.

ParameterAtLength

#
Gets the parameter at a specific length along the curve.
bool ParameterAtLength(
instance,
Instance of T.
length,
Offset distance along curve, may be negative.
out double
parameter
Parameter on curve, [length] away from the start parameter.
)
Success or failure.

SetDomain

#
Assign a new parameter domain to the curve.
object SetDomain(
instance,
Instance.
domain
New domain to assign.
)
Curve with new domain.

Split

#
Split a curve into two parts.
void Split(
instance,
Instance.
parameter,
Splitting parameter.
out object
below,
Part from start of curve to parameter.
out object
above
Part from parameter to end of curve.
)

Trim

#
Extract a subcurve from an instance of T.
object Trim(
instance,
Instance of T.
domain
Domain of subcurve.
)
Sub curve.