make hole feature work again
This commit is contained in:
parent
7f80e711f6
commit
08e4151ea1
|
@ -56,7 +56,7 @@ class Hole():
|
|||
self.feature.addProperty("App::PropertyLinkSub","Support","Hole","Support of hole feature").Support=None
|
||||
self.feature.addProperty("App::PropertyLink","HoleGroove","Hole","Revolution feature creating the hole").HoleGroove=None
|
||||
# Create new HoleGroove feature
|
||||
body = PartDesignGui.getActivePart()
|
||||
body = FreeCADGui.activeView().getActiveObject("pdbody");
|
||||
self.sketchaxis = self.feature.Document.addObject("PartDesign::Line", "HoleSketchAxis")
|
||||
body.addFeature(self.sketchaxis)
|
||||
self.Gui.ActiveDocument.hide(self.sketchaxis.Name)
|
||||
|
|
|
@ -61,7 +61,7 @@ class HoleGui:
|
|||
# It is done in TaskHole.updateUI() instead
|
||||
|
||||
# Show feature preview
|
||||
body = PartDesignGui.getActivePart()
|
||||
body = FreeCADGui.activeView().getActiveObject("pdbody");
|
||||
if body == None:
|
||||
QtGui.QMessageBox.critical(mw, "No active body", "Please create a body or make a body active")
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ class TaskHole:
|
|||
if (self.feature != None):
|
||||
self.hideFeature() # Show the support again
|
||||
document = self.feature.Document
|
||||
body = PartDesignGui.getActivePart()
|
||||
body = FreeCADGui.activeView().getActiveObject("pdbody");
|
||||
groove = self.feature.HoleGroove
|
||||
sketch = groove.Sketch
|
||||
plane = sketch.Support[0]
|
||||
|
|
Loading…
Reference in New Issue
Block a user