Use independent XYZAC and XYZBC boat programs and models

This commit is contained in:
2026-09-11 07:54:55 +08:00
parent 02dcc573b0
commit 07d53a705c
11 changed files with 111 additions and 34 deletions

View File

@@ -4,7 +4,8 @@ function trt(id, coordinates, type, offsets, model) {
const stem = coordinates.toLowerCase();
return Object.freeze({
id, label: `${coordinates} TRT`, coordinates, axes: [...stem], joint_count: coordinates.length,
entrypoint: `${TRT_ROOT}/${id}.ini`, program: `${TRT_ROOT}/demos/${stem}_switchkins.ngc`,
entrypoint: `${TRT_ROOT}/${id}.ini`, program: `${TRT_ROOT}/demos/boat-${stem}.ngc`,
switchkins_program: `${TRT_ROOT}/demos/${stem}_switchkins.ngc`,
kinematics_type: type, runtime: "trt", model,
source_path: `linuxcnc/src/hal/user_comps/vismach/${id}-gui.py`,
subroutines: [`${stem}_switchkins_sub`, `helix_${stem.slice(3)}`],

View File

@@ -228,6 +228,12 @@ export async function loadSimulationCase({ path, fetchImpl = globalThis.fetch, b
// source hashing and model provenance.
const machine = machineDefinition(catalog.path);
if (machine) {
const programPath = machine.program;
if (!(programPath in files)) {
const content = await fetchText(fetchImpl, baseUrl, programPath);
if (content === null) missing.push(programPath);
else { files[programPath] = content; fetched.push(programPath); }
}
const visualSource = machine.source_path;
if (!(visualSource in files)) {
const content = await fetchText(fetchImpl, baseUrl, visualSource);