NurbsCurvePointList
Referencespublic class NurbsCurvePointList : IEnumerable<ControlPoint>, IEpsilonComparable<NurbsCurvePointList>, IList<ControlPoint>
Provides access to the control points of a NURBS curve.
Properties
Gets the length of the polyline connecting all control points.
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.
Returns false.
Indexers
this[]
#Gets or sets the control point location at the given index.
Returns: The control vertex at [index]
Methods
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.
Returns: true on success, false on failure.
Determines if this list contains an item.
Returns: A boolean value.
Constructs a polyline through all the control points. Note that periodic curves generate a closed polyline with fewer points than control-points.
Returns: A polyline connecting all control points.
Copied the list to an array.
public void CopyTo()
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()
Gets a world 3-D, or Euclidean, control point at the given index. The 4-D representation is (x, y, z, 1.0).
Returns: true on success, false on failure.
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.
Returns: true on success, false on failure.
Gets the weight of a control point at the given index. Note, if the curve is non-rational, the weight will be 1.0.
Returns: The control point weight if successful, Rhino.Math.UnsetValue otherwise.
Gets the index of a control point, or -1.
Returns: The index.
Converts the curve to a Non-rational NURBS curve. Non-rational curves have unweighted control points.
Returns: true on success, false on failure.
Converts the curve to a Rational NURBS curve. Rational NURBS curves have weighted control points.
Returns: true on success, false on failure.
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.
Returns: true on success, false on failure.
Sets a world 3-D, or Euclidean, control point at the given index. The 4-D representation is (x, y, z, 1.0).
Returns: true on success, false on failure.
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).
Returns: true on success, false on failure.
Sets a world 3-D, or Euclidean, control point at the given index. The 4-D representation is (x, y, z, 1.0).
Returns: true on success, false on failure.
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.
Returns: true on success, false on failure.
Sets the weight of a control point at the given index Note, if the curve is non-rational, it will be converted to rational.
Returns: true if successful, false otherwise.
Calculates the U, V, and N directions of a NURBS curve control point similar to the method used by Rhino's MoveUVN command.
Returns: true if successful, false otherwise.
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'
closeIndices,
indices of 'close' points are returned in this array
stackedIndices
indices of 'stacked' points are returned in this array
Returns: true if close or stacked indices are found