From 20fcc831cdee28fbc72bb079eb487f689d749b95 Mon Sep 17 00:00:00 2001 From: tarman3 Date: Sat, 13 Dec 2025 10:57:41 +0200 Subject: [PATCH] CAM: Profile - Limit value NumPasses --- src/Mod/CAM/Path/Base/SetupSheetOpPrototype.py | 1 + src/Mod/CAM/Path/Op/Profile.py | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Mod/CAM/Path/Base/SetupSheetOpPrototype.py b/src/Mod/CAM/Path/Base/SetupSheetOpPrototype.py index 678d190714..4fa2751092 100644 --- a/src/Mod/CAM/Path/Base/SetupSheetOpPrototype.py +++ b/src/Mod/CAM/Path/Base/SetupSheetOpPrototype.py @@ -188,6 +188,7 @@ class OpPrototype(object): "App::PropertyFloatConstraint": Property, "App::PropertyFloatList": Property, "App::PropertyInteger": PropertyInteger, + "App::PropertyIntegerConstraint": PropertyInteger, "App::PropertyIntegerList": PropertyInteger, "App::PropertyLength": PropertyLength, "App::PropertyLink": Property, diff --git a/src/Mod/CAM/Path/Op/Profile.py b/src/Mod/CAM/Path/Op/Profile.py index 32a6588151..ba2d59c47c 100644 --- a/src/Mod/CAM/Path/Op/Profile.py +++ b/src/Mod/CAM/Path/Op/Profile.py @@ -174,7 +174,7 @@ class ObjectProfile(PathAreaOp.ObjectOp): ), ), ( - "App::PropertyInteger", + "App::PropertyIntegerConstraint", "NumPasses", "Profile", QT_TRANSLATE_NOOP( @@ -255,7 +255,7 @@ class ObjectProfile(PathAreaOp.ObjectOp): "processHoles": False, "processPerimeter": True, "Stepover": 0, - "NumPasses": 1, + "NumPasses": (1, 1, 99999, 1), } def areaOpApplyPropertyDefaults(self, obj, job, propList): @@ -334,7 +334,8 @@ class ObjectProfile(PathAreaOp.ObjectOp): num_passes = max(1, obj.NumPasses) stepover = obj.Stepover.Value if num_passes > 1 and stepover == 0: - # This check is important because C++ code has a default value for stepover if it's 0 and extra passes are requested + # This check is important because C++ code has a default value for stepover + # if it's 0 and extra passes are requested num_passes = 1 Path.Log.warning( "Multipass profile requires a non-zero stepover. Reducing to a single pass."