MovieTool.py

Go to the documentation of this file.
00001 #!/usr/bin/python
00002 import os,sys,string
00003 import FreeCAD,FreeCADGui,Robot,RobotGui
00004 
00005 x = 1920
00006 y = 1080
00007 Background = "White"
00008 
00009 OutDir = "c:/temp/Movie/"
00010 
00011 Trajectory = None
00012 Robot = None
00013 
00014 def run():
00015     Tool = Robot.Tool
00016     Tool = Tool.inverse()
00017     # duration in seconds time the pictures per second gives the size
00018     size = int(Trajectory.Duration * 24.0)
00019     for l in range(size):
00020         Robot.Tcp = Trajectory.position(l/24.0).multiply(Tool)
00021         FreeCADGui.updateGui()
00022         FreeCADGui.ActiveDocument.ActiveView.saveImage(OutDir + "Rob_" + `l` + ".jpg",x,y,"White")

Generated on Wed Nov 23 19:00:24 2011 for FreeCAD by  doxygen 1.6.1