import Part,PartGui OutDir = "c:/temp/" Index = OutDir + "index.html" index_html = open(Index,'w') index_html.write('MIBA Examples

MIBA Examples

') Part.open("C:/Documents and Settings/jriegel/My Documents/Projects/FreeCAD/data/Schenkel.stp") l = Gui.document().getObject("Schenkel").Display l[0] = 'Normal' Gui.document().getObject("Schenkel").Display = l Gui.document().getObject("Schenkel").ShapeColor = (1.0,1.0,0.0) Gui.document().view().fitAll() for p in ["PerspectiveCamera","OrthographicCamera"]: Gui.SendMsgToActiveView(p) for f in ["ViewAxo","ViewFront","ViewTop"]: Gui.SendMsgToActiveView(f) for x,y in [[500,500],[1000,3000],[3000,1000],[3000,3000],[8000,8000]]: name = "Blade_" + p +"_" + f + "_" + `x` + "_" + `y` Gui.document().view().saveImage(OutDir + "Blade_" + p +"_" + f + "_" + `x` + "_" + `y` + ".jpg",x,y,"White") Gui.document().view().saveImage(OutDir + "Blade_" + p +"_" + f + "_" + `x` + "_" + `y` + ".png",x,y,"Transparent") index_html.write(''+ name + '.jpg
\n') index_html.write(''+ name + '.png
\n') index_html.write("") index_html.close() App.Close("Unnamed")