Path: Vcarve - Added threshold property to remove unwanted segments

code cleanup & debug
This commit is contained in:
sliptonic
2019-06-11 21:59:54 -05:00
parent d9d4387b1d
commit f63d0fadcb
4 changed files with 291 additions and 161 deletions

View File

@@ -49,6 +49,23 @@ class MESHGate(PathBaseGate):
class VCARVEGate:
def allow(self, doc, obj, sub):
try:
shape = obj.Shape
except Exception: # pylint: disable=broad-except
return False
if math.fabs(shape.Volume) < 1e-9 and len(shape.Wires) > 0:
return True
if shape.ShapeType == 'Edge':
return True
if sub:
subShape = shape.getElement(sub)
if subShape.ShapeType == 'Edge':
return True
return False
class ENGRAVEGate(PathBaseGate):