algorithmic modeling for Rhino
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 some thing wrong. I want to get some planar surfaces.
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
a = panels
Tags:
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by