DrawingTests.py

Go to the documentation of this file.
00001 import Part, Drawing
00002 Part.open("D:/_Projekte/FreeCAD/FreeCADData/Schenkel.stp")
00003 App.activeDocument().addObject('Drawing::FeaturePage','Page')
00004 App.activeDocument().Page.Template = 'D:/_Projekte/FreeCAD/FreeCAD_0.9_LibPack7/Mod/Drawing/Templates/A3_Landscape.svg'
00005 App.activeDocument().addObject('Drawing::FeatureViewPart','View')
00006 App.activeDocument().View.Source = App.activeDocument().Schenkel
00007 App.activeDocument().View.Direction = (0.0,1.0,0.0)
00008 App.activeDocument().View.X = 30.0
00009 App.activeDocument().View.Y = 30.0
00010 App.activeDocument().View.Scale = 1.0
00011 App.activeDocument().Page.addObject(App.activeDocument().View)
00012 
00013 App.activeDocument().addObject('Drawing::FeatureViewPart','View1')
00014 App.activeDocument().View1.Source = App.activeDocument().Schenkel
00015 App.activeDocument().View1.Direction = (0.0,0.0,1.0)
00016 App.activeDocument().View1.X = 70.0
00017 App.activeDocument().View1.Y = 30.0
00018 App.activeDocument().View1.Scale = 1.0
00019 App.activeDocument().Page.addObject(App.activeDocument().View1)
00020 
00021 App.activeDocument().addObject('Drawing::FeatureViewPart','View2')
00022 App.activeDocument().View2.Source = App.activeDocument().Schenkel
00023 App.activeDocument().View2.Direction = (1.0,0.0,0.0)
00024 App.activeDocument().View2.X = 70.0
00025 App.activeDocument().View2.Y = 200.0
00026 App.activeDocument().View2.Rotation = 90.0
00027 App.activeDocument().View2.Scale = 1.0
00028 App.activeDocument().Page.addObject(App.activeDocument().View2)
00029 
00030 App.activeDocument().addObject('Drawing::FeatureViewPart','View3')
00031 App.activeDocument().View3.Source = App.activeDocument().Schenkel
00032 App.activeDocument().View3.Direction = (1.0,1.0,1.0)
00033 App.activeDocument().View3.X = 280.0
00034 App.activeDocument().View3.Y = 90.0
00035 App.activeDocument().View3.Scale = 1.0
00036 App.activeDocument().Page.addObject(App.activeDocument().View3)
00037 
00038 App.activeDocument().recompute()

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