Prototype objects for operations and the ability to create them through the regular proxy instantiation.

This commit is contained in:
Markus Lampert
2018-08-21 19:20:12 -07:00
parent 070d17e4e4
commit ee49b9874d
6 changed files with 141 additions and 8 deletions

View File

@@ -156,8 +156,19 @@ class ObjectPocket(PathPocketBase.ObjectPocket):
obj.OpFinalDepth = bb.ZMin
obj.OpStartDepth = bb.ZMax
def Create(name):
def SetupProperties():
setup = []
setup.append('CutMode')
setup.append('ExtraOffset')
setup.append('StepOver')
setup.append('ZigZagAngle')
setup.append('OffsetPattern')
setup.append('UseOutline')
return setup
def Create(name, obj=None):
'''Create(name) ... Creates and returns a Pocket operation.'''
obj = FreeCAD.ActiveDocument.addObject("Path::FeaturePython", name)
if obj is None:
obj = FreeCAD.ActiveDocument.addObject("Path::FeaturePython", name)
proxy = ObjectPocket(obj)
return obj