In the below code"panel = rg.NurbsSurface.CreateFromPoints(cpts,2,vnum2,2,2)", I want to generate a surface with 1 degree from points. But now, I get a wrong thing.
Thx for ur help!
import random as rnd
import Rhino.Geometry as rg
uinc = 1/unum
vinc = 1/vnum
panels = []
for i in range(unum):
for j in range(vnum):
vlen = rnd.randint(1,10)
if j + vlen > vnum:
vlen = vnum - j
cpts = []
depth = rnd.randint(0,1)
for k in range(vlen+1):
cpts.append(srf.PointAt(i*uinc, (j + k)*vinc))
cpts.append(srf.PointAt((i+1)*uinc, (j + k)*vinc))
vnum2=int(len(cpts)/2)
panel = rg.NurbsSurface.CreateFromPoints(cpts,2,vnum2,2,2)
panels.append(panel)
a = panels