Hi,
I have a problem with rebuilding a Polycurve. It has degree 1 and I would like to interpolate it with a degree 3 curve.
But when I rebuild the curve with the same spancount (which is about 2500) it always reduces it to a degree 3 curve with less than 1000. What am I doing wrong.
Here is the code and fileCRV.3dm (690.5 KB): I like RhinoCommon THANKS
###############
import Rhino
import System
import copy
import rhinoscriptsyntax as rs
import scriptcontext as sc
import Rhino.Geometry as rg
import Rhino.Input as ri
import Rhino.DocObjects as rd
import time
import math
import random
rc, crv = ri.RhinoGet.GetOneObject(“Select Curve”, False, Rhino.DocObjects.ObjectType.Curve)
“”"
if rc <> Rhino.Commands.Result.Success or crv == None:
return rc
“”"
obj = crv.Object()
getcrv = obj.Geometry
crv = rg.PolyCurve.ToNurbsCurve(getcrv)
spancount = crv.SpanCount
crvnew = rg.NurbsCurve.Rebuild(crv,spancount,3,True)
sc.doc.Objects.AddCurve(crvnew)
#############