################################### ### DM2_w24 # AGruber@tugraz.at ### ### hu_06 UN_headquaters NYC ### ###################################################### ### paneling / new dimensions ### 87.5 x 22.0 meters (was lenY = 116.56 / lenX = 28.18) ################################### ###################################################### ############################## import rhinoscriptsyntax as rs import random, time, sys, os ### sys.path.append("P:/") ### sys.path.append("D:/PY/") sys.path.append("P:/WWW/mori21/DM2/") import DM_lib as dm ### reload( dm ) ############################## rs.UnitSystem(4) # km = 5, meters = 4, cm = 3 etc rs.ShowGrid(None, 0) # grid > 0 = off rs.ShowGridAxes(None, 1) # y/y/z axen display > 0/1 = off/on rs.ViewDisplayMode(rs.CurrentView(), "wireframe") #rs.ViewDisplayMode(rs.CurrentView(), "rendered") rs.Command("cplane w t enter", 0) # cPlane World Top dm.PointRadius(displayModeX=0, rad=1, styl=3) dm.printDisplay(1) # nomen est omen rs.EnableRedraw(0) #_____________________________here you go: dm.newEmptyLayer("myPROJ", [100,110,200]) anz = 16*8 showPts = 0 deg = 1 delIt = 0 keepFrames = 10 frames = 25*4 path = "L:/animatzi/" if not os.path.exists(path): os.makedirs(path) #coords_1 = makeFigure( pnts=pnts_singt, crv_degree=deg, pos=[50.0, 10.0,0], divis=anz, show=showPts, delIt=delIt, crv_name="MM_singt", obj_color=[0,200,0]) #coords_2 = makeFigure( pnts=pnts_wind, crv_degree=deg, pos=[00.0, 10.0,0], divis=anz, show=showPts, delIt=delIt, crv_name="MM_wind", obj_color=[210,0,120]) #rs.LayerVisible("mori", 1) crv_0 = rs.ObjectsByName("spagat")[0] crv_1 = rs.ObjectsByName("pose_0")[0] #MM_2 = rs.ObjectsByName("MM_arme")[0] coords_0 = rs.DivideCurve(crv_0, anz, 0) coords_1 = rs.DivideCurve(crv_1, anz, 0) coords_2 = rs.DivideCurve(rs.ObjectsByName("spagat_1")[0], anz, 0) coordsLists = [coords_0, coords_1, coords_2] rs.HideObjects([crv_0, crv_1, rs.ObjectsByName("spagat_1")[0]]) dm.getCameraTarget() #dm.setCameraTarget( [-77.48685689, 11.77273249, 12.05421199], [17.20711797, 25.7546931, 14.05896983], lens=49.99999999, rota=0, upVec=[-0.020714654726424725,-0.003058605226544303,0.999780749971529] ) # ... danke, andi ! ## cam 1 #dm.setCameraTarget( [2297.30833452, -1105.70267301, 1105.86386332], [2095.90941287, 309.52877449, 32.56533569], lens=50.0, rota=0, upVec=[-0.0845927567448117,0.5944338162146086,0.7996827518752985] ) # ... danke, andi ! #dm.setCameraTarget( [2606.27453986, -2437.34727857, 388.12544758], [2648.67706826, 259.67823271, 4.22570046], lens=50.0, rota=0, upVec=[0.0022150192840294358,0.140886964569818,0.9900232102854329] ) # ... danke, andi ! if 1: if 1: framNumber = 0 fac = 1/frames allCoords = [] for i in range(len(coordsLists)-1): for fram in range(0, frames+1): # facX = fac*fram # coords = [] # for j in range(anz): # cor = dm.pntInbetween( coords_1[j], coords_2[j], facX ) # coords.append(cor) coords_0=coordsLists[i] coords_1=coordsLists[i+1] coords = [ dm.pntInbetween( coords_0[j], coords_1[j], fac*fram ) for j in range(anz+0) ] #allCoords.append( coords ) #rs.AddPoints(coords) #rs.AddLine( coords[-1], coords[0] ) #coords.append(coords[0]) frameCrvs = rs.ObjectsByName("frameCrv") if len(frameCrvs) == keepFrames: rs.DeleteObjects(frameCrvs[-1:]) crv = rs.AddCurve(coords, deg) rs.ObjectName(crv, "frameCrv") #rs.Redraw() #rs.Command("isolate -selId "+str(crv)+" enter enter", 0) nam = dm.makeName("gD", frameNumber=framNumber, anzahl=4, format='jpg') rs.Redraw() #rs.Command("-viewCaptureToFile Width=960 Height=540 Scale=2 DrawCPlaneAxes=No TransparentBackground=No "+path+nam, 0) framNumber +=1 #print nam dm.esc() if 0: for fram in range(0, frames+1): # facX = fac*fram # coords = [] # for j in range(anz): # cor = dm.pntInbetween( coords_1[j], coords_2[j], facX ) # coords.append(cor) coords = [ dm.pntInbetween( coords_1[j], coords_2[j], fac*fram ) for j in range(anz+1) ] #allCoords.append( coords ) #rs.AddPoints(coords) #rs.AddLine( coords[-1], coords[0] ) #coords.append(coords[0]) crv = rs.AddCurve(coords, deg) #rs.Redraw() #rs.Command("isolate -selId "+str(crv)+" enter enter", 0) nam = dm.makeName("gD", frameNumber=framNumber, anzahl=4, format='jpg') rs.Redraw() rs.Command("-viewCaptureToFile Width=960 Height=540 Scale=1 DrawCPlaneAxes=No TransparentBackground=No "+path+nam, 0) framNumber +=1 #print nam dm.esc() #____________________________:here you end ################################# #rs.ZoomExtents() rs.EnableRedraw(1) ### 4 the MACs dm.printDisplay(1) dm.newEmptyLayer("Default")