algorithmic modeling for Rhino
hello,
I would like to ask you where can I put the "a =" as output in my grasshopper component to see all the circles (I've tried before rs.AddCircle (center, 2.0) but I have as output only one circle):
import rhinoscriptsyntax as rs
start=rs.AddPoint(0,0,0)
end=rs.AddPoint([10,0,0])
divide=20
vec=rs.VectorCreate(end,start)
vec=rs.VectorDivide(vec,divide)
centerList=list()
for i in range(divide):
newVec=rs.VectorScale(vec,i)
centerList.append(rs.CopyObject(start,newVec))
for center in centerList:
rs.AddCircle(center,2.0)
any help appreciate thanks,
roy
Tags:
hi Mohamed ,
thank you for your message.
I've tried but don't works for me. the script works fine if I use it in rhino but I would like to use it in grasshopper python but if I put the a = before the last string I receive only one circle instead of all circles. where can I put the "a =" (grasshopper component output variable ) to view the global solution of the script that works fine in rhino?
mohameds solution seems to work for me.
look at attached
yes to me too!
thank you very much to you and Mohamed,
my mistake was that after centerList I wrote [] instead of ()...
thanks again
randomPtsNum?
yes, to populate the surface(trimmed surface) i create in the first part.
randomPtsNum should be the count of points to populate
file attached with surface internalised
thanks a lot Mohamed, i will study and try, that will help me understand
regards!
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
© 2024 Created by Scott Davidson. Powered by