From 7a65e48d33e9e67e007a3232ad1850d6f9f3ce17 Mon Sep 17 00:00:00 2001 From: Markus Lampert Date: Sun, 2 Sep 2018 23:20:17 -0700 Subject: [PATCH] Removed obsolete adjustWirePlacement. --- src/Mod/Path/PathScripts/PathChamfer.py | 1 - src/Mod/Path/PathScripts/PathEngrave.py | 2 -- src/Mod/Path/PathScripts/PathEngraveBase.py | 30 --------------------- 3 files changed, 33 deletions(-) diff --git a/src/Mod/Path/PathScripts/PathChamfer.py b/src/Mod/Path/PathScripts/PathChamfer.py index eeafaa51c7..1070ba550b 100644 --- a/src/Mod/Path/PathScripts/PathChamfer.py +++ b/src/Mod/Path/PathScripts/PathChamfer.py @@ -100,7 +100,6 @@ class ObjectChamfer(PathEngraveBase.ObjectOp): self.basewires.extend(basewires) - #for w in self.adjustWirePlacement(obj, base, basewires): for w in basewires: self.adjusted_basewires.append(w) wire = PathOpTools.offsetWire(w, base.Shape, offset, True) diff --git a/src/Mod/Path/PathScripts/PathEngrave.py b/src/Mod/Path/PathScripts/PathEngrave.py index 7603a2a88e..edf0e69377 100644 --- a/src/Mod/Path/PathScripts/PathEngrave.py +++ b/src/Mod/Path/PathScripts/PathEngrave.py @@ -123,7 +123,6 @@ class ObjectEngrave(PathEngraveBase.ObjectOp): for edgelist in Part.sortEdges(edges): basewires.append(Part.Wire(edgelist)) - #wires.extend(self.adjustWirePlacement(obj, base, basewires)) wires.extend(basewires) self.buildpathocc(obj, wires, zValues) self.wires = wires @@ -143,7 +142,6 @@ class ObjectEngrave(PathEngraveBase.ObjectOp): wires = [] for shape in obj.BaseShapes + jobshapes: PathLog.track(shape.Label) - #shapeWires = self.adjustWirePlacement(obj, shape, shape.Shape.Wires) shapeWires = shape.Shape.Wires self.buildpathocc(obj, shapeWires, zValues) wires.extend(shapeWires) diff --git a/src/Mod/Path/PathScripts/PathEngraveBase.py b/src/Mod/Path/PathScripts/PathEngraveBase.py index fc45647c6e..9c6c1184f5 100644 --- a/src/Mod/Path/PathScripts/PathEngraveBase.py +++ b/src/Mod/Path/PathScripts/PathEngraveBase.py @@ -46,34 +46,6 @@ else: def translate(context, text, disambig=None): return QtCore.QCoreApplication.translate(context, text, disambig) -#def adjustPlacement(obj, shape, wires): -# job = PathUtils.findParentJob(obj) -# if hasattr(shape, 'MapMode') and 'Deactivated' != shape.MapMode: -# if hasattr(shape, 'Support') and 1 == len(shape.Support) and 1 == len(shape.Support[0][1]): -# pmntShape = shape.Placement -# pmntSupport = shape.Support[0][0].getGlobalPlacement() -# #pmntSupport = shape.Support[0][0].Placement -# pmntBase = job.Base.Placement -# pmnt = pmntBase.multiply(pmntSupport.inverse().multiply(pmntShape)) -# #PathLog.debug("pmnt = %s" % pmnt) -# newWires = [] -# for w in wires: -# edges = [] -# for e in w.Edges: -# e = e.copy() -# e.Placement = FreeCAD.Placement() -# edges.append(e) -# w = Part.Wire(edges) -# w.Placement = pmnt -# newWires.append(w) -# wires = newWires -# else: -# PathLog.warning(translate("PathEngrave", "Attachment not supported by engraver")) -# else: -# PathLog.debug("MapMode: %s" % (shape.MapMode if hasattr(shape, 'MapMode') else 'None')) -# return wires - - class ObjectOp(PathOp.ObjectOp): '''Proxy base class for engrave operations.''' @@ -162,5 +134,3 @@ class ObjectOp(PathOp.ObjectOp): else: obj.OpFinalDepth = -0.1 - #def adjustWirePlacement(self, obj, shape, wires): - # return adjustPlacement(obj, shape, wires)