import fantastic_stairs_lib as fs import rhinoscriptsyntax as rs import random as ran reload(fs) # delete everything and start from scratch rs.DeleteObjects(rs.AllObjects()) rs.EnableRedraw(False) # clover curve = fs.make_clover(30,30,30) len_crv = rs.CurveLength(curve) An = 0 P = 9 mods = (len_crv-An) / (P*fs.tt+fs.pod_l+fs.tt) steps = int(mods*P)+1 # columns for clover fs.make_curved_podeststair(curve, steps=steps, pod_l=fs.pod_l, DC=steps+1, P=P, An=An) i = 1 len_start = An+P*fs.tt+fs.pod_l/2 while (len_start<=len_crv): point = rs.CurveArcLengthPoint(curve, len_start) m_l = rs.AddLine(point, [point[0],point[1],i*P*fs.th-fs.thick]) rs.AddPipe(m_l, 0, 0.4) i = i+1 len_start += P*fs.tt + fs.pod_l + fs.tt # spiral curve =rs.AddSpiral([0,0,0],[0,0,1], 0, turns= 9, radius0= 15, radius1= 3) len_c= rs.CurveLength(curve) An=0 P=9 mods = (len_c+An) / (P*fs.tt+fs.pod_l + fs.tt) steps = int(mods*P)+1 # columns for spiral fs.make_curved_podeststair(curve, steps=steps, pod_l=fs.pod_l, DC=steps + 1, P=P, An=An) i = 1 len_start = An + P * fs.tt + fs.pod_l/2 while (len_start <= len_c): point = rs.CurveArcLengthPoint(curve, len_start) m_l = rs.AddLine(point, [point[0], point[1], i * P * fs.th - fs.thick]) rs.AddPipe(m_l, 0, 0.2) i = i+1 len_start += P*fs.tt + fs.pod_l + fs.tt rs.EnableRedraw(True)