NurbsCurveKnotList

References
Provides access to the knot vector of a NURBS curve.

Properties

Count

#Since v5.0
public int Count { get; }
Total number of knots in this curve.

IsClampedEnd

#Since v5.0
public bool IsClampedEnd { get; }
Gets a value indicating whether or not the knot vector is clamped at the end of the curve. Clamped curves are coincident with the first and last control-point. This requires fully multiple knots.

IsClampedStart

#Since v5.0
public bool IsClampedStart { get; }
Gets a value indicating whether or not the knot vector is clamped at the start of the curve. Clamped curves start at the first control-point. This requires fully multiple knots.

KnotStyle

#Since v7.1
public KnotStyle KnotStyle { get; }
Gets the style of the knot vector.
Explicit

ICollection<double>.IsReadOnly

#
bool ICollection<double>.IsReadOnly

Indexers

this[]

#
public double this[int index] { get; set; }
Gets or sets the knot vector value at the given index.
index (int)Index of knot to access.
The knot value at [index]

Methods

ClampEnd

#Since v5.0
public bool ClampEnd(CurveEnd end)
Clamp end knots. Does not modify control point locations.
end (CurveEnd)Curve end to clamp.
true on success, false on failure.

Contains

#Since v6.0
public bool Contains(double item)
Returns an indication of the presence of a value in the knot list.
item (double)The item.
true if present, false otherwise.

CopyTo

#Since v6.0
public void CopyTo(double[] array, int arrayIndex)
Copies the list to an array.
array (double[])The array to copy to.
arrayIndex (int)The index into copy will begin.

CreatePeriodicKnots

#Since v5.0
public bool CreatePeriodicKnots(double knotSpacing)
Compute a clamped, uniform, periodic knot vector based on the current degree and control point count. Does not change values of control vertices.
knotSpacing (double)Spacing of subsequent knots.
true on success, false on failure.

CreateUniformKnots

#Since v5.0
public bool CreateUniformKnots(double knotSpacing)
Compute a clamped, uniform knot vector based on the current degree and control point count. Does not change values of control vertices.
knotSpacing (double)Spacing of subsequent knots.
true on success, false on failure.

EnsurePrivateCopy

#Since v5.0
public void EnsurePrivateCopy()
If you want to keep a copy of this class around by holding onto it in a variable after a command completes, call EnsurePrivateCopy to make sure that this class is not tied to the document. You can call this function as many times as you want.

EpsilonEquals

#Since v5.4
public bool EpsilonEquals(NurbsCurveKnotList other, double epsilon)
Checks that all values in the other list are sequentially equal within epsilon to the values in this list.
other (NurbsCurveKnotList)The other list.
epsilon (double)The epsilon value.
True if values are, orderly, equal within epsilon. False otherwise.
EpsilonEquals

IndexOf

#Since v6.0
public int IndexOf(double item)
Returns the first item in the list.
item (double)The value.
The index, or -1 if no index is found.

InsertKnot

#Since v5.0
public bool InsertKnot(double value, int multiplicity)
Inserts a knot and update control point locations. Does not change parameterization or locus of curve.
value (double)Knot value to insert.
multiplicity (int)Multiplicity of knot to insert.
true on success, false on failure.

InsertKnot

#ExampleSince v5.0
public bool InsertKnot(double value)
Inserts a knot and update control point locations. Does not change parameterization or locus of curve.
value (double)Knot value to insert.
true on success, false on failure.

KnotMultiplicity

#Since v5.0
public int KnotMultiplicity(int index)
Get knot multiplicity.
index (int)Index of knot to query.
The multiplicity (valence) of the knot.

RemoveKnotAt

#Since v6.0
public bool RemoveKnotAt(double t)
Remove a knot from a curve and adjusts the remaining control points to maintain curve position as closely as possible.
t (double)The parameter on the curve that is closest to the knot to be removed.
true if successful, false on failure.

RemoveKnots

#Since v6.0
public bool RemoveKnots(int index0, int index1)
Remove knots from a curve and adjusts the remaining control points to maintain curve position as closely as possible. The knots from Knots[index0] through Knots[index1 - 1] will be removed.
index0 (int)The starting knot index, where Degree-1 < index0 < index1 <= Points.Count-1.
index1 (int)The ending knot index, where Degree-1 < index0 < index1 <= Points.Count-1.
true if successful, false on failure.

RemoveMultipleKnots

#Since v6.0
public int RemoveMultipleKnots(int minimumMultiplicity, int maximumMultiplicity, double tolerance)
Remove multiple knots from this curve.
minimumMultiplicity (int)Remove knots with multiplicity > minimumKnotMultiplicity.
maximumMultiplicity (int)Remove knots with multiplicity < maximumKnotMultiplicity.
tolerance (double)When you remove knots, the shape of the curve is changed. If tolerance is RhinoMath.UnsetValue, any amount of change is permitted. If tolerance is >=0, the maximum distance between the input and output curve is restricted to be <= tolerance.
number of knots removed on success. 0 if no knots were removed

SuperfluousKnot

#Since v5.0
public double SuperfluousKnot(bool start)
Computes the knots that are superfluous because they are not used in NURBs evaluation. These make it appear so that the first and last curve spans are different from interior spans.

http://wiki.mcneel.com/developer/onsuperfluousknot

start (bool)true if the query targets the first knot. Otherwise, the last knot.
A component.
Explicit

ICollection<double>.Add

#
void ICollection<double>.Add(double item)
item (double)
Explicit

ICollection<double>.Clear

#
void ICollection<double>.Clear()
Explicit

ICollection<double>.Remove

#
item (double)
Explicit

IEnumerable<double>.GetEnumerator

#
Explicit

IList<double>.Insert

#
void IList<double>.Insert(int index, double item)
index (int)
item (double)
Explicit

IList<double>.RemoveAt

#
void IList<double>.RemoveAt(int index)
index (int)
Explicit

IEnumerable.GetEnumerator

#
IEnumerator IEnumerable.GetEnumerator()