NurbsCurvePointList

References
Provides access to the control points of a NURBS curve.

Properties

ControlPolygonLength

#Since v5.0
public double ControlPolygonLength { get; }
Gets the length of the polyline connecting all control points.

Count

#Since v5.0
public int Count { get; }
Gets the number of control points in this curve.

PointSize

#Since v6.9
public int PointSize { get; }
Returns the control point size, or the number of doubles per control point. For rational curves, PointSize = Curve.Dimension + 1. For non-rational curves, PointSize = Curve.Dimension.
Explicit

ICollection<ControlPoint>.IsReadOnly

#
Returns false.

Indexers

this[]

#
public ControlPoint this[int index] { get; set; }
Gets or sets the control point location at the given index.
index (int)Index of control vertex to access.
The control vertex at [index]

Methods

ChangeEndWeights

#Since v5.0
public bool ChangeEndWeights(double w0, double w1)
Use a combination of scaling and reparameterization to change the end weights to the specified values.
Remarks: The domain, Euclidean locations of the control points, and locus of the curve do not change, but the weights, homogeneous CV values and internal knot values may change. If w0 and w1 are 1 and the curve is not rational, the curve is not changed.
w0 (double)Weight for first control point.
w1 (double)Weight for last control point.
true on success, false on failure.

Contains

#Since v6.0
public bool Contains(ControlPoint item)
Determines if this list contains an item.
item (ControlPoint)The exact item to search for.
A boolean value.

ControlPolygon

#Since v5.0
public Polyline ControlPolygon()
Constructs a polyline through all the control points. Note that periodic curves generate a closed polyline with fewer points than control-points.
A polyline connecting all control points.

CopyTo

#Since v6.0
public void CopyTo(ControlPoint[] array, int arrayIndex)
Copied the list to an array.
array (ControlPoint[])The array to copy to.
arrayIndex (int)The index in which the copy will begin.

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(NurbsCurvePointList other, double epsilon)
Check that all values in other are within epsilon of the values in this
other (NurbsCurvePointList)
epsilon (double)
EpsilonEquals

GetPoint

#Since v6.0
public bool GetPoint(int index, out Point3d point)
Gets a world 3-D, or Euclidean, control point at the given index. The 4-D representation is (x, y, z, 1.0).
index (int)Index of control point to get.
point (out Point3d)Coordinate of control point.
true on success, false on failure.

GetPoint

#Since v6.0
public bool GetPoint(int index, out Point4d point)
Gets a homogeneous control point at the given index, where the 4-D representation is (x, y, z, w). The world 3-D, or Euclidean, representation is (x/w, y/w, z/w).
Remarks: For expert use only. If you do not understand homogeneous coordinates, then use the override that returns world 3-D, or Euclidean, coordinates.
index (int)Index of control point to get.
point (out Point4d)Coordinate and weight of control point.
true on success, false on failure.

GetWeight

#Since v6.0
public double GetWeight(int index)
Gets the weight of a control point at the given index. Note, if the curve is non-rational, the weight will be 1.0.
index (int)Index of control point to get.
The control point weight if successful, Rhino.Math.UnsetValue otherwise.

IndexOf

#Since v6.0
public int IndexOf(ControlPoint item)
Gets the index of a control point, or -1.
item (ControlPoint)The exact item to search for.
The index.

MakeNonRational

#Since v5.0
public bool MakeNonRational()
Converts the curve to a Non-rational NURBS curve. Non-rational curves have unweighted control points.
true on success, false on failure.

MakeRational

#Since v5.0
public bool MakeRational()
Converts the curve to a Rational NURBS curve. Rational NURBS curves have weighted control points.
true on success, false on failure.

SetPoint

#Since v5.0
public bool SetPoint(int index, double x, double y, double z, double weight)
Sets a homogeneous control point at the given index, where the 4-D representation is (x, y, z, w). The world 3-D, or Euclidean, representation is (x/w, y/w, z/w).
Remarks: For expert use only. If you do not understand homogeneous coordinates, then use an override that accepts world 3-D, or Euclidean, coordinates as input.
index (int)Index of control point to set.
x (double)X coordinate of control point.
y (double)Y coordinate of control point.
z (double)Z coordinate of control point.
weight (double)Weight of control point.
true on success, false on failure.

SetPoint

#Since v6.0
public bool SetPoint(int index, double x, double y, double z)
Sets a world 3-D, or Euclidean, control point at the given index. The 4-D representation is (x, y, z, 1.0).
index (int)Index of control point to set.
x (double)X coordinate of control point.
y (double)Y coordinate of control point.
z (double)Z coordinate of control point.
true on success, false on failure.

SetPoint

#Since v6.0
public bool SetPoint(int index, Point3d point, double weight)
Sets a world 3-D, or Euclidean, control point and weight at a given index. The 4-D representation is (x*w, y*w, z*w, w).
index (int)Index of control point to set.
point (Point3d)Coordinates of the control point.
weight (double)Weight of control point.
true on success, false on failure.

SetPoint

#Since v5.0
public bool SetPoint(int index, Point3d point)
Sets a world 3-D, or Euclidean, control point at the given index. The 4-D representation is (x, y, z, 1.0).
index (int)Index of control point to set.
point (Point3d)Coordinate of control point.
true on success, false on failure.

SetPoint

#Since v5.0
public bool SetPoint(int index, Point4d point)
Sets a homogeneous control point at the given index, where the 4-D representation is (x, y, z, w). The world 3-D, or Euclidean, representation is (x/w, y/w, z/w).
Remarks: For expert use only. If you do not understand homogeneous coordinates, then use an override that accepts world 3-D, or Euclidean, coordinates as input.
index (int)Index of control point to set.
point (Point4d)Coordinate and weight of control point.
true on success, false on failure.

SetWeight

#Since v6.0
public bool SetWeight(int index, double weight)
Sets the weight of a control point at the given index Note, if the curve is non-rational, it will be converted to rational.
index (int)Index of control point to set.
weight (double)The control point weight.
true if successful, false otherwise.
item (ControlPoint)
Explicit

ICollection<ControlPoint>.Remove

#
item (ControlPoint)
Explicit

IList<ControlPoint>.Insert

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

IList<ControlPoint>.RemoveAt

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

IEnumerable.GetEnumerator

#
IEnumerator IEnumerable.GetEnumerator()

UVNDirectionsAt

#Since v7.0
public bool UVNDirectionsAt(int index, out Vector3d uDir, out Vector3d vDir, out Vector3d nDir)
Calculates the U, V, and N directions of a NURBS curve control point similar to the method used by Rhino's MoveUVN command.
index (int)Index of control point.
uDir (out Vector3d)The U direction.
vDir (out Vector3d)The V direction.
nDir (out Vector3d)The N direction.
true if successful, false otherwise.

ValidateSpacing

#Since v6.0
public bool ValidateSpacing(double closeTolerance, double stackTolerance, out int[] closeIndices, out int[] stackedIndices)
Simple check of distance between adjacent control points
closeTolerance (double)tolerance to use for determining if control points are 'close'
stackTolerance (double)tolerance to use for determining if control points are 'stacked'
closeIndices (out int[])indices of 'close' points are returned in this array
stackedIndices (out int[])indices of 'stacked' points are returned in this array
true if close or stacked indices are found