From a7f3c5974b9b0ddee8de982da8db4a49f613b435 Mon Sep 17 00:00:00 2001 From: Markus Lampert Date: Fri, 31 Aug 2018 20:03:52 -0700 Subject: [PATCH] Added multi base model support to MillFace. --- src/Mod/Path/PathScripts/PathMillFace.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Mod/Path/PathScripts/PathMillFace.py b/src/Mod/Path/PathScripts/PathMillFace.py index ac8ebd40d7..5e96e8a7c8 100644 --- a/src/Mod/Path/PathScripts/PathMillFace.py +++ b/src/Mod/Path/PathScripts/PathMillFace.py @@ -86,7 +86,7 @@ class ObjectFace(PathPocketBase.ObjectPocket): obj.OpFinalDepth = Part.makeCompound(sublist).BoundBox.ZMax else: - obj.OpFinalDepth = job.Base.Shape.BoundBox.ZMax + obj.OpFinalDepth = job.Proxy.modelBoundBox(job).ZMax def areaOpShapes(self, obj): '''areaOpShapes(obj) ... return top face''' @@ -107,8 +107,8 @@ class ObjectFace(PathPocketBase.ObjectPocket): # If no base object, do planing of top surface of entire model else: - planeshape = self.baseobject.Shape - PathLog.debug("Working on a shape {}".format(self.baseobject.Name)) + planeshape = Part.makeCompound([base.Shape for base in self.model]) + PathLog.debug("Working on a shape {}".format(obj.Label)) # Find the correct shape depending on Boundary shape. PathLog.debug("Boundary Shape: {}".format(obj.BoundaryShape)) @@ -130,9 +130,9 @@ class ObjectFace(PathPocketBase.ObjectPocket): obj.ZigZagAngle = 45.0 # need to overwrite the default depth calculations for facing - if job and job.Base: + if job and len(job.Model.Group) > 0: obj.OpStartDepth = job.Stock.Shape.BoundBox.ZMax - obj.OpFinalDepth = job.Base.Shape.BoundBox.ZMax + obj.OpFinalDepth = job.Proxy.modelBoundBox(job).ZMax # If the operation has a geometry identified the Finaldepth # is the top of the bboundbox which includes all features.