From 66889de9fed32ec5bd263dc6af454c26c5095d0d Mon Sep 17 00:00:00 2001 From: Russell Johnson <47639332+Russ4262@users.noreply.github.com> Date: Sun, 11 Jul 2021 10:30:27 -0500 Subject: [PATCH] Path: Correct the processing of selected edges The recent Extensions upgrade for Adaptive disabled the processing of selected edges. This commit re-enables that capability. Issue raised in forum at, https://forum.freecadweb.org/viewtopic.php?f=15&t=60037 --- src/Mod/Path/PathScripts/PathAdaptive.py | 25 ++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/src/Mod/Path/PathScripts/PathAdaptive.py b/src/Mod/Path/PathScripts/PathAdaptive.py index 06cc36774f..ee2ea7ecd0 100644 --- a/src/Mod/Path/PathScripts/PathAdaptive.py +++ b/src/Mod/Path/PathScripts/PathAdaptive.py @@ -579,16 +579,21 @@ def _get_working_edges(op, obj): # Get faces selected by user for base, subs in obj.Base: for sub in subs: - if sub not in avoidFeatures: - if obj.UseOutline: - face = base.Shape.getElement(sub) - # get outline with wire_A method used in PocketShape, but it does not play nicely later - # wire_A = TechDraw.findShapeOutline(face, 1, FreeCAD.Vector(0.0, 0.0, 1.0)) - wire_B = face.Wires[0] - shape = Part.Face(wire_B) - else: - shape = base.Shape.getElement(sub) - regions.append(shape) + if sub.startswith("Face"): + if sub not in avoidFeatures: + if obj.UseOutline: + face = base.Shape.getElement(sub) + # get outline with wire_A method used in PocketShape, but it does not play nicely later + # wire_A = TechDraw.findShapeOutline(face, 1, FreeCAD.Vector(0.0, 0.0, 1.0)) + wire_B = face.Wires[0] + shape = Part.Face(wire_B) + else: + shape = base.Shape.getElement(sub) + regions.append(shape) + elif sub.startswith("Edge"): + # Discretize selected edges directly + shape = base.Shape.getElement(sub) + edge_list.append([discretize(shape)]) # Efor # Return Extend Outline extension, OR regular edge extension