Enabled drilling of arcs.

This commit is contained in:
Markus Lampert
2017-08-12 20:33:35 -07:00
committed by Yorik van Havre
parent 1a8d4b3879
commit 7bd176b8dd
2 changed files with 3 additions and 3 deletions

View File

@@ -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

View File

@@ -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.")