import rhinoscriptsyntax as rs allobjs = rs.AllObjects() rs.DeleteObjects(allobjs) #Buchstabe1 initial = "E" hgt= 60 size= 40 # draw a closed curve in Rhino mytext = rs.AddText(initial, (0,0,0), height=size, font="Skia Black") crv = rs.ExplodeText(mytext,True) [0] rs.SelectObject(crv) # extrude the curve rs.Command("-_ExtrudeCrv Solid=No {} _Enter" .format(hgt)) srf = rs.FirstObject(select=True) # use handles to change NURBS shape rs.Command("-_Rebuild UPointCount=10 VPointCount=4 UDegree=3 VDegree=3 DeleteInput=Yes _Enter") rs.EnableObjectGrips(srf, True) rs.SelectObjectGrip(srf,24) rs.SelectObjectGrip(srf,25) rs.Command("-_Move 0,0,0 10,0,0 _Enter") rs.UnselectAllObjects() rs.SelectObjectGrip(srf,38) rs.Command("-_Move 0,0,0 10,0,0 _Enter") rs.UnselectAllObjects() rs.SelectObjectGrip(srf,32) rs.Command("-_Move 0,0, 0,8,0") rs.UnselectAllObjects() rs.EnableObjectGrips(srf,False) # create contourlines in Z-direction and extrude them (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 contourlines in X-direction and use the pipe command (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) #Buchstabe2 initial = "B" # draw a closed curve in Rhino mytext = rs.AddText(initial, (90,0,0), height=size, font="Skia Black") crv = rs.ExplodeText(mytext,True) [0] rs.SelectObject(crv) # extrude the curve rs.Command("-_ExtrudeCrv Solid=No {} _Enter" .format(hgt)) srf = rs.FirstObject(select=True) # use handles to change NURBS shape rs.Command("-_Rebuild UPointCount=10 VPointCount=4 UDegree=3 VDegree=3 DeleteInput=Yes _Enter") rs.EnableObjectGrips(srf, True) rs.SelectObjectGrip(srf,24) rs.SelectObjectGrip(srf,25) rs.Command("-_Move 0,0,0 9,0,0 _Enter") rs.UnselectAllObjects() rs.SelectObjectGrip(srf,38) rs.Command("-_Move 0,0,0 2,0,0 _Enter") rs.UnselectAllObjects() rs.SelectObjectGrip(srf,27) rs.Command("-_Move 0,0,0 -2,0,0 _Enter") rs.UnselectAllObjects() rs.SelectObjectGrip(srf,20) rs.Command("-_Move 0,0,0 0,11,0 _Enter") rs.UnselectAllObjects() rs.SelectObjectGrip(srf,8) rs.Command("-_Move 0,0,0 -5,0,0 _Enter") rs.UnselectAllObjects() rs.EnableObjectGrips(srf,False) # create contourlines in Z-direction and extrude them (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 contourlines in X-direction and use the pipe command (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)