Fixed missing stock exception in ProfileContour.

This commit is contained in:
Markus Lampert
2018-06-24 14:41:17 -07:00
parent bd4de59ead
commit d3e44be2ab

View File

@@ -102,6 +102,8 @@ class ObjectContour(PathProfileBase.ObjectProfile):
return params
def updateDepths(self, obj, ignoreErrors=False):
if not hasattr(self, 'stock'):
self.stock = self.getJob(obj).Stock
stockBB = self.stock.Shape.BoundBox
obj.OpFinalDepth = stockBB.ZMin
obj.OpStartDepth = stockBB.ZMax