From 2b35d19ce477fd277b9248febce7a5873fbca55b Mon Sep 17 00:00:00 2001 From: Markus Lampert Date: Mon, 4 Apr 2022 21:12:45 -0700 Subject: [PATCH] Removed debugging globals --- src/Mod/Path/PathScripts/PathDressupHoldingTags.py | 7 ------- src/Mod/Path/PathScripts/PathGeom.py | 9 --------- src/Mod/Path/PathScripts/PathPropertyBagGui.py | 4 ---- src/Mod/Path/PathScripts/PathVcarve.py | 9 --------- 4 files changed, 29 deletions(-) diff --git a/src/Mod/Path/PathScripts/PathDressupHoldingTags.py b/src/Mod/Path/PathScripts/PathDressupHoldingTags.py index 3be01251ab..db6426c2d6 100644 --- a/src/Mod/Path/PathScripts/PathDressupHoldingTags.py +++ b/src/Mod/Path/PathScripts/PathDressupHoldingTags.py @@ -48,9 +48,6 @@ else: translate = FreeCAD.Qt.translate -failures = [] - - def debugEdge(edge, prefix, force=False): if force or PathLog.getLevel(PathLog.thisModule()) == PathLog.Level.DEBUG: pf = edge.valueAt(edge.FirstParameter) @@ -568,7 +565,6 @@ class MapWireToTag: return shell def commandsForEdges(self): - global failures if self.edges: try: shape = self.shell().common(self.tag.solid) @@ -623,7 +619,6 @@ class MapWireToTag: commands.extend( PathGeom.cmdsForEdge(e, hSpeed=self.hSpeed, vSpeed=self.vSpeed) ) - failures.append(self) return commands return [] @@ -1299,8 +1294,6 @@ class ObjectTagDressup: @waiting_effects def processTags(self, obj): - global failures - failures = [] tagID = 0 if PathLog.getLevel(PathLog.thisModule()) == PathLog.Level.DEBUG: for tag in self.tags: diff --git a/src/Mod/Path/PathScripts/PathGeom.py b/src/Mod/Path/PathScripts/PathGeom.py index 0ea55edd7c..2d9ea687c3 100644 --- a/src/Mod/Path/PathScripts/PathGeom.py +++ b/src/Mod/Path/PathScripts/PathGeom.py @@ -611,9 +611,6 @@ def removeDuplicateEdges(wire): return Part.Wire(unique) -OddsAndEnds = [] - - def flipEdge(edge): """flipEdge(edge) Flips given edge around so the new Vertexes[0] was the old Vertexes[-1] and vice versa, without changing the shape. @@ -675,19 +672,13 @@ def flipEdge(edge): elif type(edge.Curve) == Part.OffsetCurve: return edge.reversed() - global OddsAndEnds - OddsAndEnds.append(edge) PathLog.warning( translate("PathGeom", "%s not supported for flipping") % type(edge.Curve) ) -Wire = [] - - def flipWire(wire): """Flip the entire wire and all its edges so it is being processed the other way around.""" - Wire.append(wire) edges = [flipEdge(e) for e in wire.Edges] edges.reverse() PathLog.debug(edges) diff --git a/src/Mod/Path/PathScripts/PathPropertyBagGui.py b/src/Mod/Path/PathScripts/PathPropertyBagGui.py index 464bab015b..07a1b31e68 100644 --- a/src/Mod/Path/PathScripts/PathPropertyBagGui.py +++ b/src/Mod/Path/PathScripts/PathPropertyBagGui.py @@ -222,9 +222,6 @@ class PropertyCreate(object): return self.form.exec_() -Panel = [] - - class TaskPanel(object): ColumnName = 0 # ColumnType = 1 @@ -241,7 +238,6 @@ class TaskPanel(object): self.model = None self.delegate = None FreeCAD.ActiveDocument.openTransaction("Edit PropertyBag") - Panel.append(self) def updateData(self, topLeft, bottomRight): pass diff --git a/src/Mod/Path/PathScripts/PathVcarve.py b/src/Mod/Path/PathScripts/PathVcarve.py index 2a86f3dff8..4e1fe227e0 100644 --- a/src/Mod/Path/PathScripts/PathVcarve.py +++ b/src/Mod/Path/PathScripts/PathVcarve.py @@ -52,10 +52,6 @@ else: translate = FreeCAD.Qt.translate - -VD = [] -Vertex = {} - _sorting = "global" @@ -68,9 +64,6 @@ def _collectVoronoiWires(vd): j = vertex.get(i, []) j.append(e) vertex[i] = j - Vertex.clear() - for v in vertex: - Vertex[v] = vertex[v] # knots are the start and end points of a wire knots = [i for i in vertex if len(vertex[i]) == 1] @@ -296,7 +289,6 @@ class ObjectVcarve(PathEngraveBase.ObjectOp): return path - VD.clear() voronoiWires = [] for f in faces: vd = Path.Voronoi() @@ -320,7 +312,6 @@ class ObjectVcarve(PathEngraveBase.ObjectOp): if _sorting != "global": wires = _sortVoronoiWires(wires) voronoiWires.extend(wires) - VD.append((f, vd, wires)) if _sorting == "global": voronoiWires = _sortVoronoiWires(voronoiWires)