Path: Fix initial guess for FinalDepth with no Base Geometry

This commit is contained in:
Russell Johnson
2020-06-05 14:50:54 -05:00
parent f05253f882
commit 1ef278b061

View File

@@ -436,6 +436,17 @@ class ObjectSurface(PathOp.ObjectOp):
except Part.OCCError as e:
PathLog.error(e)
obj.OpFinalDepth = zmin
elif self.job:
if hasattr(obj, 'BoundBox'):
if obj.BoundBox == 'BaseBoundBox':
models = self.job.Model.Group
zmin = models[0].Shape.BoundBox.ZMin
for M in models:
zmin = min(zmin, M.Shape.BoundBox.ZMin)
obj.OpFinalDepth = zmin
if obj.BoundBox == 'Stock':
models = self.job.Stock
obj.OpFinalDepth = self.job.Stock.Shape.BoundBox.ZMin
def opExecute(self, obj):
'''opExecute(obj) ... process surface operation'''