Draft: Draft_Fillet minor consistency update

This commit is contained in:
Roy-043
2024-02-02 11:29:43 +01:00
parent 691511e975
commit 0fbe5f75bf
2 changed files with 3 additions and 14 deletions

View File

@@ -138,7 +138,6 @@ class Fillet(gui_base_original.Creator):
"""
self.rad = rad
self.draw_arc(rad, self.chamfer, self.delete)
self.finish()
def draw_arc(self, rad, chamfer, delete):
"""Process the selection and draw the actual object."""
@@ -185,16 +184,8 @@ class Fillet(gui_base_original.Creator):
'Draft.autogroup(arc)',
'FreeCAD.ActiveDocument.recompute()']
self.commit(translate("draft", "Create fillet"),
_cmd_list)
def finish(self, cont=False):
"""Terminate the operation."""
super(Fillet, self).finish()
if self.ui:
# self.linetrack.finalize()
# self.arctrack.finalize()
self.doc.recompute()
self.commit(translate("draft", "Create fillet"), _cmd_list)
self.finish()
Gui.addCommand('Draft_Fillet', Fillet())

View File

@@ -150,8 +150,7 @@ def make_fillet(objs, radius=100, chamfer=False, delete=False):
return None
_doc = App.activeDocument()
obj = _doc.addObject("Part::Part2DObjectPython",
"Fillet")
obj = _doc.addObject("Part::Part2DObjectPython", "Fillet")
fillet.Fillet(obj)
obj.Shape = wire
obj.Length = wire.Length
@@ -168,7 +167,6 @@ def make_fillet(objs, radius=100, chamfer=False, delete=False):
view_fillet.ViewProviderFillet(obj.ViewObject)
gui_utils.format_object(obj)
gui_utils.select(obj)
gui_utils.autogroup(obj)
return obj