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
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.
Parameters:
| item (ControlPoint) | The exact item to search for. |
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.
Parameters:
| array (ControlPoint[]) | The array to copy to. |
| arrayIndex (int) | The index in which the copy will begin. |
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.
Check that all values in other are within epsilon of the values in this
Parameters:
| other (NurbsCurvePointList) | |
| epsilon (double) |
Implements: EpsilonEquals
Gets a world 3-D, or Euclidean, control point at the given index. The 4-D representation is (x, y, z, 1.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).
Remarks: For expert use only. If you do not understand homogeneous coordinates, then use the override that returns world 3-D, or Euclidean, coordinates.
Parameters:
| index (int) | Index of control point to get. |
| point (out Point4d) | Coordinate and weight of control point. |
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.
Parameters:
| index (int) | Index of control point to get. |
Returns: The control point weight if successful, Rhino.Math.UnsetValue otherwise.
Gets the index of a control point, or -1.
Parameters:
| item (ControlPoint) | The exact item to search for. |
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.
Parameters:
| 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. |
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).
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).
Sets a world 3-D, or Euclidean, control point at the given index. The 4-D representation is (x, y, z, 1.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).
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.
Parameters:
| index (int) | Index of control point to set. |
| point (Point4d) | Coordinate and weight of control point. |
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.
Parameters:
| item (ControlPoint) |
Parameters:
| item (ControlPoint) |
Parameters:
| index (int) | |
| item (ControlPoint) |
Parameters:
| index (int) |
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 ValidateSpacing(double closeTolerance, double stackTolerance, out int[] closeIndices, out int[] stackedIndices)
Simple check of distance between adjacent control points
Parameters:
| 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 |
Returns: true if close or stacked indices are found