I don’t understand why the SetPoint() or SetWeight() methods change the points location when I set the weight to a different value from the default 1.0.
It seems like the higher the weight set, the closer the control point moves towards the origin.
How do you change a control point’s weight without moving its location?
Weight Set at 1.0 with control point in correct location:
Weight Set at 1.3 with control point moving towards origin?!
Here is the code:
import Rhino.Geometry as rg
#Define Function To Move A Control Point
def Move_Point(Control_Points_List, U, V, X, Y, Z, Weight):#Select Point at U,V Index 0,0 Control_Point = Control_Points_List.GetControlPoint(U,V) #Move Point X, Y, Z Control_Point.X += X Control_Point.Y += Y Control_Point.Z += Z Control_Point.Weight = Weight #Set Control Point Control_Points_List.SetControlPoint(U,V,(Control_Point))
Move_Point(Control_Points, 1, 1, 0, 0, 5, Weight_In)