From fabe64cbcd53f680b00acbb965e13199e5000d50 Mon Sep 17 00:00:00 2001 From: Russell Johnson <47639332+Russ4262@users.noreply.github.com> Date: Thu, 4 Jun 2020 13:15:10 -0500 Subject: [PATCH] Path: Fix `_makeIntersectionTags()` for very short edges The 0.25 constant used might need to be modified later. Or, the entire `_makeIntersectionTags()` method might need to be improved if other micro-edge use cases cause failure. --- src/Mod/Path/PathScripts/PathProfile.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Mod/Path/PathScripts/PathProfile.py b/src/Mod/Path/PathScripts/PathProfile.py index 87ba301649..ad4ac0536d 100644 --- a/src/Mod/Path/PathScripts/PathProfile.py +++ b/src/Mod/Path/PathScripts/PathProfile.py @@ -1266,8 +1266,14 @@ class ObjectProfile(PathAreaOp.ObjectOp): begExt = extTObj else: d = i * mid - cp1 = E.valueAt(E.getParameterByLength(d - spc)) - cp2 = E.valueAt(E.getParameterByLength(d + spc)) + negTestLen = d - spc + if negTestLen < 0: + negTestLen = d - (LE * 0.25) + posTestLen = d + spc + if posTestLen > LE: + posTestLen = d + (LE * 0.25) + cp1 = E.valueAt(E.getParameterByLength(negTestLen)) + cp2 = E.valueAt(E.getParameterByLength(posTestLen)) (intTObj, extTObj) = self._makeOffsetCircleTag(cp1, cp2, tagRad, fdv, 'Edge[{}]_'.format(e)) if intTObj and extTObj: tagCnt += nt