Hi everyone,

I tried to change the weight of one control point of an initially equally weighted NURBS curve (B-Spline). This is my code in the GH-C#-component, where w is the list of the new weights and C is the B-Spline curve.

```
private void RunScript(Curve C, List<double> w, ref object NC)
{
//construct NURBS curve
NurbsCurve nurbs_crv = new NurbsCurve(C.ToNurbsCurve());
//check if sufficient control points are available
if(nurbs_crv.Points.Count != w.Count)
{
Component.AddRuntimeMessage(GH_RuntimeMessageLevel.Error, "Number of control points and weights do not match!");
return;
}
for(int i = 0; i < nurbs_crv.Points.Count; i++)
{
nurbs_crv.Points.SetWeight(i, w[i]);
}
NC = nurbs_crv;
}
```

The outcoming curve (red) is wrong. ( Only the weight of the second point is set to 2.8, the rest is still 1.0). The initial B-Spline curve is represented in blue. If every entry in the w-list is 1.0, the two curves coincide.

This happens also if I use the initial working code, which I had in Rhino5:

```
nurbs_crv.Points[i] = new ControlPoint(nurbs_crv.Points[i].Location.X, nurbs_crv.Points[i].Location.Y, nurbs_crv.Points[i].Location.Z, w[i]);
```

Are there some changes which might cause this error? I would be grateful for every type of hint!

Anna