import rhinoscriptsyntax as rs allobj = rs.AllObjects() rs.DeleteObjects(allobj) #both of my initials are the letter H initial = "H" hgt = 60 hgt2 = 80 size = 5 loc = 0 loc2 = 420 #draw the 1st letter H mytext = rs.AddText(initial,(loc,0,0),height=size, font="Verdana") 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) #change the shape of the NURBS using the handles/ rebuild it rs.Command("-_Rebuild UPointCount=20 VPointCount=4 UDegree=3 Vdegree=3 DeleteInput=Yes _Enter") #enable grips rs.EnableObjectGrips(srf, True) #comment bc of the pictures """ pointList = rs.ObjectGripLocations(srf) print pointList #enumerate through the points and place a dot for visual refrence for i, pt in enumerate(pointList): cmd = "-Dot {} {} _Enter".format(str(i),str(pt)) rs.Command(cmd, False) """ #move control points to change the shape(aestethics) rs.SelectObjectGrip(srf, 23) rs.Command("-_Move 0,0,0 -15,0,0 _Enter") rs.UnselectAllObjects() rs.SelectObjectGrip(srf, 17) rs.Command("-_Move 0,0,0 50,0,0 _Enter") rs.UnselectAllObjects() rs.SelectObjectGrip(srf, 7) rs.SelectObjectGrip(srf, 27) rs.Command("-_Move 0,0,0 -10,0,0 _Enter") rs.UnselectAllObjects() rs.SelectObjectGrip(srf, 3) rs.Command("-_Move 0,0,0 -20,0,0 _Enter") rs.UnselectAllObjects() rs.SelectObjectGrip(srf, 0) rs.SelectObjectGrip(srf, 63) rs.Command("-_Move 0,0,0 100,0,0 _Enter") rs.UnselectAllObjects() rs.SelectObjectGrip(srf, 4) rs.SelectObjectGrip(srf, 44) rs.Command("-_Move 0,0,0 30,0,0 _Enter") rs.UnselectAllObjects() #disable grips rs.EnableObjectGrips(srf, False) #create floor-plates: create and extrude contourlines in the Z-direction rs.SelectObject(srf) rs.Command("Contour 0,0,0 0,0,1 10.0 _Enter ") rs.Command("_ExtrudeCrv Solid=Yes 0.3 _Enter") #create floor-plates: create and extrude contourlines in the X-direction rs.SelectObject(srf) rs.Command("Contour 0,0,0 1,0,0 10.0 _Enter ") rs.Command("Pipe 0.2 _Enter") #delete the original srf rs.DeleteObject(srf) rs.UnselectAllObjects() #---------------------------------------------------------------------------- #draw the 2nd H mytext = rs.AddText(initial,(loc2,0,0),height=size, font="Verdana") crv = rs.ExplodeText(mytext,True)[0] rs.SelectObject(crv) #extrude the curve rs.Command("-_ExtrudeCrv Solid=No {} _Enter".format(hgt2)) srf = rs.FirstObject(select=True) #change the shape of the NURBS using the handles/ rebuild it rs.Command("-_Rebuild UPointCount=20 VPointCount=4 UDegree=3 Vdegree=3 DeleteInput=Yes _Enter") #enable grips rs.EnableObjectGrips(srf, True) #comment bc of the pictures """ pointList = rs.ObjectGripLocations(srf) print pointList #enumerate through the points and place a dot for visual refrence for i, pt in enumerate(pointList): cmd = "-Dot {} {} _Enter".format(str(i),str(pt)) rs.Command(cmd, False) """ #move control points to change the shape(aestethics) rs.SelectObjectGrip(srf, 23) rs.Command("-_Move 0,0,0 -15,0,0 _Enter") rs.UnselectAllObjects() rs.SelectObjectGrip(srf, 27) rs.Command("-_Move 0,0,0 -10,0,0 _Enter") rs.UnselectAllObjects() rs.SelectObjectGrip(srf, 43) rs.Command("-_Move 0,0,0 -100,0,0 _Enter") rs.UnselectAllObjects() rs.SelectObjectGrip(srf, 19) rs.Command("-_Move 0,0,0 30,0,0 _Enter") rs.UnselectAllObjects() rs.SelectObjectGrip(srf, 60) rs.Command("-_Move 0,0,0 15,0,0 _Enter") rs.UnselectAllObjects() rs.SelectObjectGrip(srf, 2) rs.SelectObjectGrip(srf, 40) rs.Command("-_Move 0,0,0 -40,0,0 _Enter") rs.UnselectAllObjects() rs.SelectObjectGrip(srf, 47) rs.SelectObjectGrip(srf, 55) rs.Command("-_Move 0,0,0 -50,0,0 _Enter") rs.UnselectAllObjects() rs.SelectObjectGrip(srf, 44) rs.Command("-_Move 0,0,0 -20,0,0 _Enter") rs.UnselectAllObjects() rs.SelectObjectGrip(srf, 53) rs.Command("-_Move 0,0,0 -25,0,0 _Enter") rs.UnselectAllObjects() #disable grips rs.EnableObjectGrips(srf, False) #create floor-plates: create and extrude contourlines in the Z-direction rs.SelectObject(srf) rs.Command("Contour 0,0,0 0,0,1 10.0 _Enter ") rs.Command("_ExtrudeCrv Solid=Yes 0.3 _Enter") #create floor-plates: create and extrude contourlines in the X-direction rs.SelectObject(srf) rs.Command("Contour 0,0,0 1,0,0 10.0 _Enter ") rs.Command("Pipe 0.2 _Enter") #delete the original srf rs.DeleteObject(srf) rs.UnselectAllObjects()