From 8d2f8a3d965fb5ef147c236f4be14da9b4924ab2 Mon Sep 17 00:00:00 2001 From: wmayer Date: Sat, 22 Sep 2018 20:10:48 +0200 Subject: [PATCH] fixes 0003380: Involute gear should be created inside of Body and respect Attachment --- src/Mod/PartDesign/InvoluteGearFeature.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Mod/PartDesign/InvoluteGearFeature.py b/src/Mod/PartDesign/InvoluteGearFeature.py index 2bef484a82..0694f4935e 100644 --- a/src/Mod/PartDesign/InvoluteGearFeature.py +++ b/src/Mod/PartDesign/InvoluteGearFeature.py @@ -42,6 +42,13 @@ def makeInvoluteGear(name): if FreeCAD.GuiUp: _ViewProviderInvoluteGear(obj.ViewObject) #FreeCAD.ActiveDocument.recompute() + if FreeCAD.GuiUp: + body=FreeCADGui.ActiveDocument.ActiveView.getActiveObject("pdbody") + part=FreeCADGui.ActiveDocument.ActiveView.getActiveObject("part") + if body: + body.Group=body.Group+[obj] + elif part: + part.Group=part.Group+[obj] return obj class _CommandInvoluteGear: @@ -243,6 +250,7 @@ class _InvoluteGearTaskPanel: def reject(self): #print 'reject(self)' FreeCADGui.ActiveDocument.resetEdit() + FreeCAD.ActiveDocument.abortTransaction() if FreeCAD.GuiUp: