Rhino6 NurbsCurve Weights Bug?

Hello,
In Rhino 6 “rs.AddNurbsCurve()” doesn’t seem to behave the same way as it did in Rhino 5 when dealing with weights.

Can someone confirm this is a bug? or am i missing something?
I have attached the GH file. In Rhino 5 It works as intended.

NurbsTest.gh (2.6 KB)

Found This Thread:

Guess i’ll use Rhino Common instead of rs.AddNurbsCurve


import scriptcontext
import rhinoscriptsyntax as rs
import utility as rhutil
import Rhino


degree=2
pts = ([0,2,1],[5,10,10],[10,1,0.5])
points = rhutil.coerce3dpointlist(pts, True)

knots = [0,0,1,1]
weights = [1,1,x]

nc= Rhino.Geometry.NurbsCurve.Create(False,degree,points)

for i in range(nc.Points.Count):
    nc.Points.SetPoint(i, points[i], weights[i])

a = scriptcontext.doc.Objects.AddCurve(nc)

NurbsTest_S.gh (3.6 KB)

1 Like

@dale Does RhinoScript “rs.AddNurbsCurve” need to be updated to match the result coming from common (which matches the GH “Nurbs Curve PWK”)?

Creates YouTrack item for this bug…

This issue (RH-47837) is fixed in the latest Service Release Candidate. Please give it a try.