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

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

ReimplementationBase

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

Type

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

Methods

BoundingBox

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

ConvertToNurbsCurve

#
NurbsCurve ConvertToNurbsCurve(object instance)
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.
instance (object)Instance to convert.
A Rhino NURBS curve or null if there is no way to describe the curve geometry as NURBS.

ConvertToPolyline

#
Polyline ConvertToPolyline(object instance, double deviation, double angle)
Convert the instance into a polyline.
instance (object)Instance to convert.
deviation (double)Maximum allowed deviation (absolute tolerance) between original curve and resulting polyline.
angle (double)Maximum allowed angle between original curve tangents and polyline corners.

ConvertToRhinoCurve

#
Curve ConvertToRhinoCurve(object instance)
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.
instance (object)Instance to convert.
A Rhino curve or null if there is no Rhino curve type which remotely describes this instance of T.

DivideByCount

#
double[] DivideByCount(object instance, int count)
Divide the curve into a number of equal length segments.
instance (object)Instance.
count (int)Number of segments.
Array of division parameters, including the start and end of the domain.

DivideByDistance

#
double[] DivideByDistance(object instance, double distance)
Divide a curve into segments whose end-points are a fixed distance apart.
instance (object)Instance.
distance (double)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

#
double[] DivideByLength(object instance, double length)
Divide the curve into equal length segments.
instance (object)Instance.
length (double)Tier length.
Array of division parameters. The parameter at the end of the domain is not included if there's a remainder segment.

EvaluateCurvature

#
Vector3d EvaluateCurvature(object instance, double parameter, CurveEvaluationSide side)
Evaluate the curvature of the curve at the given parameter.
instance (object)Instance of T.
parameter (double)Curve parameter.
side (CurveEvaluationSide)Side of parameter to evaluate.
Curvature at parameter, or Vector3d.None if the curve cannot be evaluated at the given parameter.

EvaluateDerivatives

#
Vector3d[] EvaluateDerivatives(object instance, double parameter, CurveEvaluationSide side, int count)
Evaluate the first N derivatives of the curve at the given parameter.
instance (object)Instance of T.
parameter (double)Curve parameter.
side (CurveEvaluationSide)Side of parameter to evaluate.
count (int)Number of derivatives to compute.
An array of N+1 derivatives, where the first element describes the position vector.

EvaluatePerpendicular

#
Plane EvaluatePerpendicular(object instance, double parameter, CurveEvaluationSide side)
Evaluate the perpendicular plane of the curve at the given parameter.
instance (object)Instance of T.
parameter (double)Curve parameter.
side (CurveEvaluationSide)Side of parameter to evaluate.
Perpendicular at parameter, or Plane.None if the curve cannot be evaluated at the given parameter.

EvaluatePosition

#
Point3d EvaluatePosition(object instance, double parameter)
Evaluate the position of the curve at the given parameter.
instance (object)Instance of T.
parameter (double)Curve parameter.
Point at parameter, or Point3d.None if the curve cannot be evaluated at the given parameter.

EvaluateTangent

#
Vector3d EvaluateTangent(object instance, double parameter, CurveEvaluationSide side)
Evaluate the tangent of the curve at the given parameter.
instance (object)Instance of T.
parameter (double)Curve parameter.
side (CurveEvaluationSide)Side of parameter to evaluate.
Tangent at parameter, or Vector3d.None if the curve cannot be evaluated at the given parameter.

Explode

#
object[] Explode(object instance)
Explode a curve into smaller segments, each representing a subtype of curve.
instance (object)Instance.
Array of subcurves.

ExplodeRecursive

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

Extend

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

FindClosestParameter

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

FindCurvatureExtremes

#
void FindCurvatureExtremes(object instance, out double minimum, out double maximum)
Find the two parameters with the lowest and highest curvature.
instance (object)Instance.
minimum (out double)The (or one of the) parameters on the curve with the lowest curvature.
maximum (out double)The (or one of the) parameters on the curve with the highest curvature.

FindDiscontinuities

#
Discontinuity[] FindDiscontinuities(object instance, DiscontinuityLevel order)
Find all discontinuities along the curve up to and including a target continuity.
instance (object)Instance.
order (DiscontinuityLevel)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

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

FindInflections

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

FindPositionExtremes

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

FlipDirection

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

GetDomain

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

GetEndPoints

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

GetEndTangents

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

GetLength

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

GetSpans

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

IntersectWith

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

IsClosed

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

IsLinear

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

IsLinear

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

IsPeriodic

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

IsPlanar

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

IsPlanar

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

LengthAtParameter

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

ParameterAtLength

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

SetDomain

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

Split

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

Trim

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