完善五轴 RTCP 仿真与验证资料

This commit is contained in:
2026-07-01 21:49:58 -04:00
parent ac4e855b2b
commit d0d58998ac
159 changed files with 6771594 additions and 339 deletions

View File

@@ -1,4 +1,6 @@
import assert from "node:assert/strict";
import { readFileSync } from "node:fs";
import { fileURLToPath } from "node:url";
import { createLinuxCncInterpreterRuntime } from "../../app/src/runtime/linuxcnc-interpreter-runtime.js";
@@ -103,4 +105,17 @@ assert.equal(switchkinsExecution.summary.plannerRuntimeReady, true);
assert.equal(switchkinsExecution.plannerTiming.totalSeconds > 0, true);
assert.equal(switchkinsExecution.summary.fullLinuxCncProgramExecutionReady, false);
const gmoccapyImpellerProgram = readFileSync(fileURLToPath(new URL(
"../../../linuxcnc/configs/sim/gmoccapy/non_trivial_kinematics/table-rotary-tilting/examples/impeller-7bl-xyzac.ngc",
import.meta.url,
)), "utf8");
const gmoccapyImpellerExecution = runtime.runProgram(gmoccapyImpellerProgram);
const firstG93FeedMotion = gmoccapyImpellerExecution.motion.find((event) => event.type === "STRAIGHT_FEED");
assert.equal(gmoccapyImpellerExecution.summary.ready, true);
assert.equal(gmoccapyImpellerExecution.motion[0].feedMode, "inverse-time");
assert.equal(firstG93FeedMotion.line, 9);
assert.equal(Math.abs(firstG93FeedMotion.feedRate - 635.745) < 0.001, true);
assert.notEqual(firstG93FeedMotion.feedRate, 318);
console.log("linuxcnc_interpreter_runtime_smoke=ok");