Allow selection of edges for engraving.
This commit is contained in:
@@ -45,16 +45,23 @@ class MESHGate:
|
||||
|
||||
class ENGRAVEGate:
|
||||
def allow(self, doc, obj, sub):
|
||||
engraveable = False
|
||||
if hasattr(obj, "Shape"):
|
||||
if obj.Shape.BoundBox.ZLength == 0.0:
|
||||
try:
|
||||
obj = obj.Shape
|
||||
except:
|
||||
return False
|
||||
if len(obj.Wires) > 0:
|
||||
engraveable = True
|
||||
return engraveable
|
||||
try:
|
||||
shape = obj.Shape
|
||||
except:
|
||||
return False
|
||||
|
||||
if shape.BoundBox.ZLength == 0.0 and len(obj.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 DRILLGate:
|
||||
|
||||
Reference in New Issue
Block a user