import rhinoscriptsyntax as rs allobjs = rs.AllObjects() rs.DeleteObjects(allobjs) initial_1 = "A" initial_2 = "S" hgt = 50 size = 40 # draw a closed curve in rhino mytext_1 = rs.AddText(initial_1, (0,0,0), height=size, font="Arial") crv_1 = rs.ExplodeText(mytext_1,True)[0] rs.SelectObject(crv_1) # extrude the curve rs.Command("_ExtrudeCrv Solid=No {} _Enter".format(hgt)) srf_1 = rs.FirstObject(select=True) rs.DeleteObject(crv_1) # draw a closed curve in rhino mytext_2 = rs.AddText(initial_2, (40,-20,0), height=size, font="Arial") crv_2 = rs.ExplodeText(mytext_2,True)[0] rs.SelectObject(crv_2) # extrude the curve rs.Command("_ExtrudeCrv Solid=No {} _Enter".format(hgt)) srf_2 = rs.FirstObject(select=True) rs.DeleteObject(crv_2) # use handles to change NURBS shape rs.Command("-_Rebuild UPointCount=10 VPointCount=4 UDegree=3 VDegree=3 DeleteInput=Yes _Enter") rs.EnableObjectGrips(srf_1, True) # use handles to change NURBS shape rs.Command("-_Rebuild UPointCount=10 VPointCount=4 UDegree=3 VDegree=3 DeleteInput=Yes _Enter") rs.EnableObjectGrips(srf_2, True) """ pointlist = rs.ObjectGripLocations(srf_1) # print pointlist for i,pt in enumerate(pointlist): cmd = "-Dot {} {} _Enter".format(str(i),str(pt)) rs.Command(cmd,False) pointlist = rs.ObjectGripLocations(srf_2) # print pointlist for i,pt in enumerate(pointlist): cmd = "-Dot {} {} _Enter".format(str(i),str(pt)) rs.Command(cmd,False) """ rs.SelectObjectGrip(srf_1,35) rs.Command("_Move 0,0,0 0,25,0 _Enter") rs.UnselectAllObjects() rs.SelectObjectGrip(srf_1,4) rs.Command("_Move 0,0,0 10,0,0 _Enter") rs.UnselectAllObjects() rs.SelectObjectGrip(srf_1,20) rs.SelectObjectGrip(srf_1,23) rs.Command("_Move 0,0,0 15,0,0 _Enter") rs.UnselectAllObjects() rs.EnableObjectGrips(srf_1, False) rs.SelectObjectGrip(srf_2,35) rs.Command("_Move 0,0,0 0,25,0 _Enter") rs.UnselectAllObjects() rs.SelectObjectGrip(srf_2,4) rs.SelectObjectGrip(srf_2,24) rs.Command("_Move 0,0,0 10,0,0 _Enter") rs.UnselectAllObjects() rs.SelectObjectGrip(srf_2,23) rs.SelectObjectGrip(srf_2,20) rs.SelectObjectGrip(srf_2,15) rs.Command("_Move 0,0,0 15,0,0 _Enter") rs.UnselectAllObjects() # create contourlines in Z-direction and extrude them (floor plates) rs.SelectObject(srf_1) rs.Command("Contour 0,0,0 0,0,1 3.0 _Enter") rs.Command("_ExtrudeCrv Solid=Yes 0.3 _Enter") # create contourlines in X-direction and use the pipe command (vertical support) rs.SelectObject(srf_1) rs.Command("Contour 0,0,0 1,0,0 2.0 _Enter") rs.Command("Pipe 0.2 _Enter") rs.DeleteObject(srf_1) rs.UnselectAllObjects() # create contourlines in Z-direction and extrude them (floor plates)rs.SelectObject(srf_2) rs.SelectObject(srf_2) rs.Command("Contour 0,0,0 0,0,1 3.0 _Enter") rs.Command("_ExtrudeCrv Solid=Yes 0.3 _Enter") # create contourlines in X-direction and use the pipe command (vertical support) rs.SelectObject(srf_2) rs.Command("Contour 0,0,0 1,0,0 2.0 _Enter") rs.Command("Pipe 0.2 _Enter") rs.DeleteObject(srf_2) rs.UnselectAllObjects()