Grasshopper

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

Views: 391

Replies to This Discussion

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= []
circles = []

for i in range(divide):
newVec=rs.VectorScale(vec,i)
centerList.append(rs.CopyObject(start,newVec))

for i in centerList:
center = rs.coerce3dpoint(i)
newCircle = rs.AddCircle(center, 2.0)
circles.append(newCircle)

name your outputs the same as the list names.

thank you very much Chris!

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service