algorithmic modeling for Rhino
Hi Guys!
I just want to create concentric circles and divide them, then later put cubic volumes on them possibly in a increasing or decreasing order. But I am not able to assign values to my self generated variables. What am I doing wrong.( refer image on what I want to achieve)
import rhinoscriptsyntax as rs
originpt=rs.AddPoint(0,0,0)
R1= rs.GetReal("Enter the radius of inner most circle")
N = rs.GetInteger("Enter how many circles do you want", 3)
D = rs.GetReal("Enter the distance between circle")
S = rs.GetInteger("Enter how many divisions do you want")
for i in range(0,N):
C+str(i) = rs.AddCircle(originpt,({[i -1] * D} + R1)
P+str(i) = rs.DivideCurve((C +str(i)), S, True, True)
Tags:
Where did you find this syntax?
Adding guids and strings seems weird for my simplistic mind.
The following works:
import rhinoscriptsyntax as rs
originpt=rs.AddPoint(0,0,0)
R1= rs.GetReal("Enter the radius of inner most circle")
N = rs.GetInteger("Enter how many circles do you want", 3)
D = rs.GetReal("Enter the distance between circle")
S = rs.GetInteger("Enter how many divisions do you want")
for i in range(0,N):
newcurve=rs.AddCircle(originpt,(i -1) * D + R1)
rs.DivideCurve(newcurve,S,True,True)
You should refer to the ironpython forum for python related questions outside GH.
Best,
M.
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2025 Created by Scott Davidson.
Powered by