From 9b472269533e4ce007ee308db8d8220e3bc3df09 Mon Sep 17 00:00:00 2001 From: Russell Johnson <47639332+Russ4262@users.noreply.github.com> Date: Wed, 18 Mar 2020 12:32:39 -0500 Subject: [PATCH] Fix application of `DepthOffset` property --- src/Mod/Path/PathScripts/PathSurface.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/Mod/Path/PathScripts/PathSurface.py b/src/Mod/Path/PathScripts/PathSurface.py index 1c5d3a6e45..414d60ca5f 100644 --- a/src/Mod/Path/PathScripts/PathSurface.py +++ b/src/Mod/Path/PathScripts/PathSurface.py @@ -23,7 +23,7 @@ # *************************************************************************** # * * # * Additional modifications and contributions beginning 2019 * -# * by Russell Johnson 2020-03-14 13:15 CST * +# * by Russell Johnson 2020-03-18 12:29 CST * # * * # *************************************************************************** @@ -3032,10 +3032,14 @@ class ObjectSurface(PathOp.ObjectOp): PathLog.debug('Applying DepthOffset value: {}'.format(DepthOffset)) lenScans = len(SCANDATA) for s in range(0, lenScans): - LN = SCANDATA[s] - numPts = len(LN) - for pt in range(0, numPts): - SCANDATA[s][pt].z += DepthOffset + SO = SCANDATA[s] # StepOver + numParts = len(SO) + for prt in range(0, numParts): + PRT = SO[prt] + if PRT != 'BRK': + numPts = len(PRT) + for pt in range(0, numPts): + SCANDATA[s][prt][pt].z += DepthOffset def _planarGetPDC(self, stl, finalDep, SampleInterval, useSafeCutter=False): pdc = ocl.PathDropCutter() # create a pdc [PathDropCutter] object