diff --git a/src/Mod/Path/PathScripts/PathSelection.py b/src/Mod/Path/PathScripts/PathSelection.py index 9670437dd5..269900f549 100644 --- a/src/Mod/Path/PathScripts/PathSelection.py +++ b/src/Mod/Path/PathScripts/PathSelection.py @@ -63,7 +63,7 @@ class DRILLGate: if hasattr(obj, "Shape") and sub: shape = obj.Shape subobj = shape.getElement(sub) - return PathUtils.isDrillable(shape, subobj) + return PathUtils.isDrillable(shape, subobj, includePartials = True) else: return False diff --git a/src/Mod/Path/PathScripts/PathUtils.py b/src/Mod/Path/PathScripts/PathUtils.py index 3bef0a801c..bb2d2db2ce 100644 --- a/src/Mod/Path/PathScripts/PathUtils.py +++ b/src/Mod/Path/PathScripts/PathUtils.py @@ -116,7 +116,7 @@ def curvetowire(obj, steps): return edgelist -def isDrillable(obj, candidate, tooldiameter=None): +def isDrillable(obj, candidate, tooldiameter=None, includePartials=False): """ Checks candidates to see if they can be drilled. Candidates can be either faces - circular or cylindrical or circular edges. @@ -162,7 +162,7 @@ def isDrillable(obj, candidate, tooldiameter=None): drillable = True else: for edge in candidate.Edges: - if isinstance(edge.Curve, Part.Circle) and edge.isClosed(): + if isinstance(edge.Curve, Part.Circle) and (includePartials or edge.isClosed()): PathLog.debug("candidate is a circle or ellipse") if not hasattr(edge.Curve, "Radius"): PathLog.debug("No radius. Ellipse.")