When using a 2D pocket operation, if the step-down value does not divide evenly into the total cut depth, Kiri:Moto calculates the correct number of equal passes but only generates N-1 of them, leaving the pocket short of the target depth.
Steps to Reproduce
- Create a 2D pocket operation
- Set cut depth to 5mm
- Set step-down to 2.49mm
- Z origin: top of stock
- Stock offset: 0x0x0
- Slice and inspect the generated G-code
Expected Behavior
5mm / 2.49mm = 2.008 → rounds up to 3 passes:
- Pass 1: Z = -1.667
- Pass 2: Z = -3.333
- Pass 3: Z = -5.000
Actual Behavior
Only 2 of 3 passes are generated:
- Pass 1: Z = -1.6766
- Pass 2: Z = -3.3433
- Pass 3: missing
The pocket is cut to -3.3433mm instead of the requested -5mm.
Analysis
It appears the total depth is divided by the correct number of passes (3), producing equal step sizes (~1.667mm), but only N-1 passes are executed. This looks like an off-by-one error in the pass generation loop.
Workaround
Use a step-down value that divides evenly into the total depth (e.g., 2.5mm for a 5mm cut).
When using a 2D pocket operation, if the step-down value does not divide evenly into the total cut depth, Kiri:Moto calculates the correct number of equal passes but only generates N-1 of them, leaving the pocket short of the target depth.
Steps to Reproduce
Expected Behavior
5mm / 2.49mm = 2.008 → rounds up to 3 passes:
Actual Behavior
Only 2 of 3 passes are generated:
The pocket is cut to -3.3433mm instead of the requested -5mm.
Analysis
It appears the total depth is divided by the correct number of passes (3), producing equal step sizes (~1.667mm), but only N-1 passes are executed. This looks like an off-by-one error in the pass generation loop.
Workaround
Use a step-down value that divides evenly into the total depth (e.g., 2.5mm for a 5mm cut).