You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
mc_arc(): G93 (inverse time) arcs run at F × segments mm/min - their time depends on the radius and $12, not on F #1030
In inverse time mode (G93) F means "complete the move in 1/F minutes". For lines the planner gets this right (programmed_rate = F * millimeters). Arcs do not: mc_arc() turns the inverse-time F into an absolute feed rate by multiplying it by the number of segments instead of the arc's length in mm:
// motion_control.c, mc_arc() - the same in master (451a539)if (pl_data->condition.inverse_time) {
pl_data->feed_rate *= segments;
pl_data->condition.inverse_time=Off; // Force as feed absolute mode over arc segments.
}
Every segment then runs at F × N mm/min, so an arc of length L takes L / (F·N) minutes: the programmed time 1/F multiplied by the chord length in mm. The chord length depends on the radius and $12 (about 2·sqrt(2·r·$12)), so small arcs run too fast and arcs whose chords are longer than 1 mm (r above ~125 mm at the default $12 = 0.002) run too slow. F itself only scales the result.
Reproduction with the upstream Simulator (91eda77, core d7aaee3, default settings, -t 0 -r 0.001, time taken from the step file), each move alone after G21 G90 G17 G94 / G0 X0 Y0 Z0:
(r = 100: 496 chords of 1.265 mm, and 1.265 × 240 s = 304 s.)
Proposed fix: multiply by the arc's length, as the planner does for lines. For N_AXIS == 3:
if (pl_data->condition.inverse_time) {
- pl_data->feed_rate *= segments;+ pl_data->feed_rate *= hypotf(angular_travel * radius, target[plane.axis_linear] - position[plane.axis_linear]);
pl_data->condition.inverse_time = Off; // Force as feed absolute mode over arc segments.
}
With it the same Simulator runs the three circles in 20.03 s, 19.84 s and 240.12 s (the line is unchanged). With N_AXIS > 3 the travel of the other linear axes would belong in the length as well.
Arcs with more than one turn (P > 1) are not covered by that line. The full turns are made by recursive mc_arc() calls that share pl_data: the first turn converts the feed and clears inverse_time, so the following turns and the remaining arc keep the first turn's rate, and the 1/F minutes are never spread over the whole move. Converting once before the recursion, with the length of the whole move (all turns and the helical travel), would cover both cases. I have not tested this part.
Found while checking program run times in a digital twin of a small mill that runs the unmodified core.
Good catch, I have also removed the P > 1 recursion - it was there to catch potential single precision float issues.
Use of A, B, ... axes with arcs is unlikely/not common so decided not to bother.
Activity
Fixed inverse time mode (G93) arc execution, ref. issue #1030.
terjeio commentedon Oct 4, 2026
Good catch, I have also removed the P > 1 recursion - it was there to catch potential single precision float issues.
Use of A, B, ... axes with arcs is unlikely/not common so decided not to bother.