Add AC/BC RTCP programs and 3D machine manager

This commit is contained in:
2026-09-20 12:31:12 +08:00
parent 1c1e5f9672
commit 8aab531b02
363 changed files with 53213 additions and 58 deletions

View File

@@ -376,6 +376,7 @@ static int apply_g(sim_interpreter_state *state, interpreter_meta *meta, double
}
static int apply_m(sim_interpreter_state *state, interpreter_meta *meta, double code, int *groups) {
if (code_is(code, 1)) return SIM_INTERP_OK;
if (code_is(code, 3) || code_is(code, 4) || code_is(code, 5)) { if (++groups[4] > 1) return SIM_INTERP_ERR_STATE; state->spindle_mode = (int)code; return SIM_INTERP_OK; }
if (code_is(code, 2) || code_is(code, 30)) { if (++groups[5] > 1) return SIM_INTERP_ERR_STATE; state->program_end = 1; return SIM_INTERP_OK; }
if (code_is(code, 6)) { if (meta) meta->selected_tool = meta->selected_tool < 0 ? 0 : meta->selected_tool; return SIM_INTERP_OK; }
@@ -582,7 +583,9 @@ int sim_interpreter_execute(sim_interpreter *interpreter, const char *block, uin
if (next.plane == 18) segment->normal.y = 1.0;
else if (next.plane == 19) segment->normal.x = 1.0;
else segment->normal.z = 1.0;
if (meta->feed_mode == 93) {
/* LinuxCNC applies inverse-time feed to G1/G2/G3. G0 remains a
* rapid move and does not require an F word while G93 is modal. */
if (meta->feed_mode == 93 && next.motion_mode != 0) {
const double dx = segment->end.tran.x - segment->start.tran.x;
const double dy = segment->end.tran.y - segment->start.tran.y;
const double dz = segment->end.tran.z - segment->start.tran.z;