Advance simulation parity and 3-axis tutorial coverage

This commit is contained in:
2026-08-23 18:00:56 +08:00
parent 4a11d9692b
commit 938654b19d
107 changed files with 13537 additions and 3565 deletions

View File

@@ -26,11 +26,24 @@ function stripComment(line) {
}
return line;
}
function resolveWorkspaceRelative(basePath, value) {
const parts = basePath.split("/");
parts.pop();
for (const part of value.replaceAll("\\", "/").split("/")) {
if (!part || part === ".") continue;
if (part === "..") {
if (!parts.length) throw error(INI_ERRORS.path, basePath, 0, "ini_include_path_escape");
parts.pop();
continue;
}
parts.push(part);
}
return normalizeWorkspacePath(`/workspace/${parts.join("/")}`);
}
function resolveInclude(basePath, includePath) {
if (includePath.startsWith("/") || includePath.includes("\\")) throw error(INI_ERRORS.path, basePath, 0, "ini_include_path_invalid");
const baseParts = basePath.split("/");
baseParts.pop();
return normalizeWorkspacePath(`/workspace/${[...baseParts, includePath].join("/")}`);
if (includePath.startsWith("linuxcnc/")) return normalizeWorkspacePath(`/workspace/${includePath}`);
return resolveWorkspaceRelative(basePath, includePath);
}
function expand(value, variables, path, line) {
return value.replace(/\$\{([^}]+)\}|\$\(([^)]+)\)|\$([A-Za-z_][A-Za-z0-9_]*)/g, (match, brace, paren, plain) => {