diff --git a/src/Mod/Draft/draftguitools/gui_lines.py b/src/Mod/Draft/draftguitools/gui_lines.py index cc4aae758f..755a77095c 100644 --- a/src/Mod/Draft/draftguitools/gui_lines.py +++ b/src/Mod/Draft/draftguitools/gui_lines.py @@ -313,7 +313,7 @@ class Wire(Line): edges.extend(o.Shape.Edges) if edges: try: - w = Part.Wire(edges) + w = Part.Wire(Part.__sortEdges__(edges)) except Exception: _err(translate("draft", "Unable to create a Wire " @@ -333,7 +333,10 @@ class Wire(Line): Gui.addModule("Draft") # The command to run is built as a series of text strings # to be committed through the `draftutils.todo.ToDo` class - _cmd_list = ['wire = Draft.make_wire([' + pts + '])'] + _cmd = 'wire = Draft.make_wire(' + _cmd += '[' + pts + '], closed=' + str(w.isClosed()) + _cmd += ')' + _cmd_list = [_cmd] _cmd_list.extend(rems) _cmd_list.append('Draft.autogroup(wire)') _cmd_list.append('FreeCAD.ActiveDocument.recompute()')