NurbsCurvePointList

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

Properties

ControlPolygonLength

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

Count

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

PointSize

#Since v6.9
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.
public int PointSize { get; }
Explicit

ICollection<ControlPoint>.IsReadOnly

#
Returns false.

Indexers

this[]

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

Methods

ChangeEndWeights

#Since v5.0
Use a combination of scaling and reparameterization to change the end weights to the specified values.
public bool ChangeEndWeights(
w0,
Weight for first control point.
w1
Weight for last control point.
)
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.
true on success, false on failure.

Contains

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

ControlPolygon

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

CopyTo

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

EnsurePrivateCopy

#Since v5.0
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.
public void EnsurePrivateCopy()

EpsilonEquals

#Since v5.4
Check that all values in other are within epsilon of the values in this
public bool EpsilonEquals()
EpsilonEquals

GetPoint

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

GetPoint

#Since v6.0
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).
public bool GetPoint(
index,
Index of control point to get.
out Point4d
point
Coordinate and weight of control point.
)
Remarks: For expert use only. If you do not understand homogeneous coordinates, then use the override that returns world 3-D, or Euclidean, coordinates.
true on success, false on failure.

GetWeight

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

IndexOf

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

MakeNonRational

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

MakeRational

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

SetPoint

#Since v5.0
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).
public bool SetPoint(
index,
Index of control point to set.
x,
X coordinate of control point.
y,
Y coordinate of control point.
z,
Z coordinate of control point.
weight
Weight of control point.
)
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.
true on success, false on failure.

SetPoint

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

SetPoint

#Since v6.0
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).
public bool SetPoint(
index,
Index of control point to set.
point,
Coordinates of the control point.
weight
Weight of control point.
)
true on success, false on failure.

SetPoint

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

SetPoint

#Since v5.0
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).
public bool SetPoint(
index,
Index of control point to set.
point
Coordinate and weight of control point.
)
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.
true on success, false on failure.

SetWeight

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

IList<ControlPoint>.Insert

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

IList<ControlPoint>.RemoveAt

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

IEnumerable.GetEnumerator

#
IEnumerator IEnumerable.GetEnumerator()

UVNDirectionsAt

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

ValidateSpacing

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