CurveLocus

References
[IoId("00000000-11ac-438f-9612-6833666f90d0")] public readonly struct CurveLocus : IStorable, IEquatable<CurveLocus>, IComparable<CurveLocus>
Represents a parameter or locus on or near a curve. This type replaces the simple numeric curve parameter as used in RhinoCommon and Grasshopper 1.0 with a more flexible and forgiving approach.

Constructors

CurveLocus

#
public CurveLocus(IReader reader)
reader (IReader)

Properties

Kind

#
public CurveLocusKind Kind { get; }
Gets the kind of locus this is.

Value

#
public object Value { get; }
Gets the value of this locus. The type of value depends on the Kind.

Methods

CompareTo

#
public int CompareTo(CurveLocus other)
other (CurveLocus)

Equals

#
public bool Equals(CurveLocus other)
other (CurveLocus)

Equals

#
public override bool Equals(object obj)
obj (object)
ValueType.Equals

FromLength

#
public static CurveLocus FromLength(double length)
Create a curve locus from a length value.
length (double)

FromParameter

#
public static CurveLocus FromParameter(double parameter)
Create a curve locus from a curve parameter.
parameter (double)

FromPoint

#
public static CurveLocus FromPoint(Point3d point)
Create a curve locus from a 3D point.
point (Point3d)

FromRatio

#
public static CurveLocus FromRatio(double ratio)
Create a curve locus from a normalised length ratio.
ratio (double)

GetHashCode

#
public override int GetHashCode()
Explicit

IStorable.Store

#
void IStorable.Store(IWriter writer)
writer (IWriter)
Store

ResolveToParameter

#
public bool ResolveToParameter(Arc curve, out double parameter)
Resolve this locus to an actual curve parameter.
curve (Arc)Curve to map on to.
parameter (out double)Resulting curve parameter.
True if mapping was successful, even if the mapping went beyond the curve domain.

ResolveToParameter

#
public bool ResolveToParameter(Circle circle, out double parameter)
Resolve this locus to an actual curve parameter.
circle (Circle)Curve to map on to.
parameter (out double)Resulting curve parameter.
True if mapping was successful, even if the mapping went beyond the curve domain.

ResolveToParameter

#
public bool ResolveToParameter(Curve curve, out double parameter)
Resolve this locus to an actual curve parameter.
curve (Curve)Curve to map on to.
parameter (out double)Resulting curve parameter.
True if mapping was successful, even if the mapping went beyond the curve domain.

ResolveToParameter

#
public bool ResolveToParameter(Line line, out double parameter)
Resolve this locus to an actual curve parameter.
line (Line)Curve to map on to.
parameter (out double)Resulting curve parameter.
True if mapping was successful, even if the mapping went beyond the curve domain.

ResolveToParameter

#
public bool ResolveToParameter(object curve, ICurveAssistant assistant, Curve rhinoCurve, out double parameter)
Resolve this locus to an actual curve parameter on a Rhino curve. This resolver is needed when a locus is defined on some unknown curve type, but it needs to be transferred onto the Curve conversion of that unknown curve type. I.e. let's say the locus is defined on an Arc, and the arc has already been converted into an ArcCurve or maybe even a NurbsCurve. Use this method to revolve the parameter on the ArcCurve or NurbsCurve implied by the locus and the original Arc.
curve (object)Curve on which this locus is defined.
assistant (ICurveAssistant)Curve assistant override. If null, a fitting assistant will be found.
rhinoCurve (Curve)Rhino curve whose parameter we're interested in.
parameter (out double)Resulting curve parameter.
True if mapping was successful, even if the mapping went beyond the curve domain.

ResolveToParameter

#
public bool ResolveToParameter(object curve, ICurveAssistant assistant, out double parameter)
Resolve this locus to an actual curve parameter.
curve (object)Curve to map on to.
assistant (ICurveAssistant)Curve assistant override. If null, a fitting assistant will be found.
parameter (out double)Resulting curve parameter.
True if mapping was successful, even if the mapping went beyond the curve domain.

ResolveToParameter

#
public bool ResolveToParameter(Polyline polyline, out double parameter)
Resolve this locus to an actual curve parameter.
polyline (Polyline)Curve to map on to.
parameter (out double)Resulting curve parameter.
True if mapping was successful, even if the mapping went beyond the curve domain.

ResolveToParameter

#
public bool ResolveToParameter(Rectangle3d rectangle, out double parameter)
Resolve this locus to an actual curve parameter.
rectangle (Rectangle3d)Curve to map on to.
parameter (out double)Resulting curve parameter.
True if mapping was successful, even if the mapping went beyond the curve domain.

ResolveToParameter

#
public bool ResolveToParameter(Triangle triangle, out double parameter)
Resolve this locus to an actual curve parameter.
triangle (Triangle)Curve to map on to.
parameter (out double)Resulting curve parameter.
True if mapping was successful, even if the mapping went beyond the curve domain.

ToString

#
public override string ToString()

ToString

#
public string ToString(NumberFormat format)
format (NumberFormat)

TryParse

#
public static Result<CurveLocus> TryParse(string text)
text (string)

Convertors

OperationResultDescription
implicitdoubleCurveLocusCreate a curve locus from a parameter.
implicitPoint3dCurveLocusCreate a curve locus from a point.