import rhinoscriptsyntax as rs import random as ran import fantastic_stairs_lib as fs # delet everything as start from screach allobjs = rs.AllObjects() rs.DeleteObjects (allobjs) """ crv = fs.make_random_spiral(15, 3, 5) fs.make_curved_stair(crv) """ whereto = [0,5,5] angle = 10 (box1, line1) = fs.make_box_wline([0,0,0], 1.2, 1.2, 0.2, 1) (box2, line2) = fs.make_box_wline(whereto, 1.2, 1.2, 0.2, 1) rs.RotateObjects([box2, line2], whereto, angle, [0,0,1]) curve = fs.blend_curves(line1, line2,2) (st_crv, tothgt) = fs.curve_to_stairline(curve) """ pts1 = rs.CurvePoints(line1) pts2 = rs.CurvePoints(line2) rs.AddLine(pts1[1], pts2[1]) """ c_len = rs.CurveLength(st_crv) (steps, th) = fs.calculate_steps_height(tothgt) An = 1 tt = (c_len-An)/steps if tt>0.32: tt = fs.tt P = steps/2 P = 4 pod_l = fs.calculate_podlen(c_len, tt, steps, P, An) print "stair values (length, tread hight, tread depth, steps)", c_len, th, tt, steps fs.make_curved_podeststair(st_crv, steps = steps, th = th, tt = tt, pod_l = pod_l, P=P, An = An, DC = steps+1, s_width = 1.2) """ steps = int(c_len/fs.tt) tt = c_len/steps th = tothgt/steps """ """ steps = int(tothgt/fs.tt) th = tothgt/steps tt = c_len/steps """