synthetos / g2

g2core - The Next Generation
Other
625 stars 296 forks source link

feedrate interpretation for moves involving both, primary axes (XYZ) and secondary linear axes (UVW) differs from LinuxCNC #503

Open DerAndere1 opened 2 years ago

DerAndere1 commented 2 years ago

NIST RS274NGC interpreter was open sourced as LinuxCNC. While the NIST RS274NGC interpreter - version 3 does not support axes UVW, these axes were added in LinuxCNC. LinuxCNC has this logic:

    if(dx || dy || dz)
        out.dtot = sqrt(dx * dx + dy * dy + dz * dz);
    else
        out.dtot = sqrt(du * du + dv * dv + dw * dw);

    if (out.tmax <= 0.0) {
        out.vel = canon.linearFeedRate;
    } else {
        out.vel = out.dtot / out.tmax;
    }

(see https://github.com/LinuxCNC/linuxcnc/blob/8a9665315cd96e9da24e08a0885b9a3686f1e7aa/src/emc/task/emccanon.cc#L795-L804)

But you have https://github.com/synthetos/g2/blob/28e7286a8af94ff3928eee72d5bd2a5ff99876f8/g2core/plan_line.cpp#L563-L564