![]() ![]() ![]() Tv.show( for ref in ActiveSketch.ExternalGeometry]) Tv.show( for ref in ActiveSketch.Support if not ref.isDerivedFrom("PartDesign::Plane")]) Tv.hide(tv.get_all_dependent(App.getDocument('TestShape').getObject('Body'), 'Pocket.Sketch001.')) Tv = Show.TempoVis(App.ActiveDocument, tag= ) ![]() # ('TestShape','Body','Pocket.Sketch001.')ĪctiveSketch = App.getDocument('TestShape').getObject('Sketch001') Gui.activateWorkbench("PartDesignWorkbench") # Changes the radius of the hole at center # Gui.ActiveDocument=Gui.getDocument("TestShape") # App.ActiveDocument=App.getDocument("TestShape") Shape that will be changedĪbobe operations generate following source code on Python console (Some comments were added for easy reading). Then we save it as "TestShape-changed.FCStd" on same folder. Here we read a FreeCAD file (TestShape.FCStd on "C:\Test" folder) and change the radius of the hole at center (that is defined on Sketch001) from 15 mm to 10 mm. Performs shape editing with GUI as normally ( Sample FreeCAD file). Right-click the Python console and select "Clear console" to clear all displayed source code onece. At first we check the source code to see what kind of source code are generared from the operation that we want to perform. On FreeCAD, GUI operations will be converted to source code and they will be execute to on FreeCAD core components. In this page, we record operations on FreeCAD as a Python script and execute it with command line version FreeCAD "FreeCADCmd". ![]()
0 Comments
Leave a Reply. |