import rhinoscriptsyntax as rs import random as ran allobjs = rs.AllObjects() rs.DeleteObjects(allobjs) #rs.EnableRedraw(False) ##################################### ur_s = rs.AddSphere([0,0,0],70) crv = rs.AddCircle3Pt([-70,0,0], [0,0,70], [70,0,0]) my_pts = rs.DivideCurve(crv, 20, True, True) start1 = [0,0,0] start2 = [30,0,0] ##random segelschalen## ranstart= ran.randint(1,2) if ranstart==1: start= start1 middle= my_pts[5] p1_ran= ran.randint(3,4) if p1_ran==3: pts1= my_pts[3] if p1_ran==4: pts1= my_pts[4] p2_ran= ran.randint(6,8) if p2_ran==6: pts2= my_pts[6] if p2_ran==7: pts2= my_pts[7] if p2_ran==8: pts2= my_pts[8] if ranstart==2: start= start2 middle= my_pts[7] p1_ran= ran.randint(4,6) if p1_ran==4: pts1= my_pts[4] if p1_ran==5: pts1= my_pts[5] if p1_ran==6: pts1= my_pts[6] p2_ran= ran.randint(8,9) if p2_ran==8: pts2= my_pts[8] if p2_ran==9: pts2= my_pts[9] line1= rs.AddLine(start, pts1) line2= rs.AddLine(start, pts2) crv_new= rs.AddArc3Pt(pts1 ,pts2, middle) schale= rs.JoinCurves((line1, line2, crv_new), True) rs.MoveObject(schale, [0,-70,0]) ##auf kugel projezieren## p_schale= rs.PullCurve(ur_s, schale) p_schale= rs.JoinCurves((p_schale), True) #rs.MoveObject(p_schale, (200,0,0)) """ #1 line1= rs.AddLine(start1, my_pts[4]) line2= rs.AddLine(start1, my_pts[8]) ##lines sollen random erstellt werden - kommt noch## crv_new1= rs.AddArc3Pt(my_pts[4] , my_pts[8], my_pts[6]) schale1= rs.JoinCurves((line1, line2, crv_new1), True) rs.MoveObject(schale1, [0,-70,0]) ##auf kugel projezieren## p_schale= rs.PullCurve(ur_s, schale1) p_schale= rs.JoinCurves((p_schale), True) rs.MoveObject(p_schale, (200,0,0)) #2 line3= rs.AddLine(start1, my_pts[4]) line4= rs.AddLine(start1, my_pts[7]) ##lines sollen random erstellt werden - kommt noch## crv_new2= rs.AddArc3Pt(my_pts[4] , my_pts[7], my_pts[6]) schale2= rs.JoinCurves((line3, line4, crv_new2), True) rs.MoveObject(schale2, [0,-70,0]) ##auf kugel projezieren## p_schale2= rs.PullCurve(ur_s, schale2) p_schale2= rs.JoinCurves((p_schale2), True) rs.MoveObject(p_schale2, (150,0,0)) #3 line5= rs.AddLine(start2, my_pts[6]) line6= rs.AddLine(start2, my_pts[9]) ##lines sollen random erstellt werden - kommt noch## crv_new3= rs.AddArc3Pt(my_pts[6] , my_pts[9], my_pts[7]) schale3= rs.JoinCurves((line5, line6, crv_new3), True) rs.MoveObject(schale3, [0,-70,0]) ##auf kugel projezieren## p_schale3= rs.PullCurve(ur_s, schale3) p_schale3= rs.JoinCurves((p_schale3), True) rs.MoveObject(p_schale3, (250,0,0)) """