From e914eca08995d6a91d83120b66fbd431a1076ca3 Mon Sep 17 00:00:00 2001 From: Dan Taylor Date: Tue, 8 Jul 2025 20:09:33 -0500 Subject: [PATCH] CAM: Adaptive: Fix NULL input shapes when top of stock equals top of model (fix #22073) --- src/Mod/CAM/Path/Op/Adaptive.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Mod/CAM/Path/Op/Adaptive.py b/src/Mod/CAM/Path/Op/Adaptive.py index 1f05eccc80..3694faef7b 100644 --- a/src/Mod/CAM/Path/Op/Adaptive.py +++ b/src/Mod/CAM/Path/Op/Adaptive.py @@ -1191,7 +1191,10 @@ def _getWorkingEdges(op, obj): user_depths=None, ) - depths = [d for d in depthParams.data if d < op.stock.Shape.BoundBox.ZMax] + # d < op.stock.Shape.BoundBox.ZMax may be true even if slicing at that + # height causes no projection, which results in a NULL shape. Use the + # operation tolerance to prevent that. + depths = [d for d in depthParams.data if d - op.stock.Shape.BoundBox.ZMax < -obj.Tolerance] # Get the stock outline at each stepdown. Used to calculate toolpaths and # for calculating cut regions in some instances