import rhinoscriptsyntax as rs #INITIAL1 allobjs=rs.AllObjects() rs.DeleteObjects(allobjs) initial1="S" hgt=100 size=30 #draw a closed curve mytext=rs.AddText(initial1,(0,0,0),height=size, font="Baloo 2") crv=rs.ExplodeText(mytext,True)[0] rs.SelectObject(crv) #extrude the curve rs.Command("_ExtrudeCrv Solid=No 30 _Enter".format(hgt)) srf=(rs.FirstObject(select=True)) rs.UnselectObject(crv) #use handles to change NURBES rs.Command("-_Rebuild UPointCount=10 VPointCount=4 UDegree=3 VDegree=3 DeleteInput=Yes _Enter") rs.EnableObjectGrips(srf, True) #pointlist=(rs.ObjectGripLocations(srf)) #print (pointlist) #for i, pt in enumerate(pointlist): #cmd="-Dot {} {} _Enter".format(str(i),str(pt)) #rs.Command(cmd, False) #rs.SelectObjectGrip(srf,23) #rs.Command("-_Move 0,0,0 15,0,0 _Enter") #rs.UnselectAllObjects() #rs.SelectObjectGrip(srf,20) #rs.Command("-_Move 0,0,0 15,0,0 _Enter") #rs.UnselectAllObjects() #rs.SelectObjectGrip(srf,11) #rs.Command("-_Move 0,0,0 0,20,0 _Enter") #rs.UnselectAllObjects() rs.EnableObjectGrips(srf, False) #create contourlines in Z-direction and extrude them and(floor plates) rs.SelectObject(srf) rs.Command("Contour 0,0,0 0,0,1 3.0 _Enter") rs.Command("_ExtrudeCrv Solid=Yes 0.3 _Enter") #create counterlines in X-direction and use pipe command and(vertical support) rs.SelectObject(srf) rs.Command("Contour 0,0,0 1,0,0 2.0 _Enter") rs.Command("Pipe 0.2 _Enter") rs.DeleteObject(srf) rs.UnselectAllObjects() #INITIAL2 allobjs=rs.AllObjects() #rs.DeleteObjects(allobjs) initial2="M" hgt=30 size=30 #draw a closed curve mytext2=rs.AddText(initial2,(60,0,0),height=size, font="Baloo 2") crv=rs.ExplodeText(mytext2,True)[0] rs.SelectObject(crv) #extrude the curve rs.Command("_ExtrudeCrv Solid=No {} _Enter".format(hgt)) srf=rs.FirstObject(select=True) rs.UnselectObject(crv) #use handles to change NURBES rs.Command("-_Rebuild UPointCount=10 VPointCount=4 UDegree=3 VDegree=3 DeleteInput=Yes _Enter") rs.EnableObjectGrips(srf, True) #pointlist=(rs.ObjectGripLocations(srf)) #print (pointlist) #for i, pt in enumerate(pointlist): #cmd="-Dot {} {} _Enter".format(str(i),str(pt)) #rs.Command(cmd, False) rs.EnableObjectGrips(srf, False) #create contourlines in Z-direction and extrude them and(floor plates) rs.SelectObject(srf) rs.Command("Contour 60,0,0 60,0,1 1.5 _Enter") rs.Command("_ExtrudeCrv Solid=Yes 0.3 _Enter") #create contourlines in X-direction and use pipe command and(vertical support) rs.SelectObject(srf) rs.Command("Contour 60,0,0 61,0,0 1.5 _Enter") rs.Command("Pipe 0.2 _Enter") rs.DeleteObject(srf) rs.UnselectAllObjects()