Complete 3axis tutorial native and Web/WASM parity tools

This commit is contained in:
2026-08-24 14:01:30 +08:00
parent 938654b19d
commit 7e90142b63
147 changed files with 17639 additions and 557 deletions

View File

@@ -0,0 +1,26 @@
#!/usr/bin/env python3
"""Verify Web preview geometry is produced by the WASM worker."""
from __future__ import annotations
import json
import subprocess
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
PROGRAM = ROOT / "linuxcnc/nc_files/3dtest.ngc"
def main() -> int:
result = subprocess.run(["node", "web/worker/test_wasm_preview.mjs"], cwd=ROOT, text=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, check=False)
if result.returncode != 0:
print(result.stderr, end="")
return result.returncode
report = json.loads(result.stdout.strip().splitlines()[-1])
print(json.dumps({"status": "verified", "program": PROGRAM.as_posix(), "preview": report}, ensure_ascii=False))
return 0
if __name__ == "__main__":
raise SystemExit(main())