Created by: portnov
This node suggests several ways of adjusting a NURBS curve so that it would go through another point at specified position, while keeping most of the curve more or less in place.
Different methods of curve adjustment allow different degrees of freedom in specifying what do you want to move and where to.
The following methods are available:
- Move one control point. The node will move exactly one control point of the curve, to move curve point at T parameter by Vector. The index of control point being moved is specified in the Index input. Note that it is not always possible to move arbitrary curve point by arbitrary vector by moving specified control point. In intuitive terms, the point to be moved has to be near control point being moved.
- Adjust one weight. The node will adjust one weight of the curve, to move curve point at T parameter directly towards corresponding control point, or in the opposite direction. The index of the weight being adjusted (and the index of corresponding control point) is specified in the Index input. Movement distance is specified in the Distance input. Note that it is not always possible to move arbitrary curve point by adjusting the specified curve weight. Also, if you try to move the point too far with this method, you will probably get unexpected curve shapes.
- Adjust two weights. The node will adjust two weights of the curve, to move curve point at T parameter, together with neighbouring curve span, towards the corresponding control polygon leg, or in the opposite direction. The index of the first weight to be adjusted (and corresponding control point index) is specified in the Index input. Note that it is not always possible to move an arbitrary curve point by adjusting the specified weights. Also, if you try to move the point too far with this method, you will probably get unexpected curve shapes.
-
Move control points. The node will move several control points of the
curve (approximately
p
of them, wherep
is the degree of the curve), to move curve point at T parameter by the specified vector. The node will automatically figure out which control points have to be moved. This algorithms gives most smooth results, but it requires more computations, so it is probably less performant. - Insert knot. The node will insert additional knot into curve's knotvector, and then move three control points, in order to move curve point at T parameter by specified vector. The node will automatically figure out which control points have to be moved.
Preflight checklist
Put an x letter in each brackets when you're done this item:
-
Code changes complete. -
Code documentation complete. -
Documentation for users complete (or not required, if user never sees these changes). -
Manual testing done. -
Unit-tests implemented. -
Ready for merge.