MovieTool.py
Go to the documentation of this file.00001
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
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")