diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..b0a55c0 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +wasm-port/vendor/linuxcnc/tests/** whitespace=-trailing-space,-blank-at-eof diff --git a/wasm-port/docs/compatibility-validation.md b/wasm-port/docs/compatibility-validation.md index 18fef69..6152154 100644 --- a/wasm-port/docs/compatibility-validation.md +++ b/wasm-port/docs/compatibility-validation.md @@ -100,12 +100,40 @@ wasm-port/tests/browser/verify_interp_browser.sh wasm-port/tests/host/verify_host_smokes.sh ``` -Layer 4 sim-config staging uses `planSimConfigStaging()` to collect +Layer 4 INI-context staging uses `planIniFileContextStaging()` to collect INI-declared `[DISPLAY]OPEN_FILE`, `[EMCIO]TOOL_TABLE`, `[RS274NGC]PARAMETER_FILE`, `[RS274NGC]SUBROUTINE_PATH`, `[RS274NGC]USER_M_PATH`, and remap-NGC files from the vendored source -manifest. That planner is a host filesystem helper only; execution still goes -through vendored LinuxCNC interpreter/remap/tool/parameter code. +manifest without browser directory enumeration. `planSimConfigStaging()` is the +`configs/sim` wrapper around that generic planner. These planners are host +filesystem helpers only; execution still goes through vendored LinuxCNC +interpreter/remap/tool/parameter code. + +Layer responsibilities are intentionally narrow: + +| Layer | LinuxCNC-owned behavior | Host/WASM adapter allowance | Expected-failure policy | +| --- | --- | --- | --- | +| 1 | `nc_files` parsing and execution through upstream `rs274` | Generate only the native harness INI/tool-table context needed to classify upstream examples | Expected failures document missing machine/task context or known upstream example edges; they must not be made pass by changing G-code semantics. | +| 2 | `configs/sim` file execution through upstream `rs274` with sim INI context | Locate the corresponding INI/tool table and classify main programs, macros, and remap subroutines | Expected failures document upstream standalone `rs274` limits such as task/user-M process edges and the preserved `incremental_repetition_g533.ngc` demo edge. | +| 3 | Vendored LinuxCNC interpreter, remap, tool, parameter, kinematics, and planner code | Provide deterministic runtime shims for filesystem, HAL/user-M boundaries, machine status, and build/source-probe coverage | A standalone pass may cover a runtime edge that Layer 1/2 cannot provide, but it must still call vendored LinuxCNC source for CNC behavior. | +| 4 | Vendored LinuxCNC C ABI behavior from generated WASM modules | Stage files, apply executable bits, persist OPFS text, generate manifest-based staging plans, and forward paths/results between JS/browser and C ABI | A WASM/browser pass proves the host boundary can reproduce the staged LinuxCNC context; it does not replace native source validation or justify JS-owned CNC semantics. | + +## Layer 2 Expected Failures + +The current `wasm-port/tests/native/verify_sim_configs.sh` run reports +`total: 159`, `pass: 151`, `expected_fail: 8`, and `unexpected_fail: 0`. +The eight expected failures are: + +| Program | Layer 2 classification | Current Layer 3/4 coverage or boundary | +| --- | --- | --- | +| `axis/foam/foam.ngc` | `ini-axis-mask-UV`; native upstream `bin/rs274` rejects `U`/`V` words before the standalone runtime applies the INI machine axis mask. | Covered by `wasm-port/tests/native/verify_native_probes.sh`, `wasm-port/tests/wasm/node/verify_sim_configs_wasm.sh`, and `wasm-port/tests/browser/verify_interp_browser.sh`, which run the vendored file with `axis_foam.ini` and verify `U/V` axis acceptance through LinuxCNC-backed file execution. | +| `axis/vismach/5axis/bridgemill/5axisgui.ngc` | `ini-axis-mask-W`; native upstream `bin/rs274` rejects the `W` word outside the bridge-mill runtime context. | Covered by `wasm-port/tests/native/verify_native_probes.sh`, `wasm-port/tests/wasm/node/verify_sim_configs_wasm.sh`, and `wasm-port/tests/browser/verify_interp_browser.sh`, which stage `5axis.ini`, the tool table, and remap subroutines, then execute through the vendored LinuxCNC remap/file path. | +| `axis/geometry/xyzc.ngc` | `user-m-code-M110`; native upstream `bin/rs274` does not register or execute the sim-config `USER_M_PATH` handler. | Covered by `wasm-port/tests/native/verify_native_probes.sh`, `wasm-port/tests/wasm/node/verify_sim_configs_wasm.sh`, and `wasm-port/tests/browser/verify_interp_browser.sh`; the smoke assertions require `canon_event=USER_M_COMMAND code=M110` and reject `Unknown m code used: M110`. | +| `axis/external_offsets/dyn_demo.ngc` | `user-m-code-M111`; native upstream `bin/rs274` does not register or execute the sim-config `USER_M_PATH` handler. | Covered by `wasm-port/tests/native/verify_native_probes.sh`, `wasm-port/tests/wasm/node/verify_sim_configs_wasm.sh`, and `wasm-port/tests/browser/verify_interp_browser.sh`; the smoke assertions require `canon_event=USER_M_COMMAND code=M111` and reject `Unknown m code used: M111`. | +| `axis/external_offsets/eoffsets.ngc` | `user-m-code-M111`; same standalone task/user-M boundary as `dyn_demo.ngc`. | Covered by `wasm-port/tests/wasm/node/verify_sim_configs_wasm.sh` and `wasm-port/tests/browser/verify_interp_browser.sh` with the vendored executable `M111` and `eoffset.tbl` staged from the manifest. | +| `axis/external_offsets/jwp_z.ngc` | `user-m-code-M111`; same standalone task/user-M boundary as `dyn_demo.ngc`. | Covered by `wasm-port/tests/wasm/node/verify_sim_configs_wasm.sh` and `wasm-port/tests/browser/verify_interp_browser.sh` with the vendored executable `M111` and `eoffset.tbl` staged from the manifest. | +| `axis/external_offsets/opa_demo.ngc` | `user-m-code-M111`; same standalone task/user-M boundary as `dyn_demo.ngc`, plus a subroutine dependency. | Covered by `wasm-port/tests/wasm/node/verify_sim_configs_wasm.sh` and `wasm-port/tests/browser/verify_interp_browser.sh`, which stage `M111`, `eoffset.tbl`, and the `SUBROUTINE_PATH` dependency `circles.ngc`. | +| `axis/vismach/5axis/table-rotary_spindle-rotary-nutating/demos/incremental_repetition_g533.ngc` | `upstream-demo-missing-motion-gcode`; upstream standalone `rs274` reports `Cannot use axis values without a g code that uses them`. | Preserved as an upstream demo expected failure. Do not make this pass by editing the G-code, changing JS interpreter behavior, or adding standalone semantics. | ## Validation Chain @@ -205,10 +233,15 @@ It also calls vendored `Interp::init_named_parameters()` and `Interp::find_named_param()` through the WASM C ABI to validate the native named-parameter harness path for LinuxCNC built-in, INI-backed, HAL-backed, and missing named-parameter lookup. -It also writes selected G-code fixtures into the -Emscripten filesystem through the SDK and runs them through LinuxCNC -`Interp::open()`, `Interp::read()`, and `Interp::execute()` to validate the -file execution path. It also writes the vendored LinuxCNC `xyzac-trt` and +It also writes selected G-code fixtures and vendored `tests/interp/g10` +regressions into the Emscripten filesystem through the SDK and runs them +through LinuxCNC `Interp::open()`, `Interp::read()`, and `Interp::execute()` +to validate the file execution path, including G10 tool-table updates, +tool-length offset application timing, active G5X offset changes, G92 +interaction, XY-rotation behavior, G52/G92 shared-offset transitions, and +G92 startup parameter-file persistence through vendored +`ini_load()`/`Interp::init()`/`restore_parameters()`, including +`DISABLE_G92_PERSISTENCE` clearing parameters 5210-5219. It also writes the vendored LinuxCNC `xyzac-trt` and `xyzbc-trt` table-rotary-tilting sample machine INI, `remap_subs/*.ngc`, and `xyzac_switchkins.ngc`/`xyzbc_switchkins.ngc`, `xyzac_switchkins_test_1.ngc`, `xyzac_switchkins_test_2.ngc`, @@ -252,7 +285,8 @@ same Node smoke writes the vendored LinuxCNC `tests/interp/do-while-break`, `tests/interp/oword-bug315`, `tests/interp/oword-bug315-p2`, `tests/interp/exists`, `tests/interp/return-value`, `tests/interp/subs-follow-main`, -`tests/interp/fractional-linenumbers`, `tests/interp/namedparam-bug424`, +`tests/interp/fractional-linenumbers`, `tests/interp/cam-nisley` with its +upstream `test.tbl`, `tests/interp/namedparam-bug424`, selected `tests/interp/rotation` pure interpreter cases, `tests/interp/iniparam`, `tests/interp/iniparam-failassign`, `tests/interp/sub-call-from-sub`, `tests/interp/sequence-number`, and @@ -386,7 +420,9 @@ I/O semantics. It also writes vendored LinuxCNC `tests/interp/do-while-break`, `tests/interp/oword-bug315`, `tests/interp/oword-bug315-p2`, `tests/interp/exists`, `tests/interp/return-value`, `tests/interp/subs-follow-main`, `tests/interp/fractional-linenumbers`, -`tests/interp/namedparam-bug424`, and selected `tests/interp/rotation` +`tests/interp/cam-nisley`, `tests/interp/namedparam-bug424`, +`tests/interp/inside-corners`, +`tests/interp/inverse-time-with-comp`, and selected `tests/interp/rotation` `.ngc` files plus `tests/interp/sub-call-from-sub` `test.ini`, `test.ngc`, and `subs/*.ngc` files and `tests/interp/sequence-number` `test.ini`, `test.ngc`, and @@ -396,9 +432,12 @@ files and `tests/interp/sequence-number` `test.ini`, `test.ngc`, and `test.ini` and `test.ngc`, plus `tests/interp/m19` `test.ini` and `test.ngc`, plus `tests/interp/magic_comments/param_format_printing` `test.ngc`, plus selected pure-interpreter `tests/interp/m98m99` cases covering -Fanuc-style `M98/M99`, parameter scope, nested numbered subprograms, -subprograms after main program text, leading-zero O-word lookup, named and -numbered main programs, and expression-based O-sub/M98 calls, +Fanuc-style `M98/M99`, missing-P-word, missing-subprogram, mixed +Fanuc/RS274NGC sub-style, and `DISABLE_FANUC_STYLE_SUB` INI-gated errors, +main-program O-word termination rules, parameter scope, loop counts including +`L0`, nested numbered subprograms, subprograms after main program text, +leading-zero O-word lookup, named and numbered main programs, and +expression-based O-sub/M98 calls, into the browser WASM filesystem and validates those upstream interpreter regressions through `runFile()` or `runFileWithIni()`, without @@ -426,6 +465,7 @@ The validation fails if: | --- | --- | | `linuxcnc_ini_probe` | Validates vendored LinuxCNC INI parsing can be used standalone. | | `linuxcnc_interp_state_probe` | Validates interpreter state constants and structs compile under the standalone boundary. | +| `linuxcnc_rs274_compile_probe` | Validates the upstream `tests/interp/compile` class remains a source/compile boundary rather than being misclassified as a runtime `.ngc` interpreter fixture. | | `linuxcnc_emc_status_probe` | Validates the standalone `emcStatus` machine-units status boundary used by vendored interpreter conversion and initialization code. | | `linuxcnc_namedparam_harness` | Validates LinuxCNC named parameter behavior, `_ini[...]`, and `_hal[...]` adapter resolution. | | `linuxcnc_interp_minimal_harness` | Runs G-code fixtures through vendored LinuxCNC parser/execution/conversion code, captures canonical events, and validates feed-rate state readback across length-unit changes. | @@ -459,13 +499,13 @@ The validation fails if: | Harness | Purpose | | --- | --- | | `tests/wasm/node/verify_ini_wasm.sh` | Validates the browser-facing INI WASM module can be built from vendored LinuxCNC `inifile.cc`, loaded through the JS SDK in Node, and queried through the exported C ABI, including LinuxCNC-backed boolean conversion and machine-session file-name string lookup. | -| `tests/wasm/node/verify_interp_wasm.sh` | Validates the interpreter-core WASM module can be built from vendored LinuxCNC interpreter/remap source, loaded through the interpreter JS SDK, run the first fixture group through `Interp::execute()` and selected file fixtures plus vendored upstream `tests/interp` regression files through `Interp::open()`/`read()`/`execute()`, match the native canonical event plus required state readback fixtures, emit `run_step` execution-status records with LinuxCNC line number, encoded source statement, return code, and interpreter axis positions for file execution, cover vendored `tests/interp/flowsnake` recursive O-word file execution, selected `tests/interp/bad` file-error paths, and `tests/interp/g33.1` rigid-tap file execution, run vendored `xyzac-trt`/`xyzbc-trt` switchkins remap demo files through the WASM C ABI/SDK path, and run parameter-file restore/save through vendored LinuxCNC `Interp::restore_parameters()` and `Interp::save_parameters()`. | -| `tests/wasm/node/verify_sim_configs_wasm.sh` | Validates representative vendored LinuxCNC `configs/sim` programs in Node WASM through `planSimConfigStaging()` plus `runSimConfigProgram()`. The staging planner uses INI text and `tools/source-manifest.txt` to collect the program, INI, tool table, parameter file when vendored, `SUBROUTINE_PATH` files, `USER_M_PATH` files, and remap-NGC files before forwarding to `runFileWithIni()` or `runFiveAxisRemapFile()`. This covers INI-driven `U/V/W` axis mask handling, real `USER_M_PATH` registration for executable `M110`/`M111`, all four current external-offset M111 expected-failure programs, `SUBROUTINE_PATH` staging for `opa_demo.ngc -> circles.ngc`, bridge-mill remap-subroutine staging, and vendored LinuxCNC bridge-mill NGC remap execution without spawning host processes. The same smoke includes a synthetic staging-plan assertion for `TOOL_TABLE`, `PARAMETER_FILE`, `SUBROUTINE_PATH`, and `USER_M_PATH` collection. | +| `tests/wasm/node/verify_interp_wasm.sh` | Validates the interpreter-core WASM module can be built from vendored LinuxCNC interpreter/remap source, loaded through the interpreter JS SDK, run the first fixture group through `Interp::execute()` and selected file fixtures plus vendored upstream `tests/interp` regression files through `Interp::open()`/`read()`/`execute()`, match the native canonical event plus required state readback fixtures, emit `run_step` execution-status records with LinuxCNC line number, encoded source statement, return code, and interpreter axis positions for file execution, cover vendored `tests/interp/flowsnake` recursive O-word file execution, `tests/interp/g6164` path-control and naive-cam tolerance execution, `tests/interp/oword-unwind` continue-on-error stack unwind behavior through planner-staged INI context, selected `tests/interp/bad` file-error paths, and `tests/interp/g33.1` rigid-tap file execution, run vendored `xyzac-trt`/`xyzbc-trt` switchkins remap demo files through the WASM C ABI/SDK path, and run parameter-file restore/save through vendored LinuxCNC `Interp::restore_parameters()` and `Interp::save_parameters()`. | +| `tests/wasm/node/verify_sim_configs_wasm.sh` | Validates representative vendored LinuxCNC `configs/sim` programs in Node WASM through `planSimConfigStaging()` plus `runSimConfigProgram()`. The generic `planIniFileContextStaging()` planner and its sim-config wrapper use INI text and `tools/source-manifest.txt` to collect the program, INI, tool table, parameter file when vendored, `SUBROUTINE_PATH` files, `USER_M_PATH` files, and remap-NGC files before forwarding to `runFileWithIni()` or `runFiveAxisRemapFile()`. This covers INI-driven `U/V/W` axis mask handling, real `USER_M_PATH` registration for executable `M110`/`M111`, all four current external-offset M111 expected-failure programs, `SUBROUTINE_PATH` staging for `opa_demo.ngc -> circles.ngc`, bridge-mill remap-subroutine staging, and vendored LinuxCNC bridge-mill NGC remap execution without spawning host processes. The same smoke includes synthetic staging-plan assertions for generic `TOOL_TABLE`, `PARAMETER_FILE`, multi-directory `SUBROUTINE_PATH`, `USER_M_PATH`, and `REMAP ... ngc=...` file collection. | | `tests/wasm/node/verify_nc_files_wasm.sh` | Validates representative vendored LinuxCNC `nc_files` examples in Node WASM by copying `3D_Chips.ngc`, `arcspiral.ngc`, `hole-circle.ngc`, `factorial.ngc`, and `m6demo.ngc` into the Emscripten filesystem and forwarding to the LinuxCNC-backed `Interp::open()`/`read()`/`execute()` path. `3D_Chips.ngc` is staged with a minimal INI-declared `tool.tbl` because the upstream program contains `T1 M6`; JavaScript only stages files and checks LinuxCNC output, including `run_step` status records, and does not implement G-code, O-word, tool-change, or M-code behavior. | | `tests/wasm/node/verify_tp_wasm.sh` | Validates a standalone trajectory-planner WASM module can be built from vendored LinuxCNC TP/TC/Ruckig support source, loaded in Node, and run the same linear, arc, and queued-line planner probe paths covered by the native TP harness. | | `tests/opfs/node/verify_file_service.sh` | Validates the host-owned OPFS text-file adapter, path model, session snapshot store including custom filenames and envelope/path rejection paths, machine file store, G-code text store including filename rejection paths, OPFS-to-WASM parameter/tool-table bridges, and grouped machine-session loading without moving file persistence, parameter semantics, or tool-table semantics into the WASM core. | | `tests/browser/verify_ini_panel_browser.sh` | Validates the INI SDK, INI/interpreter WASM module loading, LinuxCNC-backed INI machine-session file-name string lookup, OPFS text-file round trip, generic session snapshot round trip plus custom filename and envelope/path rejection paths, machine file text round trip, G-code text round trip plus filename rejection paths, and the INI panel UI's machine-session load with default OPFS parameter/tool-table file mapping, G-code run, `run_step`-backed progress/line/statement/axis display, canonical-event display paths, and 5-axis remap demo action in a real browser runtime. | -| `tests/browser/verify_interp_browser.sh` | Validates the interpreter-core WASM module loads through the interpreter JS SDK in a real browser runtime and runs selected positive and negative canonical fixtures plus vendored upstream `tests/interp` regression files through vendored LinuxCNC `Interp::execute()` and `Interp::open()`/`read()`/`execute()` via the exported C ABI, including direct browser SDK and OPFS-backed parameter-file restore/save, non-random/random tool-table load/save through vendored LinuxCNC source, vendored `xyzac-trt`/`xyzbc-trt` switchkins remap demo execution, representative vendored `configs/sim` `foam`, `geometry`, `external_offsets`, and bridge-mill programs through `runSimConfigProgram()`, and representative vendored `nc_files` examples through `runFile()` or `runFileWithIni()` when the upstream file requires INI/tool-table context. | +| `tests/browser/verify_interp_browser.sh` | Validates the interpreter-core WASM module loads through the interpreter JS SDK in a real browser runtime and runs selected positive and negative canonical fixtures plus vendored upstream `tests/interp` regression files through vendored LinuxCNC `Interp::execute()` and `Interp::open()`/`read()`/`execute()` via the exported C ABI, including direct browser SDK and OPFS-backed parameter-file restore/save, non-random/random tool-table load/save through vendored LinuxCNC source, vendored `xyzac-trt`/`xyzbc-trt` switchkins remap demo execution, representative vendored `configs/sim` `foam`, `geometry`, `external_offsets`, and bridge-mill programs through `runSimConfigProgram()`, representative vendored `nc_files` examples through `runFile()` or `runFileWithIni()` when the upstream file requires INI/tool-table context, and a synthetic browser assertion that `planIniFileContextStaging()` can collect INI, program, tool-table, parameter, multi-directory subroutine, executable user-M, and remap-NGC files using only manifest text. | | `tests/host/verify_host_smokes.sh` | Runs the current host-side Node, WASM interpreter-core, WASM trajectory-planner, OPFS, and browser smoke validation with shared WASM builds. | ## Fixture Coverage @@ -493,6 +533,7 @@ Positive G-code fixtures currently cover: - comment logging canonical calls - local, INI-backed named parameters and numbered parameters - O-word subroutines +- continue-on-error O-word unwind - program-end modal reset - canonical runtime edge calls @@ -532,7 +573,8 @@ plus the `g1_zero_feed`, `arc_radius_mismatch`, `arc_zero_radius`, path additionally covers the same canonical-event fixture group, plus `namedparam_ini_semantics` and `namedparam_semantics` through the INI-aware file execution ABI, -`file_open_reset`, `percent_file_finish`, and `oword_subroutine`. +`file_open_reset`, `percent_file_finish`, `oword_subroutine`, +`g6164`, and `oword_unwind`. `position_params` uses a dedicated file-path expectation under `tests/fixtures/canon_file/` because LinuxCNC file execution advances the post-execute position parameters differently than the line-by-line MDI smoke; @@ -785,7 +827,20 @@ numbered-parameter, local named-parameter plus `_ini[...]` lookup through tool-reload, tool select/change/length-offset, M61 current-tool-number update, canned-cycle, state-tag motion, tool-table setup, and O-word subroutine fixtures, plus vendored `tests/interp/flowsnake` recursive O-word toolpath, -selected upstream `tests/interp/bad` file-error paths, threading/rigid tap, +`tests/interp/cam-nisley` storm-door latch cam execution with upstream +tool-table context and a bare-run missing-tool negative check, +`tests/interp/inside-corners` cutter-compensation concave/convex/tangent +geometry across XY and ZX planes, +`tests/interp/inverse-time-with-comp` inverse-time feed and cutter-compensation +interaction, +selected upstream `tests/interp/bad` file-error paths including canned-cycle +A-axis rejection, center-format arc radius mismatch rejection, and +selected upstream `tests/interp/good` center-format arc tolerance acceptance, +selected `tests/interp/g72-*` lathe facing canned-cycle iteration regressions, +selected `tests/interp/g71-*` lathe roughing/finish canned-cycle regressions, +`tests/interp/g76` lathe threading with upstream tool-table context, +cutter-compensation rejection, selected standalone `tests/ccomp` +cutter-compensation file execution with upstream tool tables, threading/rigid tap, vendored `tests/interp/g33.1` rigid-tap file execution, NURBS dispatch boundaries, and the comparable canonical runtime edge and program-end cleanup calls. The @@ -873,9 +928,15 @@ numbered subroutine in the same external file, selected `tests/interp/rotation` absolute-position `#<_abs_x>`, `#<_abs_y>`, and `#<_abs_z>` reporting under G54, G92, XY rotation, and unit changes plus rotated-coordinate `G28` and `G53` endpoint behavior, selected `tests/interp/m98m99` -Fanuc-style `M98/M99` subprogram calls, parameter-scope differences, -nested numbered subprograms, subprograms after main program text, -leading-zero O-word lookup, named/numbered main programs, and O-expression -calls, plus `(ABORT,...)` hot-comment numbered, named, and INI-parameter +Fanuc-style `M98/M99` subprogram calls, missing-P-word, missing-subprogram, +mixed Fanuc/RS274NGC sub-style, and `DISABLE_FANUC_STYLE_SUB` INI-gated +errors, main-program O-word termination rules, parameter-scope differences, +loop counts including `L0`, nested numbered subprograms, subprograms after main +program text, leading-zero O-word lookup, named/numbered main programs, and +O-expression calls, plus +`(ABORT,...)` hot-comment numbered, named, and INI-parameter expansion, with skipped branch/subroutine messages and post-abort program end -asserted absent where applicable. +asserted absent where applicable. The same native, Node WASM, and browser +interpreter validation also stages an INI-declared variable file to verify +LinuxCNC G92 startup persistence and the `DISABLE_G92_PERSISTENCE` startup +clear path through vendored interpreter initialization. diff --git a/wasm-port/docs/drift-report.md b/wasm-port/docs/drift-report.md index a3f52bf..1de186f 100644 --- a/wasm-port/docs/drift-report.md +++ b/wasm-port/docs/drift-report.md @@ -45,7 +45,7 @@ semantic rewrites: | Go math C/C++ linkage | `genserkins` runtime probing compiles vendored `gomath.c` through a narrow C++ wrapper so LinuxCNC `genserfuncs.c` can link to the upstream Go math symbols without editing vendored source. | | Switchkins iterative forward | `genhexkins` runtime probing follows LinuxCNC switchkins iterative-forward behavior, including the first-call warmup path before asserting roundtrip convergence. | | Browser storage | OPFS remains outside the native core; `runtime/opfs/file-service.js` owns browser text-file persistence, `runtime/opfs/path-model.js` owns host-side storage paths for INI, tool table, parameter, G-code, preview-cache, and session-snapshot content, `runtime/opfs/snapshot-store.js` owns generic JSON session snapshot persistence, `runtime/opfs/machine-file-store.js` owns pure-text machine-file and G-code persistence, `runtime/opfs/linuxcnc-parameter-bridge.js` only copies parameter files between OPFS text storage and the LinuxCNC-backed WASM parameter-file ABI, `runtime/opfs/linuxcnc-tool-table-bridge.js` only copies tool tables between OPFS text storage and the LinuxCNC-backed WASM tool-table ABI, and `runtime/opfs/linuxcnc-machine-session-bridge.js` groups INI, parameter, and tool-table loading while using the LinuxCNC-backed INI SDK for `[EMCIO]RANDOM_TOOLCHANGER`, `[RS274NGC]PARAMETER_FILE`, and `[EMCIO]TOOL_TABLE` when available; explicit host session file-name options take precedence over INI-derived file names, missing INI file-name values fall back to host default parameter/tool-table paths, and path validation remains owned by the OPFS path model, including rejection of traversal or nested path segments from INI-derived file names. | -| Sim-config SDK staging | `runtime/sdk/src/sim-config-staging.js` exposes `planSimConfigStaging()` as a host-boundary file planner for representative vendored `configs/sim` programs. It reads INI text plus `tools/source-manifest.txt` to collect `[DISPLAY]OPEN_FILE`, `[EMCIO]TOOL_TABLE`, `[RS274NGC]PARAMETER_FILE`, `[RS274NGC]SUBROUTINE_PATH`, `[RS274NGC]USER_M_PATH`, and remap-NGC files for staging. `runtime/sdk/src/linuxcnc-interp.js` exposes `runSimConfigProgram()` as the execution convenience only: it writes planned text files into the Emscripten filesystem, applies executable bits for user M-code files, and forwards to existing LinuxCNC-backed C ABI entry points such as `runFileWithIni()` or `runFiveAxisRemapFile()`; neither helper implements interpreter, axis, remap, tool, parameter, or user M-code semantics. | +| INI-context SDK staging | `runtime/sdk/src/sim-config-staging.js` exposes `planIniFileContextStaging()` as a generic host-boundary file planner and `planSimConfigStaging()` as the representative vendored `configs/sim` wrapper. The planner reads INI text plus `tools/source-manifest.txt` to collect `[DISPLAY]OPEN_FILE`, `[EMCIO]TOOL_TABLE`, `[RS274NGC]PARAMETER_FILE`, one or more `[RS274NGC]SUBROUTINE_PATH` entries, one or more `[RS274NGC]USER_M_PATH` entries, and remap-NGC files for staging without relying on browser directory enumeration. `runtime/sdk/src/linuxcnc-interp.js` exposes `runSimConfigProgram()` as the execution convenience only: it writes planned text files into the Emscripten filesystem, applies executable bits for user M-code files, and forwards to existing LinuxCNC-backed C ABI entry points such as `runFileWithIni()` or `runFiveAxisRemapFile()`; neither helper implements interpreter, axis, remap, tool, parameter, or user M-code semantics. | ## Enforced Non-Drift Rules diff --git a/wasm-port/docs/linuxcnc-test-porting-tracker.md b/wasm-port/docs/linuxcnc-test-porting-tracker.md index b338081..068de3c 100644 --- a/wasm-port/docs/linuxcnc-test-porting-tracker.md +++ b/wasm-port/docs/linuxcnc-test-porting-tracker.md @@ -57,6 +57,28 @@ wasm-port/tests/host/verify_host_smokes.sh | Add aggregate smoke coverage | Done | `tests/host/verify_host_smokes.sh` now runs stable Node WASM, sim-config WASM, `nc_files` WASM, OPFS, and browser smoke checks with shared builds. Current run passed with `host_wasm_opfs_browser_smokes=ok`. | | Add `linuxcnc/nc_files` basic examples | Done | `tests/native/verify_nc_files.sh` now runs the basic/example subset of upstream `linuxcnc/nc_files` through LinuxCNC `bin/rs274`; current native baseline is 107 total, 101 pass, 6 expected context/entry-point edges, 0 unexpected failures. Exploratory `--all` inventory is 247 total, 219 pass, 28 expected context/entry-point edges, 0 unexpected failures. A representative vendored subset now passes Node WASM and browser execution through LinuxCNC-backed `Interp::open()`/`read()`/`execute()`, with `3D_Chips.ngc` using an INI-declared tool-table context for its upstream `T1 M6` line. | +## Current Review Boundaries + +Use these batches when reviewing or splitting the current uncommitted work. + +| Batch | Scope | Files | +| --- | --- | --- | +| A | `run_step` status output and UI/Node/browser assertions. | `wasm-port/runtime/core/linuxcnc_wrap/linuxcnc_interp_minimal_harness.cpp`, `wasm-port/runtime/core/linuxcnc_wrap/linuxcnc_interp_minimal_runtime.cpp`, `wasm-port/runtime/core/linuxcnc_wrap/linuxcnc_interp_wasm.cpp`, `wasm-port/runtime/core/linuxcnc_wrap/linuxcnc_runtime_state.hh`, `wasm-port/tests/wasm/node/verify_interp_wasm.mjs`, `wasm-port/tests/browser/interp_smoke.html`, `wasm-port/tests/fixtures/canon/arc_semantics.events`. | +| B | `nc_files` representative smoke and `3D_Chips.ngc` tool-table context. | `wasm-port/tests/native/verify_native_probes.sh`, `wasm-port/tests/wasm/node/verify_interp_wasm.mjs`, `wasm-port/tests/browser/interp_smoke.html`, `wasm-port/tools/source-manifest.txt`, vendored `wasm-port/vendor/linuxcnc/nc_files/3D_Chips.ngc`, `arcspiral.ngc`, `factorial.ngc`, `hole-circle.ngc`, and `m6demo.ngc`. | +| C | Selected upstream `tests/interp/*` and `tests/ccomp/*` fixture intake. | `wasm-port/tests/native/verify_native_probes.sh`, `wasm-port/tests/wasm/node/verify_interp_wasm.mjs`, `wasm-port/tests/browser/interp_smoke.html`, `wasm-port/tools/extract_sources.sh`, `wasm-port/tools/source-manifest.txt`, vendored `wasm-port/vendor/linuxcnc/tests/interp/...`, and vendored `wasm-port/vendor/linuxcnc/tests/ccomp/...` files listed in `tools/source-manifest.txt`. | +| D | Interpreter regression coverage for G92 parameter persistence, tool tables, G10/G52/G71/G72/G76, rotation, INI parameters, M19, M98/M99, subroutine lookup, sequence numbers, nested-sub errors, and ABORT hot comments. | `wasm-port/runtime/core/linuxcnc_wrap/linuxcnc_interp_minimal_harness.cpp`, `wasm-port/runtime/core/linuxcnc_wrap/linuxcnc_interp_minimal_runtime.cpp`, `wasm-port/runtime/core/linuxcnc_wrap/linuxcnc_interp_wasm.cpp`, `wasm-port/tests/native/verify_native_probes.sh`, `wasm-port/tests/wasm/node/verify_interp_wasm.mjs`, `wasm-port/tests/browser/interp_smoke.html`, and the corresponding vendored upstream fixture files under `wasm-port/vendor/linuxcnc/tests/interp/`. | +| E | Generic INI-context staging helper and Node/browser synthetic coverage. | `wasm-port/runtime/sdk/src/sim-config-staging.js`, `wasm-port/runtime/sdk/src/index.js`, `wasm-port/runtime/sdk/README.md`, `wasm-port/tests/wasm/node/verify_sim_configs_wasm.mjs`, `wasm-port/tests/browser/interp_smoke.html`. | +| F | Validation docs, source reuse map, tracker updates, native probe build/source-sync glue. | `wasm-port/docs/compatibility-validation.md`, `wasm-port/docs/drift-report.md`, `wasm-port/docs/linuxcnc-test-porting-tracker.md`, `wasm-port/docs/source-reuse-map.md`, `wasm-port/tools/build_native_probes.sh`, `wasm-port/tools/extract_sources.sh`, `wasm-port/tools/source-manifest.txt`, `wasm-port/tools/verify_vendor_sync.sh`. | + +Vendored files in the current workset must stay byte-identical to upstream and +covered by both `wasm-port/tools/source-manifest.txt` and +`wasm-port/tools/verify_vendor_sync.sh`. The current untracked vendor groups +are `wasm-port/vendor/linuxcnc/tests/ccomp/`, selected +`wasm-port/vendor/linuxcnc/tests/interp/bad/*.ngc`, and selected upstream +directories under `wasm-port/vendor/linuxcnc/tests/interp/` including +`cam-nisley`, `crazy-paths`, `g10`, `g52`, `g71-*`, `g72-*`, `g76`, `good`, +`inside-corners`, `inverse-time-with-comp`, and selected `m98m99` cases. + ## LinuxCNC Test Asset Queue | LinuxCNC test path | Status | Current target | Notes | @@ -79,21 +101,34 @@ wasm-port/tests/host/verify_host_smokes.sh | `tests/interp/return-value` | Done | Native, WASM Node, browser | Vendored under `wasm-port/vendor/linuxcnc/tests/interp/return-value`; validates LinuxCNC O-word return-value and `#<_value>` behavior through vendored file execution paths. | | `tests/interp/subs-follow-main` | Done | Native, WASM Node, browser | Vendored under `wasm-port/vendor/linuxcnc/tests/interp/subs-follow-main`; validates LinuxCNC subroutines after main program text through vendored file execution paths. | | `tests/interp/fractional-linenumbers` | Done | Native, WASM Node, browser | Vendored under `wasm-port/vendor/linuxcnc/tests/interp/fractional-linenumbers`; validates LinuxCNC fractional line-number parsing through vendored file execution paths. | +| `tests/interp/cam-nisley` | Done | Native, WASM Node, browser | Vendored under `wasm-port/vendor/linuxcnc/tests/interp/cam-nisley`; validates the upstream storm-door latch cam toolpath through `Interp::open()`, `read()`, and `execute()` with upstream `test.tbl` staged through an INI-declared tool table. Native, WASM Node, and browser checks also assert that bare execution without that tool-table context fails at the upstream `T1 M6` lookup. | | `tests/interp/namedparam-bug424` | Done | Native, WASM Node, browser | Vendored under `wasm-port/vendor/linuxcnc/tests/interp/namedparam-bug424`; validates LinuxCNC named-parameter parsing regression behavior through vendored file execution paths. | | `tests/interp/flowsnake` | Done | Native, WASM Node, browser | Vendored under `wasm-port/vendor/linuxcnc/tests/interp/flowsnake`; validates LinuxCNC recursive O-word subroutine execution, expression evaluation, and comment argument handling through a pure file-execution fractal toolpath. | -| `tests/interp/bad` selected file errors | Done | Native, WASM Node, browser | Vendored selected upstream files under `wasm-port/vendor/linuxcnc/tests/interp/bad`; validates LinuxCNC file-execution error text for malformed `EXISTS[]` parameter expressions, nested subroutine definitions, zero-feed G1, missing arc center/radius words, and probe motion without axes. | +| `tests/interp/inside-corners` | Done | Native, WASM Node, browser | Vendored under `wasm-port/vendor/linuxcnc/tests/interp/inside-corners`; validates LinuxCNC cutter-compensation geometry through concave corners, convex corners, and tangencies across XY and ZX plane file execution. | +| `tests/interp/inverse-time-with-comp` | Done | Native, WASM Node, browser | Vendored under `wasm-port/vendor/linuxcnc/tests/interp/inverse-time-with-comp`; validates LinuxCNC inverse-time feed (`G93`), units-per-minute feed (`G94`), and cutter compensation interaction across uncompensated, right-compensated, and left-compensated subprogram calls. | +| `tests/ccomp` selected standalone cases | Done | Native, WASM Node, browser | Vendored `lathe-comp`, `mill-g90g91g92`, `mill-line-arc-entry`, and `mill-zchanges` under `wasm-port/vendor/linuxcnc/tests/ccomp`; validates standalone LinuxCNC cutter-compensation file execution with upstream tool tables staged through LinuxCNC `tooldata_load()` and `Interp::load_tool_table()`, with the standalone minimal interpreter startup now aligned to LinuxCNC's default incremental IJK mode (`G91.1`). | +| `tests/interp/bad` selected file errors | Done | Native, WASM Node, browser | Vendored selected upstream files under `wasm-port/vendor/linuxcnc/tests/interp/bad`; validates LinuxCNC file-execution error text for canned-cycle A-axis rejection, center-format arc radius mismatch rejection, cutter-compensation arc-exit/gouging rejection, malformed `EXISTS[]` parameter expressions, nested subroutine definitions, zero-feed G1, missing arc center/radius words, and probe motion without axes. | +| `tests/interp/good` selected arc tolerance cases | Done | Native, WASM Node, browser | Vendored selected upstream files under `wasm-port/vendor/linuxcnc/tests/interp/good`; validates LinuxCNC center-format arc tolerance acceptance across small/medium/big inch and metric cases through `ARC_FEED` canonical output and successful program end. | +| `tests/interp/g6164` | Done | Native, WASM Node, browser | Vendored under `wasm-port/vendor/linuxcnc/tests/interp/g6164`; validates LinuxCNC `G61`/`G64` path-control and naive-cam tolerance canonical output through vendored file execution paths. | +| `tests/interp/g72-facing` and `tests/interp/g72-missing-iteration` | Done | Native, WASM Node, browser | Vendored under `wasm-port/vendor/linuxcnc/tests/interp/g72-facing` and `wasm-port/vendor/linuxcnc/tests/interp/g72-missing-iteration`; validates LinuxCNC G72 lathe facing canned-cycle iteration behavior through vendored file execution paths, canonical `STRAIGHT_FEED` endpoints, and successful program end without timeout. | +| `tests/interp/g71-*` selected lathe canned-cycle cases | Done | Native, WASM Node, browser | Vendored `g71-endless-loop`, `g71-endless-loop2`, `g71-endless-loop_2`, and `g71-with-g70`; validates LinuxCNC G71 roughing and G70 finishing canned-cycle regressions through vendored file execution paths, canonical feed/arc endpoints, and successful program end without timeout. | +| `tests/interp/g76` | Done | Native, WASM Node, browser | Vendored under `wasm-port/vendor/linuxcnc/tests/interp/g76`; validates LinuxCNC G76 lathe threading with upstream `test.tbl` staged through an INI-declared tool table, covering tool change, spindle start, speed-feed sync, threading feed events, and successful program end. | | `tests/interp/g33.1` | Done | Native, WASM Node, browser | Vendored under `wasm-port/vendor/linuxcnc/tests/interp/g33.1`; validates LinuxCNC rigid-tap `G33.1` file execution, spindle start, feed synchronization, and `RIGID_TAP` canonical output through vendored interpreter paths. | +| `tests/interp/g10` | Done | Native, WASM Node, browser | Vendored under `wasm-port/vendor/linuxcnc/tests/interp/g10`; validates LinuxCNC `G10 L1/L10/L11/L2/L20`, tool-table updates, tool-length offset application timing, active G5X offset changes, G92 interaction, and XY-rotation behavior through vendored file execution paths with upstream `test.tbl` files staged through LinuxCNC tool-table loading. | +| `tests/interp/g52/g52-g92-interaction` plus G92 startup persistence | Done | Native, WASM Node, browser | Vendored under `wasm-port/vendor/linuxcnc/tests/interp/g52/g52-g92-interaction`; validates LinuxCNC G52/G92 shared offset parameter behavior, `G92.1`/`G92.2`/`G92.3` transitions, and `SET_G92_OFFSET` canonical output through vendored file execution paths. Native, WASM Node, and browser validation also stage a `[RS274NGC]PARAMETER_FILE` and exercise vendored `ini_load()`/`Interp::init()`/`restore_parameters()` startup behavior, including `DISABLE_G92_PERSISTENCE` clearing parameters 5210-5219. | | `tests/interp/rotation` selected pure interpreter cases | Done | Native, WASM Node, browser | Vendored selected upstream cases under `wasm-port/vendor/linuxcnc/tests/interp/rotation`; validates LinuxCNC machine-coordinate `G53` absolute-position named parameters `#<_abs_x>`, `#<_abs_y>`, and `#<_abs_z>` across G54 offsets, G92 offsets, XY rotation, and inch/millimeter modes, plus rotated-coordinate `G28` and `G53` endpoint behavior through vendored file execution paths. | | `tests/interp/iniparam` | Done | Native, WASM Node, browser | Vendored under `wasm-port/vendor/linuxcnc/tests/interp/iniparam`; validates LinuxCNC `_ini[...]` lookup, missing INI-parameter error text, and continued file execution through vendored file execution paths and `INI_FILE_NAME`. | | `tests/interp/iniparam-failassign` | Done | Native, WASM Node, browser | Vendored under `wasm-port/vendor/linuxcnc/tests/interp/iniparam-failassign`; validates LinuxCNC `_ini[...]` read-only named-parameter assignment rejection through vendored file execution paths and `INI_FILE_NAME`. | | `tests/interp/m19` | Done | Native, WASM Node, browser | Vendored under `wasm-port/vendor/linuxcnc/tests/interp/m19`; validates LinuxCNC `M19` spindle orient canonical events, wait timeout, and `[RS274NGC]ORIENT_OFFSET` handling through vendored file execution paths. | | `tests/interp/magic_comments/param_format_printing` | Done | Native, WASM Node, browser | Vendored under `wasm-port/vendor/linuxcnc/tests/interp/magic_comments/param_format_printing`; validates LinuxCNC `(DEBUG,...)` magic-comment parameter formatting for integer, default float, and explicit precision formats through vendored file execution paths. | -| `tests/interp/m98m99` selected pure interpreter cases | Done | Native, WASM Node, browser | Vendored selected upstream cases under `wasm-port/vendor/linuxcnc/tests/interp/m98m99`; validates LinuxCNC Fanuc-style `M98/M99`, parameter scope, nested numbered subprograms, subprograms after main program text, leading-zero O-word lookup, named and numbered main programs, and expression-based O-sub/M98 calls through vendored file execution paths. | +| `tests/interp/m98m99` selected pure interpreter cases | Done | Native, WASM Node, browser | Vendored selected upstream cases under `wasm-port/vendor/linuxcnc/tests/interp/m98m99`; validates LinuxCNC Fanuc-style `M98/M99`, missing-P-word, missing-subprogram, mixed Fanuc/RS274NGC sub-style, `DISABLE_FANUC_STYLE_SUB` INI-gated errors, main-program O-word termination rules, parameter scope, loop counts including `L0`, nested numbered subprograms, subprograms after main program text, leading-zero O-word lookup, named and numbered main programs, and expression-based O-sub/M98 calls through vendored file execution paths. | | `tests/interp/sub-call-from-sub` | Done | Native, WASM Node, browser | Vendored under `wasm-port/vendor/linuxcnc/tests/interp/sub-call-from-sub`; validates LinuxCNC external subroutine calls from another external subroutine through vendored file execution paths and LinuxCNC INI `SUBROUTINE_PATH`. | | `tests/interp/sequence-number` | Done | Native, WASM Node, browser | Vendored under `wasm-port/vendor/linuxcnc/tests/interp/sequence-number`; validates LinuxCNC `#<_line>` reporting in main files and external subroutines through vendored file execution paths and LinuxCNC INI `SUBROUTINE_PATH`. | | `tests/interp/nested-sub-error` | Done | Native, WASM Node, browser | Vendored under `wasm-port/vendor/linuxcnc/tests/interp/nested-sub-error`; validates LinuxCNC nested-subroutine-definition rejection through vendored file execution paths and LinuxCNC INI `SUBROUTINE_PATH`. | | `tests/interp/nested-sub-in-file-error` | Done | Native, WASM Node, browser | Vendored under `wasm-port/vendor/linuxcnc/tests/interp/nested-sub-in-file-error`; validates LinuxCNC rejection of forward seek to a later numbered subroutine in the same external subroutine file through vendored file execution paths and LinuxCNC INI `SUBROUTINE_PATH`. | +| `tests/interp/oword-unwind` | Done | Native, WASM Node, browser | Vendored under `wasm-port/vendor/linuxcnc/tests/interp/oword-unwind`; validates LinuxCNC O-word stack unwind after a subroutine error through upstream-style continue-on-error file execution and LinuxCNC INI `SUBROUTINE_PATH`. | | `tests/interp/abort-hot-comment` | Done | Native, WASM Node, browser | Vendored under `wasm-port/vendor/linuxcnc/tests/interp/abort-hot-comment`; validates LinuxCNC `(ABORT,...)` hot-comment parameter expansion for numbered, named, and INI named parameters through vendored file execution paths and `INI_FILE_NAME`. | +| `tests/interp/compile` | Done | Native source probe | Upstream `linuxcnc/tests/interp/compile` is a C++ compile/source test (`use-rs274.cc`), not a runtime `.ngc` interpreter fixture. The current port covers this class through the native `linuxcnc_rs274_compile_probe` object build in `wasm-port/tools/build_native_probes.sh`; do not add it to file-execution intake unless an upstream runtime fixture appears. | | `configs/sim/axis/foam/foam.ngc` | Done | Native, WASM Node, browser | Vendored under `wasm-port/vendor/linuxcnc/configs/sim/axis/foam`; validates LinuxCNC INI-driven `U/V` axis mask handling through `axis_foam.ini` and vendored file execution paths. | | `configs/sim/axis/geometry/xyzc.ngc` | Done | Native, WASM Node, browser | Vendored under `wasm-port/vendor/linuxcnc/configs/sim/axis/geometry`; validates LinuxCNC `USER_M_PATH` registration with the real executable `M110` while process execution remains a deterministic standalone `USER_M_COMMAND` boundary. | | `configs/sim/axis/external_offsets/*.ngc` M111 demos | Done | Native, WASM Node, browser | Vendored under `wasm-port/vendor/linuxcnc/configs/sim/axis/external_offsets`; validates `dyn_demo.ngc`, `eoffsets.ngc`, `jwp_z.ngc`, and `opa_demo.ngc` with their corresponding INI files, real executable `M111`, shared `eoffset.tbl`, and `opa_demo.ngc`'s `circles.ngc` subroutine while process execution remains a deterministic standalone boundary. | diff --git a/wasm-port/docs/source-reuse-map.md b/wasm-port/docs/source-reuse-map.md index d4298fb..38ca74c 100644 --- a/wasm-port/docs/source-reuse-map.md +++ b/wasm-port/docs/source-reuse-map.md @@ -41,10 +41,10 @@ Current validation is intentionally mechanical: | Switchable 5-axis bridge kinematics | `src/emc/kinematics/5axiskins.c`, `switchkins.c`, `switchkins.h`, `userkfuncs.c`, plus `src/rtapi/rtapi_ctype.h` | Copy unchanged | HAL pin allocation, HAL component lifecycle, and RTAPI module metadata are standalone runtime edges; switchable 5-axis forward/inverse behavior remains LinuxCNC source | Vendor byte sync, per-file source probes, `linuxcnc_5axis_kinematics_probe` | | TRT table-rotary kinematics | `src/emc/kinematics/trtfuncs.c`, `xyzac-trt-kins.c`, `xyzbc-trt-kins.c` | Copy unchanged | HAL pin allocation and switchkins lifecycle stay runtime boundaries; XYZAC/XYZBC TRT forward/inverse behavior remains LinuxCNC source | Vendor byte sync, per-file source probes, `linuxcnc_xyzac_trt_kinematics_probe`, `linuxcnc_xyzbc_trt_kinematics_probe` | | Five-axis switchkins machine configs and M428/M429/M430 remaps | `configs/sim/axis/vismach/5axis/bridgemill/*`, `table-dual-rotary/*`, and `table-rotary-tilting/*` selected INI, HAL, tool-table, XML, demo, and `remap_subs/*.ngc` files plus `src/emc/rs274ngc/interp_remap.cc` | Copy unchanged | `M428`, `M429`, and `M430` remain LinuxCNC `REMAP` entries that call LinuxCNC NGC subroutines using `M68`, `M66`, `_hal[motion.switchkins-type]`, and the INI/HAL `motion.analog-out-03 => motion.switchkins-type` link; standalone remap descriptor parsing routes through vendored `Interp::parse_remap()` and `find_ngc_file()`, and NGC remap/file execution routes through vendored LinuxCNC O-word and `open()`/`read()`/`execute()` paths while HAL synchronization stays a runtime adapter boundary | Vendor byte sync, `linuxcnc_5axis_remap_asset_probe`, `linuxcnc_remap_parse_harness`, `linuxcnc_remap_hal_sync_harness`, `linuxcnc_5axis_remap_execute_harness`, `tests/wasm/node/verify_interp_wasm.sh`, `tests/wasm/node/verify_sim_configs_wasm.sh`, `tests/browser/verify_interp_browser.sh`, `tests/browser/verify_ini_panel_browser.sh` | -| Representative sim-config machine programs | `configs/sim/axis/foam/*`, `configs/sim/axis/geometry/M110`, `xyzc.ini`, `xyzc.ngc`, `configs/sim/axis/external_offsets/M111`, `dyn_demo.ngc`, `dynamic_offsets.ini`, `eoffsets.ngc`, `eoffsets.ini`, `jwp_z.ngc`, `jwp_z.ini`, `opa_demo.ngc`, `opa.ini`, `circles.ngc`, `eoffset.tbl`, and `configs/sim/axis/sim.tbl` | Copy unchanged | The `foam`, `xyzc`, and external-offset sample programs remain LinuxCNC sim-config assets. The standalone boundary only copies INI, tool table, G-code, executable user-M files, and `SUBROUTINE_PATH` files into the native or WASM filesystem, then calls vendored LinuxCNC INI parsing and `Interp::open()`/`read()`/`execute()` through the existing machine-config adapter. The native sim-config harness now prefers `[DISPLAY]OPEN_FILE` when several INI files live beside a program, so each program is judged with its corresponding machine context. The JS SDK `runSimConfigProgram()` is only the host file-staging helper for this boundary: it writes caller-provided text files to the Emscripten filesystem, applies executable bits, and forwards to LinuxCNC-backed C ABI entry points. `M110`/`M111` process execution stays a runtime boundary represented by deterministic `USER_M_COMMAND` canonical events | Vendor byte sync, `tests/native/verify_sim_configs.sh`, `tests/wasm/node/verify_sim_configs_wasm.sh`, `tests/browser/verify_interp_browser.sh` | +| Representative sim-config machine programs | `configs/sim/axis/foam/*`, `configs/sim/axis/geometry/M110`, `xyzc.ini`, `xyzc.ngc`, `configs/sim/axis/external_offsets/M111`, `dyn_demo.ngc`, `dynamic_offsets.ini`, `eoffsets.ngc`, `eoffsets.ini`, `jwp_z.ngc`, `jwp_z.ini`, `opa_demo.ngc`, `opa.ini`, `circles.ngc`, `eoffset.tbl`, and `configs/sim/axis/sim.tbl` | Copy unchanged | The `foam`, `xyzc`, and external-offset sample programs remain LinuxCNC sim-config assets. The standalone boundary only copies INI, tool table, G-code, executable user-M files, `SUBROUTINE_PATH` files, and remap-NGC files into the native or WASM filesystem, then calls vendored LinuxCNC INI parsing and `Interp::open()`/`read()`/`execute()` through the existing machine-config adapter. The native sim-config harness now prefers `[DISPLAY]OPEN_FILE` when several INI files live beside a program, so each program is judged with its corresponding machine context. The JS SDK `planIniFileContextStaging()` is a generic manifest-based file-plan helper, `planSimConfigStaging()` is its `configs/sim` wrapper, and `runSimConfigProgram()` only writes caller-provided text files to the Emscripten filesystem, applies executable bits, and forwards to LinuxCNC-backed C ABI entry points. `M110`/`M111` process execution stays a runtime boundary represented by deterministic `USER_M_COMMAND` canonical events | Vendor byte sync, `tests/native/verify_sim_configs.sh`, `tests/wasm/node/verify_sim_configs_wasm.sh`, `tests/browser/verify_interp_browser.sh` | | Representative `nc_files` examples | `nc_files/3D_Chips.ngc`, `nc_files/arcspiral.ngc`, `nc_files/factorial.ngc`, `nc_files/hole-circle.ngc`, `nc_files/m6demo.ngc` | Copy unchanged | These upstream `linuxcnc/nc_files` examples are copied byte-for-byte into the WASM vendor tree after the native `nc_files` harness classifies the broader directory. Node and browser tests only stage the original `.ngc` text and, for `3D_Chips.ngc`, the minimal INI-declared tool table context required by its upstream `T1 M6` line in the Emscripten filesystem, then call the LinuxCNC-backed `Interp::open()`, `read()`, and `execute()` path through the existing SDK; no G-code, O-word, tool-change, or M-code behavior is implemented in JavaScript | Vendor byte sync, `tests/native/verify_nc_files.sh`, `tests/wasm/node/verify_nc_files_wasm.sh`, `tests/browser/verify_interp_browser.sh`, `tests/host/verify_host_smokes.sh` | | LinuxCNC remap regression fixtures | `tests/remap/duplicate-o-word/*`, `tests/remap/fail/args.0/*`, `tests/remap/fail/args.1/*`, `tests/remap/fail/args.2/*`, `tests/remap/fail/body-ngc/*`, `tests/remap/m30-interaction/*`, `tests/remap/nested-remaps-oword/*`, `tests/remap/posargs.0/*`, `tests/remap/sequencing/*`, selected NGC-only `tests/remap/remap-io/test-ngc.ini` plus `io_*.ngc`, and `src/emc/rs274ngc/interp_remap.cc` plus `interp_o_word.cc` | Copy unchanged | The upstream duplicate O-word, NGC-only remap failure, M30/remap-level interaction, nested O-word remap, positional-argument remap, G/M remap sequencing, and remap-IO NGC subroutine regressions remain LinuxCNC REMAP/O-word/file or MDI execution tests. The standalone boundary only copies the upstream test files into native or WASM filesystems, reads LinuxCNC INI `SUBROUTINE_PATH`, `REMAP`, and `OWORD_NARGS` entries, and calls vendored `Interp::parse_remap()`, `open()`, `read()`, and `execute()` or feeds the upstream remap-IO MDI sequence into vendored `Interp::execute()`; the continue-on-error runner path only mirrors LinuxCNC `rs274 -n 0` test execution and does not implement duplicate-label, O-word, nested remap, M30, positional-argument, failure, sequencing, M62-M68, M66 input, or remap semantics | Vendor byte sync, `linuxcnc_duplicate_oword_remap_harness`, `tests/wasm/node/verify_interp_wasm.sh`, `tests/browser/verify_interp_browser.sh` | -| LinuxCNC interpreter regression fixtures | `tests/interp/do-while-break/*`, `tests/interp/oword-bug315/*`, `tests/interp/oword-bug315-p2/*`, `tests/interp/exists/*`, `tests/interp/return-value/*`, `tests/interp/subs-follow-main/*`, `tests/interp/fractional-linenumbers/*`, `tests/interp/namedparam-bug424/*`, `tests/interp/flowsnake/*`, selected `tests/interp/bad/*.ngc` file-error fixtures, `tests/interp/g33.1/*`, selected `tests/interp/rotation/*` pure interpreter cases, `tests/interp/iniparam/*`, `tests/interp/iniparam-failassign/*`, `tests/interp/m19/*`, `tests/interp/magic_comments/param_format_printing/*`, selected `tests/interp/m98m99/*` pure interpreter cases, `tests/interp/sub-call-from-sub/*`, `tests/interp/sequence-number/*`, `tests/interp/nested-sub-error/*`, `tests/interp/nested-sub-in-file-error/*`, `tests/interp/abort-hot-comment/*`, plus vendored interpreter/O-word sources including `interp_o_word.cc`, `interp_read.cc`, `interp_execute.cc`, `interp_find.cc`, `interp_namedparams.cc`, and `rs274ngc_pre.cc` | Copy unchanged | The upstream do/while/break, O-word bug315, `EXISTS[]`, subroutine return-value, subs-after-main, fractional line-number, named-parameter, recursive O-word flowsnake toolpath, selected file-execution error cases including malformed `EXISTS[]`, rigid-tap `G33.1`, selected rotation/G53/G28 absolute-position and endpoint, INI named-parameter lookup/read-only protection, M19 spindle-orient offset/timeout handling, magic-comment parameter formatting, selected Fanuc `M98/M99` and O-expression call regressions, external-subroutine-call, external-subroutine line-number, nested-subroutine-definition rejection, blocked forward-seek-to-later-numbered-sub, and `(ABORT,...)` hot-comment parameter-expansion regressions remain LinuxCNC interpreter file-execution tests. The standalone boundary only vendors the original upstream assets, copies `*.ngc`, `test.ini`, `test.tbl`, `subs/*.ngc`, and referenced external subroutine `.ngc` files into native or WASM filesystems where applicable, sets the LinuxCNC `INI_FILE_NAME` runtime edge for `_ini[...]`, applies LinuxCNC INI machine settings such as `[RS274NGC]ORIENT_OFFSET`, reads LinuxCNC INI `SUBROUTINE_PATH`, captures LinuxCNC `(PRINT,...)` output through the existing stdout/Emscripten `print` boundary, and calls vendored `Interp::open()`, `read()`, and `execute()`; it does not implement O-word loop, break, subroutine, dynamic call, `M98/M99`, `EXISTS[]`, named-parameter, recursive O-word toolpath generation, rigid tap, absolute-position named-parameter, G28/G53 endpoint, INI-variable, read-only parameter, line-number, spindle-speed, spindle-orient, magic-comment formatting, subroutine lookup, ABORT hot-comment, error, or branch semantics | Vendor byte sync, `linuxcnc_interp_minimal_harness`, `tests/wasm/node/verify_interp_wasm.sh`, `tests/browser/verify_interp_browser.sh` | +| LinuxCNC interpreter regression fixtures | `tests/interp/do-while-break/*`, `tests/interp/oword-bug315/*`, `tests/interp/oword-bug315-p2/*`, `tests/interp/exists/*`, `tests/interp/return-value/*`, `tests/interp/subs-follow-main/*`, `tests/interp/fractional-linenumbers/*`, `tests/interp/cam-nisley/*`, `tests/interp/namedparam-bug424/*`, `tests/interp/flowsnake/*`, selected `tests/interp/good/*.ngc` center-format arc tolerance fixtures, `tests/interp/g6164/*`, `tests/interp/inside-corners/*`, `tests/interp/inverse-time-with-comp/*`, selected `tests/ccomp/*` standalone cutter-compensation fixtures, selected `tests/interp/bad/*.ngc` file-error fixtures, `tests/interp/g33.1/*`, selected `tests/interp/g71-*/*` and `tests/interp/g72-*/*` lathe canned-cycle fixtures, `tests/interp/g76/*`, `tests/interp/g10/*`, `tests/interp/g52/g52-g92-interaction/*`, selected `tests/interp/rotation/*` pure interpreter cases, `tests/interp/iniparam/*`, `tests/interp/iniparam-failassign/*`, `tests/interp/m19/*`, `tests/interp/magic_comments/param_format_printing/*`, selected `tests/interp/m98m99/*` pure interpreter cases, `tests/interp/sub-call-from-sub/*`, `tests/interp/sequence-number/*`, `tests/interp/nested-sub-error/*`, `tests/interp/nested-sub-in-file-error/*`, `tests/interp/oword-unwind/*`, `tests/interp/abort-hot-comment/*`, plus vendored interpreter/O-word sources including `interp_o_word.cc`, `interp_read.cc`, `interp_execute.cc`, `interp_find.cc`, `interp_namedparams.cc`, and `rs274ngc_pre.cc` | Copy unchanged | The upstream do/while/break, O-word bug315, `EXISTS[]`, subroutine return-value, subs-after-main, fractional line-number, storm-door latch cam toolpath with upstream tool-table context, named-parameter, recursive O-word flowsnake toolpath, selected center-format arc tolerance acceptance/rejection cases, `G61`/`G64` path-control and naive-cam tolerance behavior, cutter-compensation concave/convex/tangent geometry, inverse-time feed and cutter-compensation interaction, selected standalone cutter-compensation file execution with upstream tool tables, selected file-execution error cases including canned-cycle A-axis rejection, center-format arc radius mismatch rejection, cutter-compensation arc-exit/gouging rejection, and malformed `EXISTS[]`, rigid-tap `G33.1`, G71/G72 lathe canned-cycle iteration behavior, G76 lathe threading with upstream tool-table context, `G10 L1/L10/L11/L2/L20` tool-table/offset/G5X/G92/rotation regressions, G52/G92 shared-offset interaction, selected rotation/G53/G28 absolute-position and endpoint, INI named-parameter lookup/read-only protection, M19 spindle-orient offset/timeout handling, magic-comment parameter formatting, selected Fanuc `M98/M99` call, loop, missing-P-word, missing-subprogram, mixed Fanuc/RS274NGC sub-style, `DISABLE_FANUC_STYLE_SUB`, main-program O-word termination, and O-expression regressions, external-subroutine-call, external-subroutine line-number, nested-subroutine-definition rejection, blocked forward-seek-to-later-numbered-sub, O-word stack unwind after a subroutine error, `(ABORT,...)` hot-comment parameter-expansion regressions, and INI-declared G92 parameter-file startup persistence remain LinuxCNC interpreter file-execution or initialization tests. The standalone boundary only vendors the original upstream assets, copies `*.ngc`, `test.ini`, `test.tbl`, `subs/*.ngc`, referenced external subroutine `.ngc` files, and staged variable files into native or WASM filesystems where applicable, sets the LinuxCNC `INI_FILE_NAME` runtime edge for `_ini[...]`, applies LinuxCNC INI machine settings such as `[RS274NGC]ORIENT_OFFSET`, loads upstream tool tables through LinuxCNC `tooldata_load()`/`Interp::load_tool_table()`, reads LinuxCNC INI `SUBROUTINE_PATH`, passes `[RS274NGC]PARAMETER_FILE` through vendored `ini_load()`/`Interp::init()`/`restore_parameters()` when the staged variable file exists, captures LinuxCNC `(PRINT,...)` output through the existing stdout/Emscripten `print` boundary, and calls vendored `Interp::open()`, `read()`, and `execute()`; it does not implement O-word loop, break, unwind, subroutine, dynamic call, `M98/M99`, `EXISTS[]`, named-parameter, canned-cycle, cutter-compensation, inverse-time feed, recursive O-word or cam toolpath generation, path-control, naive-cam tolerance, arc tolerance, threading, rigid tap, `G10`, G52/G92 offset behavior, G92 persistence, tool-offset, absolute-position named-parameter, G28/G53 endpoint, INI-variable, read-only parameter, line-number, spindle-speed, spindle-orient, magic-comment formatting, subroutine lookup, ABORT hot-comment, error, or branch semantics | Vendor byte sync, `linuxcnc_interp_minimal_harness`, `tests/wasm/node/verify_interp_wasm.sh`, `tests/browser/verify_interp_browser.sh` | | Additional non-switchable kinematics | `src/emc/kinematics/corexykins.c`, `rotatekins.c`, `rosekins.c`, `maxkins.c`, `lineardeltakins.c`, `lineardeltakins-common.h`, `rotarydeltakins.c`, `rotarydeltakins-common.h`, `scorbot-kins.c`, `tripodkins.c`, `scarakins.c`, `pumakins.c`, `pumakins.h`, `genhexkins.c`, `genhexkins.h`, `genserfuncs.c`, `genserkins.c`, `genserkins.h`, `ugenserkins.c`, `pentakins.c`, `pentakins.h`, `cubic.c` | Copy unchanged | HAL pin allocation, HAL parameter allocation, HAL component lifecycle, RTAPI module metadata, Go math C/C++ linkage, switchkins iterative-forward warmup, and userspace test-program process entry remain standalone runtime edges; forward/inverse behavior remains LinuxCNC source where the module exposes it | Vendor byte sync, per-file source probes, `linuxcnc_corexy_kinematics_probe`, `linuxcnc_rotate_kinematics_probe`, `linuxcnc_rose_kinematics_probe`, `linuxcnc_max_kinematics_probe`, `linuxcnc_lineardelta_kinematics_probe`, `linuxcnc_rotarydelta_kinematics_probe`, `linuxcnc_scorbot_kinematics_probe`, `linuxcnc_tripod_kinematics_probe`, `linuxcnc_scara_kinematics_probe`, `linuxcnc_puma_kinematics_probe`, `linuxcnc_genser_kinematics_probe`, `linuxcnc_genhex_kinematics_probe`, `linuxcnc_pentakins_kinematics_probe` | | Trajectory planner | `src/emc/tp/tp.c`, `tc.c`, `tcq.c`, `spherical_arc.c`, `blendmath.c`, `sp_scurve.c`, `ruckig_wrapper.c`, plus matching `*.h` files | Copy unchanged | Native realtime scheduling and motion process state are replaced by standalone probe setup; the WASM TP probe uses the same deterministic status/config boundary and calls vendored TP APIs through a narrow C ABI | Vendor byte sync, per-file source probes, `linuxcnc_tp_api_probe`, `tests/wasm/node/verify_tp_wasm.sh` | | Ruckig C planner support | Selected `src/emc/tp/cruckig/*.c` and `*.h` files in the manifest | Copy unchanged | Used as LinuxCNC planner support code through vendored TP sources | Vendor byte sync, per-file source probes, `tests/wasm/node/verify_tp_wasm.sh` | @@ -60,7 +60,7 @@ Current validation is intentionally mechanical: | Dependency | LinuxCNC files that expose it | Standalone treatment | | --- | --- | --- | -| Native file IO | `inifile.cc`, `rs274ngc_pre.cc`, `tooldata_common.cc`, parameter file paths, tool table paths | Allowed in native probes; the interpreter WASM C ABI validates parameter-file restore/save by calling vendored `Interp::restore_parameters()` and `Interp::save_parameters()`, including missing required numeric parameter defaulting, and tool-table load/save by calling vendored `tooldata_load()` and `tooldata_save()` against Emscripten filesystem paths; browser OPFS remains a host-side adapter under `runtime/opfs/`, with path ownership in `runtime/opfs/path-model.js`, generic snapshot persistence in `runtime/opfs/snapshot-store.js`, pure-text machine-file persistence in `runtime/opfs/machine-file-store.js`, OPFS-to-WASM parameter-file copying in `runtime/opfs/linuxcnc-parameter-bridge.js`, OPFS-to-WASM tool-table copying in `runtime/opfs/linuxcnc-tool-table-bridge.js`, and grouped INI/parameter/tool-table session loading in `runtime/opfs/linuxcnc-machine-session-bridge.js`, including INI-derived `[RS274NGC]PARAMETER_FILE` and `[EMCIO]TOOL_TABLE` OPFS filename selection through the LinuxCNC-backed INI SDK; explicit host session file-name options take precedence over INI-derived names, missing INI file-name values fall back to host default `linuxcnc.var` and `tool.tbl` paths, and OPFS path validation rejects traversal and nested segments before host storage access | +| Native file IO | `inifile.cc`, `rs274ngc_pre.cc`, `tooldata_common.cc`, parameter file paths, tool table paths | Allowed in native probes; the interpreter WASM C ABI validates direct parameter-file restore/save by calling vendored `Interp::restore_parameters()` and `Interp::save_parameters()`, validates startup G92 parameter persistence by passing staged `[RS274NGC]PARAMETER_FILE` paths through vendored `ini_load()`/`Interp::init()`/`restore_parameters()`, including missing required numeric parameter defaulting and `DISABLE_G92_PERSISTENCE`, and validates tool-table load/save by calling vendored `tooldata_load()` and `tooldata_save()` against Emscripten filesystem paths; browser OPFS remains a host-side adapter under `runtime/opfs/`, with path ownership in `runtime/opfs/path-model.js`, generic snapshot persistence in `runtime/opfs/snapshot-store.js`, pure-text machine-file persistence in `runtime/opfs/machine-file-store.js`, OPFS-to-WASM parameter-file copying in `runtime/opfs/linuxcnc-parameter-bridge.js`, OPFS-to-WASM tool-table copying in `runtime/opfs/linuxcnc-tool-table-bridge.js`, and grouped INI/parameter/tool-table session loading in `runtime/opfs/linuxcnc-machine-session-bridge.js`, including INI-derived `[RS274NGC]PARAMETER_FILE` and `[EMCIO]TOOL_TABLE` OPFS filename selection through the LinuxCNC-backed INI SDK; explicit host session file-name options take precedence over INI-derived names, missing INI file-name values fall back to host default `linuxcnc.var` and `tool.tbl` paths, and OPFS path validation rejects traversal and nested segments before host storage access | | RTAPI | `rtapi_*.h`, TP, posemath, motion headers | Minimal standalone shim in `runtime/core/shims/rtapi.h` | | NML transport | `emc.hh`, motion/NML type headers | Transport is not ported; only the status/type edges needed by vendored compute code are exposed through standalone shims and probes | | HAL runtime | named parameter lookup, kinematics component lifecycle, and runtime status edges | Standalone HAL adapter under `runtime/core/linuxcnc_wrap/` | diff --git a/wasm-port/runtime/core/linuxcnc_wrap/linuxcnc_interp_minimal_harness.cpp b/wasm-port/runtime/core/linuxcnc_wrap/linuxcnc_interp_minimal_harness.cpp index 34156f5..42b3a43 100644 --- a/wasm-port/runtime/core/linuxcnc_wrap/linuxcnc_interp_minimal_harness.cpp +++ b/wasm-port/runtime/core/linuxcnc_wrap/linuxcnc_interp_minimal_harness.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include "canon_event_sink.hh" #include "emc/ini/inifile.hh" @@ -79,7 +80,7 @@ void initialize_minimal_interp(Interp &interp) standalone::reset_external_axis_mask(); interp._setup.length_units = CANON_UNITS_MM; interp._setup.distance_mode = DISTANCE_MODE::ABSOLUTE; - interp._setup.ijk_distance_mode = DISTANCE_MODE::ABSOLUTE; + interp._setup.ijk_distance_mode = DISTANCE_MODE::INCREMENTAL; interp._setup.feed_mode = FEED_MODE::UNITS_PER_MINUTE; interp._setup.plane = CANON_PLANE::XY; interp._setup.motion_mode = G_0; @@ -133,6 +134,46 @@ void apply_ini_search_paths(Interp &interp, const char *ini_path) } } +std::filesystem::path resolve_machine_relative_path(const std::filesystem::path &machine_dir, + const std::string &entry) +{ + std::filesystem::path path(entry); + if (path.is_relative()) { + path = machine_dir / path; + } + return path.lexically_normal(); +} + +int initialize_parameter_file_from_ini(Interp &interp, const char *ini_path) +{ + standalone::reset_parameter_file_name(); + if (!ini_path || ini_path[0] == '\0') { + return INTERP_OK; + } + + linuxcnc::IniFile ini(ini_path); + if (!ini || !ini.findString("PARAMETER_FILE", "RS274NGC")) { + return INTERP_OK; + } + + const int ini_rc = interp.ini_load(ini_path); + if (ini_rc != INTERP_OK) { + return ini_rc; + } + + char parameter_file_name[LINELEN] = {0}; + standalone::get_parameter_file_name(parameter_file_name, sizeof(parameter_file_name)); + const auto resolved = resolve_machine_relative_path( + std::filesystem::path(ini_path).parent_path(), parameter_file_name); + if (access(resolved.c_str(), F_OK) != 0) { + standalone::reset_parameter_file_name(); + return INTERP_OK; + } + standalone::set_parameter_file_name(resolved.c_str()); + + return interp.init(); +} + std::vector load_program(int argc, char **argv) { if (argc <= 1) { @@ -273,7 +314,17 @@ int main(int argc, char **argv) standalone::reset_canon_events(); initialize_minimal_interp(file_interp); apply_ini_search_paths(file_interp, ini_path); - file_open_rc = file_interp.open(argv[arg_offset]); + const int init_rc = initialize_parameter_file_from_ini(file_interp, ini_path); + if (init_rc != INTERP_OK) { + std::cout << "file_init=" << init_rc << "\n"; + if (init_rc > INTERP_MIN_ERROR) { + char error_buf[LINELEN] = {0}; + file_interp.error_text(init_rc, error_buf, sizeof(error_buf)); + std::cout << "file_error_text=" << error_buf << "\n"; + } + } + apply_ini_search_paths(file_interp, ini_path); + file_open_rc = init_rc == INTERP_OK ? file_interp.open(argv[arg_offset]) : init_rc; if (file_open_rc == INTERP_OK) { while (true) { const int file_read_rc = file_interp.read(); diff --git a/wasm-port/runtime/core/linuxcnc_wrap/linuxcnc_interp_minimal_runtime.cpp b/wasm-port/runtime/core/linuxcnc_wrap/linuxcnc_interp_minimal_runtime.cpp index 0626ad7..f65b897 100644 --- a/wasm-port/runtime/core/linuxcnc_wrap/linuxcnc_interp_minimal_runtime.cpp +++ b/wasm-port/runtime/core/linuxcnc_wrap/linuxcnc_interp_minimal_runtime.cpp @@ -22,6 +22,7 @@ namespace standalone { static std::vector g_canon_events; static double g_external_feed_rate = 0.0; static int g_external_axis_mask = Interp::AXIS_MASK_X | Interp::AXIS_MASK_Y | Interp::AXIS_MASK_Z; +static std::string g_parameter_file_name; void reset_canon_events() { @@ -55,6 +56,25 @@ int external_axis_mask() return g_external_axis_mask; } +void reset_parameter_file_name() +{ + g_parameter_file_name.clear(); +} + +void set_parameter_file_name(const char *filename) +{ + g_parameter_file_name = filename ? filename : ""; +} + +void get_parameter_file_name(char *filename, int max_size) +{ + if (!filename || max_size <= 0) { + return; + } + std::snprintf(filename, static_cast(max_size), "%s", + g_parameter_file_name.c_str()); +} + } // namespace standalone bool GET_BLOCK_DELETE(void) { return false; } @@ -489,11 +509,12 @@ double GET_EXTERNAL_ORIGIN_Y() { return 0.0; } double GET_EXTERNAL_ORIGIN_Z() { return 0.0; } void GET_EXTERNAL_PARAMETER_FILE_NAME(char *filename, int max_size) { - if (max_size > 0) { - filename[0] = '\0'; - } + standalone::get_parameter_file_name(filename, max_size); +} +void SET_PARAMETER_FILE_NAME(const char *filename) +{ + standalone::set_parameter_file_name(filename); } -void SET_PARAMETER_FILE_NAME(const char *) {} CANON_PLANE GET_EXTERNAL_PLANE() { return CANON_PLANE::XY; } double GET_EXTERNAL_POSITION_A() { return 0.0; } double GET_EXTERNAL_POSITION_B() { return 0.0; } diff --git a/wasm-port/runtime/core/linuxcnc_wrap/linuxcnc_interp_wasm.cpp b/wasm-port/runtime/core/linuxcnc_wrap/linuxcnc_interp_wasm.cpp index 8edda60..261744d 100644 --- a/wasm-port/runtime/core/linuxcnc_wrap/linuxcnc_interp_wasm.cpp +++ b/wasm-port/runtime/core/linuxcnc_wrap/linuxcnc_interp_wasm.cpp @@ -10,6 +10,7 @@ #include #include +#include #include "canon_event_sink.hh" #include "emc/ini/inifile.hh" @@ -111,7 +112,7 @@ void initialize_minimal_interp(Interp &interp) standalone::reset_external_axis_mask(); interp._setup.length_units = CANON_UNITS_MM; interp._setup.distance_mode = DISTANCE_MODE::ABSOLUTE; - interp._setup.ijk_distance_mode = DISTANCE_MODE::ABSOLUTE; + interp._setup.ijk_distance_mode = DISTANCE_MODE::INCREMENTAL; interp._setup.feed_mode = FEED_MODE::UNITS_PER_MINUTE; interp._setup.plane = CANON_PLANE::XY; interp._setup.motion_mode = G_0; @@ -411,6 +412,17 @@ std::string remap_subroutine_path(const std::string &machine_dir, const std::str return machine_dir + "/" + entry; } +std::string resolve_machine_relative_path(const std::string &machine_dir, const std::string &entry) +{ + if (entry.empty() || entry[0] == '/') { + return entry; + } + if (machine_dir == "/") { + return machine_dir + entry; + } + return machine_dir + "/" + entry; +} + int apply_ini_search_paths(Interp &interp, const linuxcnc::IniFile &ini, const std::string &machine_dir) { standalone::apply_machine_axis_config(interp, ini); @@ -452,6 +464,36 @@ bool apply_ini_search_paths(Interp &interp, const char *ini_path) return true; } +int initialize_parameter_file_from_ini(Interp &interp, const char *ini_path) +{ + standalone::reset_parameter_file_name(); + if (!ini_path || ini_path[0] == '\0') { + return INTERP_OK; + } + + linuxcnc::IniFile ini(ini_path); + if (!ini || !ini.findString("PARAMETER_FILE", "RS274NGC")) { + return INTERP_OK; + } + + const int ini_rc = interp.ini_load(ini_path); + if (ini_rc != INTERP_OK) { + return ini_rc; + } + + char parameter_file_name[LINELEN] = {0}; + standalone::get_parameter_file_name(parameter_file_name, sizeof(parameter_file_name)); + const std::string resolved = + resolve_machine_relative_path(parent_path(ini_path), parameter_file_name); + if (access(resolved.c_str(), F_OK) != 0) { + standalone::reset_parameter_file_name(); + return INTERP_OK; + } + standalone::set_parameter_file_name(resolved.c_str()); + + return interp.init(); +} + bool parse_remaps_from_ini(Interp &interp, std::ostringstream &output, const char *ini_path) { const std::string machine_dir = parent_path(ini_path); @@ -569,6 +611,14 @@ char *run_file_with_ini_internal(const char *path, const char *ini_path, bool co std::ostringstream output; apply_ini_search_paths(interp, ini_path); + const int init_rc = initialize_parameter_file_from_ini(interp, ini_path); + if (init_rc != INTERP_OK) { + output << "file_init=" << init_rc << "\n"; + append_error_text(output, interp, "file_error_text=", init_rc); + append_events_and_state(output, interp); + return copy_result(output.str()); + } + apply_ini_search_paths(interp, ini_path); const int open_rc = interp.open(path); output << "file_open=" << open_rc << "\n"; diff --git a/wasm-port/runtime/core/linuxcnc_wrap/linuxcnc_runtime_state.hh b/wasm-port/runtime/core/linuxcnc_wrap/linuxcnc_runtime_state.hh index 3b53af2..0ae2b43 100644 --- a/wasm-port/runtime/core/linuxcnc_wrap/linuxcnc_runtime_state.hh +++ b/wasm-port/runtime/core/linuxcnc_wrap/linuxcnc_runtime_state.hh @@ -5,5 +5,8 @@ namespace standalone { void reset_external_axis_mask(); void set_external_axis_mask(int axis_mask); int external_axis_mask(); +void reset_parameter_file_name(); +void set_parameter_file_name(const char *filename); +void get_parameter_file_name(char *filename, int max_size); } // namespace standalone diff --git a/wasm-port/runtime/sdk/README.md b/wasm-port/runtime/sdk/README.md index d53bdde..e014d57 100644 --- a/wasm-port/runtime/sdk/README.md +++ b/wasm-port/runtime/sdk/README.md @@ -25,6 +25,7 @@ Use `src/index.js` for stable imports: import { createLinuxCncIniSdk, createLinuxCncInterpSdk, + planIniFileContextStaging, planSimConfigStaging, } from "./src/index.js"; ``` @@ -86,14 +87,22 @@ into the Emscripten filesystem, applies executable bits for user M-code files, then forwards to `runFileWithIni()` by default or to `runFiveAxisRemapFile()` when `executionMode: "fiveAxisRemap"` is explicitly requested. -`planSimConfigStaging()` is the companion file-staging planner for +`planIniFileContextStaging()` is the generic file-staging planner for +LinuxCNC INI-driven interpreter runs. Callers provide vendored source-manifest +text, a source root, an INI file name, INI text, and a target WASM directory. +The planner reads only INI file references and the manifest, then returns the +INI, `[DISPLAY]OPEN_FILE`, `[EMCIO]TOOL_TABLE`, +`[RS274NGC]PARAMETER_FILE`, `[RS274NGC]SUBROUTINE_PATH`, +`[RS274NGC]USER_M_PATH`, and remap-NGC files that should be copied into the +Emscripten filesystem. Each planned file includes `sourceRel`, `wasmPath`, the +legacy alias `path`, and `executable`. It does not implement G-code, tool, +parameter, remap, or user-M semantics. + +`planSimConfigStaging()` is the companion convenience wrapper for representative LinuxCNC `configs/sim` programs. Callers provide the vendored -source manifest text, machine relative path, INI file name, and INI text. The -planner reads only INI file references and the manifest, then returns the INI, -`[DISPLAY]OPEN_FILE`, `[EMCIO]TOOL_TABLE`, `[RS274NGC]PARAMETER_FILE`, -`[RS274NGC]SUBROUTINE_PATH`, `[RS274NGC]USER_M_PATH`, and remap-NGC files that -should be copied into the Emscripten filesystem. It does not implement G-code, -tool, parameter, remap, or user-M semantics. +source manifest text, machine relative path, INI file name, and INI text. It +uses `planIniFileContextStaging()` with a `configs/sim/` source root +and `configs/sim` upward-search boundary. `runFileWithIniContinueOnError()` uses the same LinuxCNC-backed file execution path but keeps the runner loop going after LinuxCNC reports an error, matching diff --git a/wasm-port/runtime/sdk/src/index.js b/wasm-port/runtime/sdk/src/index.js index 9299499..49dbfc8 100644 --- a/wasm-port/runtime/sdk/src/index.js +++ b/wasm-port/runtime/sdk/src/index.js @@ -1,3 +1,6 @@ export { createLinuxCncIniSdk } from "./linuxcnc-ini.js"; export { createLinuxCncInterpSdk } from "./linuxcnc-interp.js"; -export { planSimConfigStaging } from "./sim-config-staging.js"; +export { + planIniFileContextStaging, + planSimConfigStaging, +} from "./sim-config-staging.js"; diff --git a/wasm-port/runtime/sdk/src/sim-config-staging.js b/wasm-port/runtime/sdk/src/sim-config-staging.js index 784c3f2..0944af8 100644 --- a/wasm-port/runtime/sdk/src/sim-config-staging.js +++ b/wasm-port/runtime/sdk/src/sim-config-staging.js @@ -98,14 +98,14 @@ function isSubroutinePath(path) { return path.toLowerCase().endsWith(".ngc"); } -function findUpwardByBasename(manifestSet, sourceDir, fileName) { +function findUpwardByBasename(manifestSet, sourceDir, fileName, searchRootRel) { let current = sourceDir; - while (current.startsWith("configs/sim")) { + while (!searchRootRel || current === searchRootRel || current.startsWith(`${searchRootRel}/`)) { const candidate = normalizeRel(`${current}/${fileName}`); if (manifestSet.has(candidate)) { return candidate; } - if (current === "configs/sim") { + if (!current || current === searchRootRel) { break; } current = dirname(current); @@ -113,7 +113,7 @@ function findUpwardByBasename(manifestSet, sourceDir, fileName) { return null; } -function sourceForReference(manifestSet, sourceDir, reference) { +function sourceForReference(manifestSet, sourceDir, reference, searchRootRel) { if (!reference || reference.startsWith("/")) { return null; } @@ -121,7 +121,7 @@ function sourceForReference(manifestSet, sourceDir, reference) { if (manifestSet.has(sourceRel)) { return sourceRel; } - return findUpwardByBasename(manifestSet, sourceDir, basename(reference)); + return findUpwardByBasename(manifestSet, sourceDir, basename(reference), searchRootRel); } function addPlannedFile(plan, manifestSet, sourceRel, targetRel, options = {}) { @@ -141,12 +141,13 @@ function addPlannedFile(plan, manifestSet, sourceRel, targetRel, options = {}) { plan.set(sourceRel, { sourceRel, + wasmPath: targetPathFor(options.wasmDir, targetRel), path: targetPathFor(options.wasmDir, targetRel), executable, }); } -function addDirectoryFiles(plan, manifestEntries, sourceDir, targetDir, predicate, options) { +function addDirectoryFiles(plan, manifestEntries, manifestSet, sourceDir, targetDir, predicate, options) { const prefix = sourceDir ? `${sourceDir}/` : ""; for (const sourceRel of manifestEntries) { if (!sourceRel.startsWith(prefix)) { @@ -156,7 +157,7 @@ function addDirectoryFiles(plan, manifestEntries, sourceDir, targetDir, predicat if (childRel.includes("/") || !predicate(sourceRel)) { continue; } - addPlannedFile(plan, new Set(manifestEntries), sourceRel, normalizeRel(`${targetDir}/${childRel}`), options); + addPlannedFile(plan, manifestSet, sourceRel, normalizeRel(`${targetDir}/${childRel}`), options); } } @@ -178,18 +179,45 @@ export function planSimConfigStaging({ iniText, programFile = null, wasmDir = `/work/sim/${machineRel}`, +}) { + return planIniFileContextStaging({ + manifestText, + sourceRootRel: `configs/sim/${machineRel}`, + sourceSearchRootRel: "configs/sim", + iniFile, + iniText, + programFile, + wasmDir, + }); +} + +export function planIniFileContextStaging({ + manifestText, + sourceRootRel, + iniFile, + iniText, + programFile = null, + wasmDir, + sourceSearchRootRel = sourceRootRel, }) { const manifestEntries = cleanManifest(manifestText); const manifestSet = new Set(manifestEntries); const iniValues = parseIni(iniText); const plan = new Map(); - const sourceDir = sourceRelFor(machineRel, dirname(iniFile)); - const iniSourceRel = sourceRelFor(machineRel, iniFile); + const normalizedSourceRoot = normalizeRel(sourceRootRel); + const normalizedSearchRoot = normalizeRel(sourceSearchRootRel); + const sourceDir = normalizeRel(`${normalizedSourceRoot}/${dirname(iniFile)}`); + const iniSourceRel = normalizeRel(`${normalizedSourceRoot}/${iniFile}`); const programReference = programFile ?? firstIniValue(iniValues, "DISPLAY", "OPEN_FILE"); addPlannedFile(plan, manifestSet, iniSourceRel, iniFile, { wasmDir, required: true }); if (programReference) { - const programSourceRel = sourceForReference(manifestSet, sourceDir, programReference); + const programSourceRel = sourceForReference( + manifestSet, + sourceDir, + programReference, + normalizedSearchRoot, + ); addPlannedFile(plan, manifestSet, programSourceRel, programReference, { wasmDir, required: true, @@ -204,39 +232,54 @@ export function planSimConfigStaging({ if (!reference) { continue; } - const sourceRel = sourceForReference(manifestSet, sourceDir, reference); + const sourceRel = sourceForReference(manifestSet, sourceDir, reference, normalizedSearchRoot); addPlannedFile(plan, manifestSet, sourceRel, reference, { wasmDir }); } - const subroutineDirs = splitSearchPath( - firstIniValue(iniValues, "RS274NGC", "SUBROUTINE_PATH") ?? "", - ); + const subroutineDirs = allIniValues(iniValues, "RS274NGC", "SUBROUTINE_PATH") + .flatMap(splitSearchPath); for (const dirEntry of subroutineDirs) { if (dirEntry.startsWith("/")) { continue; } const sourceSubdir = normalizeRel(`${sourceDir}/${dirEntry}`); const targetSubdir = normalizeRel(dirEntry); - addDirectoryFiles(plan, manifestEntries, sourceSubdir, targetSubdir, isSubroutinePath, { - wasmDir, - }); + addDirectoryFiles( + plan, + manifestEntries, + manifestSet, + sourceSubdir, + targetSubdir, + isSubroutinePath, + { wasmDir }, + ); } - for (const dirEntry of splitSearchPath(firstIniValue(iniValues, "RS274NGC", "USER_M_PATH") ?? "")) { + for (const dirEntry of allIniValues(iniValues, "RS274NGC", "USER_M_PATH").flatMap(splitSearchPath)) { if (dirEntry.startsWith("/")) { continue; } const sourceUserMDir = normalizeRel(`${sourceDir}/${dirEntry}`); const targetUserMDir = normalizeRel(dirEntry); - addDirectoryFiles(plan, manifestEntries, sourceUserMDir, targetUserMDir, isUserMCodePath, { - wasmDir, - executable: true, - }); + addDirectoryFiles( + plan, + manifestEntries, + manifestSet, + sourceUserMDir, + targetUserMDir, + isUserMCodePath, + { wasmDir, executable: true }, + ); } for (const remapName of remapNgcNames(iniValues)) { for (const dirEntry of subroutineDirs) { - const sourceRel = sourceForReference(manifestSet, normalizeRel(`${sourceDir}/${dirEntry}`), remapName); + const sourceRel = sourceForReference( + manifestSet, + normalizeRel(`${sourceDir}/${dirEntry}`), + remapName, + normalizedSearchRoot, + ); addPlannedFile(plan, manifestSet, sourceRel, normalizeRel(`${dirEntry}/${remapName}`), { wasmDir, }); diff --git a/wasm-port/tests/browser/interp_smoke.html b/wasm-port/tests/browser/interp_smoke.html index 5d68844..29505ec 100644 --- a/wasm-port/tests/browser/interp_smoke.html +++ b/wasm-port/tests/browser/interp_smoke.html @@ -10,6 +10,7 @@ import { createLinuxCncIniSdk, createLinuxCncInterpSdk, + planIniFileContextStaging, planSimConfigStaging, } from "../../runtime/sdk/src/index.js"; import { @@ -95,6 +96,67 @@ } } + function verifyBrowserIniContextStagingPlan() { + const plan = planIniFileContextStaging({ + manifestText: [ + "tests/browser-staging/example/test.ini", + "tests/browser-staging/example/test.ngc", + "tests/browser-staging/example/test.tbl", + "tests/browser-staging/example/startup.var", + "tests/browser-staging/example/subs/helper.ngc", + "tests/browser-staging/example/subs/rm145.ngc", + "tests/browser-staging/example/more-subs/other.ngc", + "tests/browser-staging/example/M145", + ].join("\n"), + sourceRootRel: "tests/browser-staging/example", + iniFile: "test.ini", + iniText: [ + "[DISPLAY]", + "OPEN_FILE = test.ngc", + "[RS274NGC]", + "PARAMETER_FILE = startup.var", + "SUBROUTINE_PATH = subs:more-subs", + "USER_M_PATH = .", + "REMAP = M145 modalgroup=10 ngc=rm145", + "[EMCIO]", + "TOOL_TABLE = test.tbl", + ].join("\n"), + wasmDir: "/work/browser-staging/example", + }); + const actual = plan.files + .map((file) => [file.sourceRel, file.wasmPath, file.executable]) + .sort((a, b) => a[0].localeCompare(b[0])); + const expected = [ + ["tests/browser-staging/example/M145", "/work/browser-staging/example/M145", true], + [ + "tests/browser-staging/example/more-subs/other.ngc", + "/work/browser-staging/example/more-subs/other.ngc", + false, + ], + [ + "tests/browser-staging/example/startup.var", + "/work/browser-staging/example/startup.var", + false, + ], + [ + "tests/browser-staging/example/subs/helper.ngc", + "/work/browser-staging/example/subs/helper.ngc", + false, + ], + [ + "tests/browser-staging/example/subs/rm145.ngc", + "/work/browser-staging/example/subs/rm145.ngc", + false, + ], + ["tests/browser-staging/example/test.ini", "/work/browser-staging/example/test.ini", false], + ["tests/browser-staging/example/test.ngc", "/work/browser-staging/example/test.ngc", false], + ["tests/browser-staging/example/test.tbl", "/work/browser-staging/example/test.tbl", false], + ]; + if (JSON.stringify(actual) !== JSON.stringify(expected)) { + throw new Error(`browser_ini_context_staging_plan: ${JSON.stringify(actual)}`); + } + } + async function writeFetchedTextFile(interp, sourcePath, wasmPath, options = {}) { interp.writeTextFile(wasmPath, await fetchText(sourcePath)); if (options.executable) { @@ -125,6 +187,39 @@ }; } + let sourceManifestText = null; + + async function getSourceManifestText() { + sourceManifestText ??= await fetchText("../../tools/source-manifest.txt"); + return sourceManifestText; + } + + async function stageInterpIniContext(interp, name, programFile = "test.ngc") { + const sourceRootRel = `tests/interp/${name}`; + const iniText = await fetchText( + `../../vendor/linuxcnc/${sourceRootRel}/test.ini`, + ); + const plan = planIniFileContextStaging({ + manifestText: await getSourceManifestText(), + sourceRootRel, + iniFile: "test.ini", + iniText, + programFile, + wasmDir: `/work/browser-interp/${name}`, + }); + + for (const file of plan.files) { + await writeFetchedTextFile( + interp, + `../../vendor/linuxcnc/${file.sourceRel}`, + file.wasmPath, + { executable: file.executable }, + ); + } + + return plan; + } + async function writeFiveAxisTrtMachineFiles(interp) { const sourceDir = "../../vendor/linuxcnc/configs/sim/axis/vismach/5axis/table-rotary-tilting"; @@ -272,6 +367,50 @@ return wasmDir; } + async function writeCcompRegressionFiles(interp, name) { + const sourceDir = `../../vendor/linuxcnc/tests/ccomp/${name}`; + const wasmDir = `/work/browser-ccomp/${name}`; + + await writeFetchedTextFile(interp, `${sourceDir}/test.ngc`, `${wasmDir}/test.ngc`); + await writeFetchedTextFile(interp, `${sourceDir}/test.tbl`, `${wasmDir}/test.tbl`); + interp.writeTextFile( + `${wasmDir}/test.ini`, + [ + "[EMCIO]", + "TOOL_TABLE = test.tbl", + "[TRAJ]", + "COORDINATES = X Y Z A B C U V W", + "", + ].join("\n"), + ); + + return wasmDir; + } + + async function writeG10RegressionFiles(interp, name, files) { + const sourceDir = `../../vendor/linuxcnc/tests/interp/g10/${name}`; + const wasmDir = `/work/browser-interp/g10/${name}`; + + for (const filename of files) { + await writeFetchedTextFile(interp, `${sourceDir}/${filename}`, `${wasmDir}/${filename}`); + } + + if (files.includes("test.tbl")) { + interp.writeTextFile( + `${wasmDir}/test.ini`, + [ + "[EMCIO]", + "TOOL_TABLE = test.tbl", + "[TRAJ]", + "COORDINATES = X Y Z A B C U V W", + "", + ].join("\n"), + ); + } + + return wasmDir; + } + async function runVendorNcFile(interp, filename) { const wasmPath = `/work/browser-nc-files/${filename}`; await writeFetchedTextFile( @@ -332,6 +471,8 @@ } try { + verifyBrowserIniContextStagingPlan(); + const interp = await createLinuxCncInterpSdk({ locateFile(path) { if (path === "linuxcnc_interp.wasm") { @@ -1516,6 +1657,94 @@ ].join("\n"), ); + const crazyPathsPath = await writeInterpRegressionFile( + interp, + "crazy-paths", + "test.ngc", + ); + verifyExpectedOutput( + "browser_interp_crazy_paths", + interp.runFile(crazyPathsPath), + [ + "file_open=0", + "file_read_count=1526", + "file_execute_count=1526", + "file_saw_error=0", + "canon_event=COMMENT: interpreter: cutter radius compensation on right", + "canon_event=COMMENT: interpreter: cutter radius compensation on left", + "canon_event=ARC_FEED line=8 first_end=-99.2047 second_end=-102.892 first_axis=-98.9043 second_axis=-102.097 rotation=-1 axis_end_point=0", + "canon_event=ARC_FEED line=103 first_end=-40.3437 second_end=-103.278 first_axis=-45.0196 second_axis=-102.442 rotation=-1 axis_end_point=0", + "canon_event=STRAIGHT_FEED line=260 x=3.58919 y=30.3694 z=0", + "canon_event=ARC_FEED line=445 first_end=101.539 second_end=44.5843 first_axis=100.896 second_axis=46.212 rotation=1 axis_end_point=0", + "canon_event=STRAIGHT_FEED line=469 x=98.8154 y=102.176 z=0", + "canon_event=PROGRAM_END", + ].join("\n"), + ); + + const camNisleyDir = await writeInterpRegressionFiles(interp, "cam-nisley", [ + "cam.ngc", + "test.tbl", + ]); + interp.writeTextFile( + `${camNisleyDir}/test.ini`, + [ + "[EMCIO]", + "TOOL_TABLE = test.tbl", + "[TRAJ]", + "COORDINATES = X Y Z A B C U V W", + "", + ].join("\n"), + ); + verifyExpectedOutput( + "browser_interp_cam_nisley", + interp.runFileWithIni(`${camNisleyDir}/cam.ngc`, `${camNisleyDir}/test.ini`), + [ + "file_open=0", + "file_read_count=1584", + "file_execute_count=1584", + "file_saw_error=0", + "canon_event=COMMENT: Ed Nisley - Nov 2006 - Mar 2007", + "canon_event=SELECT_TOOL tool=1", + "canon_event=CHANGE_TOOL", + "canon_event=START_SPINDLE_CLOCKWISE spindle=0", + "canon_event=COMMENT: interpreter: cutter radius compensation on right", + "canon_event=ARC_FEED line=223 first_end=1.91351e-18 second_end=-15.1438", + "canon_event=STRAIGHT_TRAVERSE line=241 x=75 y=0 z=75", + "canon_event=MESSAGE: Done!", + "canon_event=PROGRAM_END", + "absent=file_error_text=Requested tool 1 not found in the tool table", + ].join("\n"), + ); + + const camNisleyBareInterp = await createLinuxCncInterpSdk({ + locateFile(path) { + if (path === "linuxcnc_interp.wasm") { + return "../../build/wasm/core/linuxcnc_interp.wasm"; + } + return path; + }, + print() {}, + printErr(message) { + console.error(message); + }, + }); + await writeFetchedTextFile( + camNisleyBareInterp, + "../../vendor/linuxcnc/tests/interp/cam-nisley/cam.ngc", + "/work/browser-interp/cam-nisley-bare/cam.ngc", + ); + verifyExpectedOutput( + "browser_interp_cam_nisley_bare", + camNisleyBareInterp.runFile("/work/browser-interp/cam-nisley-bare/cam.ngc"), + [ + "file_open=0", + "file_read_count=57", + "file_execute_count=57", + "file_saw_error=1", + "file_error_text=Requested tool 1 not found in the tool table", + ].join("\n"), + ); + const namedparamBug424Path = await writeInterpRegressionFile( interp, "namedparam-bug424", @@ -1563,7 +1792,225 @@ ].join("\n"), ); + const insideCornersPath = await writeInterpRegressionFile( + interp, + "inside-corners", + "test.ngc", + ); + verifyExpectedOutput( + "browser_interp_inside_corners", + interp.runFile(insideCornersPath), + [ + "file_open=0", + "file_read_count=397", + "file_execute_count=397", + "file_saw_error=0", + "canon_event=PROGRAM_STOP", + "canon_event=DWELL seconds=3", + "canon_event=SELECT_PLANE plane=1", + "canon_event=SELECT_PLANE plane=3", + "canon_event=COMMENT: interpreter: cutter radius compensation on left", + "canon_event=COMMENT: interpreter: cutter radius compensation on right", + "canon_event=ARC_FEED line=16 first_end=1.2281 second_end=1.3456 first_axis=0.628 second_axis=1.0458 rotation=1 axis_end_point=-0.1", + "canon_event=STRAIGHT_FEED line=14 x=0.701154 y=0.162499 z=-0.1", + "canon_event=ARC_FEED line=74 first_end=0.298564 second_end=1.82077 first_axis=0.3459 second_axis=1.7626 rotation=1 axis_end_point=0", + "canon_event=STRAIGHT_FEED line=107 x=0 y=0 z=1", + "canon_event=PROGRAM_END", + ].join("\n"), + ); + + const inverseTimeWithCompPath = await writeInterpRegressionFile( + interp, + "inverse-time-with-comp", + "inverse.ngc", + ); + verifyExpectedOutput( + "browser_interp_inverse_time_with_comp", + interp.runFile(inverseTimeWithCompPath), + [ + "file_open=0", + "file_read_count=68", + "file_execute_count=68", + "file_saw_error=0", + "canon_event=COMMENT: interpreter: cutter radius compensation on right", + "canon_event=COMMENT: interpreter: cutter radius compensation on left", + "canon_event=COMMENT: interpreter: feed mode set to inverse time", + "canon_event=COMMENT: interpreter: feed mode set to units per minute", + "canon_event=SET_FEED_RATE rate=30", + "canon_event=SET_FEED_RATE rate=20", + "canon_event=SET_FEED_RATE rate=40", + "canon_event=SET_FEED_RATE rate=33", + "canon_event=SET_FEED_RATE rate=10", + "canon_event=SET_FEED_RATE rate=25", + "canon_event=STRAIGHT_FEED line=5 x=1 y=0 z=0", + "canon_event=ARC_FEED line=6 first_end=1.2 second_end=0", + "canon_event=STRAIGHT_FEED line=13 x=0.2 y=3.82918 z=0", + "canon_event=ARC_FEED line=14 first_end=1.22465e-17 second_end=5.2", + "canon_event=ARC_FEED line=14 first_end=1.22465e-17 second_end=4.2", + "canon_event=ARC_FEED line=14 first_end=1.22465e-17 second_end=4.8", + "canon_event=COMMENT: interpreter: cutter radius compensation off", + "canon_event=PROGRAM_END", + ].join("\n"), + ); + + const ccompLatheCompDir = await writeCcompRegressionFiles(interp, "lathe-comp"); + verifyExpectedOutput( + "browser_interp_ccomp_lathe_comp", + interp.runFileWithIni( + `${ccompLatheCompDir}/test.ngc`, + `${ccompLatheCompDir}/test.ini`, + ), + [ + "file_open=0", + "file_read_count=49", + "file_execute_count=49", + "file_saw_error=0", + "canon_event=SELECT_PLANE plane=3", + "canon_event=SELECT_TOOL tool=2", + "canon_event=COMMENT: interpreter: cutter radius compensation on left", + "canon_event=SELECT_TOOL tool=7", + "canon_event=COMMENT: interpreter: cutter radius compensation on right", + "canon_event=PROGRAM_END", + ].join("\n"), + ); + + const ccompMillG90G91G92Dir = await writeCcompRegressionFiles( + interp, + "mill-g90g91g92", + ); + verifyExpectedOutput( + "browser_interp_ccomp_mill_g90g91g92", + interp.runFileWithIni( + `${ccompMillG90G91G92Dir}/test.ngc`, + `${ccompMillG90G91G92Dir}/test.ini`, + ), + [ + "file_open=0", + "file_read_count=28", + "file_execute_count=28", + "file_saw_error=0", + "canon_event=SELECT_TOOL tool=3", + "canon_event=SET_G92_OFFSET x=0 y=0 z=0.5", + "canon_event=COMMENT: interpreter: cutter radius compensation on left", + "canon_event=COMMENT: interpreter: cutter radius compensation off", + "canon_event=PROGRAM_END", + ].join("\n"), + ); + + const ccompMillLineArcEntryDir = await writeCcompRegressionFiles( + interp, + "mill-line-arc-entry", + ); + verifyExpectedOutput( + "browser_interp_ccomp_mill_line_arc_entry", + interp.runFileWithIni( + `${ccompMillLineArcEntryDir}/test.ngc`, + `${ccompMillLineArcEntryDir}/test.ini`, + ), + [ + "file_open=0", + "file_read_count=33", + "file_execute_count=33", + "file_saw_error=0", + "canon_event=SELECT_TOOL tool=4", + "canon_event=COMMENT: interpreter: cutter radius compensation on left", + "canon_event=ARC_FEED line=23 first_end=2 second_end=3.01969", + "canon_event=COMMENT: interpreter: cutter radius compensation off", + "canon_event=PROGRAM_END", + ].join("\n"), + ); + + const ccompMillZchangesDir = await writeCcompRegressionFiles(interp, "mill-zchanges"); + verifyExpectedOutput( + "browser_interp_ccomp_mill_zchanges", + interp.runFileWithIni( + `${ccompMillZchangesDir}/test.ngc`, + `${ccompMillZchangesDir}/test.ini`, + ), + [ + "file_open=0", + "file_read_count=81", + "file_execute_count=81", + "file_saw_error=0", + "canon_event=COMMENT: interpreter: cutter radius compensation on left", + "canon_event=ARC_FEED line=15 first_end=0.5 second_end=0.752461", + "canon_event=STRAIGHT_FEED line=54 x=0.49826 y=-0.24826 z=0", + "canon_event=COMMENT: interpreter: cutter radius compensation off", + "canon_event=PROGRAM_END", + ].join("\n"), + ); + for (const badFixture of [ + { + name: "a_in_canned_cycle", + file: "a-in-canned-cycle.ngc", + readCount: 3, + executeCount: 2, + errorText: "Cannot put an a in canned cycle", + }, + { + name: "a_in_canned_cycle2", + file: "a-in-canned-cycle2.ngc", + readCount: 2, + executeCount: 1, + errorText: "Cannot put an a in canned cycle", + }, + { + name: "bad_arc_big_imperial_center_format", + file: "bad-arc.big.imperial.center-format.ngc", + readCount: 6, + executeCount: 6, + errorText: "Radius to end of arc differs from radius to start: start=(X0.0000,Y0.0000) center=(X300.1428,Y0.0000) end=(X600.0000,Y0.0000) r1=300.1428 r2=299.8572 abs_err=0.2857 rel_err=0.0952%", + }, + { + name: "bad_arc_big_metric_center_format", + file: "bad-arc.big.metric.center-format.ngc", + readCount: 6, + executeCount: 6, + errorText: "Radius to end of arc differs from radius to start: start=(X0.0000,Y0.0000) center=(X3001.4284,Y0.0000) end=(X6000.0000,Y0.0000) r1=3001.4284 r2=2998.5716 abs_err=2.857 rel_err=0.0952%", + }, + { + name: "bad_arc_medium_imperial_center_format", + file: "bad-arc.medium.imperial.center-format.ngc", + readCount: 6, + executeCount: 6, + errorText: "Radius to end of arc differs from radius to start: start=(X0.0000,Y0.0000) center=(X99.8500,Y0.0000) end=(X200.0000,Y0.0000) r1=99.8500 r2=100.1500 abs_err=0.3 rel_err=0.2996%", + }, + { + name: "bad_arc_medium_metric_center_format", + file: "bad-arc.medium.metric.center-format.ngc", + readCount: 6, + executeCount: 6, + errorText: "Radius to end of arc differs from radius to start: start=(X0.0000,Y0.0000) center=(X998.5000,Y0.0000) end=(X2000.0000,Y0.0000) r1=998.5000 r2=1001.5000 abs_err=3 rel_err=0.2996%", + }, + { + name: "bad_arc_small_imperial_center_format", + file: "bad-arc.small.imperial.center-format.ngc", + readCount: 6, + executeCount: 6, + errorText: "Radius to end of arc differs from radius to start: start=(X0.0000,Y0.0000) center=(X2.4986,Y0.0000) end=(X5.0000,Y0.0000) r1=2.4986 r2=2.5014 abs_err=0.002857 rel_err=0.1142%", + }, + { + name: "bad_arc_small_metric_center_format", + file: "bad-arc.small.metric.center-format.ngc", + readCount: 6, + executeCount: 6, + errorText: "Radius to end of arc differs from radius to start: start=(X0.0000,Y0.0000) center=(X24.9857,Y0.0000) end=(X50.0000,Y0.0000) r1=24.9857 r2=25.0143 abs_err=0.02857 rel_err=0.1142%", + }, + { + name: "ccomp_arcexit", + file: "ccomp-arcexit.ngc", + readCount: 7, + executeCount: 7, + errorText: "The move just after exiting cutter compensation mode must be straight, not an arc", + }, + { + name: "ccomp_gouging", + file: "ccomp-gouging.ngc", + readCount: 7, + executeCount: 7, + errorText: "Straight feed in concave corner cannot be reached by the tool without gouging", + }, { name: "exists_1", file: "exists-1.ngc", @@ -1676,6 +2123,67 @@ ].join("\n"), ); + for (const goodArcFixture of [ + { + name: "big_imperial_center_format", + file: "good-arc.big.imperial.center-format.ngc", + x: 600, + firstEnd: 600, + firstAxis: 300.14, + }, + { + name: "big_metric_center_format", + file: "good-arc.big.metric.center-format.ngc", + x: 6000, + firstEnd: 6000, + firstAxis: 3001.4, + }, + { + name: "medium_imperial_center_format", + file: "good-arc.medium.imperial.center-format.ngc", + x: 200, + firstEnd: 200, + firstAxis: 99.95, + }, + { + name: "medium_metric_center_format", + file: "good-arc.medium.metric.center-format.ngc", + x: 2000, + firstEnd: 2000, + firstAxis: 999.5, + }, + { + name: "small_imperial_center_format", + file: "good-arc.small.imperial.center-format.ngc", + x: 5, + firstEnd: 5, + firstAxis: 2.4986, + }, + { + name: "small_metric_center_format", + file: "good-arc.small.metric.center-format.ngc", + x: 50, + firstEnd: 50, + firstAxis: 24.986, + }, + ]) { + const goodArcPath = await writeInterpRegressionFile(interp, "good", goodArcFixture.file); + verifyExpectedOutput( + `browser_interp_good_arc_${goodArcFixture.name}`, + interp.runFile(goodArcPath), + [ + "file_open=0", + "file_read_count=5", + "file_execute_count=5", + "file_saw_error=0", + `run_step phase=execute step=4 rc=0 line=4 x=${goodArcFixture.x} y=0`, + `canon_event=ARC_FEED line=4 first_end=${goodArcFixture.firstEnd} second_end=0 first_axis=${goodArcFixture.firstAxis} second_axis=0 rotation=-1 axis_end_point=0`, + "canon_event=PROGRAM_END", + "absent=Radius to end of arc differs from radius to start", + ].join("\n"), + ); + } + const g6164Path = await writeInterpRegressionFile(interp, "g6164", "test.ngc"); verifyExpectedOutput( "browser_interp_g6164", @@ -1695,6 +2203,147 @@ ].join("\n"), ); + for (const g72Fixture of [ + { + name: "facing", + dir: "g72-facing", + file: "g72-iterations-present.ngc", + finalZ: "-39.999", + }, + { + name: "missing_iteration", + dir: "g72-missing-iteration", + file: "g72-iterations-missing.ngc", + finalZ: "-40", + }, + ]) { + const g72Path = await writeInterpRegressionFile(interp, g72Fixture.dir, g72Fixture.file); + verifyExpectedOutput( + `browser_interp_g72_${g72Fixture.name}`, + interp.runFile(g72Path), + [ + "file_open=0", + "file_read_count=10", + "file_execute_count=10", + "file_saw_error=0", + "run_step phase=execute step=8 rc=0 line=8 x=100 y=0 z=0", + "canon_event=STRAIGHT_TRAVERSE line=8 x=50 y=0 z=0", + "canon_event=STRAIGHT_FEED line=-1 x=100 y=0 z=-39", + `canon_event=STRAIGHT_FEED line=-1 x=100 y=0 z=${g72Fixture.finalZ}`, + "canon_event=PROGRAM_END", + "absent=program seem to be stuck", + ].join("\n"), + ); + } + + for (const g71Fixture of [ + { + name: "endless_loop", + dir: "g71-endless-loop", + file: "g71-endless-loop.ngc", + readCount: 19, + executeCount: 19, + keyEvents: [ + "canon_event=STRAIGHT_TRAVERSE line=17 x=15 y=0 z=0", + "canon_event=ARC_FEED line=-1 first_end=-14.04 second_end=10", + "canon_event=STRAIGHT_FEED line=-1 x=15 y=0 z=-21.96", + ], + }, + { + name: "endless_loop2", + dir: "g71-endless-loop2", + file: "g71-endless-loop2.ngc", + readCount: 12, + executeCount: 12, + keyEvents: [ + "canon_event=START_SPINDLE_CLOCKWISE spindle=0", + "canon_event=STRAIGHT_TRAVERSE line=9 x=168 y=0 z=0", + "canon_event=STRAIGHT_FEED line=-1 x=170 y=0 z=-415", + "canon_event=STRAIGHT_TRAVERSE line=11 x=300 y=0 z=10", + ], + }, + { + name: "endless_loop_2", + dir: "g71-endless-loop_2", + file: "g71-endless-loop_2.ngc", + readCount: 40, + executeCount: 40, + keyEvents: [ + "canon_event=COMMENT: interpreter: Lathe diameter mode changed to diameter", + "canon_event=STRAIGHT_TRAVERSE line=31 x=10 y=0 z=2.8", + "canon_event=ARC_FEED line=-1 first_end=-27 second_end=10.113", + "canon_event=COMMENT: interpreter: cutter radius compensation off", + "canon_event=STRAIGHT_TRAVERSE line=38 x=12.5 y=0 z=-25", + ], + }, + { + name: "with_g70", + dir: "g71-with-g70", + file: "g71-with-g70.ngc", + readCount: 32, + executeCount: 32, + keyEvents: [ + "canon_event=ARC_FEED line=-1 first_end=1.62661 second_end=1.78761", + "canon_event=ARC_FEED line=-1 first_end=-36.1 second_end=13", + "canon_event=STRAIGHT_FEED line=-1 x=15 y=0 z=-38.1", + ], + }, + ]) { + const g71Path = await writeInterpRegressionFile(interp, g71Fixture.dir, g71Fixture.file); + verifyExpectedOutput( + `browser_interp_g71_${g71Fixture.name}`, + interp.runFile(g71Path), + [ + "file_open=0", + `file_read_count=${g71Fixture.readCount}`, + `file_execute_count=${g71Fixture.executeCount}`, + "file_saw_error=0", + ...g71Fixture.keyEvents, + "canon_event=PROGRAM_END", + "absent=program seem to be stuck", + "absent=killing", + ].join("\n"), + ); + } + + const g76Dir = await writeInterpRegressionFiles(interp, "g76", [ + "g76only.ngc", + "test.tbl", + ]); + interp.writeTextFile( + `${g76Dir}/test.ini`, + [ + "[EMCIO]", + "TOOL_TABLE = test.tbl", + "[TRAJ]", + "COORDINATES = X Y Z A B C U V W", + "", + ].join("\n"), + ); + verifyExpectedOutput( + "browser_interp_g76", + interp.runFileWithIni(`${g76Dir}/g76only.ngc`, `${g76Dir}/test.ini`), + [ + "file_open=0", + "file_read_count=30", + "file_execute_count=30", + "file_saw_error=0", + "run_step phase=execute step=6 rc=2 line=6", + "statement_uri=t4%20m6", + "run_step phase=execute step=25 rc=0 line=25 x=0.2 y=0 z=-0.5", + "canon_event=SELECT_TOOL tool=4", + "canon_event=CHANGE_TOOL", + "canon_event=START_SPINDLE_CLOCKWISE spindle=0", + "canon_event=START_SPEED_FEED_SYNCH spindle=0 feed_per_revolution=0.05 velocity_mode=0", + "canon_event=START_SPEED_FEED_SYNCH spindle=0 feed_per_revolution=0.0672681 velocity_mode=0", + "canon_event=STOP_SPEED_FEED_SYNCH", + "canon_event=STRAIGHT_TRAVERSE line=25 x=0.237 y=0 z=0.195474", + "canon_event=STRAIGHT_TRAVERSE line=26 x=0.5 y=0 z=-0.5", + "canon_event=PROGRAM_END", + "absent=Requested tool 4 not found", + ].join("\n"), + ); + const rotationAbsPtsPath = await writeInterpRegressionFile( interp, "rotation/abs-pts", @@ -1772,19 +2421,12 @@ throw new Error("browser_interp_rotation_g53: rotated G53 endpoint"); } - const iniparamDir = await writeInterpRegressionFiles( - interp, - "iniparam", - [ - "test.ini", - "test.ngc", - ], - ); + const iniparamPlan = await stageInterpIniContext(interp, "iniparam"); verifyExpectedOutput( "browser_interp_iniparam", interp.runFileWithIniContinueOnError( - `${iniparamDir}/test.ngc`, - `${iniparamDir}/test.ini`, + iniparamPlan.programPath, + iniparamPlan.iniPath, ), [ "file_open=0", @@ -1802,19 +2444,15 @@ ].join("\n"), ); - const iniparamFailassignDir = await writeInterpRegressionFiles( + const iniparamFailassignPlan = await stageInterpIniContext( interp, "iniparam-failassign", - [ - "test.ini", - "test.ngc", - ], ); verifyExpectedOutput( "browser_interp_iniparam_failassign", interp.runFileWithIni( - `${iniparamFailassignDir}/test.ngc`, - `${iniparamFailassignDir}/test.ini`, + iniparamFailassignPlan.programPath, + iniparamFailassignPlan.iniPath, ), [ "file_open=0", @@ -1827,21 +2465,12 @@ ].join("\n"), ); - const subCallFromSubDir = await writeInterpRegressionFiles( - interp, - "sub-call-from-sub", - [ - "test.ini", - "test.ngc", - "subs/caller.ngc", - "subs/helper.ngc", - ], - ); + const subCallFromSubPlan = await stageInterpIniContext(interp, "sub-call-from-sub"); verifyExpectedOutput( "browser_interp_sub_call_from_sub", interp.runFileWithIni( - `${subCallFromSubDir}/test.ngc`, - `${subCallFromSubDir}/test.ini`, + subCallFromSubPlan.programPath, + subCallFromSubPlan.iniPath, ), [ "file_open=0", @@ -1852,20 +2481,12 @@ ].join("\n"), ); - const sequenceNumberDir = await writeInterpRegressionFiles( - interp, - "sequence-number", - [ - "test.ini", - "test.ngc", - "rm400.ngc", - ], - ); + const sequenceNumberPlan = await stageInterpIniContext(interp, "sequence-number"); verifyExpectedOutput( "browser_interp_sequence_number", interp.runFileWithIni( - `${sequenceNumberDir}/test.ngc`, - `${sequenceNumberDir}/test.ini`, + sequenceNumberPlan.programPath, + sequenceNumberPlan.iniPath, ), [ "file_open=0", @@ -1878,20 +2499,12 @@ ].join("\n"), ); - const nestedSubErrorDir = await writeInterpRegressionFiles( - interp, - "nested-sub-error", - [ - "test.ini", - "test.ngc", - "subs/nested.ngc", - ], - ); + const nestedSubErrorPlan = await stageInterpIniContext(interp, "nested-sub-error"); verifyExpectedOutput( "browser_interp_nested_sub_error", interp.runFileWithIni( - `${nestedSubErrorDir}/test.ngc`, - `${nestedSubErrorDir}/test.ini`, + nestedSubErrorPlan.programPath, + nestedSubErrorPlan.iniPath, ), [ "file_open=0", @@ -1904,20 +2517,15 @@ ].join("\n"), ); - const nestedSubInFileErrorDir = await writeInterpRegressionFiles( + const nestedSubInFileErrorPlan = await stageInterpIniContext( interp, "nested-sub-in-file-error", - [ - "test.ini", - "test.ngc", - "subs/sequential.ngc", - ], ); verifyExpectedOutput( "browser_interp_nested_sub_in_file_error", interp.runFileWithIni( - `${nestedSubInFileErrorDir}/test.ngc`, - `${nestedSubInFileErrorDir}/test.ini`, + nestedSubInFileErrorPlan.programPath, + nestedSubInFileErrorPlan.iniPath, ), [ "file_open=0", @@ -1931,20 +2539,12 @@ ].join("\n"), ); - const owordUnwindDir = await writeInterpRegressionFiles( - interp, - "oword-unwind", - [ - "test.ini", - "test.ngc", - "fail.ngc", - ], - ); + const owordUnwindPlan = await stageInterpIniContext(interp, "oword-unwind"); verifyExpectedOutput( "browser_interp_oword_unwind", interp.runFileWithIniContinueOnError( - `${owordUnwindDir}/test.ngc`, - `${owordUnwindDir}/test.ini`, + owordUnwindPlan.programPath, + owordUnwindPlan.iniPath, ), [ "file_open=0", @@ -1959,19 +2559,12 @@ ].join("\n"), ); - const abortHotCommentDir = await writeInterpRegressionFiles( - interp, - "abort-hot-comment", - [ - "test.ini", - "test.ngc", - ], - ); + const abortHotCommentPlan = await stageInterpIniContext(interp, "abort-hot-comment"); verifyExpectedOutput( "browser_interp_abort_hot_comment", interp.runFileWithIniContinueOnError( - `${abortHotCommentDir}/test.ngc`, - `${abortHotCommentDir}/test.ini`, + abortHotCommentPlan.programPath, + abortHotCommentPlan.iniPath, ), [ "file_open=0", @@ -1983,17 +2576,10 @@ ].join("\n"), ); - const m19Dir = await writeInterpRegressionFiles( - interp, - "m19", - [ - "test.ini", - "test.ngc", - ], - ); + const m19Plan = await stageInterpIniContext(interp, "m19"); verifyExpectedOutput( "browser_interp_m19", - interp.runFileWithIni(`${m19Dir}/test.ngc`, `${m19Dir}/test.ini`), + interp.runFileWithIni(m19Plan.programPath, m19Plan.iniPath), [ "file_open=0", "file_read_count=8", @@ -2083,6 +2669,155 @@ ].join("\n"), ); + const m98m99M98NoPWordPath = await writeInterpRegressionFile( + interp, + "m98m99/03-error-M98-no-P-word", + "test.ngc", + ); + verifyExpectedOutput( + "browser_interp_m98m99_03_error_m98_no_p_word", + interp.runFile(m98m99M98NoPWordPath), + [ + "file_open=0", + "file_read_count=3", + "file_execute_count=2", + "file_saw_error=1", + "file_error_text=Found 'm98' code with no P-word", + "run_step phase=read step=3 rc=5 line=4", + "statement_uri=M98", + "canon_event=COMMENT: Fanuc M98 requires P-word ", + "absent=canon_event=PROGRAM_END", + ].join("\n"), + ); + + const m98m99M98ButNoSubPath = await writeInterpRegressionFile( + interp, + "m98m99/04-M98-but-no-sub", + "test.ngc", + ); + verifyExpectedOutput( + "browser_interp_m98m99_04_m98_but_no_sub", + interp.runFile(m98m99M98ButNoSubPath), + [ + "file_open=0", + "file_read_count=5", + "file_execute_count=4", + "file_saw_error=1", + "file_error_text=Failed to find sub 'O1' before EOF", + "run_step phase=read step=5 rc=5 line=4", + "statement_uri=%25", + "canon_event=COMMENT: M98 call non-existant sub ", + "absent=canon_event=PROGRAM_END", + ].join("\n"), + ); + + const m98m99M98LoopsPath = await writeInterpRegressionFile( + interp, + "m98m99/05-M98-loops", + "test.ngc", + ); + const m98m99M98LoopsRun = runWithCapturedPrints(() => + interp.runFile(m98m99M98LoopsPath), + ); + verifyExpectedOutput( + "browser_interp_m98m99_05_m98_loops", + m98m99M98LoopsRun.output, + [ + "file_open=0", + "file_read_count=102", + "file_execute_count=102", + "file_saw_error=0", + "canon_event=COMMENT: A simple O sub example ", + "canon_event=PROGRAM_END", + ].join("\n"), + ); + verifyExpectedOutput( + "browser_interp_m98m99_05_m98_loops_prints", + m98m99M98LoopsRun.prints, + [ + "X SUB O1 PARAM1 = 10.000000", + "X MAIN 10LOOP PARAM1 = 10.000000", + "X MAIN 0LOOP PARAM1 = 0.000000", + "X MAIN 2LOOP PARAM1 = 2.000000", + ].join("\n"), + ); + + for (const mixedSubStyleFixture of [ + { + name: "called_with_o_call", + file: "O...-called-with-O..._call.ngc", + readCount: 5, + executeCount: 5, + errorText: "Fanuc 'O....' subroutine must be called with 'M98'", + errorStep: "run_step phase=execute step=5 rc=5 line=4", + statementUri: "statement_uri=O1", + comment: "canon_event=COMMENT: Fanuc 'O...' sub must be called with M98 ", + }, + { + name: "ended_with_o_endsub", + file: "O...-ended-with-O..._endsub.ngc", + readCount: 7, + executeCount: 7, + errorText: "Fanuc 'O....' subroutine definition must end with 'M99'", + errorStep: "run_step phase=execute step=7 rc=5 line=4", + statementUri: "statement_uri=O1%20endsub", + comment: "canon_event=COMMENT: Fanuc 'O...' sub must end with M99 ", + print: "X FANUC", + }, + { + name: "sub_called_with_m98", + file: "O...-sub-called-with-M98.ngc", + readCount: 5, + executeCount: 5, + errorText: "'O.... sub' subroutine must be called with 'O.... call'", + errorStep: "run_step phase=execute step=5 rc=5 line=4", + statementUri: "statement_uri=O1%20sub", + comment: "canon_event=COMMENT: RS274NGC 'O...' sub must not be called with M98 ", + }, + { + name: "sub_ended_with_m99", + file: "O...-sub-ended-with-M99.ngc", + readCount: 7, + executeCount: 7, + errorText: "'O.... endsub' or 'O.... return' must follow 'O.... sub' subroutine definition", + errorStep: "run_step phase=execute step=7 rc=5 line=4", + statementUri: "statement_uri=M99", + comment: "canon_event=COMMENT: RS274NGC 'O... sub' sub must not end with M99 ", + print: "X FANUC", + }, + ]) { + const mixedSubStylePath = await writeInterpRegressionFile( + interp, + "m98m99/06-error-mixed-sub-styles", + mixedSubStyleFixture.file, + ); + const mixedSubStyleRun = runWithCapturedPrints(() => + interp.runFile(mixedSubStylePath), + ); + verifyExpectedOutput( + `browser_interp_m98m99_06_${mixedSubStyleFixture.name}`, + mixedSubStyleRun.output, + [ + "file_open=0", + `file_read_count=${mixedSubStyleFixture.readCount}`, + `file_execute_count=${mixedSubStyleFixture.executeCount}`, + "file_saw_error=1", + `file_error_text=${mixedSubStyleFixture.errorText}`, + mixedSubStyleFixture.errorStep, + mixedSubStyleFixture.statementUri, + mixedSubStyleFixture.comment, + "absent=canon_event=PROGRAM_END", + ].join("\n"), + ); + if (mixedSubStyleFixture.print) { + verifyExpectedOutput( + `browser_interp_m98m99_06_${mixedSubStyleFixture.name}_prints`, + mixedSubStyleRun.prints, + mixedSubStyleFixture.print, + ); + } + } + const m98m99NestedSubsPath = await writeInterpRegressionFile( interp, "m98m99/07-nested-subs", @@ -2138,6 +2873,97 @@ "X IN O1", ); + const m98m99DisableFanucSubsDir = await writeInterpRegressionFiles( + interp, + "m98m99/09-disable-fanuc-subs", + [ + "test-fanuc.ini", + "test-no-fanuc.ini", + "test-fanuc.ngc", + "test-rs274ngc.ngc", + ], + ); + for (const disableFanucCase of [ + { + name: "fanuc_ini", + program: "test-fanuc.ngc", + ini: "test-fanuc.ini", + readCount: 22, + keyTraverse: "canon_event=STRAIGHT_TRAVERSE line=10 x=3 y=0 z=0.25", + keyFeed: "canon_event=STRAIGHT_FEED line=11 x=3 y=0 z=-1", + }, + { + name: "rs274ngc_ini", + program: "test-rs274ngc.ngc", + ini: "test-fanuc.ini", + readCount: 15, + keyTraverse: "canon_event=STRAIGHT_TRAVERSE line=5 x=1 y=0 z=0.25", + keyFeed: "canon_event=STRAIGHT_FEED line=6 x=1 y=0 z=-1", + }, + { + name: "rs274ngc_no_fanuc", + program: "test-rs274ngc.ngc", + ini: "test-no-fanuc.ini", + readCount: 15, + keyTraverse: "canon_event=STRAIGHT_TRAVERSE line=5 x=1 y=0 z=0.25", + keyFeed: "canon_event=STRAIGHT_FEED line=6 x=1 y=0 z=-1", + }, + { + name: "fanuc_default", + program: "test-fanuc.ngc", + readCount: 22, + keyTraverse: "canon_event=STRAIGHT_TRAVERSE line=10 x=3 y=0 z=0.25", + keyFeed: "canon_event=STRAIGHT_FEED line=11 x=3 y=0 z=-1", + }, + { + name: "rs274ngc_default", + program: "test-rs274ngc.ngc", + readCount: 15, + keyTraverse: "canon_event=STRAIGHT_TRAVERSE line=5 x=1 y=0 z=0.25", + keyFeed: "canon_event=STRAIGHT_FEED line=6 x=1 y=0 z=-1", + }, + ]) { + const output = disableFanucCase.ini + ? interp.runFileWithIni( + `${m98m99DisableFanucSubsDir}/${disableFanucCase.program}`, + `${m98m99DisableFanucSubsDir}/${disableFanucCase.ini}`, + ) + : interp.runFile(`${m98m99DisableFanucSubsDir}/${disableFanucCase.program}`); + verifyExpectedOutput( + `browser_interp_m98m99_09_${disableFanucCase.name}`, + output, + [ + "file_open=0", + `file_read_count=${disableFanucCase.readCount}`, + `file_execute_count=${disableFanucCase.readCount}`, + "file_saw_error=0", + "canon_event=COMMENT: A simple O sub example ", + disableFanucCase.keyTraverse, + disableFanucCase.keyFeed, + "canon_event=PROGRAM_END", + "absent=file_error_text=DISABLE_FANUC_STYLE_SUB", + ].join("\n"), + ); + } + verifyExpectedOutput( + "browser_interp_m98m99_09_fanuc_no_fanuc", + interp.runFileWithIni( + `${m98m99DisableFanucSubsDir}/test-fanuc.ngc`, + `${m98m99DisableFanucSubsDir}/test-no-fanuc.ini`, + ), + [ + "file_open=0", + "file_read_count=5", + "file_execute_count=4", + "file_saw_error=1", + "file_error_text=DISABLE_FANUC_STYLE_SUB set in INI file, but found m98", + "run_step phase=read step=5 rc=5 line=6", + "statement_uri=M98%20P1%20L3", + "canon_event=STRAIGHT_TRAVERSE line=5 x=0 y=0 z=0.25", + "absent=canon_event=PROGRAM_END", + ].join("\n"), + ); + const m98m99M98P001Path = await writeInterpRegressionFile( interp, "m98m99/10-M98-P001", @@ -2167,6 +2993,112 @@ ].join("\n"), ); + const m98m99MainProgramOwordDir = await writeInterpRegressionFiles( + interp, + "m98m99/11-main-program-oword", + [ + "test-legal-end-main-with-m2.ngc", + "test-legal-end-main-with-m02.ngc", + "test-legal-end-main-with-m30.ngc", + "test-legal-end-main-with-percent.ngc", + "test-illegal-end-main-with-eof.ngc", + "test-illegal-no-m30-before-osub.ngc", + "test-illegal-sub-after-percent.ngc", + ], + ); + for (const mainProgramFixture of [ + { + name: "legal_m2", + file: "test-legal-end-main-with-m2.ngc", + readCount: 17, + firstLine: 4, + subLine: 13, + endEvent: "canon_event=PROGRAM_END", + }, + { + name: "legal_m02", + file: "test-legal-end-main-with-m02.ngc", + readCount: 17, + firstLine: 4, + subLine: 13, + endEvent: "canon_event=PROGRAM_END", + }, + { + name: "legal_m30", + file: "test-legal-end-main-with-m30.ngc", + readCount: 17, + firstLine: 4, + subLine: 13, + endEvent: "canon_event=PROGRAM_END", + }, + { + name: "legal_percent", + file: "test-legal-end-main-with-percent.ngc", + readCount: 20, + firstLine: 11, + subLine: 6, + endEvent: "canon_event=FINISH", + }, + ]) { + verifyExpectedOutput( + `browser_interp_m98m99_11_${mainProgramFixture.name}`, + interp.runFile(`${m98m99MainProgramOwordDir}/${mainProgramFixture.file}`), + [ + "file_open=0", + `file_read_count=${mainProgramFixture.readCount}`, + `file_execute_count=${mainProgramFixture.readCount}`, + "file_saw_error=0", + "canon_event=COMMENT: legal example", + `canon_event=STRAIGHT_TRAVERSE line=${mainProgramFixture.firstLine} x=1 y=2 z=0`, + `canon_event=STRAIGHT_TRAVERSE line=${mainProgramFixture.subLine} x=1 y=2 z=3`, + mainProgramFixture.endEvent, + "absent=should never get here", + ].join("\n"), + ); + } + for (const mainProgramErrorFixture of [ + { + name: "illegal_eof", + file: "test-illegal-end-main-with-eof.ngc", + readCount: 21, + executeCount: 20, + errorText: "File ended with no percent sign (%) or program end (M2)", + marker: "canon_event=COMMENT: end of main signaled by EOF", + }, + { + name: "illegal_no_m30", + file: "test-illegal-no-m30-before-osub.ngc", + readCount: 18, + executeCount: 18, + errorText: "File:", + marker: "statement_uri=O2%20sub%20%28subprogram%20begin%29", + extraMarker: "sub: o|2| found in illegal location", + }, + { + name: "illegal_sub_after_percent", + file: "test-illegal-sub-after-percent.ngc", + readCount: 8, + executeCount: 7, + errorText: "Failed to find sub 'O2' before EOF", + marker: "canon_event=FINISH", + }, + ]) { + verifyExpectedOutput( + `browser_interp_m98m99_11_${mainProgramErrorFixture.name}`, + interp.runFile(`${m98m99MainProgramOwordDir}/${mainProgramErrorFixture.file}`), + [ + "file_open=0", + `file_read_count=${mainProgramErrorFixture.readCount}`, + `file_execute_count=${mainProgramErrorFixture.executeCount}`, + "file_saw_error=1", + `file_error_text=${mainProgramErrorFixture.errorText}`, + mainProgramErrorFixture.marker, + mainProgramErrorFixture.extraMarker ?? "", + "absent=canon_event=PROGRAM_END", + ].join("\n"), + ); + } + const m98m99NamedProgramNamedPath = await writeInterpRegressionFile( interp, "m98m99/13-named-program", @@ -2233,6 +3165,198 @@ ].join("\n"), ); + const g10L1L10Dir = await writeG10RegressionFiles(interp, "g10-l1-l10", [ + "test.ngc", + "test.tbl", + ]); + verifyExpectedOutput( + "browser_interp_g10_l1_l10", + interp.runFileWithIni(`${g10L1L10Dir}/test.ngc`, `${g10L1L10Dir}/test.ini`), + [ + "file_open=0", + "file_read_count=115", + "file_execute_count=115", + "file_saw_error=0", + "canon_event=MESSAGE: G10 L1: set tool offsets direct", + "canon_event=MESSAGE: G10 L10: set tool offsets relative to position + 45 deg. rotation", + "canon_event=MESSAGE: Model B contract: M6 alone and G10 alone do not change tool offset params", + "canon_event=MESSAGE: G10 alone does not apply offset, should still be 0 0 0: 0.000000 0.000000 0.000000", + "canon_event=USE_TOOL_LENGTH_OFFSET x=8 y=6 z=7", + "canon_event=SET_XY_ROTATION rotation=45", + "canon_event=PROGRAM_END", + ].join("\n"), + ); + + const g10L11Dir = await writeG10RegressionFiles(interp, "g10-l11", [ + "test.ngc", + "test.tbl", + ]); + verifyExpectedOutput( + "browser_interp_g10_l11", + interp.runFileWithIni(`${g10L11Dir}/test.ngc`, `${g10L11Dir}/test.ini`), + [ + "file_open=0", + "file_read_count=41", + "file_execute_count=41", + "file_saw_error=0", + "canon_event=SET_G5X_OFFSET index=1 x=1 y=2 z=-3", + "canon_event=SET_G92_OFFSET x=-41.1962 y=-46.1962 z=-72", + "canon_event=USE_TOOL_LENGTH_OFFSET x=0 y=0 z=-4", + "canon_event=MESSAGE: -101.600000", + "canon_event=PROGRAM_END", + ].join("\n"), + ); + + const g10L2WhileActiveDir = await writeG10RegressionFiles( + interp, + "g10-l2-while-active", + ["test.ngc"], + ); + verifyExpectedOutput( + "browser_interp_g10_l2_while_active", + interp.runFile(`${g10L2WhileActiveDir}/test.ngc`), + [ + "file_open=0", + "file_read_count=24", + "file_execute_count=24", + "file_saw_error=0", + "canon_event=SET_G5X_OFFSET index=1 x=1 y=0 z=0", + "canon_event=SET_XY_ROTATION rotation=-45", + "canon_event=MESSAGE: Should be 0 1.414214: 0.000000 1.414214", + "canon_event=SET_XY_ROTATION rotation=90", + "canon_event=MESSAGE: Should be 1 1: 1.000000 1.000000", + "canon_event=PROGRAM_END", + ].join("\n"), + ); + + const g10L20WhileActiveDir = await writeG10RegressionFiles( + interp, + "g10-l20-while-active", + ["test.ngc"], + ); + verifyExpectedOutput( + "browser_interp_g10_l20_while_active", + interp.runFile(`${g10L20WhileActiveDir}/test.ngc`), + [ + "file_open=0", + "file_read_count=20", + "file_execute_count=20", + "file_saw_error=0", + "canon_event=SET_XY_ROTATION rotation=45", + "canon_event=MESSAGE: Should be -1 0: -1.000000 0.000000", + "canon_event=MESSAGE: Should be 0 -1: 0.000000 -1.000000", + "canon_event=MESSAGE: Should be 1 1: 1.000000 1.000000", + "canon_event=PROGRAM_END", + ].join("\n"), + ); + + const g10WithG92Dir = await writeG10RegressionFiles(interp, "g10-with-g92", [ + "test.ngc", + "test.tbl", + ]); + verifyExpectedOutput( + "browser_interp_g10_with_g92", + interp.runFileWithIni(`${g10WithG92Dir}/test.ngc`, `${g10WithG92Dir}/test.ini`), + [ + "file_open=0", + "file_read_count=61", + "file_execute_count=61", + "file_saw_error=0", + "canon_event=SET_G5X_OFFSET index=9 x=25 y=26 z=27", + "canon_event=SET_G92_OFFSET x=-0.1 y=-0.2 z=-10.3", + "canon_event=MESSAGE: X0.100000 Y0.200000 Z0.300000", + "canon_event=MESSAGE: X-23.900000 Y-23.800000 Z-23.700000", + "canon_event=SET_G92_OFFSET x=0 y=0 z=0", + "canon_event=MESSAGE: X-24.000000 Y-24.000000 Z-34.000000", + "canon_event=PROGRAM_END", + ].join("\n"), + ); + + const g52G92InteractionPath = await writeInterpRegressionFile( + interp, + "g52/g52-g92-interaction", + "g52-g92-interaction.ngc", + ); + verifyExpectedOutput( + "browser_interp_g52_g92_interaction", + interp.runFile(g52G92InteractionPath), + [ + "file_open=0", + "file_read_count=39", + "file_execute_count=39", + "file_saw_error=0", + "canon_event=COMMENT: G52 and G92 param #5210 setting behavior", + "G92 params: 1.000000 -25.400000 -50.800000", + "G92 params: 0.000000 -25.400000 -50.800000", + "G92 params: 1.000000 50.800000 76.200000", + "G92 params: 1.000000 0.000000 0.000000", + "canon_event=SET_G92_OFFSET x=-1 y=-2 z=0", + "canon_event=SET_G92_OFFSET x=2 y=3 z=0", + "canon_event=PALLET_SHUTTLE", + "canon_event=PROGRAM_END", + ].join("\n"), + ); + + const g92PersistenceDir = "/work/browser-interp/g52/g92-persistence"; + const g92PersistenceProgramPath = `${g92PersistenceDir}/test.ngc`; + const g92PersistenceParameterPath = `${g92PersistenceDir}/startup.var`; + const g92PersistenceIniPath = `${g92PersistenceDir}/persist.ini`; + const g92PersistenceDisabledIniPath = `${g92PersistenceDir}/disabled.ini`; + interp.writeTextFile( + g92PersistenceProgramPath, + [ + "(PRINT,Startup G92 params: #5210 #5211 #5212 #5213)", + "M30", + "", + ].join("\n"), + ); + interp.writeTextFile( + g92PersistenceParameterPath, + [ + "5210 1", + "5211 1.25", + "5212 2.5", + "5213 3.75", + "5220 1", + "", + ].join("\n"), + ); + interp.writeTextFile( + g92PersistenceIniPath, + [ + "[RS274NGC]", + "PARAMETER_FILE = startup.var", + "[TRAJ]", + "COORDINATES = X Y Z", + "", + ].join("\n"), + ); + interp.writeTextFile( + g92PersistenceDisabledIniPath, + [ + "[RS274NGC]", + "PARAMETER_FILE = startup.var", + "DISABLE_G92_PERSISTENCE = 1", + "[TRAJ]", + "COORDINATES = X Y Z", + "", + ].join("\n"), + ); + verifyExpectedOutput( + "browser_interp_g92_persistence_enabled", + runWithCapturedPrints(() => + interp.runFileWithIni(g92PersistenceProgramPath, g92PersistenceIniPath), + ).prints, + "Startup G92 params: 1.000000 1.250000 2.500000 3.750000", + ); + verifyExpectedOutput( + "browser_interp_g92_persistence_disabled", + runWithCapturedPrints(() => + interp.runFileWithIni(g92PersistenceProgramPath, g92PersistenceDisabledIniPath), + ).prints, + "Startup G92 params: 0.000000 0.000000 0.000000 0.000000", + ); + verifyExpectedOutput( "restore_parameters_missing_file", interp.restoreParameters("/work/browser-missing.var"), diff --git a/wasm-port/tests/fixtures/canon/arc_semantics.events b/wasm-port/tests/fixtures/canon/arc_semantics.events index 40d58c6..69aa526 100644 --- a/wasm-port/tests/fixtures/canon/arc_semantics.events +++ b/wasm-port/tests/fixtures/canon/arc_semantics.events @@ -1,5 +1,4 @@ canon_event=STRAIGHT_TRAVERSE line=1 x=0 y=0 z=0 a=0 b=0 c=0 u=0 v=0 w=0 -canon_event=COMMENT: interpreter: IJK distance mode changed to incremental canon_event=SET_FEED_RATE rate=60 canon_event=ARC_FEED line=3 first_end=1 second_end=1 first_axis=1 second_axis=0 rotation=-1 axis_end_point=0 a=0 b=0 c=0 u=0 v=0 w=0 canon_event=COMMENT: interpreter: IJK distance mode changed to absolute diff --git a/wasm-port/tests/native/verify_native_probes.sh b/wasm-port/tests/native/verify_native_probes.sh index d79fad8..16596d6 100755 --- a/wasm-port/tests/native/verify_native_probes.sh +++ b/wasm-port/tests/native/verify_native_probes.sh @@ -209,8 +209,21 @@ check_exitcode linuxcnc_interp_minimal_harness.interp_exists.run check_exitcode linuxcnc_interp_minimal_harness.return_value.run check_exitcode linuxcnc_interp_minimal_harness.subs_follow_main.run check_exitcode linuxcnc_interp_minimal_harness.fractional_linenumbers.run +check_exitcode linuxcnc_interp_minimal_harness.cam_nisley_bare.run +check_exitcode linuxcnc_interp_minimal_harness.cam_nisley.run +check_exitcode linuxcnc_interp_minimal_harness.crazy_paths.run check_exitcode linuxcnc_interp_minimal_harness.namedparam_bug424.run check_exitcode linuxcnc_interp_minimal_harness.flowsnake.run +check_exitcode linuxcnc_interp_minimal_harness.inside_corners.run +check_exitcode linuxcnc_interp_minimal_harness.inverse_time_with_comp.run +check_exitcode linuxcnc_interp_minimal_harness.ccomp_lathe_comp.run +check_exitcode linuxcnc_interp_minimal_harness.ccomp_mill_g90g91g92.run +check_exitcode linuxcnc_interp_minimal_harness.ccomp_mill_line_arc_entry.run +check_exitcode linuxcnc_interp_minimal_harness.ccomp_mill_zchanges.run +check_exitcode linuxcnc_interp_minimal_harness.bad_a_in_canned_cycle.run +check_exitcode linuxcnc_interp_minimal_harness.bad_a_in_canned_cycle2.run +check_exitcode linuxcnc_interp_minimal_harness.bad_ccomp_arcexit.run +check_exitcode linuxcnc_interp_minimal_harness.bad_ccomp_gouging.run check_exitcode linuxcnc_interp_minimal_harness.bad_exists_1.run check_exitcode linuxcnc_interp_minimal_harness.bad_exists_2.run check_exitcode linuxcnc_interp_minimal_harness.bad_exists_3.run @@ -249,6 +262,8 @@ check_exitcode linuxcnc_interp_minimal_harness.sim_axis_foam.run check_exitcode linuxcnc_interp_minimal_harness.sim_bridgemill.run check_exitcode linuxcnc_interp_minimal_harness.sim_geometry_xyzc.run check_exitcode linuxcnc_interp_minimal_harness.sim_external_offsets_dyn.run +check_exitcode linuxcnc_interp_minimal_harness.g92_persistence_enabled.run +check_exitcode linuxcnc_interp_minimal_harness.g92_persistence_disabled.run check_exitcode linuxcnc_parameter_file_harness check_exitcode linuxcnc_parameter_file_harness.run check_exitcode linuxcnc_interp_init_harness @@ -1131,6 +1146,47 @@ grep -Fq "canon_event=SET_SPINDLE_SPEED spindle=0 speed=600" "$FRACTIONAL_LINENU grep -Fq "canon_event=SET_SPINDLE_SPEED spindle=0 speed=1200" "$FRACTIONAL_LINENUMBERS_STDOUT" grep -Fq "canon_event=PROGRAM_END" "$FRACTIONAL_LINENUMBERS_STDOUT" +CAM_NISLEY_BARE_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.cam_nisley_bare.run.stdout.log" +grep -Fq "file_open=0" "$CAM_NISLEY_BARE_STDOUT" +grep -Fq "file_read_count=57" "$CAM_NISLEY_BARE_STDOUT" +grep -Fq "file_execute_count=57" "$CAM_NISLEY_BARE_STDOUT" +grep -Fq "file_saw_error=1" "$CAM_NISLEY_BARE_STDOUT" +grep -Fq "file_error_text=Requested tool 1 not found in the tool table" "$CAM_NISLEY_BARE_STDOUT" + +CAM_NISLEY_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.cam_nisley.run.stdout.log" +grep -Fq "file_open=0" "$CAM_NISLEY_STDOUT" +grep -Fq "file_read_count=1584" "$CAM_NISLEY_STDOUT" +grep -Fq "file_execute_count=1584" "$CAM_NISLEY_STDOUT" +grep -Fq "file_saw_error=0" "$CAM_NISLEY_STDOUT" +grep -Fq "error_text=Bad character '%' used" "$CAM_NISLEY_STDOUT" +grep -Fq "canon_event=COMMENT: Ed Nisley - Nov 2006 - Mar 2007" "$CAM_NISLEY_STDOUT" +grep -Fq "canon_event=SELECT_TOOL tool=1" "$CAM_NISLEY_STDOUT" +grep -Fq "canon_event=CHANGE_TOOL" "$CAM_NISLEY_STDOUT" +grep -Fq "canon_event=START_SPINDLE_CLOCKWISE spindle=0" "$CAM_NISLEY_STDOUT" +grep -Fq "canon_event=COMMENT: interpreter: cutter radius compensation on right" "$CAM_NISLEY_STDOUT" +grep -Fq "canon_event=ARC_FEED line=223 first_end=1.91351e-18 second_end=-15.1438" "$CAM_NISLEY_STDOUT" +grep -Fq "canon_event=STRAIGHT_TRAVERSE line=241 x=75 y=0 z=75" "$CAM_NISLEY_STDOUT" +grep -Fq "canon_event=MESSAGE: Done!" "$CAM_NISLEY_STDOUT" +grep -Fq "canon_event=PROGRAM_END" "$CAM_NISLEY_STDOUT" +if grep -Fq "file_error_text=Requested tool 1 not found in the tool table" "$CAM_NISLEY_STDOUT"; then + echo "cam-nisley with upstream tool table unexpectedly failed tool lookup" >&2 + exit 1 +fi + +CRAZY_PATHS_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.crazy_paths.run.stdout.log" +grep -Fq "file_open=0" "$CRAZY_PATHS_STDOUT" +grep -Fq "file_read_count=1526" "$CRAZY_PATHS_STDOUT" +grep -Fq "file_execute_count=1526" "$CRAZY_PATHS_STDOUT" +grep -Fq "file_saw_error=0" "$CRAZY_PATHS_STDOUT" +grep -Fq "canon_event=COMMENT: interpreter: cutter radius compensation on right" "$CRAZY_PATHS_STDOUT" +grep -Fq "canon_event=COMMENT: interpreter: cutter radius compensation on left" "$CRAZY_PATHS_STDOUT" +grep -Fq "canon_event=ARC_FEED line=8 first_end=-99.2047 second_end=-102.892 first_axis=-98.9043 second_axis=-102.097 rotation=-1 axis_end_point=0" "$CRAZY_PATHS_STDOUT" +grep -Fq "canon_event=ARC_FEED line=103 first_end=-40.3437 second_end=-103.278 first_axis=-45.0196 second_axis=-102.442 rotation=-1 axis_end_point=0" "$CRAZY_PATHS_STDOUT" +grep -Fq "canon_event=STRAIGHT_FEED line=260 x=3.58919 y=30.3694 z=0" "$CRAZY_PATHS_STDOUT" +grep -Fq "canon_event=ARC_FEED line=445 first_end=101.539 second_end=44.5843 first_axis=100.896 second_axis=46.212 rotation=1 axis_end_point=0" "$CRAZY_PATHS_STDOUT" +grep -Fq "canon_event=STRAIGHT_FEED line=469 x=98.8154 y=102.176 z=0" "$CRAZY_PATHS_STDOUT" +grep -Fq "canon_event=PROGRAM_END" "$CRAZY_PATHS_STDOUT" + NAMEDPARAM_BUG424_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.namedparam_bug424.run.stdout.log" grep -Fq "file_open=0" "$NAMEDPARAM_BUG424_STDOUT" grep -Fq "file_read_count=6" "$NAMEDPARAM_BUG424_STDOUT" @@ -1158,6 +1214,68 @@ grep -Fq "setup.current_x=0.25" "$FLOWSNAKE_STDOUT" grep -Fq "setup.current_y=1" "$FLOWSNAKE_STDOUT" grep -Fq "setup.current_z=1" "$FLOWSNAKE_STDOUT" +INSIDE_CORNERS_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.inside_corners.run.stdout.log" +grep -Fq "file_open=0" "$INSIDE_CORNERS_STDOUT" +grep -Fq "file_read_count=397" "$INSIDE_CORNERS_STDOUT" +grep -Fq "file_execute_count=397" "$INSIDE_CORNERS_STDOUT" +grep -Fq "file_saw_error=0" "$INSIDE_CORNERS_STDOUT" +grep -Fq "canon_event=PROGRAM_STOP" "$INSIDE_CORNERS_STDOUT" +grep -Fq "canon_event=DWELL seconds=3" "$INSIDE_CORNERS_STDOUT" +grep -Fq "canon_event=SELECT_PLANE plane=1" "$INSIDE_CORNERS_STDOUT" +grep -Fq "canon_event=SELECT_PLANE plane=3" "$INSIDE_CORNERS_STDOUT" +grep -Fq "canon_event=COMMENT: interpreter: cutter radius compensation on left" "$INSIDE_CORNERS_STDOUT" +grep -Fq "canon_event=COMMENT: interpreter: cutter radius compensation on right" "$INSIDE_CORNERS_STDOUT" +grep -Fq "canon_event=ARC_FEED line=16 first_end=1.2281 second_end=1.3456 first_axis=0.628 second_axis=1.0458 rotation=1 axis_end_point=-0.1" "$INSIDE_CORNERS_STDOUT" +grep -Fq "canon_event=STRAIGHT_FEED line=14 x=0.701154 y=0.162499 z=-0.1" "$INSIDE_CORNERS_STDOUT" +grep -Fq "canon_event=ARC_FEED line=74 first_end=0.298564 second_end=1.82077 first_axis=0.3459 second_axis=1.7626 rotation=1 axis_end_point=0" "$INSIDE_CORNERS_STDOUT" +grep -Fq "canon_event=STRAIGHT_FEED line=107 x=0 y=0 z=1" "$INSIDE_CORNERS_STDOUT" +grep -Fq "canon_event=PROGRAM_END" "$INSIDE_CORNERS_STDOUT" + +CCOMP_LATHE_COMP_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.ccomp_lathe_comp.run.stdout.log" +grep -Fq "file_open=0" "$CCOMP_LATHE_COMP_STDOUT" +grep -Fq "file_read_count=49" "$CCOMP_LATHE_COMP_STDOUT" +grep -Fq "file_execute_count=49" "$CCOMP_LATHE_COMP_STDOUT" +grep -Fq "file_saw_error=0" "$CCOMP_LATHE_COMP_STDOUT" +grep -Fq "canon_event=SELECT_PLANE plane=3" "$CCOMP_LATHE_COMP_STDOUT" +grep -Fq "canon_event=SELECT_TOOL tool=2" "$CCOMP_LATHE_COMP_STDOUT" +grep -Fq "canon_event=COMMENT: interpreter: cutter radius compensation on left" "$CCOMP_LATHE_COMP_STDOUT" +grep -Fq "canon_event=SELECT_TOOL tool=7" "$CCOMP_LATHE_COMP_STDOUT" +grep -Fq "canon_event=COMMENT: interpreter: cutter radius compensation on right" "$CCOMP_LATHE_COMP_STDOUT" +grep -Fq "canon_event=PROGRAM_END" "$CCOMP_LATHE_COMP_STDOUT" + +CCOMP_MILL_G90G91G92_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.ccomp_mill_g90g91g92.run.stdout.log" +grep -Fq "file_open=0" "$CCOMP_MILL_G90G91G92_STDOUT" +grep -Fq "file_read_count=28" "$CCOMP_MILL_G90G91G92_STDOUT" +grep -Fq "file_execute_count=28" "$CCOMP_MILL_G90G91G92_STDOUT" +grep -Fq "file_saw_error=0" "$CCOMP_MILL_G90G91G92_STDOUT" +grep -Fq "canon_event=SELECT_TOOL tool=3" "$CCOMP_MILL_G90G91G92_STDOUT" +grep -Fq "canon_event=SET_G92_OFFSET x=0 y=0 z=0.5" "$CCOMP_MILL_G90G91G92_STDOUT" +grep -Fq "canon_event=COMMENT: interpreter: cutter radius compensation on left" "$CCOMP_MILL_G90G91G92_STDOUT" +grep -Fq "canon_event=COMMENT: interpreter: cutter radius compensation off" "$CCOMP_MILL_G90G91G92_STDOUT" +grep -Fq "canon_event=PROGRAM_END" "$CCOMP_MILL_G90G91G92_STDOUT" + +CCOMP_MILL_LINE_ARC_ENTRY_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.ccomp_mill_line_arc_entry.run.stdout.log" +grep -Fq "file_open=0" "$CCOMP_MILL_LINE_ARC_ENTRY_STDOUT" +grep -Fq "file_read_count=33" "$CCOMP_MILL_LINE_ARC_ENTRY_STDOUT" +grep -Fq "file_execute_count=33" "$CCOMP_MILL_LINE_ARC_ENTRY_STDOUT" +grep -Fq "file_saw_error=0" "$CCOMP_MILL_LINE_ARC_ENTRY_STDOUT" +grep -Fq "canon_event=SELECT_TOOL tool=4" "$CCOMP_MILL_LINE_ARC_ENTRY_STDOUT" +grep -Fq "canon_event=COMMENT: interpreter: cutter radius compensation on left" "$CCOMP_MILL_LINE_ARC_ENTRY_STDOUT" +grep -Fq "canon_event=ARC_FEED line=23 first_end=2 second_end=3.01969" "$CCOMP_MILL_LINE_ARC_ENTRY_STDOUT" +grep -Fq "canon_event=COMMENT: interpreter: cutter radius compensation off" "$CCOMP_MILL_LINE_ARC_ENTRY_STDOUT" +grep -Fq "canon_event=PROGRAM_END" "$CCOMP_MILL_LINE_ARC_ENTRY_STDOUT" + +CCOMP_MILL_ZCHANGES_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.ccomp_mill_zchanges.run.stdout.log" +grep -Fq "file_open=0" "$CCOMP_MILL_ZCHANGES_STDOUT" +grep -Fq "file_read_count=81" "$CCOMP_MILL_ZCHANGES_STDOUT" +grep -Fq "file_execute_count=81" "$CCOMP_MILL_ZCHANGES_STDOUT" +grep -Fq "file_saw_error=0" "$CCOMP_MILL_ZCHANGES_STDOUT" +grep -Fq "canon_event=COMMENT: interpreter: cutter radius compensation on left" "$CCOMP_MILL_ZCHANGES_STDOUT" +grep -Fq "canon_event=ARC_FEED line=15 first_end=0.5 second_end=0.752461" "$CCOMP_MILL_ZCHANGES_STDOUT" +grep -Fq "canon_event=STRAIGHT_FEED line=54 x=0.49826 y=-0.24826 z=0" "$CCOMP_MILL_ZCHANGES_STDOUT" +grep -Fq "canon_event=COMMENT: interpreter: cutter radius compensation off" "$CCOMP_MILL_ZCHANGES_STDOUT" +grep -Fq "canon_event=PROGRAM_END" "$CCOMP_MILL_ZCHANGES_STDOUT" + check_bad_file_fixture() { local name="$1" local read_count="$2" @@ -1173,6 +1291,10 @@ check_bad_file_fixture() { grep -Fq "canon_event=ON_RESET" "$stdout_file" } +check_bad_file_fixture bad_a_in_canned_cycle 3 2 "Cannot put an a in canned cycle" +check_bad_file_fixture bad_a_in_canned_cycle2 2 1 "Cannot put an a in canned cycle" +check_bad_file_fixture bad_ccomp_arcexit 7 7 "The move just after exiting cutter compensation mode must be straight, not an arc" +check_bad_file_fixture bad_ccomp_gouging 7 7 "Straight feed in concave corner cannot be reached by the tool without gouging" check_bad_file_fixture bad_exists_1 2 1 "Expected # reading parameter" check_bad_file_fixture bad_exists_2 2 1 "Expected ] reading bracketed parameter" check_bad_file_fixture bad_exists_3 3 2 "Parameter number out of range" @@ -1394,6 +1516,101 @@ grep -Fq "Q MAIN/FANUC: POST-M98: 1=13.010000; 30=13.300000; 31=13.310000" "$M grep -Fq "Q MAIN/RS274NGC: POST-O-CALL: 1=42.010000; 30=42.300000; 31=13.310000" "$M98M99_02_VARIABLES_STDOUT" grep -Fq "canon_event=PROGRAM_END" "$M98M99_02_VARIABLES_STDOUT" +M98M99_03_ERROR_M98_NO_P_WORD_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.m98m99_03_error_m98_no_p_word.run.stdout.log" +grep -Fq "file_open=0" "$M98M99_03_ERROR_M98_NO_P_WORD_STDOUT" +grep -Fq "file_read_count=3" "$M98M99_03_ERROR_M98_NO_P_WORD_STDOUT" +grep -Fq "file_execute_count=2" "$M98M99_03_ERROR_M98_NO_P_WORD_STDOUT" +grep -Fq "file_saw_error=1" "$M98M99_03_ERROR_M98_NO_P_WORD_STDOUT" +grep -Fq "file_error_text=Found 'm98' code with no P-word" \ + "$M98M99_03_ERROR_M98_NO_P_WORD_STDOUT" +grep -Fq "run_step phase=read step=3 rc=5 line=4" "$M98M99_03_ERROR_M98_NO_P_WORD_STDOUT" +grep -Fq "statement_uri=M98" "$M98M99_03_ERROR_M98_NO_P_WORD_STDOUT" +grep -Fq "canon_event=COMMENT: Fanuc M98 requires P-word " \ + "$M98M99_03_ERROR_M98_NO_P_WORD_STDOUT" + +M98M99_04_M98_BUT_NO_SUB_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.m98m99_04_m98_but_no_sub.run.stdout.log" +grep -Fq "file_open=0" "$M98M99_04_M98_BUT_NO_SUB_STDOUT" +grep -Fq "file_read_count=5" "$M98M99_04_M98_BUT_NO_SUB_STDOUT" +grep -Fq "file_execute_count=4" "$M98M99_04_M98_BUT_NO_SUB_STDOUT" +grep -Fq "file_saw_error=1" "$M98M99_04_M98_BUT_NO_SUB_STDOUT" +grep -Fq "file_error_text=Failed to find sub 'O1' before EOF" \ + "$M98M99_04_M98_BUT_NO_SUB_STDOUT" +grep -Fq "run_step phase=read step=5 rc=5 line=4" "$M98M99_04_M98_BUT_NO_SUB_STDOUT" +grep -Fq "statement_uri=%25" "$M98M99_04_M98_BUT_NO_SUB_STDOUT" +grep -Fq "canon_event=COMMENT: M98 call non-existant sub " \ + "$M98M99_04_M98_BUT_NO_SUB_STDOUT" + +M98M99_05_M98_LOOPS_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.m98m99_05_m98_loops.run.stdout.log" +grep -Fq "file_open=0" "$M98M99_05_M98_LOOPS_STDOUT" +grep -Fq "file_read_count=102" "$M98M99_05_M98_LOOPS_STDOUT" +grep -Fq "file_execute_count=102" "$M98M99_05_M98_LOOPS_STDOUT" +grep -Fq "file_saw_error=0" "$M98M99_05_M98_LOOPS_STDOUT" +grep -Fq "X MAIN 10LOOP PARAM1 = 10.000000" "$M98M99_05_M98_LOOPS_STDOUT" +grep -Fq "X MAIN 0LOOP PARAM1 = 0.000000" "$M98M99_05_M98_LOOPS_STDOUT" +grep -Fq "X MAIN 2LOOP PARAM1 = 2.000000" "$M98M99_05_M98_LOOPS_STDOUT" +grep -Fq "X SUB O1 PARAM1 = 10.000000" "$M98M99_05_M98_LOOPS_STDOUT" +grep -Fq "canon_event=COMMENT: A simple O sub example " "$M98M99_05_M98_LOOPS_STDOUT" +grep -Fq "canon_event=PROGRAM_END" "$M98M99_05_M98_LOOPS_STDOUT" +if ! awk ' + /statement_uri=M98%20P1%20L0/ { in_l0 = 1; saw_sub = 0; next } + in_l0 && /X SUB O1 PARAM1/ { saw_sub = 1 } + in_l0 && /X MAIN 0LOOP PARAM1 = 0\.000000/ && !saw_sub { found = 1; in_l0 = 0 } + END { exit(found ? 0 : 1) } +' "$M98M99_05_M98_LOOPS_STDOUT"; then + echo "unexpected m98m99 M98 L0 loop execution" >&2 + exit 1 +fi + +M98M99_06_CALLED_WITH_O_CALL_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.m98m99_06_called_with_o_call.run.stdout.log" +grep -Fq "file_open=0" "$M98M99_06_CALLED_WITH_O_CALL_STDOUT" +grep -Fq "file_read_count=5" "$M98M99_06_CALLED_WITH_O_CALL_STDOUT" +grep -Fq "file_execute_count=5" "$M98M99_06_CALLED_WITH_O_CALL_STDOUT" +grep -Fq "file_saw_error=1" "$M98M99_06_CALLED_WITH_O_CALL_STDOUT" +grep -Fq "file_error_text=Fanuc 'O....' subroutine must be called with 'M98'" \ + "$M98M99_06_CALLED_WITH_O_CALL_STDOUT" +grep -Fq "run_step phase=execute step=5 rc=5 line=4" "$M98M99_06_CALLED_WITH_O_CALL_STDOUT" +grep -Fq "statement_uri=O1" "$M98M99_06_CALLED_WITH_O_CALL_STDOUT" +grep -Fq "canon_event=COMMENT: Fanuc 'O...' sub must be called with M98 " \ + "$M98M99_06_CALLED_WITH_O_CALL_STDOUT" + +M98M99_06_ENDED_WITH_O_ENDSUB_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.m98m99_06_ended_with_o_endsub.run.stdout.log" +grep -Fq "file_open=0" "$M98M99_06_ENDED_WITH_O_ENDSUB_STDOUT" +grep -Fq "file_read_count=7" "$M98M99_06_ENDED_WITH_O_ENDSUB_STDOUT" +grep -Fq "file_execute_count=7" "$M98M99_06_ENDED_WITH_O_ENDSUB_STDOUT" +grep -Fq "file_saw_error=1" "$M98M99_06_ENDED_WITH_O_ENDSUB_STDOUT" +grep -Fq "file_error_text=Fanuc 'O....' subroutine definition must end with 'M99'" \ + "$M98M99_06_ENDED_WITH_O_ENDSUB_STDOUT" +grep -Fq "run_step phase=execute step=7 rc=5 line=4" "$M98M99_06_ENDED_WITH_O_ENDSUB_STDOUT" +grep -Fq "statement_uri=O1%20endsub" "$M98M99_06_ENDED_WITH_O_ENDSUB_STDOUT" +grep -Fq "X FANUC" "$M98M99_06_ENDED_WITH_O_ENDSUB_STDOUT" +grep -Fq "canon_event=COMMENT: Fanuc 'O...' sub must end with M99 " \ + "$M98M99_06_ENDED_WITH_O_ENDSUB_STDOUT" + +M98M99_06_SUB_CALLED_WITH_M98_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.m98m99_06_sub_called_with_m98.run.stdout.log" +grep -Fq "file_open=0" "$M98M99_06_SUB_CALLED_WITH_M98_STDOUT" +grep -Fq "file_read_count=5" "$M98M99_06_SUB_CALLED_WITH_M98_STDOUT" +grep -Fq "file_execute_count=5" "$M98M99_06_SUB_CALLED_WITH_M98_STDOUT" +grep -Fq "file_saw_error=1" "$M98M99_06_SUB_CALLED_WITH_M98_STDOUT" +grep -Fq "file_error_text='O.... sub' subroutine must be called with 'O.... call'" \ + "$M98M99_06_SUB_CALLED_WITH_M98_STDOUT" +grep -Fq "run_step phase=execute step=5 rc=5 line=4" "$M98M99_06_SUB_CALLED_WITH_M98_STDOUT" +grep -Fq "statement_uri=O1%20sub" "$M98M99_06_SUB_CALLED_WITH_M98_STDOUT" +grep -Fq "canon_event=COMMENT: RS274NGC 'O...' sub must not be called with M98 " \ + "$M98M99_06_SUB_CALLED_WITH_M98_STDOUT" + +M98M99_06_SUB_ENDED_WITH_M99_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.m98m99_06_sub_ended_with_m99.run.stdout.log" +grep -Fq "file_open=0" "$M98M99_06_SUB_ENDED_WITH_M99_STDOUT" +grep -Fq "file_read_count=7" "$M98M99_06_SUB_ENDED_WITH_M99_STDOUT" +grep -Fq "file_execute_count=7" "$M98M99_06_SUB_ENDED_WITH_M99_STDOUT" +grep -Fq "file_saw_error=1" "$M98M99_06_SUB_ENDED_WITH_M99_STDOUT" +grep -Fq "file_error_text='O.... endsub' or 'O.... return' must follow 'O.... sub' subroutine definition" \ + "$M98M99_06_SUB_ENDED_WITH_M99_STDOUT" +grep -Fq "run_step phase=execute step=7 rc=5 line=4" "$M98M99_06_SUB_ENDED_WITH_M99_STDOUT" +grep -Fq "statement_uri=M99" "$M98M99_06_SUB_ENDED_WITH_M99_STDOUT" +grep -Fq "X FANUC" "$M98M99_06_SUB_ENDED_WITH_M99_STDOUT" +grep -Fq "canon_event=COMMENT: RS274NGC 'O... sub' sub must not end with M99 " \ + "$M98M99_06_SUB_ENDED_WITH_M99_STDOUT" + M98M99_07_NESTED_SUBS_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.m98m99_07_nested_subs.run.stdout.log" grep -Fq "file_open=0" "$M98M99_07_NESTED_SUBS_STDOUT" grep -Fq "file_read_count=163" "$M98M99_07_NESTED_SUBS_STDOUT" @@ -1412,6 +1629,65 @@ grep -Fq "X IN O1" "$M98M99_08_SUB_FOLLOWS_MAIN_STDOUT" grep -Fq "canon_event=COMMENT: Fanuc-style subs may follow main program " "$M98M99_08_SUB_FOLLOWS_MAIN_STDOUT" grep -Fq "canon_event=PROGRAM_END" "$M98M99_08_SUB_FOLLOWS_MAIN_STDOUT" +check_m98m99_09_fanuc_pass() { + local stdout_file="$1" + grep -Fq "file_open=0" "$stdout_file" + grep -Fq "file_read_count=22" "$stdout_file" + grep -Fq "file_execute_count=22" "$stdout_file" + grep -Fq "file_saw_error=0" "$stdout_file" + grep -Fq "canon_event=COMMENT: A simple O sub example " "$stdout_file" + grep -Fq "canon_event=STRAIGHT_TRAVERSE line=10 x=3 y=0 z=0.25" "$stdout_file" + grep -Fq "canon_event=STRAIGHT_FEED line=11 x=3 y=0 z=-1" "$stdout_file" + grep -Fq "canon_event=PROGRAM_END" "$stdout_file" + if grep -Fq "file_error_text=DISABLE_FANUC_STYLE_SUB" "$stdout_file"; then + echo "unexpected disabled Fanuc sub error in $stdout_file" >&2 + exit 1 + fi +} + +check_m98m99_09_rs274ngc_pass() { + local stdout_file="$1" + grep -Fq "file_open=0" "$stdout_file" + grep -Fq "file_read_count=15" "$stdout_file" + grep -Fq "file_execute_count=15" "$stdout_file" + grep -Fq "file_saw_error=0" "$stdout_file" + grep -Fq "canon_event=COMMENT: A simple O sub example " "$stdout_file" + grep -Fq "canon_event=STRAIGHT_TRAVERSE line=5 x=1 y=0 z=0.25" "$stdout_file" + grep -Fq "canon_event=STRAIGHT_FEED line=6 x=1 y=0 z=-1" "$stdout_file" + grep -Fq "canon_event=PROGRAM_END" "$stdout_file" + if grep -Fq "file_error_text=DISABLE_FANUC_STYLE_SUB" "$stdout_file"; then + echo "unexpected disabled Fanuc sub error in $stdout_file" >&2 + exit 1 + fi +} + +check_m98m99_09_fanuc_pass \ + "$BUILD_DIR/linuxcnc_interp_minimal_harness.m98m99_09_fanuc_ini.run.stdout.log" +check_m98m99_09_rs274ngc_pass \ + "$BUILD_DIR/linuxcnc_interp_minimal_harness.m98m99_09_rs274ngc_ini.run.stdout.log" +check_m98m99_09_rs274ngc_pass \ + "$BUILD_DIR/linuxcnc_interp_minimal_harness.m98m99_09_rs274ngc_no_fanuc.run.stdout.log" +check_m98m99_09_fanuc_pass \ + "$BUILD_DIR/linuxcnc_interp_minimal_harness.m98m99_09_fanuc_default.run.stdout.log" +check_m98m99_09_rs274ngc_pass \ + "$BUILD_DIR/linuxcnc_interp_minimal_harness.m98m99_09_rs274ngc_default.run.stdout.log" + +M98M99_09_FANUC_NO_FANUC_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.m98m99_09_fanuc_no_fanuc.run.stdout.log" +grep -Fq "file_open=0" "$M98M99_09_FANUC_NO_FANUC_STDOUT" +grep -Fq "file_read_count=5" "$M98M99_09_FANUC_NO_FANUC_STDOUT" +grep -Fq "file_execute_count=4" "$M98M99_09_FANUC_NO_FANUC_STDOUT" +grep -Fq "file_saw_error=1" "$M98M99_09_FANUC_NO_FANUC_STDOUT" +grep -Fq "file_error_text=DISABLE_FANUC_STYLE_SUB set in INI file, but found m98" \ + "$M98M99_09_FANUC_NO_FANUC_STDOUT" +grep -Fq "run_step phase=read step=5 rc=5 line=6" "$M98M99_09_FANUC_NO_FANUC_STDOUT" +grep -Fq "statement_uri=M98%20P1%20L3" "$M98M99_09_FANUC_NO_FANUC_STDOUT" +grep -Fq "canon_event=STRAIGHT_TRAVERSE line=5 x=0 y=0 z=0.25" \ + "$M98M99_09_FANUC_NO_FANUC_STDOUT" +if grep -Fq "canon_event=PROGRAM_END" "$M98M99_09_FANUC_NO_FANUC_STDOUT"; then + echo "unexpected m98m99 disabled Fanuc sub program end" >&2 + exit 1 +fi + M98M99_10_M98_P001_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.m98m99_10_m98_p001.run.stdout.log" grep -Fq "file_open=0" "$M98M99_10_M98_P001_STDOUT" grep -Fq "file_read_count=8" "$M98M99_10_M98_P001_STDOUT" @@ -1429,6 +1705,74 @@ if awk ' exit 1 fi +check_m98m99_11_legal() { + local stdout_file="$1" + local read_count="$2" + local first_line="$3" + local sub_line="$4" + + grep -Fq "file_open=0" "$stdout_file" + grep -Fq "file_read_count=$read_count" "$stdout_file" + grep -Fq "file_execute_count=$read_count" "$stdout_file" + grep -Fq "file_saw_error=0" "$stdout_file" + grep -Fq "canon_event=COMMENT: legal example" "$stdout_file" + grep -Fq "canon_event=STRAIGHT_TRAVERSE line=$first_line x=1 y=2 z=0" "$stdout_file" + grep -Fq "canon_event=STRAIGHT_TRAVERSE line=$sub_line x=1 y=2 z=3" "$stdout_file" + if grep -Fq "should never get here" "$stdout_file"; then + echo "unexpected m98m99 main-program fallthrough in $stdout_file" >&2 + exit 1 + fi +} + +check_m98m99_11_legal \ + "$BUILD_DIR/linuxcnc_interp_minimal_harness.m98m99_11_legal_m2.run.stdout.log" \ + 17 4 13 +grep -Fq "canon_event=PROGRAM_END" \ + "$BUILD_DIR/linuxcnc_interp_minimal_harness.m98m99_11_legal_m2.run.stdout.log" +check_m98m99_11_legal \ + "$BUILD_DIR/linuxcnc_interp_minimal_harness.m98m99_11_legal_m02.run.stdout.log" \ + 17 4 13 +grep -Fq "canon_event=PROGRAM_END" \ + "$BUILD_DIR/linuxcnc_interp_minimal_harness.m98m99_11_legal_m02.run.stdout.log" +check_m98m99_11_legal \ + "$BUILD_DIR/linuxcnc_interp_minimal_harness.m98m99_11_legal_m30.run.stdout.log" \ + 17 4 13 +grep -Fq "canon_event=PROGRAM_END" \ + "$BUILD_DIR/linuxcnc_interp_minimal_harness.m98m99_11_legal_m30.run.stdout.log" +check_m98m99_11_legal \ + "$BUILD_DIR/linuxcnc_interp_minimal_harness.m98m99_11_legal_percent.run.stdout.log" \ + 20 11 6 +grep -Fq "canon_event=FINISH" \ + "$BUILD_DIR/linuxcnc_interp_minimal_harness.m98m99_11_legal_percent.run.stdout.log" + +M98M99_11_ILLEGAL_EOF_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.m98m99_11_illegal_eof.run.stdout.log" +grep -Fq "file_open=0" "$M98M99_11_ILLEGAL_EOF_STDOUT" +grep -Fq "file_read_count=21" "$M98M99_11_ILLEGAL_EOF_STDOUT" +grep -Fq "file_execute_count=20" "$M98M99_11_ILLEGAL_EOF_STDOUT" +grep -Fq "file_saw_error=1" "$M98M99_11_ILLEGAL_EOF_STDOUT" +grep -Fq "file_error_text=File ended with no percent sign (%) or program end (M2)" \ + "$M98M99_11_ILLEGAL_EOF_STDOUT" +grep -Fq "canon_event=COMMENT: end of main signaled by EOF" \ + "$M98M99_11_ILLEGAL_EOF_STDOUT" + +M98M99_11_ILLEGAL_NO_M30_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.m98m99_11_illegal_no_m30.run.stdout.log" +grep -Fq "file_open=0" "$M98M99_11_ILLEGAL_NO_M30_STDOUT" +grep -Fq "file_read_count=18" "$M98M99_11_ILLEGAL_NO_M30_STDOUT" +grep -Fq "file_execute_count=18" "$M98M99_11_ILLEGAL_NO_M30_STDOUT" +grep -Fq "file_saw_error=1" "$M98M99_11_ILLEGAL_NO_M30_STDOUT" +grep -Fq "sub: o|2| found in illegal location" "$M98M99_11_ILLEGAL_NO_M30_STDOUT" +grep -Fq "statement_uri=O2%20sub%20%28subprogram%20begin%29" \ + "$M98M99_11_ILLEGAL_NO_M30_STDOUT" + +M98M99_11_ILLEGAL_SUB_AFTER_PERCENT_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.m98m99_11_illegal_sub_after_percent.run.stdout.log" +grep -Fq "file_open=0" "$M98M99_11_ILLEGAL_SUB_AFTER_PERCENT_STDOUT" +grep -Fq "file_read_count=8" "$M98M99_11_ILLEGAL_SUB_AFTER_PERCENT_STDOUT" +grep -Fq "file_execute_count=7" "$M98M99_11_ILLEGAL_SUB_AFTER_PERCENT_STDOUT" +grep -Fq "file_saw_error=1" "$M98M99_11_ILLEGAL_SUB_AFTER_PERCENT_STDOUT" +grep -Fq "file_error_text=Failed to find sub 'O2' before EOF" \ + "$M98M99_11_ILLEGAL_SUB_AFTER_PERCENT_STDOUT" +grep -Fq "canon_event=FINISH" "$M98M99_11_ILLEGAL_SUB_AFTER_PERCENT_STDOUT" + M98M99_13_NAMED_PROGRAM_NAMED_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.m98m99_13_named_program_named.run.stdout.log" grep -Fq "file_open=0" "$M98M99_13_NAMED_PROGRAM_NAMED_STDOUT" grep -Fq "file_read_count=4" "$M98M99_13_NAMED_PROGRAM_NAMED_STDOUT" @@ -1456,6 +1800,93 @@ grep -Fq "In sub 100" "$M98M99_14_O_EXPRESSION_CALL_STDOUT" grep -Fq "In sub 200" "$M98M99_14_O_EXPRESSION_CALL_STDOUT" grep -Fq "canon_event=PROGRAM_END" "$M98M99_14_O_EXPRESSION_CALL_STDOUT" +G10_L1_L10_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.g10_l1_l10.run.stdout.log" +grep -Fq "file_open=0" "$G10_L1_L10_STDOUT" +grep -Fq "file_read_count=115" "$G10_L1_L10_STDOUT" +grep -Fq "file_execute_count=115" "$G10_L1_L10_STDOUT" +grep -Fq "file_saw_error=0" "$G10_L1_L10_STDOUT" +grep -Fq "canon_event=MESSAGE: G10 L1: set tool offsets direct" "$G10_L1_L10_STDOUT" +grep -Fq "canon_event=MESSAGE: G10 L10: set tool offsets relative to position + 45 deg. rotation" "$G10_L1_L10_STDOUT" +grep -Fq "canon_event=MESSAGE: Model B contract: M6 alone and G10 alone do not change tool offset params" "$G10_L1_L10_STDOUT" +grep -Fq "canon_event=MESSAGE: G10 alone does not apply offset, should still be 0 0 0: 0.000000 0.000000 0.000000" "$G10_L1_L10_STDOUT" +grep -Fq "canon_event=USE_TOOL_LENGTH_OFFSET x=8 y=6 z=7" "$G10_L1_L10_STDOUT" +grep -Fq "canon_event=SET_XY_ROTATION rotation=45" "$G10_L1_L10_STDOUT" +grep -Fq "canon_event=PROGRAM_END" "$G10_L1_L10_STDOUT" + +G10_L11_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.g10_l11.run.stdout.log" +grep -Fq "file_open=0" "$G10_L11_STDOUT" +grep -Fq "file_read_count=41" "$G10_L11_STDOUT" +grep -Fq "file_execute_count=41" "$G10_L11_STDOUT" +grep -Fq "file_saw_error=0" "$G10_L11_STDOUT" +grep -Fq "canon_event=SET_G5X_OFFSET index=1 x=1 y=2 z=-3" "$G10_L11_STDOUT" +grep -Fq "canon_event=SET_G92_OFFSET x=-41.1962 y=-46.1962 z=-72" "$G10_L11_STDOUT" +grep -Fq "canon_event=USE_TOOL_LENGTH_OFFSET x=0 y=0 z=-4" "$G10_L11_STDOUT" +grep -Fq "canon_event=MESSAGE: -101.600000" "$G10_L11_STDOUT" +grep -Fq "canon_event=PROGRAM_END" "$G10_L11_STDOUT" + +G10_L2_WHILE_ACTIVE_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.g10_l2_while_active.run.stdout.log" +grep -Fq "file_open=0" "$G10_L2_WHILE_ACTIVE_STDOUT" +grep -Fq "file_read_count=24" "$G10_L2_WHILE_ACTIVE_STDOUT" +grep -Fq "file_execute_count=24" "$G10_L2_WHILE_ACTIVE_STDOUT" +grep -Fq "file_saw_error=0" "$G10_L2_WHILE_ACTIVE_STDOUT" +grep -Fq "canon_event=SET_G5X_OFFSET index=1 x=1 y=0 z=0" "$G10_L2_WHILE_ACTIVE_STDOUT" +grep -Fq "canon_event=SET_XY_ROTATION rotation=-45" "$G10_L2_WHILE_ACTIVE_STDOUT" +grep -Fq "canon_event=MESSAGE: Should be 0 1.414214: 0.000000 1.414214" "$G10_L2_WHILE_ACTIVE_STDOUT" +grep -Fq "canon_event=SET_XY_ROTATION rotation=90" "$G10_L2_WHILE_ACTIVE_STDOUT" +grep -Fq "canon_event=MESSAGE: Should be 1 1: 1.000000 1.000000" "$G10_L2_WHILE_ACTIVE_STDOUT" +grep -Fq "canon_event=PROGRAM_END" "$G10_L2_WHILE_ACTIVE_STDOUT" + +G10_L20_WHILE_ACTIVE_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.g10_l20_while_active.run.stdout.log" +grep -Fq "file_open=0" "$G10_L20_WHILE_ACTIVE_STDOUT" +grep -Fq "file_read_count=20" "$G10_L20_WHILE_ACTIVE_STDOUT" +grep -Fq "file_execute_count=20" "$G10_L20_WHILE_ACTIVE_STDOUT" +grep -Fq "file_saw_error=0" "$G10_L20_WHILE_ACTIVE_STDOUT" +grep -Fq "canon_event=SET_XY_ROTATION rotation=45" "$G10_L20_WHILE_ACTIVE_STDOUT" +grep -Fq "canon_event=MESSAGE: Should be -1 0: -1.000000 0.000000" "$G10_L20_WHILE_ACTIVE_STDOUT" +grep -Fq "canon_event=MESSAGE: Should be 0 -1: 0.000000 -1.000000" "$G10_L20_WHILE_ACTIVE_STDOUT" +grep -Fq "canon_event=MESSAGE: Should be 1 1: 1.000000 1.000000" "$G10_L20_WHILE_ACTIVE_STDOUT" +grep -Fq "canon_event=PROGRAM_END" "$G10_L20_WHILE_ACTIVE_STDOUT" + +G10_WITH_G92_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.g10_with_g92.run.stdout.log" +grep -Fq "file_open=0" "$G10_WITH_G92_STDOUT" +grep -Fq "file_read_count=61" "$G10_WITH_G92_STDOUT" +grep -Fq "file_execute_count=61" "$G10_WITH_G92_STDOUT" +grep -Fq "file_saw_error=0" "$G10_WITH_G92_STDOUT" +grep -Fq "canon_event=SET_G5X_OFFSET index=9 x=25 y=26 z=27" "$G10_WITH_G92_STDOUT" +grep -Fq "canon_event=SET_G92_OFFSET x=-0.1 y=-0.2 z=-10.3" "$G10_WITH_G92_STDOUT" +grep -Fq "canon_event=MESSAGE: X0.100000 Y0.200000 Z0.300000" "$G10_WITH_G92_STDOUT" +grep -Fq "canon_event=MESSAGE: X-23.900000 Y-23.800000 Z-23.700000" "$G10_WITH_G92_STDOUT" +grep -Fq "canon_event=SET_G92_OFFSET x=0 y=0 z=0" "$G10_WITH_G92_STDOUT" +grep -Fq "canon_event=MESSAGE: X-24.000000 Y-24.000000 Z-34.000000" "$G10_WITH_G92_STDOUT" +grep -Fq "canon_event=PROGRAM_END" "$G10_WITH_G92_STDOUT" + +G52_G92_INTERACTION_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.g52_g92_interaction.run.stdout.log" +grep -Fq "file_open=0" "$G52_G92_INTERACTION_STDOUT" +grep -Fq "file_read_count=39" "$G52_G92_INTERACTION_STDOUT" +grep -Fq "file_execute_count=39" "$G52_G92_INTERACTION_STDOUT" +grep -Fq "file_saw_error=0" "$G52_G92_INTERACTION_STDOUT" +grep -Fq "canon_event=COMMENT: G52 and G92 param #5210 setting behavior" "$G52_G92_INTERACTION_STDOUT" +grep -Fq "G92 params: 1.000000 -25.400000 -50.800000" "$G52_G92_INTERACTION_STDOUT" +grep -Fq "G92 params: 0.000000 -25.400000 -50.800000" "$G52_G92_INTERACTION_STDOUT" +grep -Fq "G92 params: 1.000000 50.800000 76.200000" "$G52_G92_INTERACTION_STDOUT" +grep -Fq "G92 params: 1.000000 0.000000 0.000000" "$G52_G92_INTERACTION_STDOUT" +grep -Fq "canon_event=SET_G92_OFFSET x=-1 y=-2 z=0" "$G52_G92_INTERACTION_STDOUT" +grep -Fq "canon_event=SET_G92_OFFSET x=2 y=3 z=0" "$G52_G92_INTERACTION_STDOUT" +grep -Fq "canon_event=PALLET_SHUTTLE" "$G52_G92_INTERACTION_STDOUT" +grep -Fq "canon_event=PROGRAM_END" "$G52_G92_INTERACTION_STDOUT" + +G92_PERSISTENCE_ENABLED_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.g92_persistence_enabled.run.stdout.log" +grep -Fq "file_open=0" "$G92_PERSISTENCE_ENABLED_STDOUT" +grep -Fq "file_saw_error=0" "$G92_PERSISTENCE_ENABLED_STDOUT" +grep -Fq "Startup G92 params: 1.000000 1.250000 2.500000 3.750000" "$G92_PERSISTENCE_ENABLED_STDOUT" +grep -Fq "canon_event=SET_G92_OFFSET x=1.25 y=2.5 z=3.75" "$G92_PERSISTENCE_ENABLED_STDOUT" + +G92_PERSISTENCE_DISABLED_STDOUT="$BUILD_DIR/linuxcnc_interp_minimal_harness.g92_persistence_disabled.run.stdout.log" +grep -Fq "file_open=0" "$G92_PERSISTENCE_DISABLED_STDOUT" +grep -Fq "file_saw_error=0" "$G92_PERSISTENCE_DISABLED_STDOUT" +grep -Fq "Startup G92 params: 0.000000 0.000000 0.000000 0.000000" "$G92_PERSISTENCE_DISABLED_STDOUT" +grep -Fq "canon_event=SET_G92_OFFSET x=0 y=0 z=0" "$G92_PERSISTENCE_DISABLED_STDOUT" + for fixture in "$GCODE_FIXTURE_DIR"/*.ngc; do name="$(basename "$fixture" .ngc)" if [[ "$name" == "disable_fanuc_style_sub_m98" ]]; then diff --git a/wasm-port/tests/wasm/node/verify_interp_wasm.mjs b/wasm-port/tests/wasm/node/verify_interp_wasm.mjs index a23685b..8e4d0a6 100644 --- a/wasm-port/tests/wasm/node/verify_interp_wasm.mjs +++ b/wasm-port/tests/wasm/node/verify_interp_wasm.mjs @@ -3,7 +3,10 @@ import { fileURLToPath } from "node:url"; import { dirname, resolve } from "node:path"; import assert from "node:assert/strict"; -import { createLinuxCncInterpSdk } from "../../../runtime/sdk/src/index.js"; +import { + createLinuxCncInterpSdk, + planIniFileContextStaging, +} from "../../../runtime/sdk/src/index.js"; import { INTERP_BASELINE_INI_FIXTURE, INTERP_COORDINATE_OFFSETS_FILE_FIXTURE, @@ -80,6 +83,7 @@ const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); const rootDir = resolve(__dirname, "../../.."); const wasmPath = resolve(rootDir, "build/wasm/core/linuxcnc_interp.wasm"); +const manifestText = readFileSync(resolve(rootDir, "tools/source-manifest.txt"), "utf8"); const interpPrints = []; const interp = await createLinuxCncInterpSdk({ @@ -98,8 +102,33 @@ function runWithCapturedPrints(operation) { return { output, prints: interpPrints.join("\n") }; } -function writeVendorTextFile(sourcePath, wasmPath) { - interp.writeTextFile(wasmPath, readFileSync(sourcePath, "utf8")); +function writeVendorTextFile(sourcePath, wasmPath, targetInterp = interp) { + targetInterp.writeTextFile(wasmPath, readFileSync(sourcePath, "utf8")); +} + +function stageInterpIniContext(name, programFile = "test.ngc") { + const sourceRootRel = `tests/interp/${name}`; + const iniText = readFileSync( + resolve(rootDir, "vendor/linuxcnc", sourceRootRel, "test.ini"), + "utf8", + ); + const plan = planIniFileContextStaging({ + manifestText, + sourceRootRel, + iniFile: "test.ini", + iniText, + programFile, + wasmDir: `/work/interp/${name}`, + }); + + for (const file of plan.files) { + writeVendorTextFile(resolve(rootDir, "vendor/linuxcnc", file.sourceRel), file.wasmPath); + if (file.executable) { + interp.module.FS.chmod(file.wasmPath, 0o755); + } + } + + return plan; } function writeFiveAxisTrtMachineFiles() { @@ -237,6 +266,50 @@ function writeInterpRegressionFiles(name, files) { return wasmDir; } +function writeCcompRegressionFiles(name) { + const sourceDir = resolve(rootDir, "vendor/linuxcnc/tests/ccomp", name); + const wasmDir = `/work/ccomp/${name}`; + + writeVendorTextFile(resolve(sourceDir, "test.ngc"), `${wasmDir}/test.ngc`); + writeVendorTextFile(resolve(sourceDir, "test.tbl"), `${wasmDir}/test.tbl`); + interp.writeTextFile( + `${wasmDir}/test.ini`, + [ + "[EMCIO]", + "TOOL_TABLE = test.tbl", + "[TRAJ]", + "COORDINATES = X Y Z A B C U V W", + "", + ].join("\n"), + ); + + return wasmDir; +} + +function writeG10RegressionFiles(name, files) { + const sourceDir = resolve(rootDir, "vendor/linuxcnc/tests/interp/g10", name); + const wasmDir = `/work/interp/g10/${name}`; + + for (const filename of files) { + writeVendorTextFile(resolve(sourceDir, filename), `${wasmDir}/${filename}`); + } + + if (files.includes("test.tbl")) { + interp.writeTextFile( + `${wasmDir}/test.ini`, + [ + "[EMCIO]", + "TOOL_TABLE = test.tbl", + "[TRAJ]", + "COORDINATES = X Y Z A B C U V W", + "", + ].join("\n"), + ); + } + + return wasmDir; +} + function writeUserMCodeFixture(name, code) { const wasmDir = `/work/user-m/${name}`; const iniPath = `${wasmDir}/test.ini`; @@ -1232,6 +1305,81 @@ verifyExpectedOutput( ].join("\n"), ); +const crazyPathsPath = writeInterpRegressionFile("crazy-paths", "test.ngc"); +verifyExpectedOutput( + "interp_crazy_paths_wasm", + interp.runFile(crazyPathsPath), + [ + "file_open=0", + "file_read_count=1526", + "file_execute_count=1526", + "file_saw_error=0", + "canon_event=COMMENT: interpreter: cutter radius compensation on right", + "canon_event=COMMENT: interpreter: cutter radius compensation on left", + "canon_event=ARC_FEED line=8 first_end=-99.2047 second_end=-102.892 first_axis=-98.9043 second_axis=-102.097 rotation=-1 axis_end_point=0", + "canon_event=ARC_FEED line=103 first_end=-40.3437 second_end=-103.278 first_axis=-45.0196 second_axis=-102.442 rotation=-1 axis_end_point=0", + "canon_event=STRAIGHT_FEED line=260 x=3.58919 y=30.3694 z=0", + "canon_event=ARC_FEED line=445 first_end=101.539 second_end=44.5843 first_axis=100.896 second_axis=46.212 rotation=1 axis_end_point=0", + "canon_event=STRAIGHT_FEED line=469 x=98.8154 y=102.176 z=0", + "canon_event=PROGRAM_END", + ].join("\n"), +); + +const camNisleyDir = writeInterpRegressionFiles("cam-nisley", ["cam.ngc", "test.tbl"]); +interp.writeTextFile( + `${camNisleyDir}/test.ini`, + [ + "[EMCIO]", + "TOOL_TABLE = test.tbl", + "[TRAJ]", + "COORDINATES = X Y Z A B C U V W", + "", + ].join("\n"), +); +verifyExpectedOutput( + "interp_cam_nisley_wasm", + interp.runFileWithIni(`${camNisleyDir}/cam.ngc`, `${camNisleyDir}/test.ini`), + [ + "file_open=0", + "file_read_count=1584", + "file_execute_count=1584", + "file_saw_error=0", + "canon_event=COMMENT: Ed Nisley - Nov 2006 - Mar 2007", + "canon_event=SELECT_TOOL tool=1", + "canon_event=CHANGE_TOOL", + "canon_event=START_SPINDLE_CLOCKWISE spindle=0", + "canon_event=COMMENT: interpreter: cutter radius compensation on right", + "canon_event=ARC_FEED line=223 first_end=1.91351e-18 second_end=-15.1438", + "canon_event=STRAIGHT_TRAVERSE line=241 x=75 y=0 z=75", + "canon_event=MESSAGE: Done!", + "canon_event=PROGRAM_END", + "absent=file_error_text=Requested tool 1 not found in the tool table", + ].join("\n"), +); + +const camNisleyBareInterp = await createLinuxCncInterpSdk({ + wasmBinary: readFileSync(wasmPath), + printErr(message) { + console.error(message); + }, +}); +writeVendorTextFile( + resolve(rootDir, "vendor/linuxcnc/tests/interp/cam-nisley/cam.ngc"), + "/work/interp/cam-nisley-bare/cam.ngc", + camNisleyBareInterp, +); +verifyExpectedOutput( + "interp_cam_nisley_bare_wasm", + camNisleyBareInterp.runFile("/work/interp/cam-nisley-bare/cam.ngc"), + [ + "file_open=0", + "file_read_count=57", + "file_execute_count=57", + "file_saw_error=1", + "file_error_text=Requested tool 1 not found in the tool table", + ].join("\n"), +); + const namedparamBug424Path = writeInterpRegressionFile("namedparam-bug424", "test.ngc"); verifyExpectedOutput( "interp_namedparam_bug424_wasm", @@ -1271,7 +1419,208 @@ verifyExpectedOutput( ].join("\n"), ); +const insideCornersPath = writeInterpRegressionFile("inside-corners", "test.ngc"); +verifyExpectedOutput( + "interp_inside_corners_wasm", + interp.runFile(insideCornersPath), + [ + "file_open=0", + "file_read_count=397", + "file_execute_count=397", + "file_saw_error=0", + "canon_event=PROGRAM_STOP", + "canon_event=DWELL seconds=3", + "canon_event=SELECT_PLANE plane=1", + "canon_event=SELECT_PLANE plane=3", + "canon_event=COMMENT: interpreter: cutter radius compensation on left", + "canon_event=COMMENT: interpreter: cutter radius compensation on right", + "canon_event=ARC_FEED line=16 first_end=1.2281 second_end=1.3456 first_axis=0.628 second_axis=1.0458 rotation=1 axis_end_point=-0.1", + "canon_event=STRAIGHT_FEED line=14 x=0.701154 y=0.162499 z=-0.1", + "canon_event=ARC_FEED line=74 first_end=0.298564 second_end=1.82077 first_axis=0.3459 second_axis=1.7626 rotation=1 axis_end_point=0", + "canon_event=STRAIGHT_FEED line=107 x=0 y=0 z=1", + "canon_event=PROGRAM_END", + ].join("\n"), +); + +const inverseTimeWithCompPath = writeInterpRegressionFile( + "inverse-time-with-comp", + "inverse.ngc", +); +verifyExpectedOutput( + "interp_inverse_time_with_comp_wasm", + interp.runFile(inverseTimeWithCompPath), + [ + "file_open=0", + "file_read_count=68", + "file_execute_count=68", + "file_saw_error=0", + "canon_event=COMMENT: interpreter: cutter radius compensation on right", + "canon_event=COMMENT: interpreter: cutter radius compensation on left", + "canon_event=COMMENT: interpreter: feed mode set to inverse time", + "canon_event=COMMENT: interpreter: feed mode set to units per minute", + "canon_event=SET_FEED_RATE rate=30", + "canon_event=SET_FEED_RATE rate=20", + "canon_event=SET_FEED_RATE rate=40", + "canon_event=SET_FEED_RATE rate=33", + "canon_event=SET_FEED_RATE rate=10", + "canon_event=SET_FEED_RATE rate=25", + "canon_event=STRAIGHT_FEED line=5 x=1 y=0 z=0", + "canon_event=ARC_FEED line=6 first_end=1.2 second_end=0", + "canon_event=STRAIGHT_FEED line=13 x=0.2 y=3.82918 z=0", + "canon_event=ARC_FEED line=14 first_end=1.22465e-17 second_end=5.2", + "canon_event=ARC_FEED line=14 first_end=1.22465e-17 second_end=4.2", + "canon_event=ARC_FEED line=14 first_end=1.22465e-17 second_end=4.8", + "canon_event=COMMENT: interpreter: cutter radius compensation off", + "canon_event=PROGRAM_END", + ].join("\n"), +); + +const ccompLatheCompDir = writeCcompRegressionFiles("lathe-comp"); +verifyExpectedOutput( + "interp_ccomp_lathe_comp_wasm", + interp.runFileWithIni(`${ccompLatheCompDir}/test.ngc`, `${ccompLatheCompDir}/test.ini`), + [ + "file_open=0", + "file_read_count=49", + "file_execute_count=49", + "file_saw_error=0", + "canon_event=SELECT_PLANE plane=3", + "canon_event=SELECT_TOOL tool=2", + "canon_event=COMMENT: interpreter: cutter radius compensation on left", + "canon_event=SELECT_TOOL tool=7", + "canon_event=COMMENT: interpreter: cutter radius compensation on right", + "canon_event=PROGRAM_END", + ].join("\n"), +); + +const ccompMillG90G91G92Dir = writeCcompRegressionFiles("mill-g90g91g92"); +verifyExpectedOutput( + "interp_ccomp_mill_g90g91g92_wasm", + interp.runFileWithIni( + `${ccompMillG90G91G92Dir}/test.ngc`, + `${ccompMillG90G91G92Dir}/test.ini`, + ), + [ + "file_open=0", + "file_read_count=28", + "file_execute_count=28", + "file_saw_error=0", + "canon_event=SELECT_TOOL tool=3", + "canon_event=SET_G92_OFFSET x=0 y=0 z=0.5", + "canon_event=COMMENT: interpreter: cutter radius compensation on left", + "canon_event=COMMENT: interpreter: cutter radius compensation off", + "canon_event=PROGRAM_END", + ].join("\n"), +); + +const ccompMillLineArcEntryDir = writeCcompRegressionFiles("mill-line-arc-entry"); +verifyExpectedOutput( + "interp_ccomp_mill_line_arc_entry_wasm", + interp.runFileWithIni( + `${ccompMillLineArcEntryDir}/test.ngc`, + `${ccompMillLineArcEntryDir}/test.ini`, + ), + [ + "file_open=0", + "file_read_count=33", + "file_execute_count=33", + "file_saw_error=0", + "canon_event=SELECT_TOOL tool=4", + "canon_event=COMMENT: interpreter: cutter radius compensation on left", + "canon_event=ARC_FEED line=23 first_end=2 second_end=3.01969", + "canon_event=COMMENT: interpreter: cutter radius compensation off", + "canon_event=PROGRAM_END", + ].join("\n"), +); + +const ccompMillZchangesDir = writeCcompRegressionFiles("mill-zchanges"); +verifyExpectedOutput( + "interp_ccomp_mill_zchanges_wasm", + interp.runFileWithIni(`${ccompMillZchangesDir}/test.ngc`, `${ccompMillZchangesDir}/test.ini`), + [ + "file_open=0", + "file_read_count=81", + "file_execute_count=81", + "file_saw_error=0", + "canon_event=COMMENT: interpreter: cutter radius compensation on left", + "canon_event=ARC_FEED line=15 first_end=0.5 second_end=0.752461", + "canon_event=STRAIGHT_FEED line=54 x=0.49826 y=-0.24826 z=0", + "canon_event=COMMENT: interpreter: cutter radius compensation off", + "canon_event=PROGRAM_END", + ].join("\n"), +); + for (const badFixture of [ + { + name: "a_in_canned_cycle", + file: "a-in-canned-cycle.ngc", + readCount: 3, + executeCount: 2, + errorText: "Cannot put an a in canned cycle", + }, + { + name: "a_in_canned_cycle2", + file: "a-in-canned-cycle2.ngc", + readCount: 2, + executeCount: 1, + errorText: "Cannot put an a in canned cycle", + }, + { + name: "bad_arc_big_imperial_center_format", + file: "bad-arc.big.imperial.center-format.ngc", + readCount: 6, + executeCount: 6, + errorText: "Radius to end of arc differs from radius to start: start=(X0.0000,Y0.0000) center=(X300.1428,Y0.0000) end=(X600.0000,Y0.0000) r1=300.1428 r2=299.8572 abs_err=0.2857 rel_err=0.0952%", + }, + { + name: "bad_arc_big_metric_center_format", + file: "bad-arc.big.metric.center-format.ngc", + readCount: 6, + executeCount: 6, + errorText: "Radius to end of arc differs from radius to start: start=(X0.0000,Y0.0000) center=(X3001.4284,Y0.0000) end=(X6000.0000,Y0.0000) r1=3001.4284 r2=2998.5716 abs_err=2.857 rel_err=0.0952%", + }, + { + name: "bad_arc_medium_imperial_center_format", + file: "bad-arc.medium.imperial.center-format.ngc", + readCount: 6, + executeCount: 6, + errorText: "Radius to end of arc differs from radius to start: start=(X0.0000,Y0.0000) center=(X99.8500,Y0.0000) end=(X200.0000,Y0.0000) r1=99.8500 r2=100.1500 abs_err=0.3 rel_err=0.2996%", + }, + { + name: "bad_arc_medium_metric_center_format", + file: "bad-arc.medium.metric.center-format.ngc", + readCount: 6, + executeCount: 6, + errorText: "Radius to end of arc differs from radius to start: start=(X0.0000,Y0.0000) center=(X998.5000,Y0.0000) end=(X2000.0000,Y0.0000) r1=998.5000 r2=1001.5000 abs_err=3 rel_err=0.2996%", + }, + { + name: "bad_arc_small_imperial_center_format", + file: "bad-arc.small.imperial.center-format.ngc", + readCount: 6, + executeCount: 6, + errorText: "Radius to end of arc differs from radius to start: start=(X0.0000,Y0.0000) center=(X2.4986,Y0.0000) end=(X5.0000,Y0.0000) r1=2.4986 r2=2.5014 abs_err=0.002857 rel_err=0.1142%", + }, + { + name: "bad_arc_small_metric_center_format", + file: "bad-arc.small.metric.center-format.ngc", + readCount: 6, + executeCount: 6, + errorText: "Radius to end of arc differs from radius to start: start=(X0.0000,Y0.0000) center=(X24.9857,Y0.0000) end=(X50.0000,Y0.0000) r1=24.9857 r2=25.0143 abs_err=0.02857 rel_err=0.1142%", + }, + { + name: "ccomp_arcexit", + file: "ccomp-arcexit.ngc", + readCount: 7, + executeCount: 7, + errorText: "The move just after exiting cutter compensation mode must be straight, not an arc", + }, + { + name: "ccomp_gouging", + file: "ccomp-gouging.ngc", + readCount: 7, + executeCount: 7, + errorText: "Straight feed in concave corner cannot be reached by the tool without gouging", + }, { name: "exists_1", file: "exists-1.ngc", @@ -1384,6 +1733,67 @@ verifyExpectedOutput( ].join("\n"), ); +for (const goodArcFixture of [ + { + name: "big_imperial_center_format", + file: "good-arc.big.imperial.center-format.ngc", + x: 600, + firstEnd: 600, + firstAxis: 300.14, + }, + { + name: "big_metric_center_format", + file: "good-arc.big.metric.center-format.ngc", + x: 6000, + firstEnd: 6000, + firstAxis: 3001.4, + }, + { + name: "medium_imperial_center_format", + file: "good-arc.medium.imperial.center-format.ngc", + x: 200, + firstEnd: 200, + firstAxis: 99.95, + }, + { + name: "medium_metric_center_format", + file: "good-arc.medium.metric.center-format.ngc", + x: 2000, + firstEnd: 2000, + firstAxis: 999.5, + }, + { + name: "small_imperial_center_format", + file: "good-arc.small.imperial.center-format.ngc", + x: 5, + firstEnd: 5, + firstAxis: 2.4986, + }, + { + name: "small_metric_center_format", + file: "good-arc.small.metric.center-format.ngc", + x: 50, + firstEnd: 50, + firstAxis: 24.986, + }, +]) { + const goodArcPath = writeInterpRegressionFile("good", goodArcFixture.file); + verifyExpectedOutput( + `interp_good_arc_${goodArcFixture.name}_wasm`, + interp.runFile(goodArcPath), + [ + "file_open=0", + "file_read_count=5", + "file_execute_count=5", + "file_saw_error=0", + `run_step phase=execute step=4 rc=0 line=4 x=${goodArcFixture.x} y=0`, + `canon_event=ARC_FEED line=4 first_end=${goodArcFixture.firstEnd} second_end=0 first_axis=${goodArcFixture.firstAxis} second_axis=0 rotation=-1 axis_end_point=0`, + "canon_event=PROGRAM_END", + "absent=Radius to end of arc differs from radius to start", + ].join("\n"), + ); +} + const g6164Path = writeInterpRegressionFile("g6164", "test.ngc"); verifyExpectedOutput( "interp_g6164_wasm", @@ -1403,6 +1813,144 @@ verifyExpectedOutput( ].join("\n"), ); +for (const g72Fixture of [ + { + name: "facing", + dir: "g72-facing", + file: "g72-iterations-present.ngc", + finalZ: "-39.999", + }, + { + name: "missing_iteration", + dir: "g72-missing-iteration", + file: "g72-iterations-missing.ngc", + finalZ: "-40", + }, +]) { + const g72Path = writeInterpRegressionFile(g72Fixture.dir, g72Fixture.file); + verifyExpectedOutput( + `interp_g72_${g72Fixture.name}_wasm`, + interp.runFile(g72Path), + [ + "file_open=0", + "file_read_count=10", + "file_execute_count=10", + "file_saw_error=0", + "run_step phase=execute step=8 rc=0 line=8 x=100 y=0 z=0", + "canon_event=STRAIGHT_TRAVERSE line=8 x=50 y=0 z=0", + "canon_event=STRAIGHT_FEED line=-1 x=100 y=0 z=-39", + `canon_event=STRAIGHT_FEED line=-1 x=100 y=0 z=${g72Fixture.finalZ}`, + "canon_event=PROGRAM_END", + "absent=program seem to be stuck", + ].join("\n"), + ); +} + +for (const g71Fixture of [ + { + name: "endless_loop", + dir: "g71-endless-loop", + file: "g71-endless-loop.ngc", + readCount: 19, + executeCount: 19, + keyEvents: [ + "canon_event=STRAIGHT_TRAVERSE line=17 x=15 y=0 z=0", + "canon_event=ARC_FEED line=-1 first_end=-14.04 second_end=10", + "canon_event=STRAIGHT_FEED line=-1 x=15 y=0 z=-21.96", + ], + }, + { + name: "endless_loop2", + dir: "g71-endless-loop2", + file: "g71-endless-loop2.ngc", + readCount: 12, + executeCount: 12, + keyEvents: [ + "canon_event=START_SPINDLE_CLOCKWISE spindle=0", + "canon_event=STRAIGHT_TRAVERSE line=9 x=168 y=0 z=0", + "canon_event=STRAIGHT_FEED line=-1 x=170 y=0 z=-415", + "canon_event=STRAIGHT_TRAVERSE line=11 x=300 y=0 z=10", + ], + }, + { + name: "endless_loop_2", + dir: "g71-endless-loop_2", + file: "g71-endless-loop_2.ngc", + readCount: 40, + executeCount: 40, + keyEvents: [ + "canon_event=COMMENT: interpreter: Lathe diameter mode changed to diameter", + "canon_event=STRAIGHT_TRAVERSE line=31 x=10 y=0 z=2.8", + "canon_event=ARC_FEED line=-1 first_end=-27 second_end=10.113", + "canon_event=COMMENT: interpreter: cutter radius compensation off", + "canon_event=STRAIGHT_TRAVERSE line=38 x=12.5 y=0 z=-25", + ], + }, + { + name: "with_g70", + dir: "g71-with-g70", + file: "g71-with-g70.ngc", + readCount: 32, + executeCount: 32, + keyEvents: [ + "canon_event=ARC_FEED line=-1 first_end=1.62661 second_end=1.78761", + "canon_event=ARC_FEED line=-1 first_end=-36.1 second_end=13", + "canon_event=STRAIGHT_FEED line=-1 x=15 y=0 z=-38.1", + ], + }, +]) { + const g71Path = writeInterpRegressionFile(g71Fixture.dir, g71Fixture.file); + verifyExpectedOutput( + `interp_g71_${g71Fixture.name}_wasm`, + interp.runFile(g71Path), + [ + "file_open=0", + `file_read_count=${g71Fixture.readCount}`, + `file_execute_count=${g71Fixture.executeCount}`, + "file_saw_error=0", + ...g71Fixture.keyEvents, + "canon_event=PROGRAM_END", + "absent=program seem to be stuck", + "absent=killing", + ].join("\n"), + ); +} + +const g76Dir = writeInterpRegressionFiles("g76", ["g76only.ngc", "test.tbl"]); +interp.writeTextFile( + `${g76Dir}/test.ini`, + [ + "[EMCIO]", + "TOOL_TABLE = test.tbl", + "[TRAJ]", + "COORDINATES = X Y Z A B C U V W", + "", + ].join("\n"), +); +verifyExpectedOutput( + "interp_g76_wasm", + interp.runFileWithIni(`${g76Dir}/g76only.ngc`, `${g76Dir}/test.ini`), + [ + "file_open=0", + "file_read_count=30", + "file_execute_count=30", + "file_saw_error=0", + "run_step phase=execute step=6 rc=2 line=6", + "statement_uri=t4%20m6", + "run_step phase=execute step=25 rc=0 line=25 x=0.2 y=0 z=-0.5", + "canon_event=SELECT_TOOL tool=4", + "canon_event=CHANGE_TOOL", + "canon_event=START_SPINDLE_CLOCKWISE spindle=0", + "canon_event=START_SPEED_FEED_SYNCH spindle=0 feed_per_revolution=0.05 velocity_mode=0", + "canon_event=START_SPEED_FEED_SYNCH spindle=0 feed_per_revolution=0.0672681 velocity_mode=0", + "canon_event=STOP_SPEED_FEED_SYNCH", + "canon_event=STRAIGHT_TRAVERSE line=25 x=0.237 y=0 z=0.195474", + "canon_event=STRAIGHT_TRAVERSE line=26 x=0.5 y=0 z=-0.5", + "canon_event=PROGRAM_END", + "absent=Requested tool 4 not found", + ].join("\n"), +); + const rotationAbsPtsPath = writeInterpRegressionFile("rotation/abs-pts", "test.ngc"); const rotationAbsPtsOutput = interp.runFile(rotationAbsPtsPath); verifyExpectedOutput( @@ -1478,15 +2026,12 @@ assert.match( "interp_rotation_g53_wasm: rotated G53 endpoint", ); -const iniparamDir = writeInterpRegressionFiles("iniparam", [ - "test.ini", - "test.ngc", -]); +const iniparamPlan = stageInterpIniContext("iniparam"); verifyExpectedOutput( "interp_iniparam_wasm", interp.runFileWithIniContinueOnError( - `${iniparamDir}/test.ngc`, - `${iniparamDir}/test.ini`, + iniparamPlan.programPath, + iniparamPlan.iniPath, ), [ "file_open=0", @@ -1504,15 +2049,12 @@ verifyExpectedOutput( ].join("\n"), ); -const iniparamFailassignDir = writeInterpRegressionFiles("iniparam-failassign", [ - "test.ini", - "test.ngc", -]); +const iniparamFailassignPlan = stageInterpIniContext("iniparam-failassign"); verifyExpectedOutput( "interp_iniparam_failassign_wasm", interp.runFileWithIni( - `${iniparamFailassignDir}/test.ngc`, - `${iniparamFailassignDir}/test.ini`, + iniparamFailassignPlan.programPath, + iniparamFailassignPlan.iniPath, ), [ "file_open=0", @@ -1525,17 +2067,12 @@ verifyExpectedOutput( ].join("\n"), ); -const subCallFromSubDir = writeInterpRegressionFiles("sub-call-from-sub", [ - "test.ini", - "test.ngc", - "subs/caller.ngc", - "subs/helper.ngc", -]); +const subCallFromSubPlan = stageInterpIniContext("sub-call-from-sub"); verifyExpectedOutput( "interp_sub_call_from_sub_wasm", interp.runFileWithIni( - `${subCallFromSubDir}/test.ngc`, - `${subCallFromSubDir}/test.ini`, + subCallFromSubPlan.programPath, + subCallFromSubPlan.iniPath, ), [ "file_open=0", @@ -1546,16 +2083,12 @@ verifyExpectedOutput( ].join("\n"), ); -const sequenceNumberDir = writeInterpRegressionFiles("sequence-number", [ - "test.ini", - "test.ngc", - "rm400.ngc", -]); +const sequenceNumberPlan = stageInterpIniContext("sequence-number"); verifyExpectedOutput( "interp_sequence_number_wasm", interp.runFileWithIni( - `${sequenceNumberDir}/test.ngc`, - `${sequenceNumberDir}/test.ini`, + sequenceNumberPlan.programPath, + sequenceNumberPlan.iniPath, ), [ "file_open=0", @@ -1568,16 +2101,12 @@ verifyExpectedOutput( ].join("\n"), ); -const nestedSubErrorDir = writeInterpRegressionFiles("nested-sub-error", [ - "test.ini", - "test.ngc", - "subs/nested.ngc", -]); +const nestedSubErrorPlan = stageInterpIniContext("nested-sub-error"); verifyExpectedOutput( "interp_nested_sub_error_wasm", interp.runFileWithIni( - `${nestedSubErrorDir}/test.ngc`, - `${nestedSubErrorDir}/test.ini`, + nestedSubErrorPlan.programPath, + nestedSubErrorPlan.iniPath, ), [ "file_open=0", @@ -1590,16 +2119,12 @@ verifyExpectedOutput( ].join("\n"), ); -const nestedSubInFileErrorDir = writeInterpRegressionFiles("nested-sub-in-file-error", [ - "test.ini", - "test.ngc", - "subs/sequential.ngc", -]); +const nestedSubInFileErrorPlan = stageInterpIniContext("nested-sub-in-file-error"); verifyExpectedOutput( "interp_nested_sub_in_file_error_wasm", interp.runFileWithIni( - `${nestedSubInFileErrorDir}/test.ngc`, - `${nestedSubInFileErrorDir}/test.ini`, + nestedSubInFileErrorPlan.programPath, + nestedSubInFileErrorPlan.iniPath, ), [ "file_open=0", @@ -1613,16 +2138,12 @@ verifyExpectedOutput( ].join("\n"), ); -const owordUnwindDir = writeInterpRegressionFiles("oword-unwind", [ - "test.ini", - "test.ngc", - "fail.ngc", -]); +const owordUnwindPlan = stageInterpIniContext("oword-unwind"); verifyExpectedOutput( "interp_oword_unwind_wasm", interp.runFileWithIniContinueOnError( - `${owordUnwindDir}/test.ngc`, - `${owordUnwindDir}/test.ini`, + owordUnwindPlan.programPath, + owordUnwindPlan.iniPath, ), [ "file_open=0", @@ -1637,15 +2158,12 @@ verifyExpectedOutput( ].join("\n"), ); -const abortHotCommentDir = writeInterpRegressionFiles("abort-hot-comment", [ - "test.ini", - "test.ngc", -]); +const abortHotCommentPlan = stageInterpIniContext("abort-hot-comment"); verifyExpectedOutput( "interp_abort_hot_comment_wasm", interp.runFileWithIniContinueOnError( - `${abortHotCommentDir}/test.ngc`, - `${abortHotCommentDir}/test.ini`, + abortHotCommentPlan.programPath, + abortHotCommentPlan.iniPath, ), [ "file_open=0", @@ -1657,13 +2175,10 @@ verifyExpectedOutput( ].join("\n"), ); -const m19Dir = writeInterpRegressionFiles("m19", [ - "test.ini", - "test.ngc", -]); +const m19Plan = stageInterpIniContext("m19"); verifyExpectedOutput( "interp_m19_wasm", - interp.runFileWithIni(`${m19Dir}/test.ngc`, `${m19Dir}/test.ini`), + interp.runFileWithIni(m19Plan.programPath, m19Plan.iniPath), [ "file_open=0", "file_read_count=8", @@ -1742,6 +2257,144 @@ verifyExpectedOutput( ].join("\n"), ); +const m98m99M98NoPWordPath = writeInterpRegressionFile( + "m98m99/03-error-M98-no-P-word", + "test.ngc", +); +verifyExpectedOutput( + "interp_m98m99_03_error_m98_no_p_word_wasm", + interp.runFile(m98m99M98NoPWordPath), + [ + "file_open=0", + "file_read_count=3", + "file_execute_count=2", + "file_saw_error=1", + "file_error_text=Found 'm98' code with no P-word", + "run_step phase=read step=3 rc=5 line=4", + "statement_uri=M98", + "canon_event=COMMENT: Fanuc M98 requires P-word ", + "absent=canon_event=PROGRAM_END", + ].join("\n"), +); + +const m98m99M98ButNoSubPath = writeInterpRegressionFile( + "m98m99/04-M98-but-no-sub", + "test.ngc", +); +verifyExpectedOutput( + "interp_m98m99_04_m98_but_no_sub_wasm", + interp.runFile(m98m99M98ButNoSubPath), + [ + "file_open=0", + "file_read_count=5", + "file_execute_count=4", + "file_saw_error=1", + "file_error_text=Failed to find sub 'O1' before EOF", + "run_step phase=read step=5 rc=5 line=4", + "statement_uri=%25", + "canon_event=COMMENT: M98 call non-existant sub ", + "absent=canon_event=PROGRAM_END", + ].join("\n"), +); + +const m98m99M98LoopsPath = writeInterpRegressionFile("m98m99/05-M98-loops", "test.ngc"); +const m98m99M98LoopsRun = runWithCapturedPrints(() => interp.runFile(m98m99M98LoopsPath)); +verifyExpectedOutput( + "interp_m98m99_05_m98_loops_wasm", + m98m99M98LoopsRun.output, + [ + "file_open=0", + "file_read_count=102", + "file_execute_count=102", + "file_saw_error=0", + "canon_event=COMMENT: A simple O sub example ", + "canon_event=PROGRAM_END", + ].join("\n"), +); +verifyExpectedOutput( + "interp_m98m99_05_m98_loops_prints_wasm", + m98m99M98LoopsRun.prints, + [ + "X SUB O1 PARAM1 = 10.000000", + "X MAIN 10LOOP PARAM1 = 10.000000", + "X MAIN 0LOOP PARAM1 = 0.000000", + "X MAIN 2LOOP PARAM1 = 2.000000", + ].join("\n"), +); + +for (const mixedSubStyleFixture of [ + { + name: "called_with_o_call", + file: "O...-called-with-O..._call.ngc", + readCount: 5, + executeCount: 5, + errorText: "Fanuc 'O....' subroutine must be called with 'M98'", + errorStep: "run_step phase=execute step=5 rc=5 line=4", + statementUri: "statement_uri=O1", + comment: "canon_event=COMMENT: Fanuc 'O...' sub must be called with M98 ", + }, + { + name: "ended_with_o_endsub", + file: "O...-ended-with-O..._endsub.ngc", + readCount: 7, + executeCount: 7, + errorText: "Fanuc 'O....' subroutine definition must end with 'M99'", + errorStep: "run_step phase=execute step=7 rc=5 line=4", + statementUri: "statement_uri=O1%20endsub", + comment: "canon_event=COMMENT: Fanuc 'O...' sub must end with M99 ", + print: "X FANUC", + }, + { + name: "sub_called_with_m98", + file: "O...-sub-called-with-M98.ngc", + readCount: 5, + executeCount: 5, + errorText: "'O.... sub' subroutine must be called with 'O.... call'", + errorStep: "run_step phase=execute step=5 rc=5 line=4", + statementUri: "statement_uri=O1%20sub", + comment: "canon_event=COMMENT: RS274NGC 'O...' sub must not be called with M98 ", + }, + { + name: "sub_ended_with_m99", + file: "O...-sub-ended-with-M99.ngc", + readCount: 7, + executeCount: 7, + errorText: "'O.... endsub' or 'O.... return' must follow 'O.... sub' subroutine definition", + errorStep: "run_step phase=execute step=7 rc=5 line=4", + statementUri: "statement_uri=M99", + comment: "canon_event=COMMENT: RS274NGC 'O... sub' sub must not end with M99 ", + print: "X FANUC", + }, +]) { + const mixedSubStylePath = writeInterpRegressionFile( + "m98m99/06-error-mixed-sub-styles", + mixedSubStyleFixture.file, + ); + const mixedSubStyleRun = runWithCapturedPrints(() => interp.runFile(mixedSubStylePath)); + verifyExpectedOutput( + `interp_m98m99_06_${mixedSubStyleFixture.name}_wasm`, + mixedSubStyleRun.output, + [ + "file_open=0", + `file_read_count=${mixedSubStyleFixture.readCount}`, + `file_execute_count=${mixedSubStyleFixture.executeCount}`, + "file_saw_error=1", + `file_error_text=${mixedSubStyleFixture.errorText}`, + mixedSubStyleFixture.errorStep, + mixedSubStyleFixture.statementUri, + mixedSubStyleFixture.comment, + "absent=canon_event=PROGRAM_END", + ].join("\n"), + ); + if (mixedSubStyleFixture.print) { + verifyExpectedOutput( + `interp_m98m99_06_${mixedSubStyleFixture.name}_prints_wasm`, + mixedSubStyleRun.prints, + mixedSubStyleFixture.print, + ); + } +} + const m98m99NestedSubsPath = writeInterpRegressionFile("m98m99/07-nested-subs", "test.ngc"); const m98m99NestedSubsRun = runWithCapturedPrints(() => interp.runFile(m98m99NestedSubsPath)); verifyExpectedOutput( @@ -1790,6 +2443,96 @@ verifyExpectedOutput( "X IN O1", ); +const m98m99DisableFanucSubsDir = writeInterpRegressionFiles( + "m98m99/09-disable-fanuc-subs", + [ + "test-fanuc.ini", + "test-no-fanuc.ini", + "test-fanuc.ngc", + "test-rs274ngc.ngc", + ], +); +for (const disableFanucCase of [ + { + name: "fanuc_ini", + program: "test-fanuc.ngc", + ini: "test-fanuc.ini", + readCount: 22, + keyTraverse: "canon_event=STRAIGHT_TRAVERSE line=10 x=3 y=0 z=0.25", + keyFeed: "canon_event=STRAIGHT_FEED line=11 x=3 y=0 z=-1", + }, + { + name: "rs274ngc_ini", + program: "test-rs274ngc.ngc", + ini: "test-fanuc.ini", + readCount: 15, + keyTraverse: "canon_event=STRAIGHT_TRAVERSE line=5 x=1 y=0 z=0.25", + keyFeed: "canon_event=STRAIGHT_FEED line=6 x=1 y=0 z=-1", + }, + { + name: "rs274ngc_no_fanuc", + program: "test-rs274ngc.ngc", + ini: "test-no-fanuc.ini", + readCount: 15, + keyTraverse: "canon_event=STRAIGHT_TRAVERSE line=5 x=1 y=0 z=0.25", + keyFeed: "canon_event=STRAIGHT_FEED line=6 x=1 y=0 z=-1", + }, + { + name: "fanuc_default", + program: "test-fanuc.ngc", + readCount: 22, + keyTraverse: "canon_event=STRAIGHT_TRAVERSE line=10 x=3 y=0 z=0.25", + keyFeed: "canon_event=STRAIGHT_FEED line=11 x=3 y=0 z=-1", + }, + { + name: "rs274ngc_default", + program: "test-rs274ngc.ngc", + readCount: 15, + keyTraverse: "canon_event=STRAIGHT_TRAVERSE line=5 x=1 y=0 z=0.25", + keyFeed: "canon_event=STRAIGHT_FEED line=6 x=1 y=0 z=-1", + }, +]) { + const output = disableFanucCase.ini + ? interp.runFileWithIni( + `${m98m99DisableFanucSubsDir}/${disableFanucCase.program}`, + `${m98m99DisableFanucSubsDir}/${disableFanucCase.ini}`, + ) + : interp.runFile(`${m98m99DisableFanucSubsDir}/${disableFanucCase.program}`); + verifyExpectedOutput( + `interp_m98m99_09_${disableFanucCase.name}_wasm`, + output, + [ + "file_open=0", + `file_read_count=${disableFanucCase.readCount}`, + `file_execute_count=${disableFanucCase.readCount}`, + "file_saw_error=0", + "canon_event=COMMENT: A simple O sub example ", + disableFanucCase.keyTraverse, + disableFanucCase.keyFeed, + "canon_event=PROGRAM_END", + "absent=file_error_text=DISABLE_FANUC_STYLE_SUB", + ].join("\n"), + ); +} +verifyExpectedOutput( + "interp_m98m99_09_fanuc_no_fanuc_wasm", + interp.runFileWithIni( + `${m98m99DisableFanucSubsDir}/test-fanuc.ngc`, + `${m98m99DisableFanucSubsDir}/test-no-fanuc.ini`, + ), + [ + "file_open=0", + "file_read_count=5", + "file_execute_count=4", + "file_saw_error=1", + "file_error_text=DISABLE_FANUC_STYLE_SUB set in INI file, but found m98", + "run_step phase=read step=5 rc=5 line=6", + "statement_uri=M98%20P1%20L3", + "canon_event=STRAIGHT_TRAVERSE line=5 x=0 y=0 z=0.25", + "absent=canon_event=PROGRAM_END", + ].join("\n"), +); + const m98m99M98P001Path = writeInterpRegressionFile("m98m99/10-M98-P001", "test.ngc"); const m98m99M98P001Run = runWithCapturedPrints(() => interp.runFile(m98m99M98P001Path)); verifyExpectedOutput( @@ -1813,6 +2556,111 @@ verifyExpectedOutput( ].join("\n"), ); +const m98m99MainProgramOwordDir = writeInterpRegressionFiles( + "m98m99/11-main-program-oword", + [ + "test-legal-end-main-with-m2.ngc", + "test-legal-end-main-with-m02.ngc", + "test-legal-end-main-with-m30.ngc", + "test-legal-end-main-with-percent.ngc", + "test-illegal-end-main-with-eof.ngc", + "test-illegal-no-m30-before-osub.ngc", + "test-illegal-sub-after-percent.ngc", + ], +); +for (const mainProgramFixture of [ + { + name: "legal_m2", + file: "test-legal-end-main-with-m2.ngc", + readCount: 17, + firstLine: 4, + subLine: 13, + endEvent: "canon_event=PROGRAM_END", + }, + { + name: "legal_m02", + file: "test-legal-end-main-with-m02.ngc", + readCount: 17, + firstLine: 4, + subLine: 13, + endEvent: "canon_event=PROGRAM_END", + }, + { + name: "legal_m30", + file: "test-legal-end-main-with-m30.ngc", + readCount: 17, + firstLine: 4, + subLine: 13, + endEvent: "canon_event=PROGRAM_END", + }, + { + name: "legal_percent", + file: "test-legal-end-main-with-percent.ngc", + readCount: 20, + firstLine: 11, + subLine: 6, + endEvent: "canon_event=FINISH", + }, +]) { + verifyExpectedOutput( + `interp_m98m99_11_${mainProgramFixture.name}_wasm`, + interp.runFile(`${m98m99MainProgramOwordDir}/${mainProgramFixture.file}`), + [ + "file_open=0", + `file_read_count=${mainProgramFixture.readCount}`, + `file_execute_count=${mainProgramFixture.readCount}`, + "file_saw_error=0", + "canon_event=COMMENT: legal example", + `canon_event=STRAIGHT_TRAVERSE line=${mainProgramFixture.firstLine} x=1 y=2 z=0`, + `canon_event=STRAIGHT_TRAVERSE line=${mainProgramFixture.subLine} x=1 y=2 z=3`, + mainProgramFixture.endEvent, + "absent=should never get here", + ].join("\n"), + ); +} +for (const mainProgramErrorFixture of [ + { + name: "illegal_eof", + file: "test-illegal-end-main-with-eof.ngc", + readCount: 21, + executeCount: 20, + errorText: "File ended with no percent sign (%) or program end (M2)", + marker: "canon_event=COMMENT: end of main signaled by EOF", + }, + { + name: "illegal_no_m30", + file: "test-illegal-no-m30-before-osub.ngc", + readCount: 18, + executeCount: 18, + errorText: "File:", + marker: "statement_uri=O2%20sub%20%28subprogram%20begin%29", + extraMarker: "sub: o|2| found in illegal location", + }, + { + name: "illegal_sub_after_percent", + file: "test-illegal-sub-after-percent.ngc", + readCount: 8, + executeCount: 7, + errorText: "Failed to find sub 'O2' before EOF", + marker: "canon_event=FINISH", + }, +]) { + verifyExpectedOutput( + `interp_m98m99_11_${mainProgramErrorFixture.name}_wasm`, + interp.runFile(`${m98m99MainProgramOwordDir}/${mainProgramErrorFixture.file}`), + [ + "file_open=0", + `file_read_count=${mainProgramErrorFixture.readCount}`, + `file_execute_count=${mainProgramErrorFixture.executeCount}`, + "file_saw_error=1", + `file_error_text=${mainProgramErrorFixture.errorText}`, + mainProgramErrorFixture.marker, + mainProgramErrorFixture.extraMarker ?? "", + "absent=canon_event=PROGRAM_END", + ].join("\n"), + ); +} + const m98m99NamedProgramNamedPath = writeInterpRegressionFile( "m98m99/13-named-program", "test-named.ngc", @@ -1876,6 +2724,189 @@ verifyExpectedOutput( ].join("\n"), ); +const g10L1L10Dir = writeG10RegressionFiles("g10-l1-l10", ["test.ngc", "test.tbl"]); +verifyExpectedOutput( + "interp_g10_l1_l10_wasm", + interp.runFileWithIni(`${g10L1L10Dir}/test.ngc`, `${g10L1L10Dir}/test.ini`), + [ + "file_open=0", + "file_read_count=115", + "file_execute_count=115", + "file_saw_error=0", + "canon_event=MESSAGE: G10 L1: set tool offsets direct", + "canon_event=MESSAGE: G10 L10: set tool offsets relative to position + 45 deg. rotation", + "canon_event=MESSAGE: Model B contract: M6 alone and G10 alone do not change tool offset params", + "canon_event=MESSAGE: G10 alone does not apply offset, should still be 0 0 0: 0.000000 0.000000 0.000000", + "canon_event=USE_TOOL_LENGTH_OFFSET x=8 y=6 z=7", + "canon_event=SET_XY_ROTATION rotation=45", + "canon_event=PROGRAM_END", + ].join("\n"), +); + +const g10L11Dir = writeG10RegressionFiles("g10-l11", ["test.ngc", "test.tbl"]); +verifyExpectedOutput( + "interp_g10_l11_wasm", + interp.runFileWithIni(`${g10L11Dir}/test.ngc`, `${g10L11Dir}/test.ini`), + [ + "file_open=0", + "file_read_count=41", + "file_execute_count=41", + "file_saw_error=0", + "canon_event=SET_G5X_OFFSET index=1 x=1 y=2 z=-3", + "canon_event=SET_G92_OFFSET x=-41.1962 y=-46.1962 z=-72", + "canon_event=USE_TOOL_LENGTH_OFFSET x=0 y=0 z=-4", + "canon_event=MESSAGE: -101.600000", + "canon_event=PROGRAM_END", + ].join("\n"), +); + +const g10L2WhileActiveDir = writeG10RegressionFiles("g10-l2-while-active", ["test.ngc"]); +verifyExpectedOutput( + "interp_g10_l2_while_active_wasm", + interp.runFile(`${g10L2WhileActiveDir}/test.ngc`), + [ + "file_open=0", + "file_read_count=24", + "file_execute_count=24", + "file_saw_error=0", + "canon_event=SET_G5X_OFFSET index=1 x=1 y=0 z=0", + "canon_event=SET_XY_ROTATION rotation=-45", + "canon_event=MESSAGE: Should be 0 1.414214: 0.000000 1.414214", + "canon_event=SET_XY_ROTATION rotation=90", + "canon_event=MESSAGE: Should be 1 1: 1.000000 1.000000", + "canon_event=PROGRAM_END", + ].join("\n"), +); + +const g10L20WhileActiveDir = writeG10RegressionFiles("g10-l20-while-active", ["test.ngc"]); +verifyExpectedOutput( + "interp_g10_l20_while_active_wasm", + interp.runFile(`${g10L20WhileActiveDir}/test.ngc`), + [ + "file_open=0", + "file_read_count=20", + "file_execute_count=20", + "file_saw_error=0", + "canon_event=SET_XY_ROTATION rotation=45", + "canon_event=MESSAGE: Should be -1 0: -1.000000 0.000000", + "canon_event=MESSAGE: Should be 0 -1: 0.000000 -1.000000", + "canon_event=MESSAGE: Should be 1 1: 1.000000 1.000000", + "canon_event=PROGRAM_END", + ].join("\n"), +); + +const g10WithG92Dir = writeG10RegressionFiles("g10-with-g92", ["test.ngc", "test.tbl"]); +verifyExpectedOutput( + "interp_g10_with_g92_wasm", + interp.runFileWithIni(`${g10WithG92Dir}/test.ngc`, `${g10WithG92Dir}/test.ini`), + [ + "file_open=0", + "file_read_count=61", + "file_execute_count=61", + "file_saw_error=0", + "canon_event=SET_G5X_OFFSET index=9 x=25 y=26 z=27", + "canon_event=SET_G92_OFFSET x=-0.1 y=-0.2 z=-10.3", + "canon_event=MESSAGE: X0.100000 Y0.200000 Z0.300000", + "canon_event=MESSAGE: X-23.900000 Y-23.800000 Z-23.700000", + "canon_event=SET_G92_OFFSET x=0 y=0 z=0", + "canon_event=MESSAGE: X-24.000000 Y-24.000000 Z-34.000000", + "canon_event=PROGRAM_END", + ].join("\n"), +); + +const g52G92InteractionPath = writeInterpRegressionFile( + "g52/g52-g92-interaction", + "g52-g92-interaction.ngc", +); +const g52G92InteractionRun = runWithCapturedPrints(() => + interp.runFile(g52G92InteractionPath), +); +verifyExpectedOutput( + "interp_g52_g92_interaction_wasm", + g52G92InteractionRun.output, + [ + "file_open=0", + "file_read_count=39", + "file_execute_count=39", + "file_saw_error=0", + "canon_event=COMMENT: G52 and G92 param #5210 setting behavior", + "canon_event=SET_G92_OFFSET x=-1 y=-2 z=0", + "canon_event=SET_G92_OFFSET x=2 y=3 z=0", + "canon_event=PALLET_SHUTTLE", + "canon_event=PROGRAM_END", + ].join("\n"), +); +verifyExpectedOutput( + "interp_g52_g92_interaction_prints_wasm", + g52G92InteractionRun.prints, + [ + "G92 params: 1.000000 -25.400000 -50.800000", + "G92 params: 0.000000 -25.400000 -50.800000", + "G92 params: 1.000000 50.800000 76.200000", + "G92 params: 1.000000 0.000000 0.000000", + ].join("\n"), +); + +const g92PersistenceDir = "/work/interp/g52/g92-persistence"; +const g92PersistenceProgramPath = `${g92PersistenceDir}/test.ngc`; +const g92PersistenceParameterPath = `${g92PersistenceDir}/startup.var`; +const g92PersistenceIniPath = `${g92PersistenceDir}/persist.ini`; +const g92PersistenceDisabledIniPath = `${g92PersistenceDir}/disabled.ini`; +interp.writeTextFile( + g92PersistenceProgramPath, + [ + "(PRINT,Startup G92 params: #5210 #5211 #5212 #5213)", + "M30", + "", + ].join("\n"), +); +interp.writeTextFile( + g92PersistenceParameterPath, + [ + "5210 1", + "5211 1.25", + "5212 2.5", + "5213 3.75", + "5220 1", + "", + ].join("\n"), +); +interp.writeTextFile( + g92PersistenceIniPath, + [ + "[RS274NGC]", + "PARAMETER_FILE = startup.var", + "[TRAJ]", + "COORDINATES = X Y Z", + "", + ].join("\n"), +); +interp.writeTextFile( + g92PersistenceDisabledIniPath, + [ + "[RS274NGC]", + "PARAMETER_FILE = startup.var", + "DISABLE_G92_PERSISTENCE = 1", + "[TRAJ]", + "COORDINATES = X Y Z", + "", + ].join("\n"), +); +verifyExpectedOutput( + "interp_g92_persistence_enabled_wasm", + runWithCapturedPrints(() => + interp.runFileWithIni(g92PersistenceProgramPath, g92PersistenceIniPath), + ).prints, + "Startup G92 params: 1.000000 1.250000 2.500000 3.750000", +); +verifyExpectedOutput( + "interp_g92_persistence_disabled_wasm", + runWithCapturedPrints(() => + interp.runFileWithIni(g92PersistenceProgramPath, g92PersistenceDisabledIniPath), + ).prints, + "Startup G92 params: 0.000000 0.000000 0.000000 0.000000", +); + const userM110 = writeUserMCodeFixture("m110", "M110"); verifyExpectedOutput( "interp_user_m110_wasm", diff --git a/wasm-port/tests/wasm/node/verify_sim_configs_wasm.mjs b/wasm-port/tests/wasm/node/verify_sim_configs_wasm.mjs index ac91978..b910118 100644 --- a/wasm-port/tests/wasm/node/verify_sim_configs_wasm.mjs +++ b/wasm-port/tests/wasm/node/verify_sim_configs_wasm.mjs @@ -5,6 +5,7 @@ import assert from "node:assert/strict"; import { createLinuxCncInterpSdk, + planIniFileContextStaging, planSimConfigStaging, } from "../../../runtime/sdk/src/index.js"; @@ -79,6 +80,59 @@ assert.deepEqual( ], "synthetic sim-config staging plan", ); +assert.deepEqual( + syntheticPlan.files.map((file) => [file.sourceRel, file.wasmPath]).sort(), + [ + ["configs/sim/example/M123", "/work/sim/example/M123"], + ["configs/sim/example/linuxcnc.var", "/work/sim/example/linuxcnc.var"], + ["configs/sim/example/subs/helper.ngc", "/work/sim/example/subs/helper.ngc"], + ["configs/sim/example/test.ini", "/work/sim/example/test.ini"], + ["configs/sim/example/test.ngc", "/work/sim/example/test.ngc"], + ["configs/sim/example/tool.tbl", "/work/sim/example/tool.tbl"], + ], + "synthetic sim-config staging wasm paths", +); + +const genericPlan = planIniFileContextStaging({ + manifestText: [ + "tests/interp/example/test.ini", + "tests/interp/example/test.ngc", + "tests/interp/example/test.tbl", + "tests/interp/example/startup.var", + "tests/interp/example/subs/helper.ngc", + "tests/interp/example/subs/rm145.ngc", + "tests/interp/example/more-subs/other.ngc", + "tests/interp/example/M145", + ].join("\n"), + sourceRootRel: "tests/interp/example", + iniFile: "test.ini", + iniText: [ + "[DISPLAY]", + "OPEN_FILE = test.ngc", + "[RS274NGC]", + "PARAMETER_FILE = startup.var", + "SUBROUTINE_PATH = subs:more-subs", + "USER_M_PATH = .", + "REMAP = M145 modalgroup=10 ngc=rm145", + "[EMCIO]", + "TOOL_TABLE = test.tbl", + ].join("\n"), + wasmDir: "/work/interp/example", +}); +assert.deepEqual( + genericPlan.files.map((file) => [file.sourceRel, file.wasmPath, file.executable]).sort(), + [ + ["tests/interp/example/M145", "/work/interp/example/M145", true], + ["tests/interp/example/more-subs/other.ngc", "/work/interp/example/more-subs/other.ngc", false], + ["tests/interp/example/startup.var", "/work/interp/example/startup.var", false], + ["tests/interp/example/subs/helper.ngc", "/work/interp/example/subs/helper.ngc", false], + ["tests/interp/example/subs/rm145.ngc", "/work/interp/example/subs/rm145.ngc", false], + ["tests/interp/example/test.ini", "/work/interp/example/test.ini", false], + ["tests/interp/example/test.ngc", "/work/interp/example/test.ngc", false], + ["tests/interp/example/test.tbl", "/work/interp/example/test.tbl", false], + ], + "generic INI file-context staging plan", +); function simMachine(machineRel, iniFile, programFile = null) { const iniText = readFileSync( diff --git a/wasm-port/tools/build_native_probes.sh b/wasm-port/tools/build_native_probes.sh index 7b60eb8..9d6e16e 100755 --- a/wasm-port/tools/build_native_probes.sh +++ b/wasm-port/tools/build_native_probes.sh @@ -16,8 +16,36 @@ EXISTS_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/exists/test.ngc" RETURN_VALUE_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/return-value/test.ngc" SUBS_FOLLOW_MAIN_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/subs-follow-main/test.ngc" FRACTIONAL_LINENUMBERS_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/fractional-linenumbers/test.ngc" +CAM_NISLEY_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/cam-nisley/cam.ngc" +CAM_NISLEY_TOOL_TABLE="$ROOT_DIR/vendor/linuxcnc/tests/interp/cam-nisley/test.tbl" +CAM_NISLEY_INI="$BUILD_DIR/cam-nisley.ini" +CRAZY_PATHS_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/crazy-paths/test.ngc" NAMEDPARAM_BUG424_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/namedparam-bug424/test.ngc" FLOWSNAKE_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/flowsnake/flowsnake.ngc" +INSIDE_CORNERS_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/inside-corners/test.ngc" +INVERSE_TIME_WITH_COMP_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/inverse-time-with-comp/inverse.ngc" +CCOMP_LATHE_COMP_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/ccomp/lathe-comp/test.ngc" +CCOMP_LATHE_COMP_TOOL_TABLE="$ROOT_DIR/vendor/linuxcnc/tests/ccomp/lathe-comp/test.tbl" +CCOMP_LATHE_COMP_INI="$BUILD_DIR/ccomp-lathe-comp.ini" +CCOMP_MILL_G90G91G92_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/ccomp/mill-g90g91g92/test.ngc" +CCOMP_MILL_G90G91G92_TOOL_TABLE="$ROOT_DIR/vendor/linuxcnc/tests/ccomp/mill-g90g91g92/test.tbl" +CCOMP_MILL_G90G91G92_INI="$BUILD_DIR/ccomp-mill-g90g91g92.ini" +CCOMP_MILL_LINE_ARC_ENTRY_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/ccomp/mill-line-arc-entry/test.ngc" +CCOMP_MILL_LINE_ARC_ENTRY_TOOL_TABLE="$ROOT_DIR/vendor/linuxcnc/tests/ccomp/mill-line-arc-entry/test.tbl" +CCOMP_MILL_LINE_ARC_ENTRY_INI="$BUILD_DIR/ccomp-mill-line-arc-entry.ini" +CCOMP_MILL_ZCHANGES_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/ccomp/mill-zchanges/test.ngc" +CCOMP_MILL_ZCHANGES_TOOL_TABLE="$ROOT_DIR/vendor/linuxcnc/tests/ccomp/mill-zchanges/test.tbl" +CCOMP_MILL_ZCHANGES_INI="$BUILD_DIR/ccomp-mill-zchanges.ini" +BAD_A_IN_CANNED_CYCLE_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/bad/a-in-canned-cycle.ngc" +BAD_A_IN_CANNED_CYCLE2_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/bad/a-in-canned-cycle2.ngc" +BAD_ARC_BIG_IMPERIAL_CENTER_FORMAT_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/bad/bad-arc.big.imperial.center-format.ngc" +BAD_ARC_BIG_METRIC_CENTER_FORMAT_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/bad/bad-arc.big.metric.center-format.ngc" +BAD_ARC_MEDIUM_IMPERIAL_CENTER_FORMAT_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/bad/bad-arc.medium.imperial.center-format.ngc" +BAD_ARC_MEDIUM_METRIC_CENTER_FORMAT_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/bad/bad-arc.medium.metric.center-format.ngc" +BAD_ARC_SMALL_IMPERIAL_CENTER_FORMAT_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/bad/bad-arc.small.imperial.center-format.ngc" +BAD_ARC_SMALL_METRIC_CENTER_FORMAT_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/bad/bad-arc.small.metric.center-format.ngc" +BAD_CCOMP_ARCEXIT_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/bad/ccomp-arcexit.ngc" +BAD_CCOMP_GOUGING_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/bad/ccomp-gouging.ngc" BAD_EXISTS_1_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/bad/exists-1.ngc" BAD_EXISTS_2_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/bad/exists-2.ngc" BAD_EXISTS_3_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/bad/exists-3.ngc" @@ -31,6 +59,21 @@ BAD_NO_IJR_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/bad/no-ijr.ngc" BAD_PROBE_NO_AXES_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/bad/probe-no-axes.ngc" G33_1_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/g33.1/g33.1.ngc" G6164_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/g6164/test.ngc" +GOOD_ARC_BIG_IMPERIAL_CENTER_FORMAT_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/good/good-arc.big.imperial.center-format.ngc" +GOOD_ARC_BIG_METRIC_CENTER_FORMAT_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/good/good-arc.big.metric.center-format.ngc" +GOOD_ARC_MEDIUM_IMPERIAL_CENTER_FORMAT_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/good/good-arc.medium.imperial.center-format.ngc" +GOOD_ARC_MEDIUM_METRIC_CENTER_FORMAT_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/good/good-arc.medium.metric.center-format.ngc" +GOOD_ARC_SMALL_IMPERIAL_CENTER_FORMAT_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/good/good-arc.small.imperial.center-format.ngc" +GOOD_ARC_SMALL_METRIC_CENTER_FORMAT_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/good/good-arc.small.metric.center-format.ngc" +G72_FACING_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/g72-facing/g72-iterations-present.ngc" +G72_MISSING_ITERATION_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/g72-missing-iteration/g72-iterations-missing.ngc" +G71_ENDLESS_LOOP_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/g71-endless-loop/g71-endless-loop.ngc" +G71_ENDLESS_LOOP2_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/g71-endless-loop2/g71-endless-loop2.ngc" +G71_ENDLESS_LOOP_2_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/g71-endless-loop_2/g71-endless-loop_2.ngc" +G71_WITH_G70_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/g71-with-g70/g71-with-g70.ngc" +G76_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/g76/g76only.ngc" +G76_TOOL_TABLE="$ROOT_DIR/vendor/linuxcnc/tests/interp/g76/test.tbl" +G76_INI="$BUILD_DIR/g76.ini" ROTATION_ABS_PTS_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/rotation/abs-pts/test.ngc" ROTATION_G28_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/rotation/g28/g28.ngc" ROTATION_G53_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/rotation/g53/g53.ngc" @@ -55,12 +98,46 @@ M19_INI="$ROOT_DIR/vendor/linuxcnc/tests/interp/m19/test.ini" MAGIC_COMMENTS_PARAM_FORMAT_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/magic_comments/param_format_printing/test.ngc" M98M99_01_BASICS_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/m98m99/01-basics/test.ngc" M98M99_02_VARIABLES_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/m98m99/02-variables/test.ngc" +M98M99_03_ERROR_M98_NO_P_WORD_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/m98m99/03-error-M98-no-P-word/test.ngc" +M98M99_04_M98_BUT_NO_SUB_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/m98m99/04-M98-but-no-sub/test.ngc" +M98M99_05_M98_LOOPS_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/m98m99/05-M98-loops/test.ngc" +M98M99_06_CALLED_WITH_O_CALL_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/m98m99/06-error-mixed-sub-styles/O...-called-with-O..._call.ngc" +M98M99_06_ENDED_WITH_O_ENDSUB_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/m98m99/06-error-mixed-sub-styles/O...-ended-with-O..._endsub.ngc" +M98M99_06_SUB_CALLED_WITH_M98_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/m98m99/06-error-mixed-sub-styles/O...-sub-called-with-M98.ngc" +M98M99_06_SUB_ENDED_WITH_M99_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/m98m99/06-error-mixed-sub-styles/O...-sub-ended-with-M99.ngc" M98M99_07_NESTED_SUBS_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/m98m99/07-nested-subs/test.ngc" M98M99_08_SUB_FOLLOWS_MAIN_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/m98m99/08-sub-follows-main/test.ngc" +M98M99_09_FANUC_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/m98m99/09-disable-fanuc-subs/test-fanuc.ngc" +M98M99_09_RS274NGC_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/m98m99/09-disable-fanuc-subs/test-rs274ngc.ngc" +M98M99_09_FANUC_INI="$ROOT_DIR/vendor/linuxcnc/tests/interp/m98m99/09-disable-fanuc-subs/test-fanuc.ini" +M98M99_09_NO_FANUC_INI="$ROOT_DIR/vendor/linuxcnc/tests/interp/m98m99/09-disable-fanuc-subs/test-no-fanuc.ini" M98M99_10_M98_P001_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/m98m99/10-M98-P001/test.ngc" +M98M99_11_LEGAL_M2_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/m98m99/11-main-program-oword/test-legal-end-main-with-m2.ngc" +M98M99_11_LEGAL_M02_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/m98m99/11-main-program-oword/test-legal-end-main-with-m02.ngc" +M98M99_11_LEGAL_M30_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/m98m99/11-main-program-oword/test-legal-end-main-with-m30.ngc" +M98M99_11_LEGAL_PERCENT_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/m98m99/11-main-program-oword/test-legal-end-main-with-percent.ngc" +M98M99_11_ILLEGAL_EOF_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/m98m99/11-main-program-oword/test-illegal-end-main-with-eof.ngc" +M98M99_11_ILLEGAL_NO_M30_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/m98m99/11-main-program-oword/test-illegal-no-m30-before-osub.ngc" +M98M99_11_ILLEGAL_SUB_AFTER_PERCENT_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/m98m99/11-main-program-oword/test-illegal-sub-after-percent.ngc" M98M99_13_NAMED_PROGRAM_NAMED_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/m98m99/13-named-program/test-named.ngc" M98M99_13_NAMED_PROGRAM_NUMBERED_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/m98m99/13-named-program/test-numbered.ngc" M98M99_14_O_EXPRESSION_CALL_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/m98m99/14-o-expression-call/test.ngc" +G10_L1_L10_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/g10/g10-l1-l10/test.ngc" +G10_L1_L10_TOOL_TABLE="$ROOT_DIR/vendor/linuxcnc/tests/interp/g10/g10-l1-l10/test.tbl" +G10_L1_L10_INI="$BUILD_DIR/g10-l1-l10.ini" +G10_L11_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/g10/g10-l11/test.ngc" +G10_L11_TOOL_TABLE="$ROOT_DIR/vendor/linuxcnc/tests/interp/g10/g10-l11/test.tbl" +G10_L11_INI="$BUILD_DIR/g10-l11.ini" +G10_L2_WHILE_ACTIVE_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/g10/g10-l2-while-active/test.ngc" +G10_L20_WHILE_ACTIVE_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/g10/g10-l20-while-active/test.ngc" +G10_WITH_G92_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/g10/g10-with-g92/test.ngc" +G10_WITH_G92_TOOL_TABLE="$ROOT_DIR/vendor/linuxcnc/tests/interp/g10/g10-with-g92/test.tbl" +G10_WITH_G92_INI="$BUILD_DIR/g10-with-g92.ini" +G52_G92_INTERACTION_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/g52/g52-g92-interaction/g52-g92-interaction.ngc" +G92_PERSISTENCE_FIXTURE="$BUILD_DIR/g92-persistence.ngc" +G92_PERSISTENCE_PARAMETER_FILE="$BUILD_DIR/g92-persistence.var" +G92_PERSISTENCE_INI="$BUILD_DIR/g92-persistence.ini" +G92_PERSISTENCE_DISABLED_INI="$BUILD_DIR/g92-persistence-disabled.ini" SIM_AXIS_FOAM_FIXTURE="$ROOT_DIR/../linuxcnc/configs/sim/axis/foam/foam.ngc" SIM_AXIS_FOAM_INI="$ROOT_DIR/../linuxcnc/configs/sim/axis/foam/axis_foam.ini" SIM_BRIDGEMILL_FIXTURE="$ROOT_DIR/../linuxcnc/configs/sim/axis/vismach/5axis/bridgemill/5axisgui.ngc" @@ -220,6 +297,72 @@ write_command_file() { printf '%q\n' "$@" > "$file" } +write_file_if_changed() { + local file="$1" + local tmp + tmp="$(mktemp)" + cat > "$tmp" + if [[ -f "$file" ]] && cmp -s "$tmp" "$file"; then + rm -f "$tmp" + return 0 + fi + mv "$tmp" "$file" +} + +write_ccomp_ini() { + local file="$1" + local tool_table="$2" + + write_file_if_changed "$file" <&2 + exit 1 + fi copy_file "$src_rel" done < "$MANIFEST_FILE" diff --git a/wasm-port/tools/source-manifest.txt b/wasm-port/tools/source-manifest.txt index e77b679..658511d 100644 --- a/wasm-port/tools/source-manifest.txt +++ b/wasm-port/tools/source-manifest.txt @@ -233,15 +233,45 @@ tests/interp/m98m99/01-basics/test.sh tests/interp/m98m99/02-variables/expected tests/interp/m98m99/02-variables/test.ngc tests/interp/m98m99/02-variables/test.sh +tests/interp/m98m99/03-error-M98-no-P-word/expected +tests/interp/m98m99/03-error-M98-no-P-word/test.ngc +tests/interp/m98m99/03-error-M98-no-P-word/test.sh +tests/interp/m98m99/04-M98-but-no-sub/expected +tests/interp/m98m99/04-M98-but-no-sub/test.ngc +tests/interp/m98m99/04-M98-but-no-sub/test.sh +tests/interp/m98m99/05-M98-loops/expected +tests/interp/m98m99/05-M98-loops/test.ngc +tests/interp/m98m99/05-M98-loops/test.sh +tests/interp/m98m99/06-error-mixed-sub-styles/O...-called-with-O..._call.ngc +tests/interp/m98m99/06-error-mixed-sub-styles/O...-ended-with-O..._endsub.ngc +tests/interp/m98m99/06-error-mixed-sub-styles/O...-sub-called-with-M98.ngc +tests/interp/m98m99/06-error-mixed-sub-styles/O...-sub-ended-with-M99.ngc +tests/interp/m98m99/06-error-mixed-sub-styles/expected +tests/interp/m98m99/06-error-mixed-sub-styles/test.sh tests/interp/m98m99/07-nested-subs/expected tests/interp/m98m99/07-nested-subs/test.ngc tests/interp/m98m99/07-nested-subs/test.sh tests/interp/m98m99/08-sub-follows-main/expected tests/interp/m98m99/08-sub-follows-main/test.ngc tests/interp/m98m99/08-sub-follows-main/test.sh +tests/interp/m98m99/09-disable-fanuc-subs/expected +tests/interp/m98m99/09-disable-fanuc-subs/test-fanuc.ini +tests/interp/m98m99/09-disable-fanuc-subs/test-fanuc.ngc +tests/interp/m98m99/09-disable-fanuc-subs/test-no-fanuc.ini +tests/interp/m98m99/09-disable-fanuc-subs/test-rs274ngc.ngc +tests/interp/m98m99/09-disable-fanuc-subs/test.sh tests/interp/m98m99/10-M98-P001/expected tests/interp/m98m99/10-M98-P001/test.ngc tests/interp/m98m99/10-M98-P001/test.sh +tests/interp/m98m99/11-main-program-oword/expected +tests/interp/m98m99/11-main-program-oword/test-illegal-end-main-with-eof.ngc +tests/interp/m98m99/11-main-program-oword/test-illegal-no-m30-before-osub.ngc +tests/interp/m98m99/11-main-program-oword/test-illegal-sub-after-percent.ngc +tests/interp/m98m99/11-main-program-oword/test-legal-end-main-with-m02.ngc +tests/interp/m98m99/11-main-program-oword/test-legal-end-main-with-m2.ngc +tests/interp/m98m99/11-main-program-oword/test-legal-end-main-with-m30.ngc +tests/interp/m98m99/11-main-program-oword/test-legal-end-main-with-percent.ngc +tests/interp/m98m99/11-main-program-oword/test.sh tests/interp/m98m99/13-named-program/expected tests/interp/m98m99/13-named-program/test-named.ngc tests/interp/m98m99/13-named-program/test-numbered.ngc @@ -276,6 +306,14 @@ tests/interp/fractional-linenumbers/README tests/interp/fractional-linenumbers/expected tests/interp/fractional-linenumbers/test.ngc tests/interp/fractional-linenumbers/test.sh +tests/interp/cam-nisley/cam.ngc +tests/interp/cam-nisley/expected +tests/interp/cam-nisley/test.sh +tests/interp/cam-nisley/test.tbl +tests/interp/crazy-paths/README +tests/interp/crazy-paths/expected +tests/interp/crazy-paths/test.ngc +tests/interp/crazy-paths/test.sh tests/interp/namedparam-bug424/README tests/interp/namedparam-bug424/expected tests/interp/namedparam-bug424/test.ngc @@ -284,6 +322,40 @@ tests/interp/flowsnake/README tests/interp/flowsnake/expected tests/interp/flowsnake/flowsnake.ngc tests/interp/flowsnake/test.sh +tests/interp/inside-corners/README +tests/interp/inside-corners/expected +tests/interp/inside-corners/test.ngc +tests/interp/inside-corners/test.sh +tests/interp/inverse-time-with-comp/README +tests/interp/inverse-time-with-comp/expected +tests/interp/inverse-time-with-comp/inverse.ngc +tests/interp/inverse-time-with-comp/test.sh +tests/ccomp/lathe-comp/expected +tests/ccomp/lathe-comp/test.ngc +tests/ccomp/lathe-comp/test.sh +tests/ccomp/lathe-comp/test.tbl +tests/ccomp/mill-g90g91g92/expected +tests/ccomp/mill-g90g91g92/test.ngc +tests/ccomp/mill-g90g91g92/test.sh +tests/ccomp/mill-g90g91g92/test.tbl +tests/ccomp/mill-line-arc-entry/expected +tests/ccomp/mill-line-arc-entry/test.ngc +tests/ccomp/mill-line-arc-entry/test.sh +tests/ccomp/mill-line-arc-entry/test.tbl +tests/ccomp/mill-zchanges/expected +tests/ccomp/mill-zchanges/test.ngc +tests/ccomp/mill-zchanges/test.sh +tests/ccomp/mill-zchanges/test.tbl +tests/interp/bad/a-in-canned-cycle.ngc +tests/interp/bad/a-in-canned-cycle2.ngc +tests/interp/bad/bad-arc.big.imperial.center-format.ngc +tests/interp/bad/bad-arc.big.metric.center-format.ngc +tests/interp/bad/bad-arc.medium.imperial.center-format.ngc +tests/interp/bad/bad-arc.medium.metric.center-format.ngc +tests/interp/bad/bad-arc.small.imperial.center-format.ngc +tests/interp/bad/bad-arc.small.metric.center-format.ngc +tests/interp/bad/ccomp-arcexit.ngc +tests/interp/bad/ccomp-gouging.ngc tests/interp/bad/exists-1.ngc tests/interp/bad/exists-2.ngc tests/interp/bad/exists-3.ngc @@ -301,6 +373,56 @@ tests/interp/g33.1/test.sh tests/interp/g6164/expected tests/interp/g6164/test.ngc tests/interp/g6164/test.sh +tests/interp/good/good-arc.big.imperial.center-format.ngc +tests/interp/good/good-arc.big.metric.center-format.ngc +tests/interp/good/good-arc.medium.imperial.center-format.ngc +tests/interp/good/good-arc.medium.metric.center-format.ngc +tests/interp/good/good-arc.small.imperial.center-format.ngc +tests/interp/good/good-arc.small.metric.center-format.ngc +tests/interp/g72-facing/expected +tests/interp/g72-facing/g72-iterations-present.ngc +tests/interp/g72-facing/test.sh +tests/interp/g72-missing-iteration/expected +tests/interp/g72-missing-iteration/g72-iterations-missing.ngc +tests/interp/g72-missing-iteration/test.sh +tests/interp/g71-endless-loop/expected +tests/interp/g71-endless-loop/g71-endless-loop.ngc +tests/interp/g71-endless-loop/test.sh +tests/interp/g71-endless-loop2/expected +tests/interp/g71-endless-loop2/g71-endless-loop2.ngc +tests/interp/g71-endless-loop2/test.sh +tests/interp/g71-endless-loop_2/expected +tests/interp/g71-endless-loop_2/g71-endless-loop_2.ngc +tests/interp/g71-endless-loop_2/test.sh +tests/interp/g71-with-g70/expected +tests/interp/g71-with-g70/g71-with-g70.ngc +tests/interp/g71-with-g70/test.sh +tests/interp/g76/README +tests/interp/g76/expected +tests/interp/g76/g76only.ngc +tests/interp/g76/test.sh +tests/interp/g76/test.tbl +tests/interp/g10/g10-l1-l10/expected +tests/interp/g10/g10-l1-l10/test.ngc +tests/interp/g10/g10-l1-l10/test.sh +tests/interp/g10/g10-l1-l10/test.tbl +tests/interp/g10/g10-l11/expected +tests/interp/g10/g10-l11/test.ngc +tests/interp/g10/g10-l11/test.sh +tests/interp/g10/g10-l11/test.tbl +tests/interp/g10/g10-l2-while-active/expected +tests/interp/g10/g10-l2-while-active/test.ngc +tests/interp/g10/g10-l2-while-active/test.sh +tests/interp/g10/g10-l20-while-active/expected +tests/interp/g10/g10-l20-while-active/test.ngc +tests/interp/g10/g10-l20-while-active/test.sh +tests/interp/g10/g10-with-g92/expected +tests/interp/g10/g10-with-g92/test.ngc +tests/interp/g10/g10-with-g92/test.sh +tests/interp/g10/g10-with-g92/test.tbl +tests/interp/g52/g52-g92-interaction/expected +tests/interp/g52/g52-g92-interaction/g52-g92-interaction.ngc +tests/interp/g52/g52-g92-interaction/test.sh tests/interp/rotation/abs-pts/expected tests/interp/rotation/abs-pts/test.ngc tests/interp/rotation/abs-pts/test.sh diff --git a/wasm-port/tools/verify_vendor_sync.sh b/wasm-port/tools/verify_vendor_sync.sh index 23f909e..00f6e5f 100755 --- a/wasm-port/tools/verify_vendor_sync.sh +++ b/wasm-port/tools/verify_vendor_sync.sh @@ -24,6 +24,22 @@ if [[ ! -f "$MANIFEST_FILE" ]]; then exit 1 fi +validate_manifest_path() { + local src_rel="$1" + if [[ "$src_rel" = /* || "$src_rel" == */ || "$src_rel" == *"//"* ]]; then + return 1 + fi + + local component + local -a path_components + IFS=/ read -r -a path_components <<< "$src_rel" + for component in "${path_components[@]}"; do + if [[ -z "$component" || "$component" == "." || "$component" == ".." ]]; then + return 1 + fi + done +} + mkdir -p "$BUILD_DIR" vendor_sync_fingerprint() { @@ -65,7 +81,7 @@ while IFS= read -r src_rel; do [[ -z "$src_rel" ]] && continue [[ "${src_rel:0:1}" == "#" ]] && continue - if [[ "$src_rel" = /* || "$src_rel" == *".."* ]]; then + if ! validate_manifest_path "$src_rel"; then echo "invalid manifest path: $src_rel" >&2 exit 1 fi diff --git a/wasm-port/vendor/linuxcnc/tests/ccomp/lathe-comp/expected b/wasm-port/vendor/linuxcnc/tests/ccomp/lathe-comp/expected new file mode 100644 index 0000000..4fabddb --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/ccomp/lathe-comp/expected @@ -0,0 +1,68 @@ + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SET_FEED_REFERENCE(CANON_XYZ) + N..... ON_RESET() + N..... SET_FEED_RATE(30.0000) + N..... SELECT_PLANE(CANON_PLANE_XZ) + N..... USE_LENGTH_UNITS(CANON_UNITS_INCHES) + N..... SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, 0.000000) + N..... SET_NAIVECAM_TOLERANCE(0.0000) + N..... USE_TOOL_LENGTH_OFFSET(0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) + N..... SELECT_TOOL(0) + N..... STOP_SPINDLE_TURNING(0) + N..... CHANGE_TOOL() + N..... STRAIGHT_TRAVERSE(0.3000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(0.1000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(0.1000, 0.0000, 0.1000, 0.1000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(1.2500, -0.2500, 1.0000, -0.2500, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(1.5000, -0.5000, 1.5000, -0.2500, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-0.5000, 0.0000, 1.7500, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.3000, 0.0000, 1.7500, 0.0000, 0.0000, 0.0000) + N..... SELECT_TOOL(2) + N..... STOP_SPINDLE_TURNING(0) + N..... CHANGE_TOOL() + N..... USE_TOOL_LENGTH_OFFSET(0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) + N..... STRAIGHT_TRAVERSE(0.3000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on left") + N..... STRAIGHT_FEED(0.0500, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(0.0500, 0.0000, 0.0500, 0.0500, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.0000, 0.0000, 0.9500, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(1.2500, -0.3000, 0.9500, -0.3000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(1.4500, -0.5000, 1.4500, -0.3000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-0.5000, 0.0000, 1.7000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_TRAVERSE(0.3000, 0.0000, 1.7500, 0.0000, 0.0000, 0.0000) + N..... SELECT_TOOL(7) + N..... STOP_SPINDLE_TURNING(0) + N..... CHANGE_TOOL() + N..... USE_TOOL_LENGTH_OFFSET(0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) + N..... STRAIGHT_TRAVERSE(0.3000, 0.0000, 1.8500, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(-0.3000, 0.0000, 1.8500, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on right") + N..... STRAIGHT_FEED(-0.4000, 0.0000, 1.7500, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(1.7000, -0.4500, 1.7000, -0.4000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-0.4500, 0.0000, 1.4500, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(1.2500, -0.2500, 1.4500, -0.2500, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(0.9500, 0.0500, 0.9500, -0.2500, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.0500, 0.0000, 0.0500, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(0.0000, 0.1000, 0.0500, 0.1000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_TRAVERSE(0.3000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... USE_TOOL_LENGTH_OFFSET(0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) + N..... SELECT_TOOL(0) + N..... STOP_SPINDLE_TURNING(0) + N..... CHANGE_TOOL() + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SELECT_PLANE(CANON_PLANE_XY) + N..... SET_FEED_MODE(0, 0) + N..... SET_FEED_RATE(0.0000) + N..... STOP_SPINDLE_TURNING(0) + N..... SET_SPINDLE_MODE(0 0.0000) + N..... PROGRAM_END() + N..... ON_RESET() + N..... ON_RESET() diff --git a/wasm-port/vendor/linuxcnc/tests/ccomp/lathe-comp/test.ngc b/wasm-port/vendor/linuxcnc/tests/ccomp/lathe-comp/test.ngc new file mode 100644 index 0000000..fc0b269 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/ccomp/lathe-comp/test.ngc @@ -0,0 +1,49 @@ +g20 g64 g18 f30 + +g49 +t0 m6 + +g0x.3z0 +g40 +g1x.1 +g3x0z.1r.1 +g1z1 +g2r.25x-.25z1.25 +g3r.25x-.5z1.5 +g1z1.75 +g0x.3 + +t2 m6 +g43 h2 + +g0z0 +g41 +g1x.1 +g3x0z.1r.1 +g1z1 +g2r.25x-.25z1.25 +g3r.25x-.5z1.5 +g1z1.75 +g40 +g0x.3 + +t7 m6 +g43 h9 + +g0z1.85 +g0x-.3 +g42 +g1x-.4 +g2x-.5z1.75r.1 +g1z1.5 +g2r.25x-.25z1.25 +g3r.25x0z1 +g1z.1 +g2r.1x.1z0 +g40 +g0x.3 + +g49 +t0 m6 + +m2 diff --git a/wasm-port/vendor/linuxcnc/tests/ccomp/lathe-comp/test.sh b/wasm-port/vendor/linuxcnc/tests/ccomp/lathe-comp/test.sh new file mode 100644 index 0000000..f74438f --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/ccomp/lathe-comp/test.sh @@ -0,0 +1,3 @@ +#!/bin/bash +rs274 -t test.tbl -g test.ngc | awk '{$1=""; print}' +exit "${PIPESTATUS[0]}" diff --git a/wasm-port/vendor/linuxcnc/tests/ccomp/lathe-comp/test.tbl b/wasm-port/vendor/linuxcnc/tests/ccomp/lathe-comp/test.tbl new file mode 100644 index 0000000..33e64d3 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/ccomp/lathe-comp/test.tbl @@ -0,0 +1,19 @@ +T1 P1 Z0.0 X0.0 D0.1 I95.0 J155.0 Q1; +T2 P2 Z0.0 X0.0 D0.1 I85.0 J25.0 Q2; +T3 P3 Z0.0 X0.0 D0.1 I275.0 J335.0 Q3; +T4 P4 Z0.0 X0.0 D0.1 I265.0 J205.0 Q4; +T5 P5 Z0.0 X0.0 D0.1 I210.0 J150.0 Q5; +T6 P6 Z0.5 X0.5 D0.1 I120.0 J60.0 Q6; +T7 P7 Z0.0 X0.0 D0.1 I-30.0 J30.0 Q7; +T8 P8 Z0.0 X0.0 D0.1 I240.0 J300.0 Q8; +T9 P9 Z0.0 X0.0 D0.1 I0.0 J0.0 Q9; +T10 P10 Z0.0 X0.0 D0.0 I0.0 J0.0 Q0; +T11 P11 Z0.0 X0.0 D0.0 I95.0 J155.0 Q1; +T12 P12 Z0.0 X0.0 D0.0 I85.0 J25.0 Q2; +T13 P13 Z0.0 X0.0 D0.0 I275.0 J335.0 Q3; +T14 P14 Z0.0 X0.0 D0.0 I265.0 J205.0 Q4; +T15 P15 Z0.0 X0.0 D0.0 I210.0 J150.0 Q5; +T16 P16 Z0.0 X0.0 D0.0 I120.0 J60.0 Q6; +T17 P17 Z0.0 X0.0 D0.0 I-30.0 J30.0 Q7; +T18 P18 Z0.0 X0.0 D0.0 I240.0 J300.0 Q8; +T19 P19 Z0.0 X0.0 D0.0 I0.0 J0.0 Q9; \ No newline at end of file diff --git a/wasm-port/vendor/linuxcnc/tests/ccomp/mill-g90g91g92/expected b/wasm-port/vendor/linuxcnc/tests/ccomp/mill-g90g91g92/expected new file mode 100644 index 0000000..f58e400 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/ccomp/mill-g90g91g92/expected @@ -0,0 +1,50 @@ + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SET_FEED_REFERENCE(CANON_XYZ) + N..... ON_RESET() + N..... USE_LENGTH_UNITS(CANON_UNITS_INCHES) + N..... SELECT_TOOL(3) + N..... STOP_SPINDLE_TURNING(0) + N..... CHANGE_TOOL() + N..... STRAIGHT_TRAVERSE(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(2.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(1.0000, 0.0000, 1.5000, -0.5000, 1, 0.5000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(0.0000, 1.0000, 1.0000, 1.0000, -1, 0.5000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(1.0000, 2.0000, -0.8229, 2.8229, 1, 0.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(2.0000, 1.0000, 0.7000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(1.0000, 0.0000, 0.5000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(1.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("This is perverse on purpose.") + N..... STRAIGHT_TRAVERSE(1.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.5000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(2.0000, 0.0000, 0.5000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on left") + N..... ARC_FEED(1.0884, -0.0884, 1.5979, -0.5979, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: distance mode changed to incremental") + N..... ARC_FEED(1.0000, -0.1250, 1.0000, 0.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-0.1250, 1.0000, 1.0000, 1.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: distance mode changed to absolute") + N..... ARC_FEED(-0.0514, 1.1139, 0.0000, 1.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(0.8861, 2.0514, -0.8229, 2.8229, 1, 0.4000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: distance mode changed to incremental") + N..... ARC_FEED(1.0884, 2.0884, 1.0000, 2.0000, -1, 0.4000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(2.0884, 1.0884, 0.2000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: distance mode changed to absolute") + N..... ARC_FEED(2.0884, 0.9116, 2.0000, 1.0000, -1, 0.2000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(1.0884, -0.0884, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(1.0884, -0.0884, 1.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SET_FEED_MODE(0, 0) + N..... SET_FEED_RATE(0.0000) + N..... STOP_SPINDLE_TURNING(0) + N..... SET_SPINDLE_MODE(0 0.0000) + N..... PROGRAM_END() + N..... ON_RESET() + N..... ON_RESET() diff --git a/wasm-port/vendor/linuxcnc/tests/ccomp/mill-g90g91g92/test.ngc b/wasm-port/vendor/linuxcnc/tests/ccomp/mill-g90g91g92/test.ngc new file mode 100644 index 0000000..74d8fae --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/ccomp/mill-g90g91g92/test.ngc @@ -0,0 +1,28 @@ +G20 +T3 M6 +G0 X0 Y0 +F100 +G0 Z1 +X2Y0 + +G3 X1Y0 R[.5*SQRT[2]] Z.5 +G2 X0Y1 R1 +G3 X1Y2Z.9 R2 +G1 X2Y1Z.7 +X1Y0Z.5 +G0Z1 + +(This is perverse on purpose.) +G0 Z1 +G92 Z.5 +X2Y0 +G41 +G3 X1Y0 R[.5*SQRT[2]] Z0 +G91 G2 X-1Y1 R1 +G90 G3 X1Y2Z.4 R2 +G91 G1 X1Y-1Z-.2 +G90 X1Y0Z0 +G0Z1 +G40 +G92.1 +M2 diff --git a/wasm-port/vendor/linuxcnc/tests/ccomp/mill-g90g91g92/test.sh b/wasm-port/vendor/linuxcnc/tests/ccomp/mill-g90g91g92/test.sh new file mode 100644 index 0000000..f74438f --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/ccomp/mill-g90g91g92/test.sh @@ -0,0 +1,3 @@ +#!/bin/bash +rs274 -t test.tbl -g test.ngc | awk '{$1=""; print}' +exit "${PIPESTATUS[0]}" diff --git a/wasm-port/vendor/linuxcnc/tests/ccomp/mill-g90g91g92/test.tbl b/wasm-port/vendor/linuxcnc/tests/ccomp/mill-g90g91g92/test.tbl new file mode 100644 index 0000000..5f3da5c --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/ccomp/mill-g90g91g92/test.tbl @@ -0,0 +1,5 @@ +T1 P1 Z0.5 D0.0625;first tool +T2 P2 Z0.7 D0.125; +T3 P3 Z0.5 D0.25; +T4 P4 Z0.7 D1.0; +T32 P32 Z0.5 D0.0;last tool \ No newline at end of file diff --git a/wasm-port/vendor/linuxcnc/tests/ccomp/mill-line-arc-entry/expected b/wasm-port/vendor/linuxcnc/tests/ccomp/mill-line-arc-entry/expected new file mode 100644 index 0000000..ab893c5 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/ccomp/mill-line-arc-entry/expected @@ -0,0 +1,47 @@ + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SET_FEED_REFERENCE(CANON_XYZ) + N..... ON_RESET() + N..... COMMENT("this is the program describing entry moves for") + N..... COMMENT("radius compensation in Figure 3 of the Handbook") + N..... COMMENT("http://www.linuxcnc.org/handbook/RS274NGC_3/RS274NGC_38a.html#999268") + N..... SET_FEED_RATE(60.0000) + N..... USE_LENGTH_UNITS(CANON_UNITS_INCHES) + N..... COMMENT("first, no compensation so we can see the part outline") + N..... STRAIGHT_TRAVERSE(1.0000, 5.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(1.0000, 4.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(2.0000, 3.0000, 2.0000, 4.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(3.0000, 2.0000, 2.0000, 2.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(3.0000, -1.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(2.0000, -2.0000, 2.0000, -1.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-2.0000, -2.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-2.6000, -0.2000, -2.0000, -1.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(1.4000, 2.8000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(2.0000, 3.0000, 2.0000, 2.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("with compensation") + N..... SELECT_TOOL(4) + N..... STOP_SPINDLE_TURNING(0) + N..... CHANGE_TOOL() + N..... STRAIGHT_TRAVERSE(1.0000, 5.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on left") + N..... STRAIGHT_FEED(1.5000, 4.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(2.0000, 3.5000, 2.0000, 4.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(3.5000, 2.0000, 2.0000, 2.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(3.5000, -1.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(2.0000, -2.5000, 2.0000, -1.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-2.0000, -2.5000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-2.9000, 0.2000, -2.0000, -1.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(1.1000, 3.2000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(2.0000, 3.5000, 2.0000, 2.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SET_FEED_MODE(0, 0) + N..... SET_FEED_RATE(0.0000) + N..... STOP_SPINDLE_TURNING(0) + N..... SET_SPINDLE_MODE(0 0.0000) + N..... PROGRAM_END() + N..... ON_RESET() + N..... ON_RESET() diff --git a/wasm-port/vendor/linuxcnc/tests/ccomp/mill-line-arc-entry/test.ngc b/wasm-port/vendor/linuxcnc/tests/ccomp/mill-line-arc-entry/test.ngc new file mode 100644 index 0000000..7b5308f --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/ccomp/mill-line-arc-entry/test.ngc @@ -0,0 +1,33 @@ +(this is the program describing entry moves for) +(radius compensation in Figure 3 of the Handbook) +(http://www.linuxcnc.org/handbook/RS274NGC_3/RS274NGC_38a.html#999268) + +g20 f60 + +(first, no compensation so we can see the part outline) +g0 x1 y5 +g1 y4 +g3 x2 y3 i1 +g2 x3 y2 j-1 +g1 y-1 +g2 x2 y-2 i-1 +g1 x-2 +g2 x-2.6 y-0.2 j1 +g1 x1.4 y2.8 +g2 x2 y3 i.6 j-.8 + +(with compensation) +t4 m6 +g0 x1 y5 +g41 g1 y4 +g3 x2 y3 i1 +g2 x3 y2 j-1 +g1 y-1 +g2 x2 y-2 i-1 +g1 x-2 +g2 x-2.6 y-0.2 j1 +g1 x1.4 y2.8 +g2 x2 y3 i.6 j-.8 +g40 + +m2 diff --git a/wasm-port/vendor/linuxcnc/tests/ccomp/mill-line-arc-entry/test.sh b/wasm-port/vendor/linuxcnc/tests/ccomp/mill-line-arc-entry/test.sh new file mode 100644 index 0000000..f74438f --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/ccomp/mill-line-arc-entry/test.sh @@ -0,0 +1,3 @@ +#!/bin/bash +rs274 -t test.tbl -g test.ngc | awk '{$1=""; print}' +exit "${PIPESTATUS[0]}" diff --git a/wasm-port/vendor/linuxcnc/tests/ccomp/mill-line-arc-entry/test.tbl b/wasm-port/vendor/linuxcnc/tests/ccomp/mill-line-arc-entry/test.tbl new file mode 100644 index 0000000..5f3da5c --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/ccomp/mill-line-arc-entry/test.tbl @@ -0,0 +1,5 @@ +T1 P1 Z0.5 D0.0625;first tool +T2 P2 Z0.7 D0.125; +T3 P3 Z0.5 D0.25; +T4 P4 Z0.7 D1.0; +T32 P32 Z0.5 D0.0;last tool \ No newline at end of file diff --git a/wasm-port/vendor/linuxcnc/tests/ccomp/mill-zchanges/expected b/wasm-port/vendor/linuxcnc/tests/ccomp/mill-zchanges/expected new file mode 100644 index 0000000..3cfeabc --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/ccomp/mill-zchanges/expected @@ -0,0 +1,107 @@ + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SET_FEED_REFERENCE(CANON_XYZ) + N..... ON_RESET() + N..... SET_FEED_RATE(60.0000) + N..... USE_LENGTH_UNITS(CANON_UNITS_INCHES) + N..... COMMENT("arc entry") + N..... COMMENT("uncomp") + N..... STRAIGHT_TRAVERSE(0.0000, 0.5000, 0.2500, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.2500, 0.5000, 0.2500, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on left") + N..... ARC_FEED(0.5000, 0.7500, 0.5000, 0.5000, -1, 0.2500, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.7500, 0.7500, 0.2500, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(1.0000, 0.7500, 0.2500, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(1.2500, 0.7500, 0.2500, 0.0000, 0.0000, 0.0000) + N..... COMMENT("comp") + N..... STRAIGHT_TRAVERSE(0.0000, 0.5000, 0.2500, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.2500, 0.5000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on left") + N..... ARC_FEED(0.5000, 0.8125, 0.5000, 0.5562, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.7500, 0.8125, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(1.0000, 0.7500, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(1.2500, 0.7500, 0.2500, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.0000, 0.5000, 0.2500, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.2500, 0.5000, 0.2500, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on left") + N..... ARC_FEED(0.5000, 0.8125, 0.5000, 0.5562, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.7500, 0.8125, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(1.0000, 0.7500, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(1.2500, 0.7500, 0.2500, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.0000, 0.5000, 0.2500, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.2500, 0.5000, 0.2500, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on left") + N..... ARC_FEED(0.5000, 0.8125, 0.5000, 0.5562, -1, 0.2500, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.7500, 0.8125, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(1.0000, 0.7500, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(1.2500, 0.7500, 0.2500, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.0000, 0.5000, 0.2500, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.2500, 0.5000, 0.2500, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on left") + N..... ARC_FEED(0.5000, 0.8125, 0.5000, 0.5562, -1, 0.2500, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.7500, 0.8125, 0.2500, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(1.0000, 0.7500, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(1.2500, 0.7500, 0.2500, 0.0000, 0.0000, 0.0000) + N..... COMMENT("line entry") + N..... COMMENT("uncomp") + N..... STRAIGHT_TRAVERSE(0.0000, -0.5000, 0.2500, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.2500, -0.5000, 0.2500, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on left") + N..... STRAIGHT_FEED(0.5000, -0.2500, 0.2500, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.7500, -0.2500, 0.2500, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(1.0000, -0.2500, 0.2500, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(1.2500, -0.2500, 0.2500, 0.0000, 0.0000, 0.0000) + N..... COMMENT("comp") + N..... STRAIGHT_TRAVERSE(0.0000, -0.5000, 0.2500, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.2500, -0.5000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on left") + N..... STRAIGHT_FEED(0.4558, -0.2058, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(0.5000, -0.1875, 0.5000, -0.2500, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.7500, -0.1875, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(1.0000, -0.2500, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(1.2500, -0.2500, 0.2500, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.0000, -0.5000, 0.2500, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.2500, -0.5000, 0.2500, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on left") + N..... STRAIGHT_FEED(0.4558, -0.2058, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(0.5000, -0.1875, 0.5000, -0.2500, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.7500, -0.1875, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(1.0000, -0.2500, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(1.2500, -0.2500, 0.2500, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.0000, -0.5000, 0.2500, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.2500, -0.5000, 0.2500, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on left") + N..... STRAIGHT_FEED(0.4558, -0.2058, 0.2500, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(0.5000, -0.1875, 0.5000, -0.2500, -1, 0.2500, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.7500, -0.1875, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(1.0000, -0.2500, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(1.2500, -0.2500, 0.2500, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.0000, -0.5000, 0.2500, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.2500, -0.5000, 0.2500, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on left") + N..... STRAIGHT_FEED(0.4558, -0.2058, 0.2500, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(0.5000, -0.1875, 0.5000, -0.2500, -1, 0.2500, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.7500, -0.1875, 0.2500, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(1.0000, -0.2500, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(1.2500, -0.2500, 0.2500, 0.0000, 0.0000, 0.0000) + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SET_FEED_MODE(0, 0) + N..... SET_FEED_RATE(0.0000) + N..... STOP_SPINDLE_TURNING(0) + N..... SET_SPINDLE_MODE(0 0.0000) + N..... PROGRAM_END() + N..... ON_RESET() + N..... ON_RESET() diff --git a/wasm-port/vendor/linuxcnc/tests/ccomp/mill-zchanges/test.ngc b/wasm-port/vendor/linuxcnc/tests/ccomp/mill-zchanges/test.ngc new file mode 100644 index 0000000..6f32baa --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/ccomp/mill-zchanges/test.ngc @@ -0,0 +1,81 @@ +g20 f60 + +(arc entry) +(uncomp) +g0x0y.5z.25 +g1x.25 +g41 g2 d0 x.5 y.75 i.25 +g1 x.75 +g40 x1 +x1.25 z.25 + +(comp) +g0x0y.5z.25 +g1x.25 z0 +g41 g2 d2 x.5 y.75 i.25 +g1 x.75 +g40 x1 +x1.25 z.25 + +g0x0y.5z.25 +g1x.25 +g41 g2 d2 x.5 y.75 i.25 z0 +g1 x.75 +g40 x1 +x1.25 z.25 + +g0x0y.5z.25 +g1x.25 +g41 g2 d2 x.5 y.75 i.25 +g1 x.75 z0 +g40 x1 +x1.25 z.25 + +g0x0y.5z.25 +g1x.25 +g41 g2 d2 x.5 y.75 i.25 +g1 x.75 +g40 x1 z0 +x1.25 z.25 + + +(line entry) +(uncomp) +g0x0y-.5z.25 +g1x.25 +g41 g1 d0 x.5 y-.25 +g1 x.75 +g40 x1 +x1.25 z.25 + +(comp) +g0x0y-.5z.25 +g1x.25 z0 +g41 g1 d2 x.5 y-.25 +g1 x.75 +g40 x1 +x1.25 z.25 + +g0x0y-.5z.25 +g1x.25 +g41 g1 d2 x.5 y-.25 z0 +g1 x.75 +g40 x1 +x1.25 z.25 + +g0x0y-.5z.25 +g1x.25 +g41 g1 d2 x.5 y-.25 +g1 x.75 z0 +g40 x1 +x1.25 z.25 + +g0x0y-.5z.25 +g1x.25 +g41 g1 d2 x.5 y-.25 +g1 x.75 +g40 x1 z0 +x1.25 z.25 + + +m2 diff --git a/wasm-port/vendor/linuxcnc/tests/ccomp/mill-zchanges/test.sh b/wasm-port/vendor/linuxcnc/tests/ccomp/mill-zchanges/test.sh new file mode 100644 index 0000000..f74438f --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/ccomp/mill-zchanges/test.sh @@ -0,0 +1,3 @@ +#!/bin/bash +rs274 -t test.tbl -g test.ngc | awk '{$1=""; print}' +exit "${PIPESTATUS[0]}" diff --git a/wasm-port/vendor/linuxcnc/tests/ccomp/mill-zchanges/test.tbl b/wasm-port/vendor/linuxcnc/tests/ccomp/mill-zchanges/test.tbl new file mode 100644 index 0000000..5f3da5c --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/ccomp/mill-zchanges/test.tbl @@ -0,0 +1,5 @@ +T1 P1 Z0.5 D0.0625;first tool +T2 P2 Z0.7 D0.125; +T3 P3 Z0.5 D0.25; +T4 P4 Z0.7 D1.0; +T32 P32 Z0.5 D0.0;last tool \ No newline at end of file diff --git a/wasm-port/vendor/linuxcnc/tests/interp/bad/a-in-canned-cycle.ngc b/wasm-port/vendor/linuxcnc/tests/interp/bad/a-in-canned-cycle.ngc new file mode 100644 index 0000000..ba20068 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/bad/a-in-canned-cycle.ngc @@ -0,0 +1,3 @@ +;Cannot put an a in canned cycle +g81 x0 y0 z-1 r0 f12 +a90 diff --git a/wasm-port/vendor/linuxcnc/tests/interp/bad/a-in-canned-cycle2.ngc b/wasm-port/vendor/linuxcnc/tests/interp/bad/a-in-canned-cycle2.ngc new file mode 100644 index 0000000..8d5d715 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/bad/a-in-canned-cycle2.ngc @@ -0,0 +1,2 @@ +;Cannot put an a in canned cycle +g81 x0 y0 z-1 r0 a90 f12 diff --git a/wasm-port/vendor/linuxcnc/tests/interp/bad/bad-arc.big.imperial.center-format.ngc b/wasm-port/vendor/linuxcnc/tests/interp/bad/bad-arc.big.imperial.center-format.ngc new file mode 100644 index 0000000..9a8938c --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/bad/bad-arc.big.imperial.center-format.ngc @@ -0,0 +1,6 @@ +;Radius to end of arc differs from radius to start: start=(X0.0000,Y0.0000) center=(X300.1428,Y0.0000) end=(X600.0000,Y0.0000) r1=300.1428 r2=299.8572 abs_err=0.2857 rel_err=0.0952% + +g20 +f1 +g0x0y0z0 +g2 x600 i[300 + [100 * [0.00101 * sqrt[2]]]] diff --git a/wasm-port/vendor/linuxcnc/tests/interp/bad/bad-arc.big.metric.center-format.ngc b/wasm-port/vendor/linuxcnc/tests/interp/bad/bad-arc.big.metric.center-format.ngc new file mode 100644 index 0000000..86db891 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/bad/bad-arc.big.metric.center-format.ngc @@ -0,0 +1,6 @@ +;Radius to end of arc differs from radius to start: start=(X0.0000,Y0.0000) center=(X3001.4284,Y0.0000) end=(X6000.0000,Y0.0000) r1=3001.4284 r2=2998.5716 abs_err=2.857 rel_err=0.0952% + +g21 +f1 +g0x0y0z0 +g2 x6000 i[3000 + [100 * [0.0101 * sqrt[2]]]] diff --git a/wasm-port/vendor/linuxcnc/tests/interp/bad/bad-arc.medium.imperial.center-format.ngc b/wasm-port/vendor/linuxcnc/tests/interp/bad/bad-arc.medium.imperial.center-format.ngc new file mode 100644 index 0000000..51a5bcd --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/bad/bad-arc.medium.imperial.center-format.ngc @@ -0,0 +1,6 @@ +;Radius to end of arc differs from radius to start: start=(X0.0000,Y0.0000) center=(X99.8500,Y0.0000) end=(X200.0000,Y0.0000) r1=99.8500 r2=100.1500 abs_err=0.3 rel_err=0.2996% + +g20 +f1 +g0x0y0z0 +g2 x200 i[0.9985 * 100] diff --git a/wasm-port/vendor/linuxcnc/tests/interp/bad/bad-arc.medium.metric.center-format.ngc b/wasm-port/vendor/linuxcnc/tests/interp/bad/bad-arc.medium.metric.center-format.ngc new file mode 100644 index 0000000..0435cd1 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/bad/bad-arc.medium.metric.center-format.ngc @@ -0,0 +1,6 @@ +;Radius to end of arc differs from radius to start: start=(X0.0000,Y0.0000) center=(X998.5000,Y0.0000) end=(X2000.0000,Y0.0000) r1=998.5000 r2=1001.5000 abs_err=3 rel_err=0.2996% + +g21 +f1 +g0x0y0z0 +g2 x2000 i[0.9985 * 1000] diff --git a/wasm-port/vendor/linuxcnc/tests/interp/bad/bad-arc.small.imperial.center-format.ngc b/wasm-port/vendor/linuxcnc/tests/interp/bad/bad-arc.small.imperial.center-format.ngc new file mode 100644 index 0000000..a0addfe --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/bad/bad-arc.small.imperial.center-format.ngc @@ -0,0 +1,6 @@ +;Radius to end of arc differs from radius to start: start=(X0.0000,Y0.0000) center=(X2.4986,Y0.0000) end=(X5.0000,Y0.0000) r1=2.4986 r2=2.5014 abs_err=0.002857 rel_err=0.1142% + +g20 +f1 +g0x0y0z0 +g2 x5.000 y0 i[2.500 - [0.00101 * sqrt[2]]] diff --git a/wasm-port/vendor/linuxcnc/tests/interp/bad/bad-arc.small.metric.center-format.ngc b/wasm-port/vendor/linuxcnc/tests/interp/bad/bad-arc.small.metric.center-format.ngc new file mode 100644 index 0000000..aa2b293 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/bad/bad-arc.small.metric.center-format.ngc @@ -0,0 +1,6 @@ +;Radius to end of arc differs from radius to start: start=(X0.0000,Y0.0000) center=(X24.9857,Y0.0000) end=(X50.0000,Y0.0000) r1=24.9857 r2=25.0143 abs_err=0.02857 rel_err=0.1142% + +g21 +f1 +g0x0y0z0 +g2 x50.00 y0 i[25.00 - [0.0101 * sqrt[2]]] diff --git a/wasm-port/vendor/linuxcnc/tests/interp/bad/ccomp-arcexit.ngc b/wasm-port/vendor/linuxcnc/tests/interp/bad/ccomp-arcexit.ngc new file mode 100644 index 0000000..05a3079 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/bad/ccomp-arcexit.ngc @@ -0,0 +1,7 @@ +;The move just after exiting cutter compensation mode must be straight, not an arc +g0x0y0z0 +g41.1d.25 +g1x1f1 +g1x2 +g40 +g2i1 diff --git a/wasm-port/vendor/linuxcnc/tests/interp/bad/ccomp-gouging.ngc b/wasm-port/vendor/linuxcnc/tests/interp/bad/ccomp-gouging.ngc new file mode 100644 index 0000000..49b2a7c --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/bad/ccomp-gouging.ngc @@ -0,0 +1,9 @@ +;Straight feed in concave corner cannot be reached by the tool without gouging +g0x0y0z0 +g41.1d.25 +g1x1f1 +g1x2 +g1y.1 +g1x1 +g40 +g1x2 diff --git a/wasm-port/vendor/linuxcnc/tests/interp/cam-nisley/cam.ngc b/wasm-port/vendor/linuxcnc/tests/interp/cam-nisley/cam.ngc new file mode 100644 index 0000000..6e3efe1 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/cam-nisley/cam.ngc @@ -0,0 +1,245 @@ +% +( Storm door latch cam ) +( Outside milling, clamped on center axis) +( Ed Nisley - Nov 2006 - Mar 2007) +(-----------------) +#1000 = 75.00 (tool change XYZ) +#1001 = 0.00 +#1002 = 75.00 +#1004 = 10.00 (traverse clearance) + +(-----------------) +(Cutter and material values) + +#1110 = 3.10 (cutter diameter from Sherline_mm.tbl entry, per #1113 tool slot) +#1111 = [0.0005 * 25.4] (chip load, inches/tooth -> mm/tooth) +#1112 = 2 (number of teeth) +#1113 = 1 (tool slot holding this cutter: verify this in *.tbl entry) +#1114 = 1.00 (max cut depth) +#1115 = 1.00 (max cut width) + +#1120 = [150 * 12 * 25.4] (cutting speed, surface ft/min > mm/min) +#1121 = [#1120 / [3.14 * #1110]] (spindle RPM) +#1122 = [#1121 * #1111 * #1112] (milling feed, mm/min = RPM * load * teeth) + +(-----------------) +(Part dimensions) + +#1201 = 4.17 (shaft Z thickness) +#1202 = 2.95 (cam Z thickness) + +#1211 = FUP[#1201 / #1114] (shaft Z passes) +#1212 = FUP[#1202 / #1114] (cam Z passes) + +#1221 = [#1201 / #1211] (shaft Z cut depth) +#1222 = [#1202 / #1212] (cam Z cut depth) + +#1230 = [17.75 / 2] (raw part OD -> radius) +#1231 = [10.30 / 2] (shaft finished OD and cam small OD) +#1232 = [17.36 / 2] (cam large OD) + +#1241 = FUP[[#1230 - #1231] / #1115] (shaft radius passes) +#1242 = FUP[[#1230 - #1232] / #1115] (cam OD radius passes) + +#1251 = [[#1230 - #1231] / #1241] (shaft radius cut depth) +#1252 = [[#1230 - #1232] / #1242] (cam OD radius cut depth) + +#1272 = [216 / 2] (half-angle of cam solid arc) + +#1300 = 1.60 (inside corner fillet radius) + +(-----------------) +(Define setup) + +G90 (absolute coordinates) +G21 (metric units) +S #1121 (set spindle speed) +F #1122 (set milling feed) +T #1113 M6 (set up the tool) + +(-----------------) +(msg,Verify METRIC Sherline.tbl file!) +(msg,Align XY=0 at center, Z=0 at surface, spindle to match S value, hit [Run]) + +M0 (wait for Resume) +M3 (spindle CW) +G0 Z#1004 (get air for alignment) + +(-----------------) +(Commence cutting!) +(Start cutter compensation) +(External cutting: CCW around the part) + +G0 X[0-#1300] Y[0-[#1230 + 3 * #1300]] (alignment move) +G42 D#1113 (comp on: tool to right, D = cutter) +G1 X[0-#1300] Y[0-[#1230 + #1300]] (first entry move) +G2 X0 Y[0-#1230] I#1300 J0 (second entry move to part edge) + +G0 Z#1004 (to traverse level) + +(--- Cut shaft) + +O309 IF [1] + +#900 = 0 (Z iteration counter - start at surface) +#901 = 0.00 (initial Z cut depth) + +O300 DO (Z iteration) + +G1 Z#901 (to new Z level) + +#910 = 0 (radius iteration counter) +#911 = #1230 (initial radius - start at raw OD) + +O310 DO (radius iteration) + +O311 IF [#911 NE #1230] (if new is not max OD, then reposition) +G91 (relative coords) +G2 Y[0 - 2 * #1300] J[0-#1300] (loop outward by min radius) +G2 Y[#1251 + 2 * #1300] J[#1300 + #1251 / 2] (loop inward to new radius) +G90 (abs coords) +O311 ENDIF + +G3 Y[0-#911] J[#911] (one pass CCW around shaft) + +#910 = [#910 + 1] (tick radius counter) +#911 = [#911 - #1251] (figure next radius) + +O310 WHILE [#910 LE #1241] (for all radius passes) + +G2 Y[0 -[#1230 + 2 * #1300]] J[0 -[[[#1230 - #1231] / 2] + #1300]] (align to max OD) +G2 Y[0 -#1230] J[#1300] + +#900 = [#900 + 1] (tick loop counter) +#901 = [#901 - #1221] (next Z level) + +O300 WHILE [#900 LE #1211] (for all Z steps) + +O309 ENDIF + +(--- Cut cam OD) + +O349 IF [1] + +#900 = 0 (Z iteration counter - at top of cam) +#901 = [0-#1201] (initial Z cut depth - top of cam = bottom of shaft) + +O340 DO (Z iteration) + +G1 Z#901 (to new Z level) + +#910 = 0 (radius iteration counter) +#911 = #1230 (initial radius - start at raw OD) + +O350 DO (radius iteration) + +O351 IF [#911 NE #1230] (if new is not max OD, then reposition) +G91 (relative coords) +G2 Y[0 - 2 * #1300] J[0-#1300] (loop outward by min radius) +G2 Y[#1252 + 2 * #1300] J[#1300 + #1252 / 2] (loop inward to new radius) +G90 (abs coords) +O351 ENDIF + +G3 Y[0-#911] J[#911] (one pass CCW around shaft) + +#910 = [#910 + 1] (tick radius counter) +#911 = [#911 - #1252] (figure next radius) + +O350 WHILE [#910 LE #1242] (for all radius passes) + +G2 Y[0 -[#1230 + 2 * #1300]] J[0 -[[[#1230 - #1232] / 2] + #1300]] (align to max OD) +G2 Y[0 -#1230] J[#1300] + +#900 = [#900 + 1] (tick loop counter) +#901 = [#901 - #1222] (next Z level) + +O340 WHILE [#900 LE #1212] (for all Z steps) + +O349 ENDIF + +(--- Cut cam ID) +(This goes in to shaft OD) +(Realign for CW passes in air clearing max OD by a bit, CCW cutting in part) + +G0 Z#1004 (reposition at clearance OD facing CW for next move) + +#520 = [#1110 + 2 * #1300] (cutter dia + 2 x min fillet radius) +#521 = [#1230 + #520] ("exterior material contour" for air cutting) + +G2 Y[0 -#521] J[0 -[#520 / 2]] (half-circle to new OD, cutter still to right) + +#522 = [#521 - #1300] (O-P - dist origin to outer circle center) +#523 = [ASIN[#1300 / #522]] (alpha - angle cam edge to outer circle center) +#524 = [#1272 - #523] (beta - angle Y axis to outer circle center) +#525 = [#522 * COS[#523]] (O-B - dist origin to B tangent on cam edge) + +#531 = [#521 * SIN[#524]] (A - X coord fairing circle tangent to OD) +#532 = [#521 * COS[#524]] (A - Y coord fairing circle tangent to OD) + +#541 = [#525 * SIN[#1272]] (B - X coord fairing circle tangent to cam) +#542 = [#525 * COS[#1272]] (B - Y coord fairing circle tangent to cam) + +#551 = [#522 * SIN[#524]] (P - X coord fairing circle center) +#552 = [#522 * COS[#524]] (P - Y coord fairing circle center) + +#900 = 0 (Z iteration counter - start at top of cam again) +#901 = [0 -#1201] (initial Z cut level - top of cam = bottom of shaft) + +O380 DO (Z iteration) + +G1 Z#901 (to new Z level) + +#910 = 0 (radius iteration counter) +#911 = #1230 (initial radius - start at raw OD) + +O390 DO (radius iteration) + +#622 = [#911 + #1300] (O-Q - dist origin to current inner circle center) +#623 = [ASIN[#1300 / #622]] (gamma - angle cam edge to inner circle center) +#624 = [#1272 - #623] (delta - angle Y axis to inner circle center) +#625 = [#622 * COS[#623]] (O-C - dist origin to C tangent on cam edge) + +#631 = [#625 * SIN[#1272]] (C - X coord inner circle tangent to cam) +#632 = [#625 * COS[#1272]] (C - Y coord inner circle tangent to cam) + +#641 = [#911 * SIN[#624]] (D - X coord inner circle tangent to shaft) +#642 = [#911 * COS[#624]] (D - Y coord inner circle tangent to shaft) + +#651 = [#622 * SIN[#624]] (Q - X coord inner circle center) +#652 = [#622 * COS[#624]] (Q - Y coord inner circle center) + +G2 X[0 -#531] Y[0 -#532] J[#521] (left side of air pass) +G2 X[0 -#541] Y[0 -#542] I[#531 - #551] J[#532 - #552] (fillet to cam edge) + +G1 X[0 -#631] Y[0 -#632] (left cam edge) +G2 X[0 -#641] Y[0 -#642] I[#631 - #651] J[#632 - #652] (fillet to current shaft OD) + +G3 X[#641] Y[0 -#642] I[#641] J[#642] (current shaft OD) +G2 X[#631] Y[0 -#632] I[#651 - #641] J[#642 - #652] (fillet to cam edge) + +G1 X[#541] Y[0 -#542] (right cam edge) +G2 X[#531] Y[0 -#532] I[#551 - #541] J[#542 - #552] (fillet to air pass) + +G2 X[0] Y[0 -#521] I[0 -#531] J[#532] (right side of air pass) + +#910 = [#910 + 1] (tick radius counter) +#911 = [#911 - #1251] (figure next radius) + +O390 WHILE [#910 LE #1241] (for all radius passes) + +#900 = [#900 + 1] (tick loop counter) +#901 = [#901 - #1222] (next Z level) + +O380 WHILE [#900 LE #1212] (for all Z steps) + +(-----------------) +M5 (spindle off) +G0 Z#1002 (get air) + +G40 (cutter comp off) + +G0 X#1000 Y#1001 (return home) +(msg,Done!) +M2 +% + diff --git a/wasm-port/vendor/linuxcnc/tests/interp/cam-nisley/expected b/wasm-port/vendor/linuxcnc/tests/interp/cam-nisley/expected new file mode 100644 index 0000000..4bc9ee3 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/cam-nisley/expected @@ -0,0 +1,1212 @@ + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SET_FEED_REFERENCE(CANON_XYZ) + N..... ON_RESET() + N..... COMMENT("Storm door latch cam ") + N..... COMMENT("Outside milling, clamped on center axis") + N..... COMMENT("Ed Nisley - Nov 2006 - Mar 2007") + N..... COMMENT("-----------------") + N..... COMMENT("tool change XYZ") + N..... COMMENT("traverse clearance") + N..... COMMENT("-----------------") + N..... COMMENT("Cutter and material values") + N..... COMMENT("cutter diameter from Sherline_mm.tbl entry, per #1113 tool slot") + N..... COMMENT("chip load, inches/tooth -> mm/tooth") + N..... COMMENT("number of teeth") + N..... COMMENT("tool slot holding this cutter: verify this in *.tbl entry") + N..... COMMENT("max cut depth") + N..... COMMENT("max cut width") + N..... COMMENT("cutting speed, surface ft/min > mm/min") + N..... COMMENT("spindle RPM") + N..... COMMENT("milling feed, mm/min = RPM * load * teeth") + N..... COMMENT("-----------------") + N..... COMMENT("Part dimensions") + N..... COMMENT("shaft Z thickness") + N..... COMMENT("cam Z thickness") + N..... COMMENT("shaft Z passes") + N..... COMMENT("cam Z passes") + N..... COMMENT("shaft Z cut depth") + N..... COMMENT("cam Z cut depth") + N..... COMMENT("raw part OD -> radius") + N..... COMMENT("shaft finished OD and cam small OD") + N..... COMMENT("cam large OD") + N..... COMMENT("shaft radius passes") + N..... COMMENT("cam OD radius passes") + N..... COMMENT("shaft radius cut depth") + N..... COMMENT("cam OD radius cut depth") + N..... COMMENT("half-angle of cam solid arc") + N..... COMMENT("inside corner fillet radius") + N..... COMMENT("-----------------") + N..... COMMENT("Define setup") + N..... COMMENT("absolute coordinates") + N..... COMMENT("metric units") + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... COMMENT("set spindle speed") + N..... SET_SPINDLE_SPEED(0, 4696.9386) + N..... COMMENT("set milling feed") + N..... SET_FEED_RATE(119.3022) + N..... COMMENT("set up the tool") + N..... SELECT_TOOL(1) + N..... STOP_SPINDLE_TURNING(0) + N..... CHANGE_TOOL() + N..... COMMENT("-----------------") + N..... MESSAGE("Verify METRIC Sherline.tbl file!") + N..... MESSAGE("Align XY=0 at center, Z=0 at surface, spindle to match S value, hit [Run]") + N..... COMMENT("wait for Resume") + N..... PROGRAM_STOP() + N..... COMMENT("spindle CW") + N..... START_SPINDLE_CLOCKWISE(0) + N..... COMMENT("get air for alignment") + N..... STRAIGHT_TRAVERSE(0.0000, 0.0000, 10.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("-----------------") + N..... COMMENT("Commence cutting!") + N..... COMMENT("Start cutter compensation") + N..... COMMENT("External cutting: CCW around the part") + N..... COMMENT("alignment move") + N..... STRAIGHT_TRAVERSE(-1.6000, -13.6750, 10.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("comp on: tool to right, D = cutter") + N..... COMMENT("interpreter: cutter radius compensation on right") + N..... COMMENT("first entry move") + N..... STRAIGHT_FEED(-0.8063, -10.4750, 10.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("second entry move to part edge") + N..... ARC_FEED(0.0000, -9.6687, 0.0000, -10.4750, -1, 10.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("to traverse level") + N..... STRAIGHT_TRAVERSE(0.0000, -9.6687, 10.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("--- Cut shaft") + N..... COMMENT("Z iteration counter - start at surface") + N..... COMMENT("initial Z cut depth") + N..... COMMENT("to new Z level") + N..... STRAIGHT_FEED(0.0000, -9.6687, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("radius iteration counter") + N..... COMMENT("initial radius - start at raw OD") + N..... COMMENT("one pass CCW around shaft") + N..... ARC_FEED(0.0000, -9.6687, 0.0000, 0.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("relative coords") + N..... COMMENT("interpreter: distance mode changed to incremental") + N..... COMMENT("loop outward by min radius") + N..... ARC_FEED(0.0000, -11.2813, 0.0000, -10.4750, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("loop inward to new radius") + N..... ARC_FEED(0.0000, -8.7375, 0.0000, -10.0094, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("abs coords") + N..... COMMENT("interpreter: distance mode changed to absolute") + N..... COMMENT("one pass CCW around shaft") + N..... ARC_FEED(0.0000, -8.7375, 0.0000, 0.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("relative coords") + N..... COMMENT("interpreter: distance mode changed to incremental") + N..... COMMENT("loop outward by min radius") + N..... ARC_FEED(0.0000, -10.3500, 0.0000, -9.5437, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("loop inward to new radius") + N..... ARC_FEED(0.0000, -7.8062, 0.0000, -9.0781, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("abs coords") + N..... COMMENT("interpreter: distance mode changed to absolute") + N..... COMMENT("one pass CCW around shaft") + N..... ARC_FEED(0.0000, -7.8062, 0.0000, -0.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("relative coords") + N..... COMMENT("interpreter: distance mode changed to incremental") + N..... COMMENT("loop outward by min radius") + N..... ARC_FEED(0.0000, -9.4188, 0.0000, -8.6125, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("loop inward to new radius") + N..... ARC_FEED(0.0000, -6.8750, 0.0000, -8.1469, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("abs coords") + N..... COMMENT("interpreter: distance mode changed to absolute") + N..... COMMENT("one pass CCW around shaft") + N..... ARC_FEED(0.0000, -6.8750, 0.0000, 0.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("relative coords") + N..... COMMENT("interpreter: distance mode changed to incremental") + N..... COMMENT("loop outward by min radius") + N..... ARC_FEED(0.0000, -8.4875, 0.0000, -7.6812, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("loop inward to new radius") + N..... ARC_FEED(0.0000, -5.9437, 0.0000, -7.2156, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("abs coords") + N..... COMMENT("interpreter: distance mode changed to absolute") + N..... COMMENT("one pass CCW around shaft") + N..... ARC_FEED(0.0000, -5.9437, 0.0000, -0.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("align to max OD") + N..... ARC_FEED(0.0000, -11.2813, 0.0000, -8.6125, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(0.0000, -9.6687, 0.0000, -10.4750, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick loop counter") + N..... COMMENT("next Z level") + N..... COMMENT("to new Z level") + N..... STRAIGHT_FEED(0.0000, -9.6687, -0.8340, 0.0000, 0.0000, 0.0000) + N..... COMMENT("radius iteration counter") + N..... COMMENT("initial radius - start at raw OD") + N..... COMMENT("one pass CCW around shaft") + N..... ARC_FEED(0.0000, -9.6687, 0.0000, 0.0000, 1, -0.8340, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("relative coords") + N..... COMMENT("interpreter: distance mode changed to incremental") + N..... COMMENT("loop outward by min radius") + N..... ARC_FEED(0.0000, -11.2813, 0.0000, -10.4750, -1, -0.8340, 0.0000, 0.0000, 0.0000) + N..... COMMENT("loop inward to new radius") + N..... ARC_FEED(0.0000, -8.7375, 0.0000, -10.0094, -1, -0.8340, 0.0000, 0.0000, 0.0000) + N..... COMMENT("abs coords") + N..... COMMENT("interpreter: distance mode changed to absolute") + N..... COMMENT("one pass CCW around shaft") + N..... ARC_FEED(0.0000, -8.7375, 0.0000, 0.0000, 1, -0.8340, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("relative coords") + N..... COMMENT("interpreter: distance mode changed to incremental") + N..... COMMENT("loop outward by min radius") + N..... ARC_FEED(0.0000, -10.3500, 0.0000, -9.5437, -1, -0.8340, 0.0000, 0.0000, 0.0000) + N..... COMMENT("loop inward to new radius") + N..... ARC_FEED(0.0000, -7.8062, 0.0000, -9.0781, -1, -0.8340, 0.0000, 0.0000, 0.0000) + N..... COMMENT("abs coords") + N..... COMMENT("interpreter: distance mode changed to absolute") + N..... COMMENT("one pass CCW around shaft") + N..... ARC_FEED(0.0000, -7.8062, 0.0000, -0.0000, 1, -0.8340, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("relative coords") + N..... COMMENT("interpreter: distance mode changed to incremental") + N..... COMMENT("loop outward by min radius") + N..... ARC_FEED(0.0000, -9.4188, 0.0000, -8.6125, -1, -0.8340, 0.0000, 0.0000, 0.0000) + N..... COMMENT("loop inward to new radius") + N..... ARC_FEED(0.0000, -6.8750, 0.0000, -8.1469, -1, -0.8340, 0.0000, 0.0000, 0.0000) + N..... COMMENT("abs coords") + N..... COMMENT("interpreter: distance mode changed to absolute") + N..... COMMENT("one pass CCW around shaft") + N..... ARC_FEED(0.0000, -6.8750, 0.0000, 0.0000, 1, -0.8340, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("relative coords") + N..... COMMENT("interpreter: distance mode changed to incremental") + N..... COMMENT("loop outward by min radius") + N..... ARC_FEED(0.0000, -8.4875, 0.0000, -7.6812, -1, -0.8340, 0.0000, 0.0000, 0.0000) + N..... COMMENT("loop inward to new radius") + N..... ARC_FEED(0.0000, -5.9437, 0.0000, -7.2156, -1, -0.8340, 0.0000, 0.0000, 0.0000) + N..... COMMENT("abs coords") + N..... COMMENT("interpreter: distance mode changed to absolute") + N..... COMMENT("one pass CCW around shaft") + N..... ARC_FEED(0.0000, -5.9437, 0.0000, -0.0000, 1, -0.8340, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("align to max OD") + N..... ARC_FEED(0.0000, -11.2813, 0.0000, -8.6125, -1, -0.8340, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(0.0000, -9.6687, 0.0000, -10.4750, -1, -0.8340, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick loop counter") + N..... COMMENT("next Z level") + N..... COMMENT("to new Z level") + N..... STRAIGHT_FEED(0.0000, -9.6687, -1.6680, 0.0000, 0.0000, 0.0000) + N..... COMMENT("radius iteration counter") + N..... COMMENT("initial radius - start at raw OD") + N..... COMMENT("one pass CCW around shaft") + N..... ARC_FEED(0.0000, -9.6687, 0.0000, 0.0000, 1, -1.6680, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("relative coords") + N..... COMMENT("interpreter: distance mode changed to incremental") + N..... COMMENT("loop outward by min radius") + N..... ARC_FEED(0.0000, -11.2813, 0.0000, -10.4750, -1, -1.6680, 0.0000, 0.0000, 0.0000) + N..... COMMENT("loop inward to new radius") + N..... ARC_FEED(0.0000, -8.7375, 0.0000, -10.0094, -1, -1.6680, 0.0000, 0.0000, 0.0000) + N..... COMMENT("abs coords") + N..... COMMENT("interpreter: distance mode changed to absolute") + N..... COMMENT("one pass CCW around shaft") + N..... ARC_FEED(0.0000, -8.7375, 0.0000, 0.0000, 1, -1.6680, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("relative coords") + N..... COMMENT("interpreter: distance mode changed to incremental") + N..... COMMENT("loop outward by min radius") + N..... ARC_FEED(0.0000, -10.3500, 0.0000, -9.5437, -1, -1.6680, 0.0000, 0.0000, 0.0000) + N..... COMMENT("loop inward to new radius") + N..... ARC_FEED(0.0000, -7.8062, 0.0000, -9.0781, -1, -1.6680, 0.0000, 0.0000, 0.0000) + N..... COMMENT("abs coords") + N..... COMMENT("interpreter: distance mode changed to absolute") + N..... COMMENT("one pass CCW around shaft") + N..... ARC_FEED(0.0000, -7.8062, 0.0000, -0.0000, 1, -1.6680, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("relative coords") + N..... COMMENT("interpreter: distance mode changed to incremental") + N..... COMMENT("loop outward by min radius") + N..... ARC_FEED(0.0000, -9.4188, 0.0000, -8.6125, -1, -1.6680, 0.0000, 0.0000, 0.0000) + N..... COMMENT("loop inward to new radius") + N..... ARC_FEED(0.0000, -6.8750, 0.0000, -8.1469, -1, -1.6680, 0.0000, 0.0000, 0.0000) + N..... COMMENT("abs coords") + N..... COMMENT("interpreter: distance mode changed to absolute") + N..... COMMENT("one pass CCW around shaft") + N..... ARC_FEED(0.0000, -6.8750, 0.0000, 0.0000, 1, -1.6680, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("relative coords") + N..... COMMENT("interpreter: distance mode changed to incremental") + N..... COMMENT("loop outward by min radius") + N..... ARC_FEED(0.0000, -8.4875, 0.0000, -7.6812, -1, -1.6680, 0.0000, 0.0000, 0.0000) + N..... COMMENT("loop inward to new radius") + N..... ARC_FEED(0.0000, -5.9437, 0.0000, -7.2156, -1, -1.6680, 0.0000, 0.0000, 0.0000) + N..... COMMENT("abs coords") + N..... COMMENT("interpreter: distance mode changed to absolute") + N..... COMMENT("one pass CCW around shaft") + N..... ARC_FEED(0.0000, -5.9437, 0.0000, -0.0000, 1, -1.6680, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("align to max OD") + N..... ARC_FEED(0.0000, -11.2813, 0.0000, -8.6125, -1, -1.6680, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(0.0000, -9.6687, 0.0000, -10.4750, -1, -1.6680, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick loop counter") + N..... COMMENT("next Z level") + N..... COMMENT("to new Z level") + N..... STRAIGHT_FEED(0.0000, -9.6687, -2.5020, 0.0000, 0.0000, 0.0000) + N..... COMMENT("radius iteration counter") + N..... COMMENT("initial radius - start at raw OD") + N..... COMMENT("one pass CCW around shaft") + N..... ARC_FEED(0.0000, -9.6687, 0.0000, 0.0000, 1, -2.5020, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("relative coords") + N..... COMMENT("interpreter: distance mode changed to incremental") + N..... COMMENT("loop outward by min radius") + N..... ARC_FEED(0.0000, -11.2813, 0.0000, -10.4750, -1, -2.5020, 0.0000, 0.0000, 0.0000) + N..... COMMENT("loop inward to new radius") + N..... ARC_FEED(0.0000, -8.7375, 0.0000, -10.0094, -1, -2.5020, 0.0000, 0.0000, 0.0000) + N..... COMMENT("abs coords") + N..... COMMENT("interpreter: distance mode changed to absolute") + N..... COMMENT("one pass CCW around shaft") + N..... ARC_FEED(0.0000, -8.7375, 0.0000, 0.0000, 1, -2.5020, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("relative coords") + N..... COMMENT("interpreter: distance mode changed to incremental") + N..... COMMENT("loop outward by min radius") + N..... ARC_FEED(0.0000, -10.3500, 0.0000, -9.5437, -1, -2.5020, 0.0000, 0.0000, 0.0000) + N..... COMMENT("loop inward to new radius") + N..... ARC_FEED(0.0000, -7.8062, 0.0000, -9.0781, -1, -2.5020, 0.0000, 0.0000, 0.0000) + N..... COMMENT("abs coords") + N..... COMMENT("interpreter: distance mode changed to absolute") + N..... COMMENT("one pass CCW around shaft") + N..... ARC_FEED(0.0000, -7.8062, 0.0000, -0.0000, 1, -2.5020, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("relative coords") + N..... COMMENT("interpreter: distance mode changed to incremental") + N..... COMMENT("loop outward by min radius") + N..... ARC_FEED(0.0000, -9.4188, 0.0000, -8.6125, -1, -2.5020, 0.0000, 0.0000, 0.0000) + N..... COMMENT("loop inward to new radius") + N..... ARC_FEED(0.0000, -6.8750, 0.0000, -8.1469, -1, -2.5020, 0.0000, 0.0000, 0.0000) + N..... COMMENT("abs coords") + N..... COMMENT("interpreter: distance mode changed to absolute") + N..... COMMENT("one pass CCW around shaft") + N..... ARC_FEED(0.0000, -6.8750, 0.0000, 0.0000, 1, -2.5020, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("relative coords") + N..... COMMENT("interpreter: distance mode changed to incremental") + N..... COMMENT("loop outward by min radius") + N..... ARC_FEED(0.0000, -8.4875, 0.0000, -7.6812, -1, -2.5020, 0.0000, 0.0000, 0.0000) + N..... COMMENT("loop inward to new radius") + N..... ARC_FEED(0.0000, -5.9437, 0.0000, -7.2156, -1, -2.5020, 0.0000, 0.0000, 0.0000) + N..... COMMENT("abs coords") + N..... COMMENT("interpreter: distance mode changed to absolute") + N..... COMMENT("one pass CCW around shaft") + N..... ARC_FEED(0.0000, -5.9437, 0.0000, -0.0000, 1, -2.5020, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("align to max OD") + N..... ARC_FEED(0.0000, -11.2813, 0.0000, -8.6125, -1, -2.5020, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(0.0000, -9.6687, 0.0000, -10.4750, -1, -2.5020, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick loop counter") + N..... COMMENT("next Z level") + N..... COMMENT("to new Z level") + N..... STRAIGHT_FEED(0.0000, -9.6687, -3.3360, 0.0000, 0.0000, 0.0000) + N..... COMMENT("radius iteration counter") + N..... COMMENT("initial radius - start at raw OD") + N..... COMMENT("one pass CCW around shaft") + N..... ARC_FEED(0.0000, -9.6687, 0.0000, 0.0000, 1, -3.3360, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("relative coords") + N..... COMMENT("interpreter: distance mode changed to incremental") + N..... COMMENT("loop outward by min radius") + N..... ARC_FEED(0.0000, -11.2813, 0.0000, -10.4750, -1, -3.3360, 0.0000, 0.0000, 0.0000) + N..... COMMENT("loop inward to new radius") + N..... ARC_FEED(0.0000, -8.7375, 0.0000, -10.0094, -1, -3.3360, 0.0000, 0.0000, 0.0000) + N..... COMMENT("abs coords") + N..... COMMENT("interpreter: distance mode changed to absolute") + N..... COMMENT("one pass CCW around shaft") + N..... ARC_FEED(0.0000, -8.7375, 0.0000, 0.0000, 1, -3.3360, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("relative coords") + N..... COMMENT("interpreter: distance mode changed to incremental") + N..... COMMENT("loop outward by min radius") + N..... ARC_FEED(0.0000, -10.3500, 0.0000, -9.5437, -1, -3.3360, 0.0000, 0.0000, 0.0000) + N..... COMMENT("loop inward to new radius") + N..... ARC_FEED(0.0000, -7.8062, 0.0000, -9.0781, -1, -3.3360, 0.0000, 0.0000, 0.0000) + N..... COMMENT("abs coords") + N..... COMMENT("interpreter: distance mode changed to absolute") + N..... COMMENT("one pass CCW around shaft") + N..... ARC_FEED(0.0000, -7.8062, 0.0000, -0.0000, 1, -3.3360, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("relative coords") + N..... COMMENT("interpreter: distance mode changed to incremental") + N..... COMMENT("loop outward by min radius") + N..... ARC_FEED(0.0000, -9.4188, 0.0000, -8.6125, -1, -3.3360, 0.0000, 0.0000, 0.0000) + N..... COMMENT("loop inward to new radius") + N..... ARC_FEED(0.0000, -6.8750, 0.0000, -8.1469, -1, -3.3360, 0.0000, 0.0000, 0.0000) + N..... COMMENT("abs coords") + N..... COMMENT("interpreter: distance mode changed to absolute") + N..... COMMENT("one pass CCW around shaft") + N..... ARC_FEED(0.0000, -6.8750, 0.0000, 0.0000, 1, -3.3360, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("relative coords") + N..... COMMENT("interpreter: distance mode changed to incremental") + N..... COMMENT("loop outward by min radius") + N..... ARC_FEED(0.0000, -8.4875, 0.0000, -7.6812, -1, -3.3360, 0.0000, 0.0000, 0.0000) + N..... COMMENT("loop inward to new radius") + N..... ARC_FEED(0.0000, -5.9437, 0.0000, -7.2156, -1, -3.3360, 0.0000, 0.0000, 0.0000) + N..... COMMENT("abs coords") + N..... COMMENT("interpreter: distance mode changed to absolute") + N..... COMMENT("one pass CCW around shaft") + N..... ARC_FEED(0.0000, -5.9437, 0.0000, -0.0000, 1, -3.3360, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("align to max OD") + N..... ARC_FEED(0.0000, -11.2813, 0.0000, -8.6125, -1, -3.3360, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(0.0000, -9.6687, 0.0000, -10.4750, -1, -3.3360, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick loop counter") + N..... COMMENT("next Z level") + N..... COMMENT("to new Z level") + N..... STRAIGHT_FEED(0.0000, -9.6687, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("radius iteration counter") + N..... COMMENT("initial radius - start at raw OD") + N..... COMMENT("one pass CCW around shaft") + N..... ARC_FEED(0.0000, -9.6687, 0.0000, 0.0000, 1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("relative coords") + N..... COMMENT("interpreter: distance mode changed to incremental") + N..... COMMENT("loop outward by min radius") + N..... ARC_FEED(0.0000, -11.2813, 0.0000, -10.4750, -1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("loop inward to new radius") + N..... ARC_FEED(0.0000, -8.7375, 0.0000, -10.0094, -1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("abs coords") + N..... COMMENT("interpreter: distance mode changed to absolute") + N..... COMMENT("one pass CCW around shaft") + N..... ARC_FEED(0.0000, -8.7375, 0.0000, 0.0000, 1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("relative coords") + N..... COMMENT("interpreter: distance mode changed to incremental") + N..... COMMENT("loop outward by min radius") + N..... ARC_FEED(0.0000, -10.3500, 0.0000, -9.5437, -1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("loop inward to new radius") + N..... ARC_FEED(0.0000, -7.8062, 0.0000, -9.0781, -1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("abs coords") + N..... COMMENT("interpreter: distance mode changed to absolute") + N..... COMMENT("one pass CCW around shaft") + N..... ARC_FEED(0.0000, -7.8062, 0.0000, -0.0000, 1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("relative coords") + N..... COMMENT("interpreter: distance mode changed to incremental") + N..... COMMENT("loop outward by min radius") + N..... ARC_FEED(0.0000, -9.4188, 0.0000, -8.6125, -1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("loop inward to new radius") + N..... ARC_FEED(0.0000, -6.8750, 0.0000, -8.1469, -1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("abs coords") + N..... COMMENT("interpreter: distance mode changed to absolute") + N..... COMMENT("one pass CCW around shaft") + N..... ARC_FEED(0.0000, -6.8750, 0.0000, 0.0000, 1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("relative coords") + N..... COMMENT("interpreter: distance mode changed to incremental") + N..... COMMENT("loop outward by min radius") + N..... ARC_FEED(0.0000, -8.4875, 0.0000, -7.6812, -1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("loop inward to new radius") + N..... ARC_FEED(0.0000, -5.9437, 0.0000, -7.2156, -1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("abs coords") + N..... COMMENT("interpreter: distance mode changed to absolute") + N..... COMMENT("one pass CCW around shaft") + N..... ARC_FEED(0.0000, -5.9437, 0.0000, -0.0000, 1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("align to max OD") + N..... ARC_FEED(0.0000, -11.2813, 0.0000, -8.6125, -1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(0.0000, -9.6687, 0.0000, -10.4750, -1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick loop counter") + N..... COMMENT("next Z level") + N..... COMMENT("--- Cut cam OD") + N..... COMMENT("Z iteration counter - at top of cam") + N..... COMMENT("initial Z cut depth - top of cam = bottom of shaft") + N..... COMMENT("to new Z level") + N..... STRAIGHT_FEED(0.0000, -9.6687, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("radius iteration counter") + N..... COMMENT("initial radius - start at raw OD") + N..... COMMENT("one pass CCW around shaft") + N..... ARC_FEED(0.0000, -9.6687, 0.0000, 0.0000, 1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("relative coords") + N..... COMMENT("interpreter: distance mode changed to incremental") + N..... COMMENT("loop outward by min radius") + N..... ARC_FEED(0.0000, -11.2813, 0.0000, -10.4750, -1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("loop inward to new radius") + N..... ARC_FEED(0.0000, -9.4737, 0.0000, -10.3775, -1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("abs coords") + N..... COMMENT("interpreter: distance mode changed to absolute") + N..... COMMENT("one pass CCW around shaft") + N..... ARC_FEED(0.0000, -9.4737, 0.0000, 0.0000, 1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("align to max OD") + N..... ARC_FEED(0.0000, -11.2813, 0.0000, -10.3775, -1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(0.0000, -9.6687, 0.0000, -10.4750, -1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick loop counter") + N..... COMMENT("next Z level") + N..... COMMENT("to new Z level") + N..... STRAIGHT_FEED(0.0000, -9.6687, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("radius iteration counter") + N..... COMMENT("initial radius - start at raw OD") + N..... COMMENT("one pass CCW around shaft") + N..... ARC_FEED(0.0000, -9.6687, 0.0000, 0.0000, 1, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("relative coords") + N..... COMMENT("interpreter: distance mode changed to incremental") + N..... COMMENT("loop outward by min radius") + N..... ARC_FEED(0.0000, -11.2813, 0.0000, -10.4750, -1, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("loop inward to new radius") + N..... ARC_FEED(0.0000, -9.4737, 0.0000, -10.3775, -1, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("abs coords") + N..... COMMENT("interpreter: distance mode changed to absolute") + N..... COMMENT("one pass CCW around shaft") + N..... ARC_FEED(0.0000, -9.4737, 0.0000, 0.0000, 1, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("align to max OD") + N..... ARC_FEED(0.0000, -11.2813, 0.0000, -10.3775, -1, -5.1533, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(0.0000, -9.6687, 0.0000, -10.4750, -1, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick loop counter") + N..... COMMENT("next Z level") + N..... COMMENT("to new Z level") + N..... STRAIGHT_FEED(0.0000, -9.6687, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("radius iteration counter") + N..... COMMENT("initial radius - start at raw OD") + N..... COMMENT("one pass CCW around shaft") + N..... ARC_FEED(0.0000, -9.6687, 0.0000, 0.0000, 1, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("relative coords") + N..... COMMENT("interpreter: distance mode changed to incremental") + N..... COMMENT("loop outward by min radius") + N..... ARC_FEED(0.0000, -11.2813, 0.0000, -10.4750, -1, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("loop inward to new radius") + N..... ARC_FEED(0.0000, -9.4737, 0.0000, -10.3775, -1, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("abs coords") + N..... COMMENT("interpreter: distance mode changed to absolute") + N..... COMMENT("one pass CCW around shaft") + N..... ARC_FEED(0.0000, -9.4737, 0.0000, 0.0000, 1, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("align to max OD") + N..... ARC_FEED(0.0000, -11.2813, 0.0000, -10.3775, -1, -6.1367, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(0.0000, -9.6687, 0.0000, -10.4750, -1, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick loop counter") + N..... COMMENT("next Z level") + N..... COMMENT("to new Z level") + N..... STRAIGHT_FEED(0.0000, -9.6687, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("radius iteration counter") + N..... COMMENT("initial radius - start at raw OD") + N..... COMMENT("one pass CCW around shaft") + N..... ARC_FEED(0.0000, -9.6687, 0.0000, 0.0000, 1, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("relative coords") + N..... COMMENT("interpreter: distance mode changed to incremental") + N..... COMMENT("loop outward by min radius") + N..... ARC_FEED(0.0000, -11.2813, 0.0000, -10.4750, -1, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("loop inward to new radius") + N..... ARC_FEED(0.0000, -9.4737, 0.0000, -10.3775, -1, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("abs coords") + N..... COMMENT("interpreter: distance mode changed to absolute") + N..... COMMENT("one pass CCW around shaft") + N..... ARC_FEED(0.0000, -9.4737, 0.0000, 0.0000, 1, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("align to max OD") + N..... ARC_FEED(0.0000, -11.2813, 0.0000, -10.3775, -1, -7.1200, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(0.0000, -9.6687, 0.0000, -10.4750, -1, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick loop counter") + N..... COMMENT("next Z level") + N..... COMMENT("--- Cut cam ID") + N..... COMMENT("This goes in to shaft OD") + N..... COMMENT("Realign for CW passes in air clearing max OD by a bit, CCW cutting in part") + N..... COMMENT("reposition at clearance OD facing CW for next move") + N..... STRAIGHT_TRAVERSE(0.0000, -9.6687, 10.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("cutter dia + 2 x min fillet radius") + N..... COMMENT(""exterior material contour" for air cutting") + N..... COMMENT("half-circle to new OD, cutter still to right") + N..... ARC_FEED(0.0000, -14.3813, 0.0000, -12.0250, -1, 10.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("O-P - dist origin to outer circle center") + N..... COMMENT("alpha - angle cam edge to outer circle center") + N..... COMMENT("beta - angle Y axis to outer circle center") + N..... COMMENT("O-B - dist origin to B tangent on cam edge") + N..... COMMENT("A - X coord fairing circle tangent to OD") + N..... COMMENT("A - Y coord fairing circle tangent to OD") + N..... COMMENT("B - X coord fairing circle tangent to cam") + N..... COMMENT("B - Y coord fairing circle tangent to cam") + N..... COMMENT("P - X coord fairing circle center") + N..... COMMENT("P - Y coord fairing circle center") + N..... COMMENT("Z iteration counter - start at top of cam again") + N..... COMMENT("initial Z cut level - top of cam = bottom of shaft") + N..... COMMENT("to new Z level") + N..... STRAIGHT_FEED(0.0000, -14.3813, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("radius iteration counter") + N..... COMMENT("initial radius - start at raw OD") + N..... COMMENT("O-Q - dist origin to current inner circle center") + N..... COMMENT("gamma - angle cam edge to inner circle center") + N..... COMMENT("delta - angle Y axis to inner circle center") + N..... COMMENT("O-C - dist origin to C tangent on cam edge") + N..... COMMENT("C - X coord inner circle tangent to cam") + N..... COMMENT("C - Y coord inner circle tangent to cam") + N..... COMMENT("D - X coord inner circle tangent to shaft") + N..... COMMENT("D - Y coord inner circle tangent to shaft") + N..... COMMENT("Q - X coord inner circle center") + N..... COMMENT("Q - Y coord inner circle center") + N..... COMMENT("left side of air pass") + N..... ARC_FEED(-14.1058, 2.8010, 0.0000, 0.0000, -1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to cam edge") + N..... ARC_FEED(-13.0659, 3.4108, -13.3150, 2.6440, -1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("left cam edge") + N..... STRAIGHT_FEED(-10.0907, 2.4441, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to current shaft OD") + N..... ARC_FEED(-9.5440, 1.5482, -10.3398, 1.6773, -1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("current shaft OD") + N..... ARC_FEED(9.5440, 1.5482, 0.0000, 0.0000, 1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to cam edge") + N..... ARC_FEED(10.0907, 2.4441, 10.3398, 1.6773, -1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("right cam edge") + N..... STRAIGHT_FEED(13.0659, 3.4108, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to air pass") + N..... ARC_FEED(14.1058, 2.8010, 13.3150, 2.6440, -1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("right side of air pass") + N..... ARC_FEED(0.0000, -14.3813, 0.0000, 0.0000, -1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("O-Q - dist origin to current inner circle center") + N..... COMMENT("gamma - angle cam edge to inner circle center") + N..... COMMENT("delta - angle Y axis to inner circle center") + N..... COMMENT("O-C - dist origin to C tangent on cam edge") + N..... COMMENT("C - X coord inner circle tangent to cam") + N..... COMMENT("C - Y coord inner circle tangent to cam") + N..... COMMENT("D - X coord inner circle tangent to shaft") + N..... COMMENT("D - Y coord inner circle tangent to shaft") + N..... COMMENT("Q - X coord inner circle center") + N..... COMMENT("Q - Y coord inner circle center") + N..... COMMENT("left side of air pass") + N..... ARC_FEED(-14.1058, 2.8010, 0.0000, 0.0000, -1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to cam edge") + N..... ARC_FEED(-13.0659, 3.4108, -13.3150, 2.6440, -1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("left cam edge") + N..... STRAIGHT_FEED(-9.1935, 2.1525, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to current shaft OD") + N..... ARC_FEED(-8.6449, 1.2687, -9.4426, 1.3858, -1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("current shaft OD") + N..... ARC_FEED(8.6449, 1.2687, 0.0000, 0.0000, 1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to cam edge") + N..... ARC_FEED(9.1935, 2.1525, 9.4426, 1.3858, -1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("right cam edge") + N..... STRAIGHT_FEED(13.0659, 3.4108, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to air pass") + N..... ARC_FEED(14.1058, 2.8010, 13.3150, 2.6440, -1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("right side of air pass") + N..... ARC_FEED(0.0000, -14.3813, 0.0000, 0.0000, -1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("O-Q - dist origin to current inner circle center") + N..... COMMENT("gamma - angle cam edge to inner circle center") + N..... COMMENT("delta - angle Y axis to inner circle center") + N..... COMMENT("O-C - dist origin to C tangent on cam edge") + N..... COMMENT("C - X coord inner circle tangent to cam") + N..... COMMENT("C - Y coord inner circle tangent to cam") + N..... COMMENT("D - X coord inner circle tangent to shaft") + N..... COMMENT("D - Y coord inner circle tangent to shaft") + N..... COMMENT("Q - X coord inner circle center") + N..... COMMENT("Q - Y coord inner circle center") + N..... COMMENT("left side of air pass") + N..... ARC_FEED(-14.1058, 2.8010, 0.0000, 0.0000, -1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to cam edge") + N..... ARC_FEED(-13.0659, 3.4108, -13.3150, 2.6440, -1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("left cam edge") + N..... STRAIGHT_FEED(-8.2937, 1.8602, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to current shaft OD") + N..... ARC_FEED(-7.7431, 0.9910, -8.5428, 1.0934, -1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("current shaft OD") + N..... ARC_FEED(7.7431, 0.9910, 0.0000, 0.0000, 1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to cam edge") + N..... ARC_FEED(8.2937, 1.8602, 8.5428, 1.0934, -1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("right cam edge") + N..... STRAIGHT_FEED(13.0659, 3.4108, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to air pass") + N..... ARC_FEED(14.1058, 2.8010, 13.3150, 2.6440, -1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("right side of air pass") + N..... ARC_FEED(0.0000, -14.3813, 0.0000, 0.0000, -1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("O-Q - dist origin to current inner circle center") + N..... COMMENT("gamma - angle cam edge to inner circle center") + N..... COMMENT("delta - angle Y axis to inner circle center") + N..... COMMENT("O-C - dist origin to C tangent on cam edge") + N..... COMMENT("C - X coord inner circle tangent to cam") + N..... COMMENT("C - Y coord inner circle tangent to cam") + N..... COMMENT("D - X coord inner circle tangent to shaft") + N..... COMMENT("D - Y coord inner circle tangent to shaft") + N..... COMMENT("Q - X coord inner circle center") + N..... COMMENT("Q - Y coord inner circle center") + N..... COMMENT("left side of air pass") + N..... ARC_FEED(-14.1058, 2.8010, 0.0000, 0.0000, -1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to cam edge") + N..... ARC_FEED(-13.0659, 3.4108, -13.3150, 2.6440, -1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("left cam edge") + N..... STRAIGHT_FEED(-7.3903, 1.5667, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to current shaft OD") + N..... ARC_FEED(-6.8376, 0.7159, -7.6395, 0.7999, -1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("current shaft OD") + N..... ARC_FEED(6.8376, 0.7159, 0.0000, 0.0000, 1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to cam edge") + N..... ARC_FEED(7.3903, 1.5667, 7.6395, 0.7999, -1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("right cam edge") + N..... STRAIGHT_FEED(13.0659, 3.4108, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to air pass") + N..... ARC_FEED(14.1058, 2.8010, 13.3150, 2.6440, -1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("right side of air pass") + N..... ARC_FEED(0.0000, -14.3813, 0.0000, 0.0000, -1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("O-Q - dist origin to current inner circle center") + N..... COMMENT("gamma - angle cam edge to inner circle center") + N..... COMMENT("delta - angle Y axis to inner circle center") + N..... COMMENT("O-C - dist origin to C tangent on cam edge") + N..... COMMENT("C - X coord inner circle tangent to cam") + N..... COMMENT("C - Y coord inner circle tangent to cam") + N..... COMMENT("D - X coord inner circle tangent to shaft") + N..... COMMENT("D - Y coord inner circle tangent to shaft") + N..... COMMENT("Q - X coord inner circle center") + N..... COMMENT("Q - Y coord inner circle center") + N..... COMMENT("left side of air pass") + N..... ARC_FEED(-14.1058, 2.8010, 0.0000, 0.0000, -1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to cam edge") + N..... ARC_FEED(-13.0659, 3.4108, -13.3150, 2.6440, -1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("left cam edge") + N..... STRAIGHT_FEED(-6.4820, 1.2715, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to current shaft OD") + N..... ARC_FEED(-5.9271, 0.4444, -6.7311, 0.5047, -1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("current shaft OD") + N..... ARC_FEED(5.9271, 0.4444, 0.0000, 0.0000, 1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to cam edge") + N..... ARC_FEED(6.4820, 1.2715, 6.7311, 0.5047, -1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("right cam edge") + N..... STRAIGHT_FEED(13.0659, 3.4108, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to air pass") + N..... ARC_FEED(14.1058, 2.8010, 13.3150, 2.6440, -1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("right side of air pass") + N..... ARC_FEED(0.0000, -14.3813, 0.0000, 0.0000, -1, -4.1700, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("tick loop counter") + N..... COMMENT("next Z level") + N..... COMMENT("to new Z level") + N..... STRAIGHT_FEED(0.0000, -14.3813, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("radius iteration counter") + N..... COMMENT("initial radius - start at raw OD") + N..... COMMENT("O-Q - dist origin to current inner circle center") + N..... COMMENT("gamma - angle cam edge to inner circle center") + N..... COMMENT("delta - angle Y axis to inner circle center") + N..... COMMENT("O-C - dist origin to C tangent on cam edge") + N..... COMMENT("C - X coord inner circle tangent to cam") + N..... COMMENT("C - Y coord inner circle tangent to cam") + N..... COMMENT("D - X coord inner circle tangent to shaft") + N..... COMMENT("D - Y coord inner circle tangent to shaft") + N..... COMMENT("Q - X coord inner circle center") + N..... COMMENT("Q - Y coord inner circle center") + N..... COMMENT("left side of air pass") + N..... ARC_FEED(-14.1058, 2.8010, 0.0000, 0.0000, -1, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to cam edge") + N..... ARC_FEED(-13.0659, 3.4108, -13.3150, 2.6440, -1, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("left cam edge") + N..... STRAIGHT_FEED(-10.0907, 2.4441, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to current shaft OD") + N..... ARC_FEED(-9.5440, 1.5482, -10.3398, 1.6773, -1, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("current shaft OD") + N..... ARC_FEED(9.5440, 1.5482, 0.0000, 0.0000, 1, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to cam edge") + N..... ARC_FEED(10.0907, 2.4441, 10.3398, 1.6773, -1, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("right cam edge") + N..... STRAIGHT_FEED(13.0659, 3.4108, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to air pass") + N..... ARC_FEED(14.1058, 2.8010, 13.3150, 2.6440, -1, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("right side of air pass") + N..... ARC_FEED(0.0000, -14.3813, 0.0000, 0.0000, -1, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("O-Q - dist origin to current inner circle center") + N..... COMMENT("gamma - angle cam edge to inner circle center") + N..... COMMENT("delta - angle Y axis to inner circle center") + N..... COMMENT("O-C - dist origin to C tangent on cam edge") + N..... COMMENT("C - X coord inner circle tangent to cam") + N..... COMMENT("C - Y coord inner circle tangent to cam") + N..... COMMENT("D - X coord inner circle tangent to shaft") + N..... COMMENT("D - Y coord inner circle tangent to shaft") + N..... COMMENT("Q - X coord inner circle center") + N..... COMMENT("Q - Y coord inner circle center") + N..... COMMENT("left side of air pass") + N..... ARC_FEED(-14.1058, 2.8010, 0.0000, 0.0000, -1, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to cam edge") + N..... ARC_FEED(-13.0659, 3.4108, -13.3150, 2.6440, -1, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("left cam edge") + N..... STRAIGHT_FEED(-9.1935, 2.1525, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to current shaft OD") + N..... ARC_FEED(-8.6449, 1.2687, -9.4426, 1.3858, -1, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("current shaft OD") + N..... ARC_FEED(8.6449, 1.2687, 0.0000, 0.0000, 1, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to cam edge") + N..... ARC_FEED(9.1935, 2.1525, 9.4426, 1.3858, -1, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("right cam edge") + N..... STRAIGHT_FEED(13.0659, 3.4108, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to air pass") + N..... ARC_FEED(14.1058, 2.8010, 13.3150, 2.6440, -1, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("right side of air pass") + N..... ARC_FEED(0.0000, -14.3813, 0.0000, 0.0000, -1, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("O-Q - dist origin to current inner circle center") + N..... COMMENT("gamma - angle cam edge to inner circle center") + N..... COMMENT("delta - angle Y axis to inner circle center") + N..... COMMENT("O-C - dist origin to C tangent on cam edge") + N..... COMMENT("C - X coord inner circle tangent to cam") + N..... COMMENT("C - Y coord inner circle tangent to cam") + N..... COMMENT("D - X coord inner circle tangent to shaft") + N..... COMMENT("D - Y coord inner circle tangent to shaft") + N..... COMMENT("Q - X coord inner circle center") + N..... COMMENT("Q - Y coord inner circle center") + N..... COMMENT("left side of air pass") + N..... ARC_FEED(-14.1058, 2.8010, 0.0000, 0.0000, -1, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to cam edge") + N..... ARC_FEED(-13.0659, 3.4108, -13.3150, 2.6440, -1, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("left cam edge") + N..... STRAIGHT_FEED(-8.2937, 1.8602, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to current shaft OD") + N..... ARC_FEED(-7.7431, 0.9910, -8.5428, 1.0934, -1, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("current shaft OD") + N..... ARC_FEED(7.7431, 0.9910, 0.0000, 0.0000, 1, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to cam edge") + N..... ARC_FEED(8.2937, 1.8602, 8.5428, 1.0934, -1, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("right cam edge") + N..... STRAIGHT_FEED(13.0659, 3.4108, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to air pass") + N..... ARC_FEED(14.1058, 2.8010, 13.3150, 2.6440, -1, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("right side of air pass") + N..... ARC_FEED(0.0000, -14.3813, 0.0000, 0.0000, -1, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("O-Q - dist origin to current inner circle center") + N..... COMMENT("gamma - angle cam edge to inner circle center") + N..... COMMENT("delta - angle Y axis to inner circle center") + N..... COMMENT("O-C - dist origin to C tangent on cam edge") + N..... COMMENT("C - X coord inner circle tangent to cam") + N..... COMMENT("C - Y coord inner circle tangent to cam") + N..... COMMENT("D - X coord inner circle tangent to shaft") + N..... COMMENT("D - Y coord inner circle tangent to shaft") + N..... COMMENT("Q - X coord inner circle center") + N..... COMMENT("Q - Y coord inner circle center") + N..... COMMENT("left side of air pass") + N..... ARC_FEED(-14.1058, 2.8010, 0.0000, 0.0000, -1, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to cam edge") + N..... ARC_FEED(-13.0659, 3.4108, -13.3150, 2.6440, -1, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("left cam edge") + N..... STRAIGHT_FEED(-7.3903, 1.5667, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to current shaft OD") + N..... ARC_FEED(-6.8376, 0.7159, -7.6395, 0.7999, -1, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("current shaft OD") + N..... ARC_FEED(6.8376, 0.7159, 0.0000, 0.0000, 1, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to cam edge") + N..... ARC_FEED(7.3903, 1.5667, 7.6395, 0.7999, -1, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("right cam edge") + N..... STRAIGHT_FEED(13.0659, 3.4108, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to air pass") + N..... ARC_FEED(14.1058, 2.8010, 13.3150, 2.6440, -1, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("right side of air pass") + N..... ARC_FEED(0.0000, -14.3813, 0.0000, 0.0000, -1, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("O-Q - dist origin to current inner circle center") + N..... COMMENT("gamma - angle cam edge to inner circle center") + N..... COMMENT("delta - angle Y axis to inner circle center") + N..... COMMENT("O-C - dist origin to C tangent on cam edge") + N..... COMMENT("C - X coord inner circle tangent to cam") + N..... COMMENT("C - Y coord inner circle tangent to cam") + N..... COMMENT("D - X coord inner circle tangent to shaft") + N..... COMMENT("D - Y coord inner circle tangent to shaft") + N..... COMMENT("Q - X coord inner circle center") + N..... COMMENT("Q - Y coord inner circle center") + N..... COMMENT("left side of air pass") + N..... ARC_FEED(-14.1058, 2.8010, 0.0000, 0.0000, -1, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to cam edge") + N..... ARC_FEED(-13.0659, 3.4108, -13.3150, 2.6440, -1, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("left cam edge") + N..... STRAIGHT_FEED(-6.4820, 1.2715, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to current shaft OD") + N..... ARC_FEED(-5.9271, 0.4444, -6.7311, 0.5047, -1, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("current shaft OD") + N..... ARC_FEED(5.9271, 0.4444, 0.0000, 0.0000, 1, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to cam edge") + N..... ARC_FEED(6.4820, 1.2715, 6.7311, 0.5047, -1, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("right cam edge") + N..... STRAIGHT_FEED(13.0659, 3.4108, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to air pass") + N..... ARC_FEED(14.1058, 2.8010, 13.3150, 2.6440, -1, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("right side of air pass") + N..... ARC_FEED(0.0000, -14.3813, 0.0000, 0.0000, -1, -5.1533, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("tick loop counter") + N..... COMMENT("next Z level") + N..... COMMENT("to new Z level") + N..... STRAIGHT_FEED(0.0000, -14.3813, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("radius iteration counter") + N..... COMMENT("initial radius - start at raw OD") + N..... COMMENT("O-Q - dist origin to current inner circle center") + N..... COMMENT("gamma - angle cam edge to inner circle center") + N..... COMMENT("delta - angle Y axis to inner circle center") + N..... COMMENT("O-C - dist origin to C tangent on cam edge") + N..... COMMENT("C - X coord inner circle tangent to cam") + N..... COMMENT("C - Y coord inner circle tangent to cam") + N..... COMMENT("D - X coord inner circle tangent to shaft") + N..... COMMENT("D - Y coord inner circle tangent to shaft") + N..... COMMENT("Q - X coord inner circle center") + N..... COMMENT("Q - Y coord inner circle center") + N..... COMMENT("left side of air pass") + N..... ARC_FEED(-14.1058, 2.8010, 0.0000, 0.0000, -1, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to cam edge") + N..... ARC_FEED(-13.0659, 3.4108, -13.3150, 2.6440, -1, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("left cam edge") + N..... STRAIGHT_FEED(-10.0907, 2.4441, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to current shaft OD") + N..... ARC_FEED(-9.5440, 1.5482, -10.3398, 1.6773, -1, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("current shaft OD") + N..... ARC_FEED(9.5440, 1.5482, 0.0000, 0.0000, 1, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to cam edge") + N..... ARC_FEED(10.0907, 2.4441, 10.3398, 1.6773, -1, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("right cam edge") + N..... STRAIGHT_FEED(13.0659, 3.4108, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to air pass") + N..... ARC_FEED(14.1058, 2.8010, 13.3150, 2.6440, -1, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("right side of air pass") + N..... ARC_FEED(0.0000, -14.3813, 0.0000, 0.0000, -1, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("O-Q - dist origin to current inner circle center") + N..... COMMENT("gamma - angle cam edge to inner circle center") + N..... COMMENT("delta - angle Y axis to inner circle center") + N..... COMMENT("O-C - dist origin to C tangent on cam edge") + N..... COMMENT("C - X coord inner circle tangent to cam") + N..... COMMENT("C - Y coord inner circle tangent to cam") + N..... COMMENT("D - X coord inner circle tangent to shaft") + N..... COMMENT("D - Y coord inner circle tangent to shaft") + N..... COMMENT("Q - X coord inner circle center") + N..... COMMENT("Q - Y coord inner circle center") + N..... COMMENT("left side of air pass") + N..... ARC_FEED(-14.1058, 2.8010, 0.0000, 0.0000, -1, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to cam edge") + N..... ARC_FEED(-13.0659, 3.4108, -13.3150, 2.6440, -1, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("left cam edge") + N..... STRAIGHT_FEED(-9.1935, 2.1525, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to current shaft OD") + N..... ARC_FEED(-8.6449, 1.2687, -9.4426, 1.3858, -1, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("current shaft OD") + N..... ARC_FEED(8.6449, 1.2687, 0.0000, 0.0000, 1, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to cam edge") + N..... ARC_FEED(9.1935, 2.1525, 9.4426, 1.3858, -1, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("right cam edge") + N..... STRAIGHT_FEED(13.0659, 3.4108, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to air pass") + N..... ARC_FEED(14.1058, 2.8010, 13.3150, 2.6440, -1, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("right side of air pass") + N..... ARC_FEED(0.0000, -14.3813, 0.0000, 0.0000, -1, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("O-Q - dist origin to current inner circle center") + N..... COMMENT("gamma - angle cam edge to inner circle center") + N..... COMMENT("delta - angle Y axis to inner circle center") + N..... COMMENT("O-C - dist origin to C tangent on cam edge") + N..... COMMENT("C - X coord inner circle tangent to cam") + N..... COMMENT("C - Y coord inner circle tangent to cam") + N..... COMMENT("D - X coord inner circle tangent to shaft") + N..... COMMENT("D - Y coord inner circle tangent to shaft") + N..... COMMENT("Q - X coord inner circle center") + N..... COMMENT("Q - Y coord inner circle center") + N..... COMMENT("left side of air pass") + N..... ARC_FEED(-14.1058, 2.8010, 0.0000, 0.0000, -1, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to cam edge") + N..... ARC_FEED(-13.0659, 3.4108, -13.3150, 2.6440, -1, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("left cam edge") + N..... STRAIGHT_FEED(-8.2937, 1.8602, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to current shaft OD") + N..... ARC_FEED(-7.7431, 0.9910, -8.5428, 1.0934, -1, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("current shaft OD") + N..... ARC_FEED(7.7431, 0.9910, 0.0000, 0.0000, 1, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to cam edge") + N..... ARC_FEED(8.2937, 1.8602, 8.5428, 1.0934, -1, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("right cam edge") + N..... STRAIGHT_FEED(13.0659, 3.4108, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to air pass") + N..... ARC_FEED(14.1058, 2.8010, 13.3150, 2.6440, -1, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("right side of air pass") + N..... ARC_FEED(0.0000, -14.3813, 0.0000, 0.0000, -1, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("O-Q - dist origin to current inner circle center") + N..... COMMENT("gamma - angle cam edge to inner circle center") + N..... COMMENT("delta - angle Y axis to inner circle center") + N..... COMMENT("O-C - dist origin to C tangent on cam edge") + N..... COMMENT("C - X coord inner circle tangent to cam") + N..... COMMENT("C - Y coord inner circle tangent to cam") + N..... COMMENT("D - X coord inner circle tangent to shaft") + N..... COMMENT("D - Y coord inner circle tangent to shaft") + N..... COMMENT("Q - X coord inner circle center") + N..... COMMENT("Q - Y coord inner circle center") + N..... COMMENT("left side of air pass") + N..... ARC_FEED(-14.1058, 2.8010, 0.0000, 0.0000, -1, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to cam edge") + N..... ARC_FEED(-13.0659, 3.4108, -13.3150, 2.6440, -1, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("left cam edge") + N..... STRAIGHT_FEED(-7.3903, 1.5667, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to current shaft OD") + N..... ARC_FEED(-6.8376, 0.7159, -7.6395, 0.7999, -1, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("current shaft OD") + N..... ARC_FEED(6.8376, 0.7159, 0.0000, 0.0000, 1, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to cam edge") + N..... ARC_FEED(7.3903, 1.5667, 7.6395, 0.7999, -1, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("right cam edge") + N..... STRAIGHT_FEED(13.0659, 3.4108, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to air pass") + N..... ARC_FEED(14.1058, 2.8010, 13.3150, 2.6440, -1, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("right side of air pass") + N..... ARC_FEED(0.0000, -14.3813, 0.0000, 0.0000, -1, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("O-Q - dist origin to current inner circle center") + N..... COMMENT("gamma - angle cam edge to inner circle center") + N..... COMMENT("delta - angle Y axis to inner circle center") + N..... COMMENT("O-C - dist origin to C tangent on cam edge") + N..... COMMENT("C - X coord inner circle tangent to cam") + N..... COMMENT("C - Y coord inner circle tangent to cam") + N..... COMMENT("D - X coord inner circle tangent to shaft") + N..... COMMENT("D - Y coord inner circle tangent to shaft") + N..... COMMENT("Q - X coord inner circle center") + N..... COMMENT("Q - Y coord inner circle center") + N..... COMMENT("left side of air pass") + N..... ARC_FEED(-14.1058, 2.8010, 0.0000, 0.0000, -1, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to cam edge") + N..... ARC_FEED(-13.0659, 3.4108, -13.3150, 2.6440, -1, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("left cam edge") + N..... STRAIGHT_FEED(-6.4820, 1.2715, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to current shaft OD") + N..... ARC_FEED(-5.9271, 0.4444, -6.7311, 0.5047, -1, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("current shaft OD") + N..... ARC_FEED(5.9271, 0.4444, 0.0000, 0.0000, 1, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to cam edge") + N..... ARC_FEED(6.4820, 1.2715, 6.7311, 0.5047, -1, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("right cam edge") + N..... STRAIGHT_FEED(13.0659, 3.4108, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to air pass") + N..... ARC_FEED(14.1058, 2.8010, 13.3150, 2.6440, -1, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("right side of air pass") + N..... ARC_FEED(0.0000, -14.3813, 0.0000, 0.0000, -1, -6.1367, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("tick loop counter") + N..... COMMENT("next Z level") + N..... COMMENT("to new Z level") + N..... STRAIGHT_FEED(0.0000, -14.3813, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("radius iteration counter") + N..... COMMENT("initial radius - start at raw OD") + N..... COMMENT("O-Q - dist origin to current inner circle center") + N..... COMMENT("gamma - angle cam edge to inner circle center") + N..... COMMENT("delta - angle Y axis to inner circle center") + N..... COMMENT("O-C - dist origin to C tangent on cam edge") + N..... COMMENT("C - X coord inner circle tangent to cam") + N..... COMMENT("C - Y coord inner circle tangent to cam") + N..... COMMENT("D - X coord inner circle tangent to shaft") + N..... COMMENT("D - Y coord inner circle tangent to shaft") + N..... COMMENT("Q - X coord inner circle center") + N..... COMMENT("Q - Y coord inner circle center") + N..... COMMENT("left side of air pass") + N..... ARC_FEED(-14.1058, 2.8010, 0.0000, 0.0000, -1, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to cam edge") + N..... ARC_FEED(-13.0659, 3.4108, -13.3150, 2.6440, -1, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("left cam edge") + N..... STRAIGHT_FEED(-10.0907, 2.4441, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to current shaft OD") + N..... ARC_FEED(-9.5440, 1.5482, -10.3398, 1.6773, -1, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("current shaft OD") + N..... ARC_FEED(9.5440, 1.5482, 0.0000, 0.0000, 1, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to cam edge") + N..... ARC_FEED(10.0907, 2.4441, 10.3398, 1.6773, -1, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("right cam edge") + N..... STRAIGHT_FEED(13.0659, 3.4108, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to air pass") + N..... ARC_FEED(14.1058, 2.8010, 13.3150, 2.6440, -1, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("right side of air pass") + N..... ARC_FEED(0.0000, -14.3813, 0.0000, 0.0000, -1, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("O-Q - dist origin to current inner circle center") + N..... COMMENT("gamma - angle cam edge to inner circle center") + N..... COMMENT("delta - angle Y axis to inner circle center") + N..... COMMENT("O-C - dist origin to C tangent on cam edge") + N..... COMMENT("C - X coord inner circle tangent to cam") + N..... COMMENT("C - Y coord inner circle tangent to cam") + N..... COMMENT("D - X coord inner circle tangent to shaft") + N..... COMMENT("D - Y coord inner circle tangent to shaft") + N..... COMMENT("Q - X coord inner circle center") + N..... COMMENT("Q - Y coord inner circle center") + N..... COMMENT("left side of air pass") + N..... ARC_FEED(-14.1058, 2.8010, 0.0000, 0.0000, -1, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to cam edge") + N..... ARC_FEED(-13.0659, 3.4108, -13.3150, 2.6440, -1, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("left cam edge") + N..... STRAIGHT_FEED(-9.1935, 2.1525, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to current shaft OD") + N..... ARC_FEED(-8.6449, 1.2687, -9.4426, 1.3858, -1, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("current shaft OD") + N..... ARC_FEED(8.6449, 1.2687, 0.0000, 0.0000, 1, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to cam edge") + N..... ARC_FEED(9.1935, 2.1525, 9.4426, 1.3858, -1, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("right cam edge") + N..... STRAIGHT_FEED(13.0659, 3.4108, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to air pass") + N..... ARC_FEED(14.1058, 2.8010, 13.3150, 2.6440, -1, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("right side of air pass") + N..... ARC_FEED(0.0000, -14.3813, 0.0000, 0.0000, -1, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("O-Q - dist origin to current inner circle center") + N..... COMMENT("gamma - angle cam edge to inner circle center") + N..... COMMENT("delta - angle Y axis to inner circle center") + N..... COMMENT("O-C - dist origin to C tangent on cam edge") + N..... COMMENT("C - X coord inner circle tangent to cam") + N..... COMMENT("C - Y coord inner circle tangent to cam") + N..... COMMENT("D - X coord inner circle tangent to shaft") + N..... COMMENT("D - Y coord inner circle tangent to shaft") + N..... COMMENT("Q - X coord inner circle center") + N..... COMMENT("Q - Y coord inner circle center") + N..... COMMENT("left side of air pass") + N..... ARC_FEED(-14.1058, 2.8010, 0.0000, 0.0000, -1, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to cam edge") + N..... ARC_FEED(-13.0659, 3.4108, -13.3150, 2.6440, -1, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("left cam edge") + N..... STRAIGHT_FEED(-8.2937, 1.8602, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to current shaft OD") + N..... ARC_FEED(-7.7431, 0.9910, -8.5428, 1.0934, -1, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("current shaft OD") + N..... ARC_FEED(7.7431, 0.9910, 0.0000, 0.0000, 1, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to cam edge") + N..... ARC_FEED(8.2937, 1.8602, 8.5428, 1.0934, -1, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("right cam edge") + N..... STRAIGHT_FEED(13.0659, 3.4108, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to air pass") + N..... ARC_FEED(14.1058, 2.8010, 13.3150, 2.6440, -1, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("right side of air pass") + N..... ARC_FEED(0.0000, -14.3813, 0.0000, 0.0000, -1, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("O-Q - dist origin to current inner circle center") + N..... COMMENT("gamma - angle cam edge to inner circle center") + N..... COMMENT("delta - angle Y axis to inner circle center") + N..... COMMENT("O-C - dist origin to C tangent on cam edge") + N..... COMMENT("C - X coord inner circle tangent to cam") + N..... COMMENT("C - Y coord inner circle tangent to cam") + N..... COMMENT("D - X coord inner circle tangent to shaft") + N..... COMMENT("D - Y coord inner circle tangent to shaft") + N..... COMMENT("Q - X coord inner circle center") + N..... COMMENT("Q - Y coord inner circle center") + N..... COMMENT("left side of air pass") + N..... ARC_FEED(-14.1058, 2.8010, 0.0000, 0.0000, -1, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to cam edge") + N..... ARC_FEED(-13.0659, 3.4108, -13.3150, 2.6440, -1, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("left cam edge") + N..... STRAIGHT_FEED(-7.3903, 1.5667, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to current shaft OD") + N..... ARC_FEED(-6.8376, 0.7159, -7.6395, 0.7999, -1, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("current shaft OD") + N..... ARC_FEED(6.8376, 0.7159, 0.0000, 0.0000, 1, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to cam edge") + N..... ARC_FEED(7.3903, 1.5667, 7.6395, 0.7999, -1, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("right cam edge") + N..... STRAIGHT_FEED(13.0659, 3.4108, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to air pass") + N..... ARC_FEED(14.1058, 2.8010, 13.3150, 2.6440, -1, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("right side of air pass") + N..... ARC_FEED(0.0000, -14.3813, 0.0000, 0.0000, -1, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("O-Q - dist origin to current inner circle center") + N..... COMMENT("gamma - angle cam edge to inner circle center") + N..... COMMENT("delta - angle Y axis to inner circle center") + N..... COMMENT("O-C - dist origin to C tangent on cam edge") + N..... COMMENT("C - X coord inner circle tangent to cam") + N..... COMMENT("C - Y coord inner circle tangent to cam") + N..... COMMENT("D - X coord inner circle tangent to shaft") + N..... COMMENT("D - Y coord inner circle tangent to shaft") + N..... COMMENT("Q - X coord inner circle center") + N..... COMMENT("Q - Y coord inner circle center") + N..... COMMENT("left side of air pass") + N..... ARC_FEED(-14.1058, 2.8010, 0.0000, 0.0000, -1, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to cam edge") + N..... ARC_FEED(-13.0659, 3.4108, -13.3150, 2.6440, -1, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("left cam edge") + N..... STRAIGHT_FEED(-6.4820, 1.2715, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to current shaft OD") + N..... ARC_FEED(-5.9271, 0.4444, -6.7311, 0.5047, -1, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("current shaft OD") + N..... ARC_FEED(5.9271, 0.4444, 0.0000, 0.0000, 1, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to cam edge") + N..... ARC_FEED(6.4820, 1.2715, 6.7311, 0.5047, -1, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("right cam edge") + N..... STRAIGHT_FEED(13.0659, 3.4108, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("fillet to air pass") + N..... ARC_FEED(14.1058, 2.8010, 13.3150, 2.6440, -1, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("right side of air pass") + N..... ARC_FEED(0.0000, -14.3813, 0.0000, 0.0000, -1, -7.1200, 0.0000, 0.0000, 0.0000) + N..... COMMENT("tick radius counter") + N..... COMMENT("figure next radius") + N..... COMMENT("tick loop counter") + N..... COMMENT("next Z level") + N..... COMMENT("-----------------") + N..... COMMENT("spindle off") + N..... STOP_SPINDLE_TURNING(0) + N..... COMMENT("get air") + N..... STRAIGHT_TRAVERSE(0.0000, -14.3813, 75.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("cutter comp off") + N..... COMMENT("interpreter: cutter radius compensation off") + N..... COMMENT("return home") + N..... STRAIGHT_TRAVERSE(75.0000, 0.0000, 75.0000, 0.0000, 0.0000, 0.0000) + N..... MESSAGE("Done!") + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SET_FEED_MODE(0, 0) + N..... SET_FEED_RATE(0.0000) + N..... STOP_SPINDLE_TURNING(0) + N..... SET_SPINDLE_MODE(0 0.0000) + N..... PROGRAM_END() + N..... ON_RESET() + N..... ON_RESET() diff --git a/wasm-port/vendor/linuxcnc/tests/interp/cam-nisley/test.sh b/wasm-port/vendor/linuxcnc/tests/interp/cam-nisley/test.sh new file mode 100755 index 0000000..4440735 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/cam-nisley/test.sh @@ -0,0 +1,3 @@ +#!/bin/bash +rs274 -t test.tbl -g cam.ngc | awk '{$1=""; print}' +exit "${PIPESTATUS[0]}" diff --git a/wasm-port/vendor/linuxcnc/tests/interp/cam-nisley/test.tbl b/wasm-port/vendor/linuxcnc/tests/interp/cam-nisley/test.tbl new file mode 100644 index 0000000..5f3da5c --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/cam-nisley/test.tbl @@ -0,0 +1,5 @@ +T1 P1 Z0.5 D0.0625;first tool +T2 P2 Z0.7 D0.125; +T3 P3 Z0.5 D0.25; +T4 P4 Z0.7 D1.0; +T32 P32 Z0.5 D0.0;last tool \ No newline at end of file diff --git a/wasm-port/vendor/linuxcnc/tests/interp/crazy-paths/README b/wasm-port/vendor/linuxcnc/tests/interp/crazy-paths/README new file mode 100644 index 0000000..4f72678 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/crazy-paths/README @@ -0,0 +1,2 @@ +This is a program generated by comp_tort.py, the cutter comp torture +tester. The paths are crazy and would never be written by a person. diff --git a/wasm-port/vendor/linuxcnc/tests/interp/crazy-paths/expected b/wasm-port/vendor/linuxcnc/tests/interp/crazy-paths/expected new file mode 100644 index 0000000..c3b6e9a --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/crazy-paths/expected @@ -0,0 +1,889 @@ + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SET_FEED_REFERENCE(CANON_XYZ) + N..... ON_RESET() + N..... SET_FEED_RATE(100.0000) + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(-100.0000, -100.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-100.0000, -102.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-99.5626, -102.9785, -98.9043, -102.0972, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-97.5626, -99.9785, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-91.5626, -97.9785, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-90.3691, -100.6485, -92.9284, -100.1908, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(-80.3691, -95.6485, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(-100.0000, -100.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on right") + N..... STRAIGHT_FEED(-100.2500, -102.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-99.7510, -102.0221, -100.0000, -102.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-99.2047, -102.8923, -98.9043, -102.0972, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-97.4022, -100.1885, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-91.4836, -98.2156, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-91.4313, -97.7657, -91.5626, -97.9785, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-90.1230, -100.6926, -92.9284, -100.1908, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(-80.3691, -95.6485, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(-100.0000, -100.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on left") + N..... STRAIGHT_FEED(-99.7500, -101.0449, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-99.7122, -103.1788, -98.9043, -102.0972, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-99.7706, -102.8398, -99.5626, -102.9785, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-97.7706, -99.8398, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-97.6417, -99.7413, -97.5626, -99.9785, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-92.2450, -97.9424, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-90.6151, -100.6045, -92.9284, -100.1908, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(-80.3691, -95.6485, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(-100.0000, -50.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-100.0000, -52.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-95.9230, -61.1205, -97.7596, -56.4700, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-97.9230, -57.1205, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-94.4408, -55.7452, -96.6064, -55.3579, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-95.5403, -52.5547, -92.6454, -53.3418, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(-93.5403, -62.5547, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(-100.0000, -50.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on right") + N..... STRAIGHT_FEED(-100.2500, -51.8482, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-95.8312, -61.3530, -97.7596, -56.4700, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-95.6994, -61.0087, -95.9230, -61.1205, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-97.6994, -57.0087, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-97.7734, -56.9202, -97.9230, -57.1205, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-94.6869, -55.7012, -96.6064, -55.3579, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-94.5904, -55.9455, -94.4408, -55.7452, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-95.7816, -52.4891, -92.6454, -53.3418, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(-93.5403, -62.5547, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(-100.0000, -50.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on left") + N..... STRAIGHT_FEED(-99.7500, -52.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-99.8880, -52.2235, -100.0000, -52.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-96.2722, -60.9811, -97.7596, -56.4700, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-98.1209, -57.2838, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-94.1715, -55.6294, -96.6064, -55.3579, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-95.2991, -52.6203, -92.6454, -53.3418, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(-93.5403, -62.5547, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(-100.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-100.0000, -2.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-85.0000, 3.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-87.0000, -2.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-82.0000, -8.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-85.0000, -5.5000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(-90.0000, 10.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(-100.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on right") + N..... STRAIGHT_FEED(-100.2500, -2.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-99.9209, -2.2372, -100.0000, -2.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-85.4323, 2.5924, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-87.2321, -1.9072, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-87.1921, -2.1600, -87.0000, -2.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-83.9526, -6.0474, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-84.8400, -5.3079, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(-90.0000, 10.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(-100.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on left") + N..... STRAIGHT_FEED(-99.7500, -1.6531, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-85.0791, 3.2372, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-84.7679, 2.9072, -85.0000, 3.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-86.7125, -1.9545, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-81.8079, -7.8400, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-82.1600, -8.1921, -82.0000, -8.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-85.1600, -5.6921, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(-90.0000, 10.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(-100.0000, 50.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-100.0000, 48.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-105.0000, 43.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-103.9376, 42.8582, -104.3417, 43.8813, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-104.9376, 47.8582, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-104.1192, 52.4343, -103.3816, 49.9412, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(-103.1192, 48.4343, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(-100.0000, 50.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on right") + N..... STRAIGHT_FEED(-100.2500, 48.1036, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-105.1768, 43.1768, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-105.1496, 42.7997, -105.0000, 43.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-103.8458, 42.6256, -104.3417, 43.8813, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-103.6925, 42.9072, -103.9376, 42.8582, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-104.6925, 47.9072, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-104.7880, 48.0585, -104.9376, 47.8582, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-104.0483, 52.1946, -103.3816, 49.9412, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(-103.1192, 48.4343, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(-100.0000, 50.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on left") + N..... STRAIGHT_FEED(-99.7500, 48.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-99.8232, 47.8232, -100.0000, 48.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-104.5808, 43.0656, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-104.2287, 43.0388, -104.3417, 43.8813, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-105.1645, 47.7177, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-104.1902, 52.6741, -103.3816, 49.9412, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(-103.1192, 48.4343, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(-100.0000, 100.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-100.0000, 98.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-98.9901, 95.7407, -101.1557, 96.1280, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-97.5982, 97.4416, -98.3318, 96.6220, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-93.5982, 107.4416, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-96.5982, 105.4416, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(-111.5982, 109.4416, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(-100.0000, 100.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on right") + N..... STRAIGHT_FEED(-100.2500, 98.4045, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-98.7440, 95.6967, -101.1557, 96.1280, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-98.8405, 95.9410, -98.9901, 95.7407, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-97.7649, 97.2553, -98.3318, 96.6220, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-97.3660, 97.3488, -97.5982, 97.4416, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-93.3660, 107.3488, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-93.7368, 107.6496, -93.5982, 107.4416, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-96.7368, 105.6496, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(-111.5982, 109.4416, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(-100.0000, 100.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on left") + N..... STRAIGHT_FEED(-99.7500, 98.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-100.1313, 97.7873, -100.0000, 98.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-99.2659, 95.6473, -101.1557, 96.1280, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-97.7149, 97.8228, -98.3318, 96.6220, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-94.1292, 106.7871, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-96.4595, 105.2336, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(-111.5982, 109.4416, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(-50.0000, -100.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-50.0000, -102.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-40.0977, -103.3221, -45.0196, -102.4418, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-39.5009, -104.6571, -40.7806, -104.4282, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-54.5009, -94.6571, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-57.8722, -99.6133, -56.0768, -97.2098, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(-62.8722, -114.6133, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(-50.0000, -100.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on right") + N..... STRAIGHT_FEED(-50.2500, -102.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-49.7510, -102.0221, -50.0000, -102.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-40.3437, -103.2781, -45.0196, -102.4418, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-40.2290, -103.5348, -40.0977, -103.3221, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-39.7593, -104.1844, -40.7806, -104.4282, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-54.3622, -94.4491, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-54.6322, -94.8698, -54.5009, -94.6571, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-57.7226, -99.4130, -56.0768, -97.2098, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(-62.8722, -114.6133, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(-50.0000, -100.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on left") + N..... STRAIGHT_FEED(-49.7500, -100.1647, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-39.8257, -103.2073, -45.0196, -102.4418, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-39.2548, -104.7011, -40.7806, -104.4282, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-39.6395, -104.8651, -39.5009, -104.6571, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-53.1089, -95.8856, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-58.0218, -99.8136, -56.0768, -97.2098, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(-62.8722, -114.6133, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(-50.0000, -50.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-50.0000, -52.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-48.0000, -51.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-50.0000, -41.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-55.0000, -44.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-53.0000, -54.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(-38.0000, -52.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(-50.0000, -50.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on right") + N..... STRAIGHT_FEED(-50.2500, -52.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-49.8882, -52.2236, -50.0000, -52.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-47.8882, -51.2236, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-47.7549, -50.9510, -48.0000, -51.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-49.7549, -40.9510, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-50.1286, -40.7856, -50.0000, -41.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-55.1286, -43.7856, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-55.2451, -44.0490, -55.0000, -44.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-53.2451, -54.0490, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(-38.0000, -52.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(-50.0000, -50.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on left") + N..... STRAIGHT_FEED(-49.7500, -51.5955, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-48.2826, -50.8618, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-50.1756, -41.3969, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-54.7203, -44.1237, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-52.7549, -53.9510, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(-38.0000, -52.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(-50.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-50.0000, -2.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-54.0000, -6.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-50.0000, -4.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-54.2316, 8.2786, -52.3876, 2.0456, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-48.2316, 12.2786, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(-58.2316, 9.2786, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(-50.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on right") + N..... STRAIGHT_FEED(-50.2500, -1.8964, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-54.1768, -5.8232, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-53.8882, -6.2236, -54.0000, -6.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-49.8882, -4.2236, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-50.0918, -3.7675, -50.0000, -4.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-54.1606, 8.0388, -52.3876, 2.0456, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-54.0929, 8.0706, -54.2316, 8.2786, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-48.0929, 12.0706, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(-58.2316, 9.2786, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(-50.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on left") + N..... STRAIGHT_FEED(-49.7500, -2.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-49.8232, -2.1768, -50.0000, -2.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-52.7339, -5.0874, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-51.9378, -4.6894, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-54.3391, 8.5074, -52.3876, 2.0456, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-48.3702, 12.4866, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(-58.2316, 9.2786, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(-50.0000, 50.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-50.0000, 48.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-52.0000, 33.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-50.0000, 23.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-43.1830, 17.9077, -45.0196, 22.5582, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-46.1830, 16.9077, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(-44.1830, 18.9077, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(-50.0000, 50.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on right") + N..... STRAIGHT_FEED(-50.2500, 48.0166, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-52.2478, 33.0330, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-52.2451, 32.9510, -52.0000, 33.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-50.2451, 22.9510, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-49.7510, 22.9779, -50.0000, 23.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-43.2686, 18.1427, -45.0196, 22.5582, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-46.2620, 17.1449, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(-44.1830, 18.9077, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(-50.0000, 50.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on left") + N..... STRAIGHT_FEED(-49.7500, 48.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-49.7522, 47.9670, -50.0000, 48.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-51.7467, 33.0082, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-49.9930, 24.2397, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-43.0911, 17.6752, -45.0196, 22.5582, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-43.1039, 17.6705, -43.1830, 17.9077, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-46.1039, 16.6705, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(-44.1830, 18.9077, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(-50.0000, 100.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-50.0000, 98.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-54.0000, 104.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-54.5498, 105.5952, -53.1023, 105.2017, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-55.3718, 104.3868, -53.8777, 104.2543, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-57.5667, 104.8804, -56.1064, 106.2470, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(-42.5667, 108.8804, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(-50.0000, 100.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on right") + N..... STRAIGHT_FEED(-50.2500, 98.8257, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-53.7920, 104.1387, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-53.8504, 104.2003, -54.0000, 104.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-54.3334, 105.4182, -53.1023, 105.2017, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-55.1272, 104.2212, -53.8777, 104.2543, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-57.7493, 104.7096, -56.1064, 106.2470, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(-42.5667, 108.8804, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(-50.0000, 100.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on left") + N..... STRAIGHT_FEED(-49.7500, 98.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-50.2080, 97.8613, -50.0000, 98.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-54.1851, 103.8269, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-54.7910, 105.6608, -53.1023, 105.2017, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-54.6618, 105.8187, -54.5498, 105.5952, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-55.6208, 104.4089, -53.8777, 104.2543, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-55.4636, 104.6193, -55.3718, 104.3868, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-57.3842, 105.0512, -56.1064, 106.2470, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(-42.5667, 108.8804, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(0.0000, -100.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.0000, -102.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(15.0000, -101.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(6.5716, -113.3904, 11.0601, -107.3818, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(7.3900, -108.8142, 8.1276, -111.3074, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(5.3900, -105.8142, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(15.3900, -99.8142, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(0.0000, -100.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on right") + N..... STRAIGHT_FEED(-0.2500, -102.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(0.0166, -102.2494, 0.0000, -102.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(15.0166, -101.2494, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(15.1313, -100.7873, 15.0000, -101.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(6.4220, -113.5907, 11.0601, -107.3818, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(6.7212, -113.1901, 6.5716, -113.3904, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(7.4610, -109.0540, 8.1276, -111.3074, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(7.5980, -108.6756, 7.3900, -108.8142, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(5.5980, -105.6756, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(15.3900, -99.8142, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(0.0000, -100.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on left") + N..... STRAIGHT_FEED(0.2500, -101.7328, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(14.1180, -100.8082, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(5.3231, -111.8146, 11.0601, -107.3818, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(7.0052, -108.6877, 8.1276, -111.3074, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(5.1820, -105.9529, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(15.3900, -99.8142, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(0.0000, -50.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.0000, -52.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(2.0000, -55.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.0000, -70.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-2.0000, -66.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-1.4008, -62.6495, -2.7346, -64.1398, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(-4.4008, -68.6495, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(0.0000, -50.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on right") + N..... STRAIGHT_FEED(-0.2500, -52.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-0.2080, -52.1387, 0.0000, -52.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(1.7397, -55.0603, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-0.1403, -69.1604, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-1.7764, -65.8882, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-2.0918, -65.7675, -2.0000, -66.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-1.5675, -62.8358, -2.7346, -64.1398, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(-4.4008, -68.6495, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(0.0000, -50.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on left") + N..... STRAIGHT_FEED(0.2500, -51.9243, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(2.2080, -54.8613, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(2.2478, -55.0330, 2.0000, -55.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.2478, -70.0330, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-0.2236, -70.1118, 0.0000, -70.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-2.1265, -66.3061, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-1.2341, -62.4633, -2.7346, -64.1398, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(-4.4008, -68.6495, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.0000, -2.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-4.0000, 4.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.0000, 1.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(9.1465, 4.6122, 5.4785, 0.5140, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(3.7928, 4.8492, 6.2572, -0.0678, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(4.7928, 10.8492, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on right") + N..... STRAIGHT_FEED(-0.2500, -1.1743, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-2.9824, 2.9243, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-0.1500, 0.8000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(0.2490, 0.9779, 0.0000, 1.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(8.9798, 4.4259, 5.4785, 0.5140, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(9.0152, 4.3995, 9.1465, 4.6122, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(3.9049, 4.6257, 6.2572, -0.0678, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(4.7928, 10.8492, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on left") + N..... STRAIGHT_FEED(0.2500, -2.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-0.2080, -2.1387, 0.0000, -2.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-4.2080, 3.8613, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-3.8500, 4.2000, -4.0000, 4.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-0.1935, 1.4577, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(9.2967, 4.8132, 5.4785, 0.5140, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(3.6808, 5.0727, 6.2572, -0.0678, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(4.7928, 10.8492, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(0.0000, 50.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.0000, 48.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(3.0000, 42.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(4.0000, 38.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(3.5892, 33.3694, 2.6342, 35.7877, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(1.5892, 35.3694, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(3.5892, 30.3694, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(0.0000, 50.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on right") + N..... STRAIGHT_FEED(-0.2500, 48.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-0.2236, 47.8882, 0.0000, 48.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(2.7641, 41.9127, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(3.7575, 37.9394, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(3.8687, 37.7873, 4.0000, 38.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(3.6457, 33.6665, 2.6342, 35.7877, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(1.7660, 35.5462, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(3.5892, 30.3694, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(0.0000, 50.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on left") + N..... STRAIGHT_FEED(0.2500, 48.0590, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(3.2236, 42.1118, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(3.2425, 42.0606, 3.0000, 42.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(4.2185, 38.1567, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(3.6810, 33.1369, 2.6342, 35.7877, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(3.4124, 33.1926, 3.5892, 33.3694, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(1.4124, 35.1926, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(3.5892, 30.3694, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(0.0000, 100.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.0000, 98.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-10.0000, 100.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-4.4251, 99.2557, -7.7596, 95.5300, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(5.5749, 93.2557, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(1.5749, 103.2557, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(2.5749, 113.2557, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(0.0000, 100.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on right") + N..... STRAIGHT_FEED(-0.2500, 98.3050, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-9.1242, 100.0798, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-4.5918, 99.0694, -7.7596, 95.5300, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-4.5537, 99.0413, -4.4251, 99.2557, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(5.4463, 93.0413, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(5.8071, 93.3485, 5.5749, 93.2557, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(1.8071, 103.3485, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(2.5749, 113.2557, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(0.0000, 100.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on left") + N..... STRAIGHT_FEED(0.2500, 98.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-0.0490, 97.7549, 0.0000, 98.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-10.0490, 99.7549, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-10.1120, 100.2235, -10.0000, 100.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-4.2763, 99.4580, -7.7596, 95.5300, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(5.0672, 93.8519, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(1.3428, 103.1628, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(2.5749, 113.2557, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(50.0000, -100.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(50.0000, -102.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(49.6090, -106.4074, 51.1650, -104.3244, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(54.6090, -116.4074, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(56.2815, -116.6307, 55.2811, -117.7484, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(62.2815, -106.6307, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(64.2815, -103.6307, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(50.0000, -100.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on right") + N..... STRAIGHT_FEED(49.7500, -101.8505, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(49.4113, -106.5709, 51.1650, -104.3244, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(54.3854, -116.5192, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(54.7210, -116.6309, 54.6090, -116.4074, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(56.1148, -116.8170, 55.2811, -117.7484, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(56.4959, -116.7593, 56.2815, -116.6307, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(62.4959, -106.7593, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(64.2815, -103.6307, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(50.0000, -100.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on left") + N..... STRAIGHT_FEED(50.2500, -102.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(50.1120, -102.2235, 50.0000, -102.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(49.7586, -106.2071, 51.1650, -104.3244, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(49.8326, -106.2956, 49.6090, -106.4074, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(54.7287, -116.0878, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(56.2094, -116.2649, 55.2811, -117.7484, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(62.0671, -106.5021, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(64.2815, -103.6307, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(50.0000, -50.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(50.0000, -52.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(35.0000, -54.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(36.8512, -51.7379, 33.8980, -51.2097, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(38.8963, -53.2655, 38.3453, -51.8704, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(37.1643, -51.7154, 38.4188, -52.0564, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(43.1643, -55.7154, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(50.0000, -50.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on right") + N..... STRAIGHT_FEED(49.7500, -51.7811, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(36.0987, -53.6013, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(36.7952, -52.6825, 33.8980, -51.2097, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(38.9881, -53.4981, 38.3453, -51.8704, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(36.9231, -51.6498, 38.4188, -52.0564, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(43.1643, -55.7154, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(50.0000, -50.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on left") + N..... STRAIGHT_FEED(50.2500, -52.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(50.0330, -52.2478, 50.0000, -52.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(35.0330, -54.2478, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(34.9082, -53.7675, 35.0000, -54.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(36.6051, -51.6938, 33.8980, -51.2097, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(37.1002, -51.7599, 36.8512, -51.7379, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(38.8045, -53.0330, 38.3453, -51.8704, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(37.4056, -51.7810, 38.4188, -52.0564, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(43.1643, -55.7154, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(50.0000, -2.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(49.0000, -7.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(51.0000, -5.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(49.5399, -4.9354, 50.2120, -6.2764, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(49.9375, -5.8249, 50.5360, -5.0237, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(46.9375, -1.8249, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on right") + N..... STRAIGHT_FEED(49.7500, -1.9752, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(48.7549, -6.9510, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(49.1768, -7.1768, 49.0000, -7.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(51.0259, -5.3276, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(49.3385, -5.3822, 50.2120, -6.2764, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(49.7879, -6.0252, 50.5360, -5.0237, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(46.9375, -1.8249, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on left") + N..... STRAIGHT_FEED(50.2500, -2.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(50.2451, -2.0490, 50.0000, -2.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(49.4071, -6.2394, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(50.8232, -4.8232, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(51.1313, -4.7873, 51.0000, -5.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(49.4279, -4.7119, 50.2120, -6.2764, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(49.7889, -4.9575, 49.5399, -4.9354, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(50.0871, -5.6246, 50.5360, -5.0237, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(46.9375, -1.8249, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 50.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(50.0000, 48.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(52.0000, 50.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(51.0000, 54.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(57.1324, 53.1813, 53.4644, 49.0830, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(47.2433, 48.2248, 53.7178, 47.6504, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(50.2433, 44.2248, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 50.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on right") + N..... STRAIGHT_FEED(49.7500, 48.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(50.1768, 47.8232, 50.0000, 48.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(52.1768, 49.8232, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(52.2425, 50.0606, 52.0000, 50.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(51.2425, 54.0606, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(50.8880, 54.2235, 51.0000, 54.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(57.2992, 53.3675, 53.4644, 49.0830, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(57.2638, 53.3940, 57.1324, 53.1813, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(46.9943, 48.2469, 53.7178, 47.6504, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(50.2433, 44.2248, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 50.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on left") + N..... STRAIGHT_FEED(50.2500, 48.6036, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(51.7231, 50.0767, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(50.8355, 53.6274, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(56.9822, 52.9802, 53.4644, 49.0830, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(47.4923, 48.2027, 53.7178, 47.6504, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(50.2433, 44.2248, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 100.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(50.0000, 98.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(55.0000, 95.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(60.0000, 96.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(61.1929, 93.3314, 62.9883, 95.7349, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(58.1929, 98.3314, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(64.1929, 96.3314, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 100.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on right") + N..... STRAIGHT_FEED(49.7500, 98.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(49.8714, 97.7856, 50.0000, 98.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(54.8714, 94.7856, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(55.0490, 94.7549, 55.0000, 95.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(60.0490, 95.7549, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(60.2490, 95.9779, 60.0000, 96.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(61.3814, 93.5032, 62.9883, 95.7349, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(58.4073, 98.4601, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(64.1929, 96.3314, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 100.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on left") + N..... STRAIGHT_FEED(50.2500, 98.1415, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(55.0457, 95.2641, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(59.7731, 96.2096, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(61.0433, 93.1311, 62.9883, 95.7349, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(60.9785, 93.2028, 61.1929, 93.3314, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(57.9785, 98.2028, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(64.1929, 96.3314, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(100.0000, -100.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(100.0000, -102.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(110.0000, -104.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(114.4847, -114.0325, 112.4644, -108.9170, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(117.4847, -99.0325, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(118.4847, -109.0325, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(121.4847, -114.0325, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(100.0000, -100.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on right") + N..... STRAIGHT_FEED(99.7500, -102.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(99.9510, -102.2451, 100.0000, -102.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(109.9510, -104.2451, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(110.1120, -104.2235, 110.0000, -104.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(114.8248, -113.6064, 112.4644, -108.9170, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(117.4021, -100.7198, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(118.2359, -109.0574, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(121.4847, -114.0325, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(100.0000, -100.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on left") + N..... STRAIGHT_FEED(100.2500, -101.7950, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(109.9658, -103.7382, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(114.5765, -114.2650, 112.4644, -108.9170, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(114.2395, -113.9835, 114.4847, -114.0325, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(117.2395, -98.9835, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(117.7334, -99.0076, 117.4847, -99.0325, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(118.7334, -109.0076, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(121.4847, -114.0325, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(100.0000, -50.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(100.0000, -52.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(115.0000, -47.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(119.0000, -51.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(123.0000, -53.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(122.1729, -62.3233, 125.4644, -57.9170, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(128.1729, -57.3233, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(100.0000, -50.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on right") + N..... STRAIGHT_FEED(99.7500, -52.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(100.0791, -52.2372, 100.0000, -52.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(114.9325, -47.2860, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(118.8232, -51.1768, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(118.8882, -51.2236, 119.0000, -51.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(122.8882, -53.2236, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(123.1120, -53.2235, 123.0000, -53.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(122.3225, -62.1230, 125.4644, -57.9170, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(128.1729, -57.3233, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(100.0000, -50.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on left") + N..... STRAIGHT_FEED(100.2500, -51.6531, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(114.9209, -46.7628, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(115.1768, -46.8232, 115.0000, -47.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(119.1481, -50.7945, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(123.0014, -52.7212, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(122.0233, -62.5236, 125.4644, -57.9170, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(128.1729, -57.3233, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(100.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(100.0000, -2.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(94.0000, -12.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(92.0000, 3.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(91.5488, -2.0854, 93.3442, 0.3180, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(91.8784, -0.2427, 91.1448, -1.0623, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(101.8784, 4.7573, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(100.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on right") + N..... STRAIGHT_FEED(99.7500, -1.9308, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(94.1533, -11.2585, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(92.2722, 2.8504, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(91.6985, -1.8852, 93.3442, 0.3180, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(91.4570, -1.8529, 91.5488, -2.0854, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(91.7117, -0.4290, 91.1448, -1.0623, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(101.8784, 4.7573, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(100.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on left") + N..... STRAIGHT_FEED(100.2500, -2.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(100.2144, -2.1286, 100.0000, -2.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(94.2144, -12.1286, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(93.7522, -12.0330, 94.0000, -12.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(91.7522, 2.9670, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(91.8880, 3.2235, 92.0000, 3.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(91.5070, -2.3629, 93.3442, 0.3180, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(92.0451, -0.0564, 91.1448, -1.0623, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(101.8784, 4.7573, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(100.0000, 50.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(100.0000, 48.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(101.6308, 44.3518, 100.8961, 46.2120, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(110.3364, 47.7899, 104.9223, 48.7582, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(111.3364, 48.7899, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(112.2333, 46.7834, 111.8293, 47.8065, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(116.2333, 36.7834, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(100.0000, 50.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on right") + N..... STRAIGHT_FEED(99.7500, 48.1482, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(101.5905, 44.0718, 100.8961, 46.2120, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(110.5680, 47.6680, 104.9223, 48.7582, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(111.4827, 48.5826, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(112.1415, 47.0159, 111.8293, 47.8065, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(116.2333, 36.7834, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(100.0000, 50.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on left") + N..... STRAIGHT_FEED(100.2500, 48.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(100.1120, 47.7765, 100.0000, 48.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(101.5390, 44.5843, 100.8961, 46.2120, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(101.7804, 44.5521, 101.6308, 44.3518, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(110.0903, 47.8339, 104.9223, 48.7582, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(110.1596, 47.9667, 110.3364, 47.7899, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(111.1596, 48.9667, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(111.2244, 49.0134, 111.3364, 48.7899, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(112.3252, 46.5509, 111.8293, 47.8065, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(116.2333, 36.7834, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(100.0000, 100.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(100.0000, 98.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(98.0000, 102.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(102.0000, 107.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(100.0000, 102.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(100.8154, 100.1759, 100.4481, 101.1060, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(98.8154, 102.1759, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(100.0000, 100.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on right") + N..... STRAIGHT_FEED(99.7500, 99.0590, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(98.2951, 101.9687, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(101.1413, 105.5265, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(99.7679, 102.0928, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(100.1120, 101.7765, 100.0000, 102.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(100.7236, 100.4084, 100.4481, 101.1060, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(98.8154, 102.1759, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(100.0000) + N..... STRAIGHT_TRAVERSE(100.0000, 100.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on left") + N..... STRAIGHT_FEED(100.2500, 98.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(99.7764, 97.8882, 100.0000, 98.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(97.7764, 101.8882, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(97.8048, 102.1562, 98.0000, 102.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(101.8048, 107.1562, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(102.2321, 106.9072, 102.0000, 107.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(100.4114, 102.3555, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(100.9072, 99.9434, 100.4481, 101.1060, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(98.8154, 102.1759, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SET_FEED_MODE(0, 0) + N..... SET_FEED_RATE(0.0000) + N..... STOP_SPINDLE_TURNING(0) + N..... SET_SPINDLE_MODE(0 0.0000) + N..... PROGRAM_END() + N..... ON_RESET() + N..... ON_RESET() diff --git a/wasm-port/vendor/linuxcnc/tests/interp/crazy-paths/test.ngc b/wasm-port/vendor/linuxcnc/tests/interp/crazy-paths/test.ngc new file mode 100644 index 0000000..4356402 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/crazy-paths/test.ngc @@ -0,0 +1,476 @@ +O0 sub (#1=radius) +F100 +G0 X-100.000000 Y-100.000000 +O1 if [#1 NE 0] +G41.1 D#1 +O1 endif +g90 g1 y-102.000000 +G2 I1.095697 J-0.097206 X-99.562609 Y-102.978473 +G1 X-97.562609 Y-99.978473 +G1 X-91.562609 Y-97.978473 +G3 I-1.365837 J-2.212349 X-90.369054 Y-100.648542 +G40 +G1 X-80.369054 Y-95.648542 +O0 endsub +F100 +G21 +O0 call [0] +O0 call [-.5] +O0 call [.5] +O2 sub (#1=radius) +F100 +G0 X-100.000000 Y-50.000000 +O3 if [#1 NE 0] +G41.1 D#1 +O3 endif +g90 g1 y-52.000000 +G3 I2.240368 J-4.469983 X-95.923035 Y-61.120458 +G1 X-97.923035 Y-57.120458 +G2 I1.316612 J1.762536 X-94.440783 Y-55.745223 +G3 I1.795380 J2.403458 X-95.540324 Y-52.554728 +G40 +G1 X-93.540324 Y-62.554728 +O2 endsub +F100 +G21 +O2 call [0] +O2 call [-.5] +O2 call [.5] +O4 sub (#1=radius) +F100 +G0 X-100.000000 Y0.000000 +O5 if [#1 NE 0] +G41.1 D#1 +O5 endif +g90 g1 y-2.000000 +G1 X-85.000000 Y3.000000 +G1 X-87.000000 Y-2.000000 +G1 X-82.000000 Y-8.000000 +G1 X-85.000000 Y-5.500000 +G40 +G1 X-90.000000 Y10.000000 +O4 endsub +F100 +G21 +O4 call [0] +O4 call [-.5] +O4 call [.5] +O6 sub (#1=radius) +F100 +G0 X-100.000000 Y50.000000 +O7 if [#1 NE 0] +G41.1 D#1 +O7 endif +g90 g1 y48.000000 +G1 X-105.000000 Y43.000000 +G3 I0.658306 J0.881268 X-103.937643 Y42.858164 +G1 X-104.937643 Y47.858164 +G2 I1.555996 J2.082997 X-104.119243 Y52.434341 +G40 +G1 X-103.119243 Y48.434341 +O6 endsub +F100 +G21 +O6 call [0] +O6 call [-.5] +O6 call [.5] +O8 sub (#1=radius) +F100 +G0 X-100.000000 Y100.000000 +O9 if [#1 NE 0] +G41.1 D#1 +O9 endif +g90 g1 y98.000000 +G3 I-1.155708 J-1.871988 X-98.990068 Y95.740711 +G2 I0.658306 J0.881268 X-97.598155 Y97.441626 +G1 X-93.598155 Y107.441626 +G1 X-96.598155 Y105.441626 +G40 +G1 X-111.598155 Y109.441626 +O8 endsub +F100 +G21 +O8 call [0] +O8 call [-.5] +O8 call [.5] +O10 sub (#1=radius) +F100 +G0 X-50.000000 Y-100.000000 +O11 if [#1 NE 0] +G41.1 D#1 +O11 endif +g90 g1 y-102.000000 +G2 I4.980439 J-0.441843 X-40.097651 Y-103.322073 +G2 I-0.682919 J-1.106175 X-39.500873 Y-104.657107 +G1 X-54.500873 Y-94.657107 +G2 I-1.575966 J-2.552711 X-57.872219 Y-99.613276 +G40 +G1 X-62.872219 Y-114.613276 +O10 endsub +F100 +G21 +O10 call [0] +O10 call [-.5] +O10 call [.5] +O12 sub (#1=radius) +F100 +G0 X-50.000000 Y-50.000000 +O13 if [#1 NE 0] +G41.1 D#1 +O13 endif +g90 g1 y-52.000000 +G1 X-48.000000 Y-51.000000 +G1 X-50.000000 Y-41.000000 +G1 X-55.000000 Y-44.000000 +G1 X-53.000000 Y-54.000000 +G40 +G1 X-38.000000 Y-52.000000 +O12 endsub +F100 +G21 +O12 call [0] +O12 call [-.5] +O12 call [.5] +O14 sub (#1=radius) +F100 +G0 X-50.000000 Y0.000000 +O15 if [#1 NE 0] +G41.1 D#1 +O15 endif +g90 g1 y-2.000000 +G1 X-54.000000 Y-6.000000 +G1 X-50.000000 Y-4.000000 +G2 I-2.387576 J6.045617 X-54.231568 Y8.278569 +G1 X-48.231568 Y12.278569 +G40 +G1 X-58.231568 Y9.278569 +O14 endsub +F100 +G21 +O14 call [0] +O14 call [-.5] +O14 call [.5] +O16 sub (#1=radius) +F100 +G0 X-50.000000 Y50.000000 +O17 if [#1 NE 0] +G41.1 D#1 +O17 endif +g90 g1 y48.000000 +G1 X-52.000000 Y33.000000 +G1 X-50.000000 Y23.000000 +G2 I4.980439 J-0.441843 X-43.182964 Y17.907682 +G1 X-46.182964 Y16.907682 +G40 +G1 X-44.182964 Y18.907682 +O16 endsub +F100 +G21 +O16 call [0] +O16 call [-.5] +O16 call [.5] +O18 sub (#1=radius) +F100 +G0 X-50.000000 Y100.000000 +O19 if [#1 NE 0] +G41.1 D#1 +O19 endif +g90 g1 y98.000000 +G1 X-54.000000 Y104.000000 +G2 I0.897690 J1.201729 X-54.549771 Y105.595248 +G2 I0.672110 J-1.340995 X-55.371792 Y104.386806 +G3 I-0.734639 J1.860190 X-57.566737 Y104.880428 +G40 +G1 X-42.566737 Y108.880428 +O18 endsub +F100 +G21 +O18 call [0] +O18 call [-.5] +O18 call [.5] +O20 sub (#1=radius) +F100 +G0 X0.000000 Y-100.000000 +O21 if [#1 NE 0] +G41.1 D#1 +O21 endif +g90 g1 y-102.000000 +G1 X15.000000 Y-101.000000 +G3 I-3.939915 J-6.381776 X6.571635 Y-113.390421 +G2 I1.555996 J2.082997 X7.390034 Y-108.814243 +G1 X5.390034 Y-105.814243 +G40 +G1 X15.390034 Y-99.814243 +O20 endsub +F100 +G21 +O20 call [0] +O20 call [-.5] +O20 call [.5] +O22 sub (#1=radius) +F100 +G0 X0.000000 Y-50.000000 +O23 if [#1 NE 0] +G41.1 D#1 +O23 endif +g90 g1 y-52.000000 +G1 X2.000000 Y-55.000000 +G1 X0.000000 Y-70.000000 +G1 X-2.000000 Y-66.000000 +G2 I-0.734639 J1.860190 X-1.400808 Y-62.649544 +G40 +G1 X-4.400808 Y-68.649544 +O22 endsub +F100 +G21 +O22 call [0] +O22 call [-.5] +O22 call [.5] +O24 sub (#1=radius) +F100 +G0 X0.000000 Y0.000000 +O25 if [#1 NE 0] +G41.1 D#1 +O25 endif +g90 g1 y-2.000000 +G1 X-4.000000 Y4.000000 +G1 X0.000000 Y1.000000 +G2 I5.478483 J-0.486028 X9.146519 Y4.612205 +G2 I-2.889271 J-4.679969 X3.792843 Y4.849217 +G40 +G1 X4.792843 Y10.849217 +O24 endsub +F100 +G21 +O24 call [0] +O24 call [-.5] +O24 call [.5] +O26 sub (#1=radius) +F100 +G0 X0.000000 Y50.000000 +O27 if [#1 NE 0] +G41.1 D#1 +O27 endif +g90 g1 y48.000000 +G1 X3.000000 Y42.000000 +G1 X4.000000 Y38.000000 +G2 I-1.365837 J-2.212349 X3.589193 Y33.369404 +G1 X1.589193 Y35.369404 +G40 +G1 X3.589193 Y30.369404 +O26 endsub +F100 +G21 +O26 call [0] +O26 call [-.5] +O26 call [.5] +O28 sub (#1=radius) +F100 +G0 X0.000000 Y100.000000 +O29 if [#1 NE 0] +G41.1 D#1 +O29 endif +g90 g1 y98.000000 +G1 X-10.000000 Y100.000000 +G2 I2.240368 J-4.469983 X-4.425054 Y99.255683 +G1 X5.574946 Y93.255683 +G1 X1.574946 Y103.255683 +G40 +G1 X2.574946 Y113.255683 +O28 endsub +F100 +G21 +O28 call [0] +O28 call [-.5] +O28 call [.5] +O30 sub (#1=radius) +F100 +G0 X50.000000 Y-100.000000 +O31 if [#1 NE 0] +G41.1 D#1 +O31 endif +g90 g1 y-102.000000 +G3 I1.164991 J-2.324391 X49.608995 Y-106.407388 +G1 X54.608995 Y-116.407388 +G2 I0.672110 J-1.340995 X56.281479 Y-116.630683 +G1 X62.281479 Y-106.630683 +G40 +G1 X64.281479 Y-103.630683 +O30 endsub +F100 +G21 +O30 call [0] +O30 call [-.5] +O30 call [.5] +O32 sub (#1=radius) +F100 +G0 X50.000000 Y-50.000000 +O33 if [#1 NE 0] +G41.1 D#1 +O33 endif +g90 g1 y-52.000000 +G1 X35.000000 Y-54.000000 +G3 I-1.101958 J2.790285 X36.851188 Y-51.737853 +G3 I1.494132 J-0.132553 X38.896299 Y-53.265549 +G3 I-0.477515 J1.209123 X37.164317 Y-51.715376 +G40 +G1 X43.164317 Y-55.715376 +O32 endsub +F100 +G21 +O32 call [0] +O32 call [-.5] +O32 call [.5] +O34 sub (#1=radius) +F100 +G0 X50.000000 Y0.000000 +O35 if [#1 NE 0] +G41.1 D#1 +O35 endif +g90 g1 y-2.000000 +G1 X49.000000 Y-7.000000 +G1 X51.000000 Y-5.000000 +G2 I-0.787983 J-1.276355 X49.539907 Y-4.935360 +G3 I0.996088 J-0.088369 X49.937534 Y-5.824882 +G40 +G1 X46.937534 Y-1.824882 +O34 endsub +F100 +G21 +O34 call [0] +O34 call [-.5] +O34 call [.5] +O36 sub (#1=radius) +F100 +G0 X50.000000 Y50.000000 +O37 if [#1 NE 0] +G41.1 D#1 +O37 endif +g90 g1 y48.000000 +G1 X52.000000 Y50.000000 +G1 X51.000000 Y54.000000 +G3 I2.464405 J-4.916982 X57.132441 Y53.181251 +G3 I-3.414593 J-5.530873 X47.243277 Y48.224775 +G40 +G1 X50.243277 Y44.224775 +O36 endsub +F100 +G21 +O36 call [0] +O36 call [-.5] +O36 call [.5] +O38 sub (#1=radius) +F100 +G0 X50.000000 Y100.000000 +O39 if [#1 NE 0] +G41.1 D#1 +O39 endif +g90 g1 y98.000000 +G1 X55.000000 Y95.000000 +G1 X60.000000 Y96.000000 +G2 I2.988264 J-0.265106 X61.192883 Y93.331436 +G1 X58.192883 Y98.331436 +G40 +G1 X64.192883 Y96.331436 +O38 endsub +F100 +G21 +O38 call [0] +O38 call [-.5] +O38 call [.5] +O40 sub (#1=radius) +F100 +G0 X100.000000 Y-100.000000 +O41 if [#1 NE 0] +G41.1 D#1 +O41 endif +g90 g1 y-102.000000 +G1 X110.000000 Y-104.000000 +G2 I2.464405 J-4.916982 X114.484661 Y-114.032503 +G1 X117.484661 Y-99.032503 +G1 X118.484661 Y-109.032503 +G40 +G1 X121.484661 Y-114.032503 +O40 endsub +F100 +G21 +O40 call [0] +O40 call [-.5] +O40 call [.5] +O42 sub (#1=radius) +F100 +G0 X100.000000 Y-50.000000 +O43 if [#1 NE 0] +G41.1 D#1 +O43 endif +g90 g1 y-52.000000 +G1 X115.000000 Y-47.000000 +G1 X119.000000 Y-51.000000 +G1 X123.000000 Y-53.000000 +G2 I2.464405 J-4.916982 X122.172875 Y-62.323321 +G40 +G1 X128.172875 Y-57.323321 +O42 endsub +F100 +G21 +O42 call [0] +O42 call [-.5] +O42 call [.5] +O44 sub (#1=radius) +F100 +G0 X100.000000 Y0.000000 +O45 if [#1 NE 0] +G41.1 D#1 +O45 endif +g90 g1 y-2.000000 +G1 X94.000000 Y-12.000000 +G1 X92.000000 Y3.000000 +G2 I1.344221 J-2.681990 X91.548841 Y-2.085448 +G2 I-0.404051 J1.023104 X91.878396 Y-0.242697 +G40 +G1 X101.878396 Y4.757303 +O44 endsub +F100 +G21 +O44 call [0] +O44 call [-.5] +O44 call [.5] +O46 sub (#1=radius) +F100 +G0 X100.000000 Y50.000000 +O47 if [#1 NE 0] +G41.1 D#1 +O47 endif +g90 g1 y48.000000 +G3 I0.896147 J-1.787993 X101.630786 Y44.351817 +G3 I3.291530 J4.406339 X110.336417 Y47.789904 +G1 X111.336417 Y48.789904 +G2 I0.492881 J-0.983396 X112.233349 Y46.783403 +G40 +G1 X116.233349 Y36.783403 +O46 endsub +F100 +G21 +O46 call [0] +O46 call [-.5] +O46 call [.5] +O48 sub (#1=radius) +F100 +G0 X100.000000 Y100.000000 +O49 if [#1 NE 0] +G41.1 D#1 +O49 endif +g90 g1 y98.000000 +G1 X98.000000 Y102.000000 +G1 X102.000000 Y107.000000 +G1 X100.000000 Y102.000000 +G2 I0.448074 J-0.893997 X100.815393 Y100.175908 +G40 +G1 X98.815393 Y102.175908 +O48 endsub +F100 +G21 +O48 call [0] +O48 call [-.5] +O48 call [.5] +m2 diff --git a/wasm-port/vendor/linuxcnc/tests/interp/crazy-paths/test.sh b/wasm-port/vendor/linuxcnc/tests/interp/crazy-paths/test.sh new file mode 100644 index 0000000..2afa80d --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/crazy-paths/test.sh @@ -0,0 +1,3 @@ +#!/bin/bash +rs274 -g test.ngc | awk '{$1=""; print}' +exit "${PIPESTATUS[0]}" diff --git a/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-l1-l10/expected b/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-l1-l10/expected new file mode 100644 index 0000000..cbc131c --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-l1-l10/expected @@ -0,0 +1,161 @@ + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SET_FEED_REFERENCE(CANON_XYZ) + N..... ON_RESET() + N..... USE_LENGTH_UNITS(CANON_UNITS_INCHES) + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... COMMENT("interpreter: continuing to use same coordinate system") + N..... MESSAGE("G10 L1: set tool offsets direct") + N..... MESSAGE(" part 1") + N..... SET_TOOL_TABLE_ENTRY(1, 1, 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... SET_TOOL_TABLE_ENTRY(0, 1, 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... SELECT_TOOL(1) + N..... STOP_SPINDLE_TURNING(0) + N..... CHANGE_TOOL() + N..... USE_TOOL_LENGTH_OFFSET(0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) + N..... MESSAGE(" should be 0 0 0: 0.000000 0.000000 0.000000") + N..... SET_TOOL_TABLE_ENTRY(1, 1, 1.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... SET_TOOL_TABLE_ENTRY(0, 1, 1.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... USE_TOOL_LENGTH_OFFSET(1.0000 0.0000 0.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) + N..... MESSAGE(" should be 1 0 0: 1.000000 0.000000 0.000000") + N..... SET_TOOL_TABLE_ENTRY(1, 1, 1.0000 2.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... SET_TOOL_TABLE_ENTRY(0, 1, 1.0000 2.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... USE_TOOL_LENGTH_OFFSET(1.0000 2.0000 0.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) + N..... MESSAGE(" should be 1 2 0: 1.000000 2.000000 0.000000") + N..... SET_TOOL_TABLE_ENTRY(1, 1, 1.0000 2.0000 3.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... SET_TOOL_TABLE_ENTRY(0, 1, 1.0000 2.0000 3.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... USE_TOOL_LENGTH_OFFSET(1.0000 2.0000 3.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) + N..... MESSAGE(" should be 1 2 3: 1.000000 2.000000 3.000000") + N..... USE_TOOL_LENGTH_OFFSET(0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) + N..... MESSAGE(" part 2") + N..... SET_TOOL_TABLE_ENTRY(1, 1, 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... SET_TOOL_TABLE_ENTRY(0, 1, 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... USE_TOOL_LENGTH_OFFSET(0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) + N..... MESSAGE(" should be 0 0 0: 0.000000 0.000000 0.000000") + N..... SET_TOOL_TABLE_ENTRY(1, 1, 1.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... SET_TOOL_TABLE_ENTRY(0, 1, 1.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... USE_TOOL_LENGTH_OFFSET(1.0000 0.0000 0.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) + N..... MESSAGE(" should be 1 0 0: 1.000000 0.000000 0.000000") + N..... SET_TOOL_TABLE_ENTRY(1, 1, 1.0000 2.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... SET_TOOL_TABLE_ENTRY(0, 1, 1.0000 2.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... USE_TOOL_LENGTH_OFFSET(1.0000 2.0000 0.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) + N..... MESSAGE(" should be 1 2 0: 1.000000 2.000000 0.000000") + N..... SET_TOOL_TABLE_ENTRY(1, 1, 1.0000 2.0000 3.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... SET_TOOL_TABLE_ENTRY(0, 1, 1.0000 2.0000 3.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... USE_TOOL_LENGTH_OFFSET(1.0000 2.0000 3.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) + N..... MESSAGE(" should be 1 2 3: 1.000000 2.000000 3.000000") + N..... USE_TOOL_LENGTH_OFFSET(0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) + N..... MESSAGE("G10 L10: set tool offsets relative to position") + N..... MESSAGE(" part 1") + N..... SET_TOOL_TABLE_ENTRY(1, 1, 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... SET_TOOL_TABLE_ENTRY(0, 1, 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... SELECT_TOOL(1) + N..... STOP_SPINDLE_TURNING(0) + N..... CHANGE_TOOL() + N..... USE_TOOL_LENGTH_OFFSET(0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) + N..... STRAIGHT_TRAVERSE(0.1000, 0.2000, 0.3000, 0.0000, 0.0000, 0.0000) + N..... MESSAGE(" should be 0 0 0: 0.000000 0.000000 0.000000") + N..... SET_TOOL_TABLE_ENTRY(1, 1, -0.9000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... SET_TOOL_TABLE_ENTRY(0, 1, -0.9000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... USE_TOOL_LENGTH_OFFSET(-0.9000 0.0000 0.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) + N..... MESSAGE(" should be -.9 0 0: -0.900000 0.000000 0.000000") + N..... SET_TOOL_TABLE_ENTRY(1, 1, -0.9000 -1.8000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... SET_TOOL_TABLE_ENTRY(0, 1, -0.9000 -1.8000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... USE_TOOL_LENGTH_OFFSET(-0.9000 -1.8000 0.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) + N..... MESSAGE(" should be -.9 -1.8 0: -0.900000 -1.800000 0.000000") + N..... SET_TOOL_TABLE_ENTRY(1, 1, -0.9000 -1.8000 -2.7000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... SET_TOOL_TABLE_ENTRY(0, 1, -0.9000 -1.8000 -2.7000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... USE_TOOL_LENGTH_OFFSET(-0.9000 -1.8000 -2.7000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) + N..... MESSAGE(" should be -.9 -1.8 -2.7: -0.900000 -1.800000 -2.700000") + N..... USE_TOOL_LENGTH_OFFSET(0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) + N..... MESSAGE(" part 2") + N..... SET_TOOL_TABLE_ENTRY(1, 1, 0.1000 0.2000 0.3000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... SET_TOOL_TABLE_ENTRY(0, 1, 0.1000 0.2000 0.3000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... USE_TOOL_LENGTH_OFFSET(0.1000 0.2000 0.3000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) + N..... MESSAGE(" should be .1 .2 .3: 0.100000 0.200000 0.300000") + N..... SET_TOOL_TABLE_ENTRY(1, 1, -0.9000 0.2000 0.3000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... SET_TOOL_TABLE_ENTRY(0, 1, -0.9000 0.2000 0.3000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... USE_TOOL_LENGTH_OFFSET(-0.9000 0.2000 0.3000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) + N..... MESSAGE(" should be -.9 0.2 .3: -0.900000 0.200000 0.300000") + N..... SET_TOOL_TABLE_ENTRY(1, 1, -0.9000 -1.8000 0.3000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... SET_TOOL_TABLE_ENTRY(0, 1, -0.9000 -1.8000 0.3000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... USE_TOOL_LENGTH_OFFSET(-0.9000 -1.8000 0.3000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) + N..... MESSAGE(" should be -.9 -1.8 .3: -0.900000 -1.800000 0.300000") + N..... SET_TOOL_TABLE_ENTRY(1, 1, -0.9000 -1.8000 -2.7000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... SET_TOOL_TABLE_ENTRY(0, 1, -0.9000 -1.8000 -2.7000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... USE_TOOL_LENGTH_OFFSET(-0.9000 -1.8000 -2.7000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) + N..... MESSAGE(" should be -.9 -1.8 -2.7: -0.900000 -1.800000 -2.700000") + N..... USE_TOOL_LENGTH_OFFSET(0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) + N..... MESSAGE("G10 L10: set tool offsets relative to position + 45 deg. rotation") + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(45.0000) + N..... STRAIGHT_TRAVERSE(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_TOOL_TABLE_ENTRY(1, 1, 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... SET_TOOL_TABLE_ENTRY(0, 1, 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... SELECT_TOOL(1) + N..... STOP_SPINDLE_TURNING(0) + N..... CHANGE_TOOL() + N..... USE_TOOL_LENGTH_OFFSET(0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) + N..... MESSAGE(" should be 0 0 0: 0.000000 0.000000 0.000000") + N..... SET_TOOL_TABLE_ENTRY(1, 1, -0.7071 -0.7071 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... SET_TOOL_TABLE_ENTRY(0, 1, -0.7071 -0.7071 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... USE_TOOL_LENGTH_OFFSET(-0.7071 -0.7071 0.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) + N..... MESSAGE(" should be -.707 -.707 0: -0.707107 -0.707107 0.000000") + N..... MESSAGE(" should be 1 0: 1.000000 0.000000") + N..... SET_TOOL_TABLE_ENTRY(1, 1, 0.0000 -1.4142 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... SET_TOOL_TABLE_ENTRY(0, 1, 0.0000 -1.4142 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... USE_TOOL_LENGTH_OFFSET(0.0000 -1.4142 0.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) + N..... MESSAGE(" should be 0 -1.414 0: 0.000000 -1.414214 0.000000") + N..... MESSAGE(" should be 1 1: 1.000000 1.000000") + N..... USE_TOOL_LENGTH_OFFSET(0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) + N..... MESSAGE("G10 L10: set tool offsets relative to position with rotation") + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(45.0000) + N..... STRAIGHT_TRAVERSE(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_TOOL_TABLE_ENTRY(1, 1, 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... SET_TOOL_TABLE_ENTRY(0, 1, 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... SELECT_TOOL(1) + N..... STOP_SPINDLE_TURNING(0) + N..... CHANGE_TOOL() + N..... USE_TOOL_LENGTH_OFFSET(0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) + N..... MESSAGE(" should be 0 0 0: 0.000000 0.000000 0.000000") + N..... SET_TOOL_TABLE_ENTRY(1, 1, -0.7071 -0.7071 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... SET_TOOL_TABLE_ENTRY(0, 1, -0.7071 -0.7071 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... SET_TOOL_TABLE_ENTRY(1, 1, 0.0000 -1.4142 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... SET_TOOL_TABLE_ENTRY(0, 1, 0.0000 -1.4142 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... MESSAGE(" G10 alone does not apply offset, should still be 0 0 0: 0.000000 0.000000 0.000000") + N..... USE_TOOL_LENGTH_OFFSET(0.0000 -1.4142 0.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) + N..... MESSAGE(" should be 0 -1.414 0: 0.000000 -1.414214 0.000000") + N..... MESSAGE(" should be 1 1: 1.000000 1.000000") + N..... USE_TOOL_LENGTH_OFFSET(0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) + N..... MESSAGE("Model B contract: M6 alone and G10 alone do not change tool offset params") + N..... USE_TOOL_LENGTH_OFFSET(0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) + N..... SET_TOOL_TABLE_ENTRY(1, 1, 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... SET_TOOL_TABLE_ENTRY(0, 1, 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... SELECT_TOOL(1) + N..... STOP_SPINDLE_TURNING(0) + N..... CHANGE_TOOL() + N..... MESSAGE(" after M6 alone, should be 0 0 0: 0.000000 0.000000 0.000000") + N..... SET_TOOL_TABLE_ENTRY(1, 1, 5.0000 6.0000 7.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... SET_TOOL_TABLE_ENTRY(0, 1, 5.0000 6.0000 7.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... MESSAGE(" after G10 alone, should still be 0 0 0: 0.000000 0.000000 0.000000") + N..... USE_TOOL_LENGTH_OFFSET(5.0000 6.0000 7.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) + N..... MESSAGE(" after G43, should be 5 6 7: 5.000000 6.000000 7.000000") + N..... SET_TOOL_TABLE_ENTRY(1, 1, 8.0000 6.0000 7.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... SET_TOOL_TABLE_ENTRY(0, 1, 8.0000 6.0000 7.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... MESSAGE(" after G10 modifying loaded tool, should still be 5 6 7: 5.000000 6.000000 7.000000") + N..... USE_TOOL_LENGTH_OFFSET(8.0000 6.0000 7.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) + N..... MESSAGE(" after G43, should be 8 6 7: 8.000000 6.000000 7.000000") + N..... USE_TOOL_LENGTH_OFFSET(0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(45.0000) + N..... SET_FEED_MODE(0, 0) + N..... SET_FEED_RATE(0.0000) + N..... STOP_SPINDLE_TURNING(0) + N..... SET_SPINDLE_MODE(0 0.0000) + N..... PROGRAM_END() + N..... ON_RESET() + N..... ON_RESET() diff --git a/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-l1-l10/test.ngc b/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-l1-l10/test.ngc new file mode 100644 index 0000000..bd7fb9d --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-l1-l10/test.ngc @@ -0,0 +1,115 @@ +g20 +g10 l2 p1 x0 y0 z0 +g54 + + +(debug,G10 L1: set tool offsets direct) +(debug, part 1) +g10 l1 p1 x0 y0 z0 +t1 m6 g43 +(debug, should be 0 0 0: #5401 #5402 #5403) +g10 l1 p1 x1 +g43 +(debug, should be 1 0 0: #5401 #5402 #5403) +g10 l1 p1 y2 +g43 +(debug, should be 1 2 0: #5401 #5402 #5403) +g10 l1 p1 z3 +g43 +(debug, should be 1 2 3: #5401 #5402 #5403) +g49 +(debug, part 2) +g10 l1 p1 x0 y0 z0 +g43 +(debug, should be 0 0 0: #5401 #5402 #5403) +g10 l1 p1 x1 +g43 +(debug, should be 1 0 0: #5401 #5402 #5403) +g10 l1 p1 y2 +g43 +(debug, should be 1 2 0: #5401 #5402 #5403) +g10 l1 p1 z3 +g43 +(debug, should be 1 2 3: #5401 #5402 #5403) +g49 + + +(debug,G10 L10: set tool offsets relative to position) +(debug, part 1) +g10 l1 p1 x0 y0 z0 +t1 m6 g43 +g0 x.1 y.2 z.3 +(debug, should be 0 0 0: #5401 #5402 #5403) +g10 l10 p1 x1 +g43 +(debug, should be -.9 0 0: #5401 #5402 #5403) +g10 l10 p1 y2 +g43 +(debug, should be -.9 -1.8 0: #5401 #5402 #5403) +g10 l10 p1 z3 +g43 +(debug, should be -.9 -1.8 -2.7: #5401 #5402 #5403) +g49 +(debug, part 2) +g10 l10 p1 x0 y0 z0 +g43 +(debug, should be .1 .2 .3: #5401 #5402 #5403) +g10 l10 p1 x1 +g43 +(debug, should be -.9 0.2 .3: #5401 #5402 #5403) +g10 l10 p1 y2 +g43 +(debug, should be -.9 -1.8 .3: #5401 #5402 #5403) +g10 l10 p1 y2 z3 +g43 +(debug, should be -.9 -1.8 -2.7: #5401 #5402 #5403) +g49 + + +(debug,G10 L10: set tool offsets relative to position + 45 deg. rotation) +g10 l2 p1 r45 +g0 x0 y0 z0 +g10 l10 p1 x0 y0 z0 +t1 m6 g43 +(debug, should be 0 0 0: #5401 #5402 #5403) +g10 l10 p1 x1 +g43 +(debug, should be -.707 -.707 0: #5401 #5402 #5403) +(debug, should be 1 0: #5420 #5421) +g10 l10 p1 y1 +g43 +(debug, should be 0 -1.414 0: #5401 #5402 #5403) +(debug, should be 1 1: #5420 #5421) +g49 + + +(debug,G10 L10: set tool offsets relative to position with rotation) +g10 l2 p1 r45 +g0 x0 y0 z0 +g10 l10 p1 x0 y0 z0 +t1 m6 g43 +(debug, should be 0 0 0: #5401 #5402 #5403) +g10 l10 p1 x1 +g10 l10 p1 y1 +(debug, G10 alone does not apply offset, should still be 0 0 0: #5401 #5402 #5403) +g43 +(debug, should be 0 -1.414 0: #5401 #5402 #5403) +(debug, should be 1 1: #5420 #5421) +g49 + + +(debug,Model B contract: M6 alone and G10 alone do not change tool offset params) +g49 +g10 l1 p1 x0 y0 z0 +t1 m6 +(debug, after M6 alone, should be 0 0 0: #5401 #5402 #5403) +g10 l1 p1 x5 y6 z7 +(debug, after G10 alone, should still be 0 0 0: #5401 #5402 #5403) +g43 +(debug, after G43, should be 5 6 7: #5401 #5402 #5403) +g10 l1 p1 x8 +(debug, after G10 modifying loaded tool, should still be 5 6 7: #5401 #5402 #5403) +g43 +(debug, after G43, should be 8 6 7: #5401 #5402 #5403) +g49 +m2 diff --git a/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-l1-l10/test.sh b/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-l1-l10/test.sh new file mode 100755 index 0000000..52077f3 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-l1-l10/test.sh @@ -0,0 +1,3 @@ +#!/bin/bash +rs274 -g test.ngc -t test.tbl | awk '{$1=""; print}' | sed 's/-0\.0000/0.0000/g' +exit "${PIPESTATUS[0]}" diff --git a/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-l1-l10/test.tbl b/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-l1-l10/test.tbl new file mode 100644 index 0000000..5ce3a2f --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-l1-l10/test.tbl @@ -0,0 +1 @@ +T1 P1 X0 Y0 Z0 ; \ No newline at end of file diff --git a/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-l11/expected b/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-l11/expected new file mode 100644 index 0000000..7907f26 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-l11/expected @@ -0,0 +1,66 @@ + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SET_FEED_REFERENCE(CANON_XYZ) + N..... ON_RESET() + N..... USE_LENGTH_UNITS(CANON_UNITS_INCHES) + N..... SET_G5X_OFFSET(1, 1.0000, 2.0000, -3.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(10.0000) + N..... COMMENT("interpreter: setting coordinate system origin") + N..... COMMENT("interpreter: setting coordinate system origin") + N..... COMMENT("interpreter: setting coordinate system origin") + N..... COMMENT("interpreter: setting coordinate system origin") + N..... COMMENT("interpreter: setting coordinate system origin") + N..... COMMENT("interpreter: setting coordinate system origin") + N..... COMMENT("interpreter: setting coordinate system origin") + N..... COMMENT("interpreter: setting coordinate system origin") + N..... COMMENT("interpreter: continuing to use same coordinate system") + N..... STRAIGHT_TRAVERSE(-1.3321, -1.7960, -27.0000, 0.0000, 0.0000, 0.0000) + N..... SET_TOOL_TABLE_ENTRY(1, 1, 0.0000 0.0000 -3.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... SET_TOOL_TABLE_ENTRY(0, 1, 0.0000 0.0000 -3.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... SELECT_TOOL(1) + N..... STOP_SPINDLE_TURNING(0) + N..... CHANGE_TOOL() + N..... USE_TOOL_LENGTH_OFFSET(0.0000 0.0000 -3.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) + N..... MESSAGE("-3.000000") + N..... SET_G5X_OFFSET(2, 4.0000, 5.0000, -6.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(20.0000) + N..... STRAIGHT_TRAVERSE(-5.4689, -3.3304, -21.0000, 0.0000, 0.0000, 0.0000) + N..... SET_TOOL_TABLE_ENTRY(1, 1, 0.0000 0.0000 -4.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... SET_TOOL_TABLE_ENTRY(0, 1, 0.0000 0.0000 -4.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... USE_TOOL_LENGTH_OFFSET(0.0000 0.0000 -4.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) + N..... MESSAGE("-4.000000") + N..... SET_G5X_OFFSET(3, 7.0000, 8.0000, -9.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(30.0000) + N..... SET_G92_OFFSET(-43.0622, -47.4282, -72.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G5X_OFFSET(1, 1.0000, 2.0000, -3.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(-43.0622, -47.4282, -72.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(10.0000) + N..... STRAIGHT_TRAVERSE(41.7301, 45.6322, 49.0000, 0.0000, 0.0000, 0.0000) + N..... SET_TOOL_TABLE_ENTRY(1, 1, 0.0000 0.0000 -3.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... SET_TOOL_TABLE_ENTRY(0, 1, 0.0000 0.0000 -3.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... SELECT_TOOL(1) + N..... STOP_SPINDLE_TURNING(0) + N..... CHANGE_TOOL() + N..... USE_TOOL_LENGTH_OFFSET(0.0000 0.0000 -3.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) + N..... MESSAGE("-3.000000") + N..... SET_G5X_OFFSET(2, 4.0000, 5.0000, -6.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(-43.0622, -47.4282, -72.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(20.0000) + N..... STRAIGHT_TRAVERSE(37.5933, 44.0978, 51.0000, 0.0000, 0.0000, 0.0000) + N..... SET_TOOL_TABLE_ENTRY(1, 1, 0.0000 0.0000 -4.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... SET_TOOL_TABLE_ENTRY(0, 1, 0.0000 0.0000 -4.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000, 0.0000, 0.0000, 0) + N..... USE_TOOL_LENGTH_OFFSET(0.0000 0.0000 -4.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) + N..... MESSAGE("-4.000000") + N..... SET_G5X_OFFSET(1, 1.0000, 2.0000, -3.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(10.0000) + N..... SET_FEED_MODE(0, 0) + N..... SET_FEED_RATE(0.0000) + N..... STOP_SPINDLE_TURNING(0) + N..... SET_SPINDLE_MODE(0 0.0000) + N..... PROGRAM_END() + N..... ON_RESET() + N..... ON_RESET() diff --git a/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-l11/test.ngc b/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-l11/test.ngc new file mode 100644 index 0000000..e2cba9a --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-l11/test.ngc @@ -0,0 +1,41 @@ +g20 +g10 l2 p1 x1 y2 z-3 r10 +g10 l2 p2 x4 y5 z-6 r20 +g10 l2 p3 x7 y8 z-9 r30 +g10 l2 p4 x10 y11 z-12 r40 +g10 l2 p5 x13 y14 z-15 r50 +g10 l2 p6 x16 y17 z-18 r60 +g10 l2 p7 x19 y20 z-21 r70 +g10 l2 p8 x22 y23 z-24 r80 + +; touch off fixture: +g10 l2 p9 x25 y26 z-27 r0 + +g54 +g0 g53 z-30 +g10 l11 p1 z0 ; length should be -3 +t1 m6 +g43 +(debug,#5403) +g55 +g0 g53 z-30 +g10 l11 p1 z1 ; length should be -4 +g43 +(debug,#5403) + +g56 +g92 x33 y44 z55 ; add some g92 to all g5x: g92 shouldn't affect the tool touchoff fixture + +g54 +g0 g53 z-30 +g10 l11 p1 z0 ; ... so the length should still be -3 +t1 m6 +g43 +(debug,#5403) +g55 +g0 g53 z-30 +g10 l11 p1 z1 ; ... so the length should still be -4 +g43 +(debug,#5403) + +m2 diff --git a/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-l11/test.sh b/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-l11/test.sh new file mode 100755 index 0000000..52077f3 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-l11/test.sh @@ -0,0 +1,3 @@ +#!/bin/bash +rs274 -g test.ngc -t test.tbl | awk '{$1=""; print}' | sed 's/-0\.0000/0.0000/g' +exit "${PIPESTATUS[0]}" diff --git a/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-l11/test.tbl b/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-l11/test.tbl new file mode 100644 index 0000000..5ce3a2f --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-l11/test.tbl @@ -0,0 +1 @@ +T1 P1 X0 Y0 Z0 ; \ No newline at end of file diff --git a/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-l2-while-active/expected b/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-l2-while-active/expected new file mode 100644 index 0000000..08a1481 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-l2-while-active/expected @@ -0,0 +1,45 @@ + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SET_FEED_REFERENCE(CANON_XYZ) + N..... ON_RESET() + N..... COMMENT("interpreter: continuing to use same coordinate system") + N..... USE_LENGTH_UNITS(CANON_UNITS_INCHES) + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SET_FEED_RATE(60.0000) + N..... STRAIGHT_FEED(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... MESSAGE(" Should be 0 0: 0.000000 0.000000") + N..... SET_G5X_OFFSET(1, 1.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... MESSAGE(" Should be -1 0: -1.000000 0.000000") + N..... STRAIGHT_FEED(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... MESSAGE(" Should be 0 0: 0.000000 0.000000") + N..... SET_G5X_OFFSET(1, 1.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(-45.0000) + N..... MESSAGE(" Should be 0 0: 0.000000 0.000000") + N..... STRAIGHT_FEED(0.0000, 1.4142, 0.0000, 0.0000, 0.0000, 0.0000) + N..... MESSAGE(" Should be 0 1.414214: 0.000000 1.414214") + N..... SET_G5X_OFFSET(1, 2.0000, 1.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(90.0000) + N..... MESSAGE(" Should be 0 0: 0.000000 0.000000") + N..... STRAIGHT_FEED(0.0000, 3.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... MESSAGE(" Should be 0 3: 0.000000 3.000000") + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(90.0000) + N..... MESSAGE(" Should be 1 1: 1.000000 1.000000") + N..... STRAIGHT_FEED(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... MESSAGE(" Should be 0 0: 0.000000 0.000000") + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... MESSAGE(" Should be 0 0: 0.000000 0.000000") + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SET_FEED_MODE(0, 0) + N..... SET_FEED_RATE(0.0000) + N..... STOP_SPINDLE_TURNING(0) + N..... SET_SPINDLE_MODE(0 0.0000) + N..... PROGRAM_END() + N..... ON_RESET() + N..... ON_RESET() diff --git a/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-l2-while-active/test.ngc b/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-l2-while-active/test.ngc new file mode 100644 index 0000000..c713103 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-l2-while-active/test.ngc @@ -0,0 +1,24 @@ +g54 +g20 +g10 l2 p1 x0 y0 z0 r0 +g1 x0 y0 z0 f60 +(debug, Should be 0 0: #5420 #5421) +g10 l2 p1 x1 +(debug, Should be -1 0: #5420 #5421) +g1 x0 y0 z0 +(debug, Should be 0 0: #5420 #5421) +g10 l2 p1 r-45 +(debug, Should be 0 0: #5420 #5421) +g1 y sqrt[2] +(debug, Should be 0 1.414214: #5420 #5421) +g10 l2 p1 x2 y1 r90 +(debug, Should be 0 0: #5420 #5421) +g1 y3 +(debug, Should be 0 3: #5420 #5421) +g10 l2 p1 x0 y0 +(debug, Should be 1 1: #5420 #5421) +g1 x0 y0 +(debug, Should be 0 0: #5420 #5421) +g10 l2 p1 r0 +(debug, Should be 0 0: #5420 #5421) +m2 diff --git a/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-l2-while-active/test.sh b/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-l2-while-active/test.sh new file mode 100755 index 0000000..2afa80d --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-l2-while-active/test.sh @@ -0,0 +1,3 @@ +#!/bin/bash +rs274 -g test.ngc | awk '{$1=""; print}' +exit "${PIPESTATUS[0]}" diff --git a/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-l20-while-active/expected b/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-l20-while-active/expected new file mode 100644 index 0000000..0610a8c --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-l20-while-active/expected @@ -0,0 +1,40 @@ + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SET_FEED_REFERENCE(CANON_XYZ) + N..... ON_RESET() + N..... COMMENT("interpreter: continuing to use same coordinate system") + N..... USE_LENGTH_UNITS(CANON_UNITS_INCHES) + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(45.0000) + N..... STRAIGHT_TRAVERSE(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... MESSAGE(" Should be 0 0: 0.000000 0.000000") + N..... SET_G5X_OFFSET(1, 0.7071, 0.7071, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(45.0000) + N..... MESSAGE(" Should be -1 0: -1.000000 0.000000") + N..... SET_FEED_RATE(60.0000) + N..... STRAIGHT_FEED(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... MESSAGE(" Should be 0 0: 0.000000 0.000000") + N..... SET_G5X_OFFSET(1, 0.0000, 1.4142, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(45.0000) + N..... MESSAGE(" Should be 0 -1: 0.000000 -1.000000") + N..... STRAIGHT_FEED(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... MESSAGE(" Should be 0 0: 0.000000 0.000000") + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(45.0000) + N..... MESSAGE(" Should be 1 1: 1.000000 1.000000") + N..... STRAIGHT_FEED(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... MESSAGE(" Should be 0 0: 0.000000 0.000000") + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... MESSAGE(" Should be 0 0: 0.000000 0.000000") + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SET_FEED_MODE(0, 0) + N..... SET_FEED_RATE(0.0000) + N..... STOP_SPINDLE_TURNING(0) + N..... SET_SPINDLE_MODE(0 0.0000) + N..... PROGRAM_END() + N..... ON_RESET() + N..... ON_RESET() diff --git a/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-l20-while-active/test.ngc b/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-l20-while-active/test.ngc new file mode 100644 index 0000000..42f33d1 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-l20-while-active/test.ngc @@ -0,0 +1,20 @@ +g54 +g20 +g10 l2 p1 x0 y0 z0 r45 +g0 g53 x0 y0 z0 +(debug, Should be 0 0: #5420 #5421) +g10 l20 p1 x-1 +(debug, Should be -1 0: #5420 #5421) +g1 x0 f60 +(debug, Should be 0 0: #5420 #5421) +g10 l20 p1 y -1 +(debug, Should be 0 -1: #5420 #5421) +g1 y0 +(debug, Should be 0 0: #5420 #5421) +g10 l20 p1 x1 y1 +(debug, Should be 1 1: #5420 #5421) +g1 x0 y0 +(debug, Should be 0 0: #5420 #5421) +g10 l2 p1 r0 +(debug, Should be 0 0: #5420 #5421) +m2 diff --git a/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-l20-while-active/test.sh b/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-l20-while-active/test.sh new file mode 100755 index 0000000..65bddf5 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-l20-while-active/test.sh @@ -0,0 +1,3 @@ +#!/bin/bash +rs274 -g test.ngc | awk '{$1=""; print}' | sed 's/-0\.0000/0.0000/g' +exit "${PIPESTATUS[0]}" diff --git a/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-with-g92/expected b/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-with-g92/expected new file mode 100644 index 0000000..e087c89 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-with-g92/expected @@ -0,0 +1,127 @@ + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SET_FEED_REFERENCE(CANON_XYZ) + N..... ON_RESET() + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_G5X_OFFSET(1, 1.0000, 2.0000, 3.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(10.0000) + N..... COMMENT("interpreter: setting coordinate system origin") + N..... COMMENT("interpreter: setting coordinate system origin") + N..... COMMENT("interpreter: setting coordinate system origin") + N..... COMMENT("interpreter: setting coordinate system origin") + N..... COMMENT("interpreter: setting coordinate system origin") + N..... COMMENT("interpreter: setting coordinate system origin") + N..... COMMENT("interpreter: setting coordinate system origin") + N..... COMMENT("interpreter: setting coordinate system origin") + N..... COMMENT("interpreter: continuing to use same coordinate system") + N..... SET_G5X_OFFSET(2, 4.0000, 5.0000, 6.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(20.0000) + N..... SET_G5X_OFFSET(3, 7.0000, 8.0000, 9.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(30.0000) + N..... SET_G5X_OFFSET(4, 10.0000, 11.0000, 12.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(40.0000) + N..... SET_G5X_OFFSET(5, 13.0000, 14.0000, 15.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(50.0000) + N..... SET_G5X_OFFSET(6, 16.0000, 17.0000, 18.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(60.0000) + N..... SET_G5X_OFFSET(7, 19.0000, 20.0000, 21.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(70.0000) + N..... SET_G5X_OFFSET(8, 22.0000, 23.0000, 24.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(80.0000) + N..... SET_G5X_OFFSET(9, 25.0000, 26.0000, 27.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SET_G5X_OFFSET(1, 1.0000, 2.0000, 3.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(10.0000) + N..... STRAIGHT_TRAVERSE(0.0000, 0.0000, -10.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(-0.1000, -0.2000, -10.3000, 0.0000, 0.0000, 0.0000) + N..... MESSAGE(" X0.100000 Y0.200000 Z0.300000") + N..... SET_G5X_OFFSET(2, 4.0000, 5.0000, 6.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(-0.1000, -0.2000, -10.3000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(20.0000) + N..... MESSAGE(" X-3.745138 Y-1.593017 Z-2.700000") + N..... SET_G5X_OFFSET(3, 7.0000, 8.0000, 9.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(-0.1000, -0.2000, -10.3000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(30.0000) + N..... MESSAGE(" X-8.096152 Y-1.996152 Z-5.700000") + N..... SET_G5X_OFFSET(4, 10.0000, 11.0000, 12.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(-0.1000, -0.2000, -10.3000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(40.0000) + N..... MESSAGE(" X-12.579488 Y-0.909312 Z-8.700000") + N..... SET_G5X_OFFSET(5, 13.0000, 14.0000, 15.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(-0.1000, -0.2000, -10.3000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(50.0000) + N..... MESSAGE(" X-16.805985 Y1.679082 Z-11.700000") + N..... SET_G5X_OFFSET(6, 16.0000, 17.0000, 18.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(-0.1000, -0.2000, -10.3000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(60.0000) + N..... MESSAGE(" X-20.390381 Y5.690381 Z-14.700000") + N..... SET_G5X_OFFSET(7, 19.0000, 20.0000, 21.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(-0.1000, -0.2000, -10.3000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(70.0000) + N..... MESSAGE(" X-22.970830 Y10.958105 Z-17.700000") + N..... SET_G5X_OFFSET(8, 22.0000, 23.0000, 24.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(-0.1000, -0.2000, -10.3000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(80.0000) + N..... MESSAGE(" X-24.227575 Y17.234351 Z-20.700000") + N..... SET_G5X_OFFSET(9, 25.0000, 26.0000, 27.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(-0.1000, -0.2000, -10.3000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... MESSAGE(" X-23.900000 Y-23.800000 Z-23.700000") + N..... SET_G5X_OFFSET(1, 1.0000, 2.0000, 3.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(-0.1000, -0.2000, -10.3000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(10.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... MESSAGE(" X0.000000 Y0.000000 Z-10.000000") + N..... SET_G5X_OFFSET(2, 4.0000, 5.0000, 6.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(20.0000) + N..... MESSAGE(" X-3.845138 Y-1.793017 Z-13.000000") + N..... SET_G5X_OFFSET(3, 7.0000, 8.0000, 9.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(30.0000) + N..... MESSAGE(" X-8.196152 Y-2.196152 Z-16.000000") + N..... SET_G5X_OFFSET(4, 10.0000, 11.0000, 12.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(40.0000) + N..... MESSAGE(" X-12.679488 Y-1.109312 Z-19.000000") + N..... SET_G5X_OFFSET(5, 13.0000, 14.0000, 15.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(50.0000) + N..... MESSAGE(" X-16.905985 Y1.479082 Z-22.000000") + N..... SET_G5X_OFFSET(6, 16.0000, 17.0000, 18.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(60.0000) + N..... MESSAGE(" X-20.490381 Y5.490381 Z-25.000000") + N..... SET_G5X_OFFSET(7, 19.0000, 20.0000, 21.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(70.0000) + N..... MESSAGE(" X-23.070830 Y10.758105 Z-28.000000") + N..... SET_G5X_OFFSET(8, 22.0000, 23.0000, 24.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(80.0000) + N..... MESSAGE(" X-24.327575 Y17.034351 Z-31.000000") + N..... SET_G5X_OFFSET(9, 25.0000, 26.0000, 27.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... MESSAGE(" X-24.000000 Y-24.000000 Z-34.000000") + N..... SET_G5X_OFFSET(1, 1.0000, 2.0000, 3.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(10.0000) + N..... SET_FEED_MODE(0, 0) + N..... SET_FEED_RATE(0.0000) + N..... STOP_SPINDLE_TURNING(0) + N..... SET_SPINDLE_MODE(0 0.0000) + N..... PROGRAM_END() + N..... ON_RESET() + N..... ON_RESET() diff --git a/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-with-g92/test.ngc b/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-with-g92/test.ngc new file mode 100644 index 0000000..6f0f84c --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-with-g92/test.ngc @@ -0,0 +1,61 @@ +g92.1 +g21 +g10 l2 p1 x1 y2 z3 r10 +g10 l2 p2 x4 y5 z6 r20 +g10 l2 p3 x7 y8 z9 r30 +g10 l2 p4 x10 y11 z12 r40 +g10 l2 p5 x13 y14 z15 r50 +g10 l2 p6 x16 y17 z18 r60 +g10 l2 p7 x19 y20 z21 r70 +g10 l2 p8 x22 y23 z24 r80 +g10 l2 p9 x25 y26 z27 r0 +g54 +g55 +g56 +g57 +g58 +g59 +g59.1 +g59.2 +g59.3 +g54 +g0 x0 y0 z-10 +g92 x.1 y.2 z.3 +(debug, X#5420 Y#5421 Z#5422) +g55 +(debug, X#5420 Y#5421 Z#5422) +g56 +(debug, X#5420 Y#5421 Z#5422) +g57 +(debug, X#5420 Y#5421 Z#5422) +g58 +(debug, X#5420 Y#5421 Z#5422) +g59 +(debug, X#5420 Y#5421 Z#5422) +g59.1 +(debug, X#5420 Y#5421 Z#5422) +g59.2 +(debug, X#5420 Y#5421 Z#5422) +g59.3 +(debug, X#5420 Y#5421 Z#5422) + +g54 +g92.1 +(debug, X#5420 Y#5421 Z#5422) +g55 +(debug, X#5420 Y#5421 Z#5422) +g56 +(debug, X#5420 Y#5421 Z#5422) +g57 +(debug, X#5420 Y#5421 Z#5422) +g58 +(debug, X#5420 Y#5421 Z#5422) +g59 +(debug, X#5420 Y#5421 Z#5422) +g59.1 +(debug, X#5420 Y#5421 Z#5422) +g59.2 +(debug, X#5420 Y#5421 Z#5422) +g59.3 +(debug, X#5420 Y#5421 Z#5422) +m2 diff --git a/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-with-g92/test.sh b/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-with-g92/test.sh new file mode 100755 index 0000000..69ec8be --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-with-g92/test.sh @@ -0,0 +1,3 @@ +#!/bin/bash +rs274 -g test.ngc -t test.tbl | awk '{$1=""; print}' +exit "${PIPESTATUS[0]}" diff --git a/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-with-g92/test.tbl b/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-with-g92/test.tbl new file mode 100644 index 0000000..36b4d8f --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/g10/g10-with-g92/test.tbl @@ -0,0 +1 @@ +t1 p1 x0 y0 z0 diff --git a/wasm-port/vendor/linuxcnc/tests/interp/g52/g52-g92-interaction/expected b/wasm-port/vendor/linuxcnc/tests/interp/g52/g52-g92-interaction/expected new file mode 100644 index 0000000..0b4999c --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/g52/g52-g92-interaction/expected @@ -0,0 +1,44 @@ + 1 N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + 2 N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + 3 N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + 4 N..... SET_XY_ROTATION(0.0000) + 5 N..... SET_FEED_REFERENCE(CANON_XYZ) + 6 N..... ON_RESET() + 7 N..... COMMENT("G52 and G92 param #5210 setting behavior") + 8 N..... USE_LENGTH_UNITS(CANON_UNITS_INCHES) +Program start: Params all 0 +G92 params: 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +G92: Set current position to X1 Y2 + 9 N..... SET_G92_OFFSET(-1.0000, -2.0000, 0.0000, 0.0000, 0.0000, 0.0000) +G92 params: 1.000000 -1.000000 -2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +G92.2: Reset G92 + 10 N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) +G92 params: 0.000000 -1.000000 -2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +G92.3: Restore G92 + 11 N..... SET_G92_OFFSET(-1.0000, -2.0000, 0.0000, 0.0000, 0.0000, 0.0000) +G92 params: 1.000000 -1.000000 -2.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +G92.1: Clear G92 + 12 N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) +G92 params: 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +G52: Set origin at X2 Y3 + 13 N..... SET_G92_OFFSET(2.0000, 3.0000, 0.0000, 0.0000, 0.0000, 0.0000) +G92 params: 1.000000 2.000000 3.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +G92.2: Reset G92 + 14 N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) +G92 params: 0.000000 2.000000 3.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +G92.3: Restore G92 + 15 N..... SET_G92_OFFSET(2.0000, 3.0000, 0.0000, 0.0000, 0.0000, 0.0000) +G92 params: 1.000000 2.000000 3.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 +G52 X0 Y0: Zero G92, but leave param 5210 set + 16 N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) +G92 params: 1.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 + 17 N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + 18 N..... SET_XY_ROTATION(0.0000) + 19 N..... SET_FEED_MODE(0, 0) + 20 N..... SET_FEED_RATE(0.0000) + 21 N..... STOP_SPINDLE_TURNING(0) + 22 N..... SET_SPINDLE_MODE(0 0.0000) + 23 N..... PALLET_SHUTTLE() + 24 N..... PROGRAM_END() + 25 N..... ON_RESET() + 26 N..... ON_RESET() diff --git a/wasm-port/vendor/linuxcnc/tests/interp/g52/g52-g92-interaction/g52-g92-interaction.ngc b/wasm-port/vendor/linuxcnc/tests/interp/g52/g52-g92-interaction/g52-g92-interaction.ngc new file mode 100644 index 0000000..f07a387 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/g52/g52-g92-interaction/g52-g92-interaction.ngc @@ -0,0 +1,39 @@ +(G52 and G92 param #5210 setting behavior) +G20 ; use inches for readability + +(PRINT,Program start: Params all 0) +(PRINT,G92 params: #5210 #5211 #5212 #5213 #5214 #5215 #5216 #5217 #5218 #5219) + +(PRINT,G92: Set current position to X1 Y2) +G92 X1 Y2 +(PRINT,G92 params: #5210 #5211 #5212 #5213 #5214 #5215 #5216 #5217 #5218 #5219) + +(PRINT,G92.2: Reset G92) +G92.2 +(PRINT,G92 params: #5210 #5211 #5212 #5213 #5214 #5215 #5216 #5217 #5218 #5219) + +(PRINT,G92.3: Restore G92) +G92.3 +(PRINT,G92 params: #5210 #5211 #5212 #5213 #5214 #5215 #5216 #5217 #5218 #5219) + +(PRINT,G92.1: Clear G92) +G92.1 +(PRINT,G92 params: #5210 #5211 #5212 #5213 #5214 #5215 #5216 #5217 #5218 #5219) + +(PRINT,G52: Set origin at X2 Y3) +G52 X2 Y3 +(PRINT,G92 params: #5210 #5211 #5212 #5213 #5214 #5215 #5216 #5217 #5218 #5219) + +(PRINT,G92.2: Reset G92) +G92.2 +(PRINT,G92 params: #5210 #5211 #5212 #5213 #5214 #5215 #5216 #5217 #5218 #5219) + +(PRINT,G92.3: Restore G92) +G92.3 +(PRINT,G92 params: #5210 #5211 #5212 #5213 #5214 #5215 #5216 #5217 #5218 #5219) + +(PRINT,G52 X0 Y0: Zero G92, but leave param 5210 set) +G52 X0 Y0 +(PRINT,G92 params: #5210 #5211 #5212 #5213 #5214 #5215 #5216 #5217 #5218 #5219) + +M30 diff --git a/wasm-port/vendor/linuxcnc/tests/interp/g52/g52-g92-interaction/test.sh b/wasm-port/vendor/linuxcnc/tests/interp/g52/g52-g92-interaction/test.sh new file mode 100644 index 0000000..e022110 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/g52/g52-g92-interaction/test.sh @@ -0,0 +1,3 @@ +#!/bin/bash +rs274 -g g52-g92-interaction.ngc + diff --git a/wasm-port/vendor/linuxcnc/tests/interp/g71-endless-loop/expected b/wasm-port/vendor/linuxcnc/tests/interp/g71-endless-loop/expected new file mode 100644 index 0000000..e741776 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/g71-endless-loop/expected @@ -0,0 +1,168 @@ + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SET_FEED_REFERENCE(CANON_XYZ) + N..... ON_RESET() + N..... COMMENT("G21 metric, G54 coordinate system 1, G18 ZX plane, G54 coordinate system") + N..... SELECT_PLANE(CANON_PLANE_XZ) + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... COMMENT("interpreter: continuing to use same coordinate system") + N..... COMMENT("G49 cancel tool length offset") + N..... USE_TOOL_LENGTH_OFFSET(0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) + N..... COMMENT("G90 abs dist mode, G92.1 Reset coord sys offset") + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("G94 Feed Mode=Units per Minute, G64p Best Possible Speed p=Motion Blend Tolerance") + N..... COMMENT("interpreter: feed mode set to units per minute") + N..... SET_FEED_MODE(0, 0) + N..... SET_FEED_RATE(0.0000) + N..... SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, 0.001000) + N..... SET_NAIVECAM_TOLERANCE(0.0010) + N..... COMMENT("Diameter Mode = 7, Radius Mode = 8") + N..... COMMENT("G91.1 = Relative Arc Offset Distance") + N..... SET_FEED_RATE(225.0000) + N..... STRAIGHT_TRAVERSE(15.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(15.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(15.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(15.0000, 0.0000, -21.9600, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(16.0000, 0.0000, -20.9600, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(16.0000, 0.0000, -1.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(15.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(14.5000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(14.5000, 0.0000, -21.9600, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(15.5000, 0.0000, -20.9600, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(15.5000, 0.0000, -1.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(14.5000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(14.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(14.0000, 0.0000, -21.9600, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(15.0000, 0.0000, -20.9600, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(15.0000, 0.0000, -1.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(14.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(13.5000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(13.5000, 0.0000, -21.9600, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(14.5000, 0.0000, -20.9600, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(14.5000, 0.0000, -1.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(13.5000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(13.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(13.0000, 0.0000, -21.9600, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(14.0000, 0.0000, -20.9600, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(14.0000, 0.0000, -1.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(13.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(12.5000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(12.5000, 0.0000, -21.9600, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(13.5000, 0.0000, -20.9600, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(13.5000, 0.0000, -1.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(12.5000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(12.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(12.0000, 0.0000, -21.9600, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(13.0000, 0.0000, -20.9600, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(13.0000, 0.0000, -1.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(12.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(11.5000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(11.5000, 0.0000, -21.9600, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(12.5000, 0.0000, -20.9600, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(12.5000, 0.0000, -1.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(11.5000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(11.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(11.0000, 0.0000, -21.9600, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(12.0000, 0.0000, -20.9600, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(12.0000, 0.0000, -1.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(11.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(10.5000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(10.5000, 0.0000, -21.9600, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(11.5000, 0.0000, -20.9600, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(11.5000, 0.0000, -1.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(10.5000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(10.0400, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(10.0400, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(10.0400, 0.0000, -14.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(10.0400, 0.0000, -14.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(10.0400, 0.0000, -21.9600, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(15.0000, 0.0000, -21.9600, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(15.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(15.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(10.0400, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(10.0400, 0.0000, -14.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(10.0400, 0.0000, -21.9600, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(11.0400, 0.0000, -20.9600, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(11.0400, 0.0000, -15.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(10.0400, 0.0000, -14.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-14.0400, 10.0000, -14.0000, 10.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(9.5400, 0.0000, -14.0400, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(9.5400, 0.0000, -21.9600, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(10.5400, 0.0000, -20.9600, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(10.5400, 0.0000, -15.0400, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(9.5400, 0.0000, -14.0400, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(9.0400, 0.0000, -14.0400, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(9.0400, 0.0000, -21.9600, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(10.0400, 0.0000, -20.9600, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(10.0400, 0.0000, -15.0400, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(9.0400, 0.0000, -14.0400, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(8.5400, 0.0000, -14.0400, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(8.5400, 0.0000, -21.9600, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(9.5400, 0.0000, -20.9600, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(9.5400, 0.0000, -15.0400, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(8.5400, 0.0000, -14.0400, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(8.0400, 0.0000, -14.0400, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(8.0400, 0.0000, -21.9600, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(9.0400, 0.0000, -20.9600, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(9.0400, 0.0000, -15.0400, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(8.0400, 0.0000, -14.0400, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(7.5400, 0.0000, -14.0400, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(7.5400, 0.0000, -21.9600, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(8.5400, 0.0000, -20.9600, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(8.5400, 0.0000, -15.0400, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(7.5400, 0.0000, -14.0400, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(7.0400, 0.0000, -14.0400, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(7.0400, 0.0000, -21.9600, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(8.0400, 0.0000, -20.9600, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(8.0400, 0.0000, -15.0400, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(7.0400, 0.0000, -14.0400, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(6.5400, 0.0000, -14.0400, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(6.5400, 0.0000, -20.9906, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(7.5400, 0.0000, -19.9906, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(7.5400, 0.0000, -15.0400, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(6.5400, 0.0000, -14.0400, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(6.0400, 0.0000, -14.0400, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(6.0400, 0.0000, -19.9906, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(7.0400, 0.0000, -18.9906, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(7.0400, 0.0000, -15.0400, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(6.0400, 0.0000, -14.0400, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(5.5400, 0.0000, -14.0400, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(5.5400, 0.0000, -18.9906, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(6.5400, 0.0000, -17.9906, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(6.5400, 0.0000, -15.0400, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(5.5400, 0.0000, -14.0400, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(5.0400, 0.0000, -14.0400, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(5.0400, 0.0000, -17.9906, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(6.0400, 0.0000, -16.9906, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(6.0400, 0.0000, -15.0400, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(5.0400, 0.0000, -14.0400, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(4.5400, 0.0000, -14.0400, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(4.5400, 0.0000, -16.9906, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(5.5400, 0.0000, -15.9906, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(5.5400, 0.0000, -15.0400, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(4.5400, 0.0000, -14.0400, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(4.0400, 0.0000, -14.0400, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(4.0400, 0.0000, -15.9906, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(5.0153, 0.0000, -15.0153, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(5.0153, 0.0000, -15.0153, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(4.0400, 0.0000, -14.0400, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(3.5400, 0.0000, -14.0400, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(3.5400, 0.0000, -14.9906, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(4.0153, 0.0000, -14.5153, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(4.0153, 0.0000, -14.5153, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(3.5400, 0.0000, -14.0400, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(3.0647, 0.0000, -14.0400, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(7.0247, 0.0000, -21.9600, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(15.0000, 0.0000, -21.9600, 0.0000, 0.0000, 0.0000) + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SELECT_PLANE(CANON_PLANE_XY) + N..... SET_FEED_MODE(0, 0) + N..... SET_FEED_RATE(0.0000) + N..... STOP_SPINDLE_TURNING(0) + N..... SET_SPINDLE_MODE(0 0.0000) + N..... PROGRAM_END() + N..... ON_RESET() + N..... ON_RESET() diff --git a/wasm-port/vendor/linuxcnc/tests/interp/g71-endless-loop/g71-endless-loop.ngc b/wasm-port/vendor/linuxcnc/tests/interp/g71-endless-loop/g71-endless-loop.ngc new file mode 100644 index 0000000..d0e5756 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/g71-endless-loop/g71-endless-loop.ngc @@ -0,0 +1,19 @@ +G21 G18 G54 (G21 metric, G54 coordinate system 1, G18 ZX plane, G54 coordinate system) +G49 (G49 cancel tool length offset) +G90 G92.1 (G90 abs dist mode, G92.1 Reset coord sys offset) +G94 G64 p0.001 (G94 Feed Mode=Units per Minute, G64p Best Possible Speed p=Motion Blend Tolerance) +G8 (Diameter Mode = 7, Radius Mode = 8) +G91.1 (G91.1 = Relative Arc Offset Distance) + +O200 SUB +;Change the next line from G01 X10 Z0 to G01 X5 Z0 and Axis works fine but this isn't the part profile I need. +G01 X10 Z0 +G01 X10 Z-14 +G01 X3 +G01 X7 Z-22 +O200 ENDSUB + +F225 +G71.1 Q200 X15.0 Z0 D0.04 I0.5 R1 +G71.2 Q200 X15.0 Z0 D0.04 I0.5 R1 +M2 diff --git a/wasm-port/vendor/linuxcnc/tests/interp/g71-endless-loop/test.sh b/wasm-port/vendor/linuxcnc/tests/interp/g71-endless-loop/test.sh new file mode 100755 index 0000000..315f994 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/g71-endless-loop/test.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# +# Demonstrate endless loop when encountering incorrect parameters in +# G71 call. Note, the expected output is not verified. No idea what +# it should look like on a successful termination of this endless +# loop. + +rs274 -g g71-endless-loop.ngc | awk '{$1=""; print}' > result & +pid=$! + +# Give it 10 seconds to complete +count=10 +while [ 0 -lt $count ] && kill -0 $pid > /dev/null 2>&1 ; do + sleep 1 + count=$((count - 1)) +done + +if kill -0 $pid > /dev/null 2>&1; then + kill -9 $pid + echo "E: g71-endless-loop.ngc program seem to be stuck, killing" + exit 1 +fi + +exit 0 diff --git a/wasm-port/vendor/linuxcnc/tests/interp/g71-endless-loop2/expected b/wasm-port/vendor/linuxcnc/tests/interp/g71-endless-loop2/expected new file mode 100644 index 0000000..2091e5f --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/g71-endless-loop2/expected @@ -0,0 +1,31 @@ + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SET_FEED_REFERENCE(CANON_XYZ) + N..... ON_RESET() + N..... COMMENT("interpreter: feed mode set to units per revolution") + N..... SET_FEED_MODE(0, 1) + N..... SET_FEED_RATE(0.0000) + N..... SELECT_PLANE(CANON_PLANE_XZ) + N..... SET_SPINDLE_MODE(0 700.0000) + N..... SET_SPINDLE_SPEED(0, 250.0000) + N..... START_SPINDLE_CLOCKWISE(0) + N..... SET_FEED_RATE(0.2400) + N..... STRAIGHT_TRAVERSE(168.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(168.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(168.0000, 0.0000, -333.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(170.0000, 0.0000, -333.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(170.0000, 0.0000, -415.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(300.0000, 0.0000, 10.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SELECT_PLANE(CANON_PLANE_XY) + N..... SET_FEED_MODE(0, 0) + N..... SET_FEED_RATE(0.0000) + N..... STOP_SPINDLE_TURNING(0) + N..... SET_SPINDLE_MODE(0 0.0000) + N..... PALLET_SHUTTLE() + N..... PROGRAM_END() + N..... ON_RESET() + N..... ON_RESET() diff --git a/wasm-port/vendor/linuxcnc/tests/interp/g71-endless-loop2/g71-endless-loop2.ngc b/wasm-port/vendor/linuxcnc/tests/interp/g71-endless-loop2/g71-endless-loop2.ngc new file mode 100644 index 0000000..3d0be1f --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/g71-endless-loop2/g71-endless-loop2.ngc @@ -0,0 +1,12 @@ +G18G95 +G96 M3 S250 D700 + +O2 SUB +Z-333 +G1 X170 +Z-415 +O2 ENDSUB +G71 Q2 X168 Z0 F.24 + +G0 X300 Z10 +M30 diff --git a/wasm-port/vendor/linuxcnc/tests/interp/g71-endless-loop2/test.sh b/wasm-port/vendor/linuxcnc/tests/interp/g71-endless-loop2/test.sh new file mode 100755 index 0000000..32a511b --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/g71-endless-loop2/test.sh @@ -0,0 +1,26 @@ +#!/bin/bash +set -e + +# Demonstrate endless loop when an additional segment is added in the G71 call. +# This is a subset of a file that was supplied in +# https://github.com/LinuxCNC/linuxcnc/issues/2844 and which worked up to and +# including 2.9.1~pre1. It entered an endless loop after +# https://github.com/LinuxCNC/linuxcnc/pull/2677 + +rs274 -g g71-endless-loop2.ngc | awk '{$1=""; print}' > result & +pid=$! + +# Give it 5 seconds to complete +count=5 +while [ 0 -lt $count ] && kill -0 $pid > /dev/null 2>&1 ; do + sleep 1 + count=$((count - 1)) +done + +if kill -0 $pid > /dev/null 2>&1; then + kill -9 $pid + echo "error: g71-endless-loop2.ngc program seem to be stuck, killing" + exit 1 +fi + +exit 0 diff --git a/wasm-port/vendor/linuxcnc/tests/interp/g71-endless-loop_2/expected b/wasm-port/vendor/linuxcnc/tests/interp/g71-endless-loop_2/expected new file mode 100644 index 0000000..6c42f3a --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/g71-endless-loop_2/expected @@ -0,0 +1,53 @@ + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SET_FEED_REFERENCE(CANON_XYZ) + N..... ON_RESET() + N..... COMMENT("interpreter: continuing to use same coordinate system") + N..... COMMENT("interpreter: Lathe diameter mode changed to diameter") + N..... SELECT_PLANE(CANON_PLANE_XZ) + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_SPINDLE_MODE(0 1400.0000) + N..... SET_SPINDLE_SPEED(0, 200.0000) + N..... START_SPINDLE_CLOCKWISE(0) + N..... COMMENT("interpreter: feed mode set to units per revolution") + N..... SET_FEED_MODE(0, 1) + N..... SET_FEED_RATE(0.0000) + N..... SET_FEED_RATE(0.1200) + N..... SET_G92_OFFSET(0.0000, 0.0000, -1.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(10.0000, 0.0000, 2.8000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(10.0000, 0.0000, 2.8000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(11.3630, 0.0000, 2.8000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(11.3630, 0.0000, 0.8229, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-0.5000, 11.8630, -0.5000, 9.8630, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(11.8630, 0.0000, -4.0318, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-5.0000, 12.1130, -5.0000, 10.1130, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(12.1130, 0.0000, -25.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-27.0000, 10.1130, -25.0000, 10.1130, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(10.0000, 0.0000, -27.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on right") + N..... STRAIGHT_TRAVERSE(10.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(10.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(9.3630, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(9.3630, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(9.8630, 0.0000, -0.5000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(9.8630, 0.0000, -5.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(10.1130, 0.0000, -5.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(10.1130, 0.0000, -25.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(10.0000, 0.0000, -25.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... MIST_OFF() + N..... FLOOD_OFF() + N..... STRAIGHT_TRAVERSE(12.5000, 0.0000, -25.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SELECT_PLANE(CANON_PLANE_XY) + N..... SET_FEED_MODE(0, 0) + N..... SET_FEED_RATE(0.0000) + N..... STOP_SPINDLE_TURNING(0) + N..... SET_SPINDLE_MODE(0 0.0000) + N..... PROGRAM_END() + N..... ON_RESET() + N..... ON_RESET() diff --git a/wasm-port/vendor/linuxcnc/tests/interp/g71-endless-loop_2/g71-endless-loop_2.ngc b/wasm-port/vendor/linuxcnc/tests/interp/g71-endless-loop_2/g71-endless-loop_2.ngc new file mode 100644 index 0000000..3d72892 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/g71-endless-loop_2/g71-endless-loop_2.ngc @@ -0,0 +1,40 @@ +#<_initial>=20 +#<_final>=19.726 +#<_champher>=0.5 +#<_zmax>=0 +#<_zmin>=-25 +#=2 + +G54 +G7 +G18 +G21 + +o100 sub + o101 if [#<_champher> gt 0] + G1 X[#<_final>-2.0001*#<_champher>] + Z#<_zmax> + X#<_final>C#<_champher> + o101 else + X#<_final> + o101 endif + W-5 + U0.5 + Z#<_zmin> + X#<_initial> +o100 endsub + +M3 G96 S200 d1400 +G95 F0.12 +G52 z[0.1-#] +;m7 +G71 Q100 Z[#<_zmax>+0.8+#] X#<_initial> D# I# R0.3 +G52 z0 +;m7 +g42 +G70 Q100 Z[#<_zmax>+1] X#<_initial> D# P1 +g40 +M9 +G0X[#<_initial>+5] + +M2 diff --git a/wasm-port/vendor/linuxcnc/tests/interp/g71-endless-loop_2/test.sh b/wasm-port/vendor/linuxcnc/tests/interp/g71-endless-loop_2/test.sh new file mode 100755 index 0000000..bca4e98 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/g71-endless-loop_2/test.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# +# Demonstrate endless loop when encountering incorrect parameters in +# G71 call. Note, the expected output is not verified. No idea what +# it should look like on a successful termination of this endless +# loop. + +rs274 -g g71-endless-loop_2.ngc | awk '{$1=""; print}' > result & +pid=$! + +# Give it 10 seconds to complete +count=10 +while [ 0 -lt $count ] && kill -0 $pid > /dev/null 2>&1 ; do + sleep 1 + count=$(($count - 1)) +done + +if kill -0 $pid > /dev/null 2>&1; then + kill -9 $pid + echo "error: g71-endless-loop.ngc program seem to be stuck, killing" + exit 1 +fi + +exit 0 diff --git a/wasm-port/vendor/linuxcnc/tests/interp/g71-with-g70/expected b/wasm-port/vendor/linuxcnc/tests/interp/g71-with-g70/expected new file mode 100644 index 0000000..0057c48 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/g71-with-g70/expected @@ -0,0 +1,259 @@ + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SET_FEED_REFERENCE(CANON_XYZ) + N..... ON_RESET() + N..... SELECT_PLANE(CANON_PLANE_XZ) + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... COMMENT("interpreter: continuing to use same coordinate system") + N..... SET_FEED_RATE(400.0000) + N..... STRAIGHT_TRAVERSE(15.0000, 0.0000, 3.0410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(15.0000, 0.0000, 3.0410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(15.0000, 0.0000, 3.0410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(15.0000, 0.0000, -37.1000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(15.3000, 0.0000, -36.8000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(15.3000, 0.0000, 2.7410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(15.0000, 0.0000, 3.0410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(14.0000, 0.0000, 3.0410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(14.0000, 0.0000, -37.1000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(14.3000, 0.0000, -36.8000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(14.3000, 0.0000, 2.7410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(14.0000, 0.0000, 3.0410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(13.0000, 0.0000, 3.0410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(13.0000, 0.0000, -36.1000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(13.3000, 0.0000, -35.8000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(13.3000, 0.0000, 2.7410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(13.0000, 0.0000, 3.0410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(12.0000, 0.0000, 3.0410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(12.0000, 0.0000, -34.6757, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(12.3000, 0.0000, -34.3757, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(12.3000, 0.0000, 2.7410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(12.0000, 0.0000, 3.0410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(11.0000, 0.0000, 3.0410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(11.0000, 0.0000, -25.1780, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(11.3000, 0.0000, -24.8780, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(11.3000, 0.0000, 2.7410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(11.0000, 0.0000, 3.0410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(10.0000, 0.0000, 3.0410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(10.0000, 0.0000, -19.0331, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(10.3000, 0.0000, -18.7331, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(10.3000, 0.0000, 2.7410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(10.0000, 0.0000, 3.0410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(9.0000, 0.0000, 3.0410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(9.0000, 0.0000, -18.9820, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(9.3000, 0.0000, -18.6820, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(9.3000, 0.0000, 2.7410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(9.0000, 0.0000, 3.0410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(8.0000, 0.0000, 3.0410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(8.0000, 0.0000, -11.2320, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(8.3000, 0.0000, -10.9320, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(8.3000, 0.0000, 2.7410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(8.0000, 0.0000, 3.0410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(7.0000, 0.0000, 3.0410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(7.0000, 0.0000, -8.7825, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(7.3000, 0.0000, -8.4825, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(7.3000, 0.0000, 2.7410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(7.0000, 0.0000, 3.0410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(6.0000, 0.0000, 3.0410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(6.0000, 0.0000, -8.0697, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(6.3000, 0.0000, -7.7697, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(6.3000, 0.0000, 2.7410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(6.0000, 0.0000, 3.0410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(5.0000, 0.0000, 3.0410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(5.0000, 0.0000, -7.7679, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(5.3000, 0.0000, -7.4679, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(5.3000, 0.0000, 2.7410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(5.0000, 0.0000, 3.0410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(4.0000, 0.0000, 3.0410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(4.0000, 0.0000, -1.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(4.3000, 0.0000, -0.7000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(4.3000, 0.0000, 2.7410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(4.0000, 0.0000, 3.0410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(3.0000, 0.0000, 3.0410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(3.0000, 0.0000, 0.4142, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(3.3000, 0.0000, 0.7142, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(3.3000, 0.0000, 2.7410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(3.0000, 0.0000, 3.0410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(2.0000, 0.0000, 3.0410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(2.0000, 0.0000, 1.4142, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(2.3000, 0.0000, 1.7142, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(2.3000, 0.0000, 2.7410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(2.0000, 0.0000, 3.0410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(1.2020, 0.0000, 3.0410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(1.2020, 0.0000, 3.0410, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(1.6266, 1.7876, 3.0410, 3.2020, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(1.7876, 0.0000, 1.6266, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(3.7071, 0.0000, -0.2929, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(3.7071, 0.0000, -0.2929, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-1.0000, 4.0000, -1.0000, 3.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(4.0000, 0.0000, -1.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(4.0000, 0.0000, -4.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(4.0000, 0.0000, -4.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(4.0000, 0.0000, -7.7320, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(4.0000, 0.0000, -7.7320, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(4.5000, 0.0000, -7.7320, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(4.5000, 0.0000, -7.7320, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-11.2320, 8.0000, -11.2320, 4.5000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(8.0000, 0.0000, -18.9820, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(9.6536, 0.0000, -18.9820, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(9.6536, 0.0000, -18.9820, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-20.1820, 10.8536, -20.1820, 9.6536, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(10.8536, 0.0000, -24.6565, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(10.8660, 0.0000, -24.6780, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(10.8660, 0.0000, -24.6780, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-25.1780, 11.0000, -25.1780, 10.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(11.0000, 0.0000, -27.1780, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(11.0000, 0.0000, -33.4884, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-34.3983, 11.7265, -30.4731, 15.7073, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(11.7265, 0.0000, -34.3983, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(12.7121, 0.0000, -35.3979, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(12.7121, 0.0000, -35.3979, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-36.1000, 13.0000, -36.1000, 12.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(13.0000, 0.0000, -36.1000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(13.0000, 0.0000, -37.1000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(13.0000, 0.0000, -37.1000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(15.0000, 0.0000, -37.1000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(15.0000, 0.0000, 3.0410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(15.0000, 0.0000, 3.0410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.7120, 0.0000, 3.0410, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(1.2801, 1.4411, 3.0410, 3.2020, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(3.3606, 0.0000, -0.6394, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-1.0000, 3.5100, -1.0000, 3.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(3.5100, 0.0000, -4.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(3.5100, 0.0000, -8.1391, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(3.8100, 0.0000, -7.8391, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(3.8100, 0.0000, -4.3000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(3.5100, 0.0000, -4.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-4.2550, 3.4417, -4.0000, 3.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(3.0100, 0.0000, -5.0028, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(3.0100, 0.0000, -7.8456, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(3.3100, 0.0000, -7.5456, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(3.3100, 0.0000, -5.3028, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(3.0100, 0.0000, -5.0028, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(2.7158, 0.0000, -5.5124, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-6.2680, 2.5100, -6.2680, 4.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(2.5100, 0.0000, -6.7320, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-8.2220, 4.0000, -6.7320, 4.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(4.5000, 0.0000, -8.2220, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-11.2320, 7.5100, -11.2320, 4.5000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(7.5100, 0.0000, -19.4720, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(7.8100, 0.0000, -19.1720, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(7.8100, 0.0000, -11.5320, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(7.5100, 0.0000, -11.2320, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-12.8933, 7.0100, -11.2320, 4.5000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(7.0100, 0.0000, -19.4720, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(7.3100, 0.0000, -19.1720, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(7.3100, 0.0000, -13.1933, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(7.0100, 0.0000, -12.8933, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-13.3173, 6.6706, -11.2320, 4.5000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-13.4876, 6.5100, -16.4820, 9.8557, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(6.5100, 0.0000, -19.4720, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(6.8100, 0.0000, -19.1720, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(6.8100, 0.0000, -13.7876, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(6.5100, 0.0000, -13.4876, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-14.1645, 6.0100, -16.4820, 9.8557, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(6.0100, 0.0000, -18.7995, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(6.3100, 0.0000, -18.4995, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(6.3100, 0.0000, -14.4645, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(6.0100, 0.0000, -14.1645, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-15.3529, 5.5100, -16.4820, 9.8557, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(5.5100, 0.0000, -17.6111, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(5.8100, 0.0000, -17.3111, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(5.8100, 0.0000, -15.6529, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(5.5100, 0.0000, -15.3529, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-19.4720, 6.5061, -16.4820, 9.8557, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(9.6536, 0.0000, -19.4720, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-20.1820, 10.3636, -20.1820, 9.6536, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(10.3636, 0.0000, -24.7878, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(10.6636, 0.0000, -24.4878, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(10.6636, 0.0000, -20.4820, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(10.3636, 0.0000, -20.1820, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-20.5370, 10.2685, -20.1820, 9.6536, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(9.8636, 0.0000, -21.2382, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(9.8636, 0.0000, -23.9218, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(10.1636, 0.0000, -23.6218, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(10.1636, 0.0000, -21.5382, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(9.8636, 0.0000, -21.2382, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(9.3636, 0.0000, -22.1042, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(9.3636, 0.0000, -23.0558, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(9.6636, 0.0000, -22.7558, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(9.6636, 0.0000, -22.4042, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(9.3636, 0.0000, -22.1042, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(9.0889, 0.0000, -22.5800, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(10.4417, 0.0000, -24.9230, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-25.1780, 10.5100, -25.1780, 10.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(10.5100, 0.0000, -27.1780, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(10.5100, 0.0000, -33.6287, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(10.8100, 0.0000, -33.3287, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(10.8100, 0.0000, -27.4780, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(10.5100, 0.0000, -27.1780, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-27.4330, 10.4417, -27.1780, 10.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-28.3495, 10.0100, -30.4731, 15.7073, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(10.0100, 0.0000, -32.5968, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(10.3100, 0.0000, -32.2968, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(10.3100, 0.0000, -28.6495, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(10.0100, 0.0000, -28.3495, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-34.7423, 11.3775, -30.4731, 15.7073, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(12.3632, 0.0000, -35.7419, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-36.1000, 12.5100, -36.1000, 12.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(12.5100, 0.0000, -37.5900, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(15.0000, 0.0000, -37.5900, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(15.0000, 0.0000, 3.0410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(15.0000, 0.0000, 3.0410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.4520, 0.0000, 3.0410, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(1.0963, 1.2573, 3.0410, 3.2020, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(3.1768, 0.0000, -0.8232, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-1.0000, 3.2500, -1.0000, 3.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(3.2500, 0.0000, -4.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-4.1250, 3.2165, -4.0000, 3.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(2.4911, 0.0000, -5.3815, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-6.2680, 2.2500, -6.2680, 4.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(2.2500, 0.0000, -6.7320, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-8.4820, 4.0000, -6.7320, 4.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(4.5000, 0.0000, -8.4820, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-13.1357, 6.4846, -11.2320, 4.5000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-19.7320, 6.3916, -16.4820, 9.8557, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(9.6536, 0.0000, -19.7320, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-20.4070, 10.0433, -20.1820, 9.6536, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(8.7887, 0.0000, -22.5800, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(10.2165, 0.0000, -25.0530, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-25.1780, 10.2500, -25.1780, 10.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(10.2500, 0.0000, -27.1780, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-27.3030, 10.2165, -27.1780, 10.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-34.9249, 11.1924, -30.4731, 15.7073, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(12.1780, 0.0000, -35.9245, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-36.1000, 12.2500, -36.1000, 12.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(12.2500, 0.0000, -37.8500, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(15.0000, 0.0000, -37.8500, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(15.0000, 0.0000, 3.0410, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.2020, 0.0000, 3.0410, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(0.9190, 1.0810, 3.0410, 3.2020, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(3.0000, 0.0000, -1.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(3.0000, 0.0000, -4.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(2.2680, 0.0000, -5.2680, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-6.2680, 2.0000, -6.2680, 4.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(2.0000, 0.0000, -6.7320, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-8.7320, 4.0000, -6.7320, 4.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(4.5000, 0.0000, -8.7320, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-12.9820, 6.2850, -11.2320, 4.5000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-19.9820, 6.2850, -16.4820, 9.8557, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(9.6536, 0.0000, -19.9820, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-20.2820, 9.8268, -20.1820, 9.6536, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(8.5000, 0.0000, -22.5800, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(10.0000, 0.0000, -25.1780, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(10.0000, 0.0000, -27.1780, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-35.1000, 11.0140, -30.4731, 15.7073, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(12.0000, 0.0000, -36.1000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(12.0000, 0.0000, -38.1000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(15.0000, 0.0000, -38.1000, 0.0000, 0.0000, 0.0000) + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SELECT_PLANE(CANON_PLANE_XY) + N..... SET_FEED_MODE(0, 0) + N..... SET_FEED_RATE(0.0000) + N..... STOP_SPINDLE_TURNING(0) + N..... SET_SPINDLE_MODE(0 0.0000) + N..... PROGRAM_END() + N..... ON_RESET() + N..... ON_RESET() diff --git a/wasm-port/vendor/linuxcnc/tests/interp/g71-with-g70/g71-with-g70.ngc b/wasm-port/vendor/linuxcnc/tests/interp/g71-with-g70/g71-with-g70.ngc new file mode 100644 index 0000000..e89298f --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/g71-with-g70/g71-with-g70.ngc @@ -0,0 +1,32 @@ +G54 G18 G21 +F400 + +O100 SUB + G0 X0.202 Z3.041 + G2 X1.081 Z0.919 I3.0 K0.0 + G1 X3.0 Z-1.0 + G1 Z-4.0 + X2.268 Z-5.268 + G2 X2.0 z-6.268 I1.73205 K-1.0 + G1 Z-6.732 + G2 X4.0 Z-8.732 I2.0 K0.0 + G1 X4.5 + G3 X6.285 Z-12.982 I-0.0 K-2.5 + G2 Z-19.982 I3.57071 K-3.5 + ; Let's make the pawn safe to play with + G1 X10 A0.2 + G1 X8.5 Z-22.58 + G1 X10.0 Z-25.178 + G1 Z-27.178 + G2 X11.014 Z-35.1 I5.70735 K-3.29514 + G1 X12.0 Z-36.1 + G1 Z-38.1 + G0 X15.0 +O100 ENDSUB + +G71.1 Q100 X15 Z3.041 D1 I1 R0.3 +G71.2 Q100 X15 Z3.041 D0.51 I0.5 R0.3 +G70 Q100 X15 Z3.041 E0 D0.5 P2 + + +M2 diff --git a/wasm-port/vendor/linuxcnc/tests/interp/g71-with-g70/test.sh b/wasm-port/vendor/linuxcnc/tests/interp/g71-with-g70/test.sh new file mode 100755 index 0000000..3897940 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/g71-with-g70/test.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# +# Copy of 'nc_files/lathe_g70_71_demo.ngc'. Uses both G70 and G71. + +rs274 -g g71-with-g70.ngc | awk '{$1=""; print}' > result & +pid=$! + +# Give it 5 seconds to complete +count=5 +while [ 0 -lt $count ] && kill -0 $pid > /dev/null 2>&1 ; do + sleep 1 + count=$((count - 1)) +done + +if kill -0 $pid > /dev/null 2>&1; then + kill -9 $pid + echo "E: g71_and_g70.ngc program seem to be stuck, killing" + exit 1 +fi + +exit 0 diff --git a/wasm-port/vendor/linuxcnc/tests/interp/g72-facing/expected b/wasm-port/vendor/linuxcnc/tests/interp/g72-facing/expected new file mode 100644 index 0000000..1096d6d --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/g72-facing/expected @@ -0,0 +1,104 @@ + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SET_FEED_REFERENCE(CANON_XYZ) + N..... ON_RESET() + N..... SET_FEED_RATE(400.0000) + N..... SELECT_PLANE(CANON_PLANE_XZ) + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... COMMENT("interpreter: continuing to use same coordinate system") + N..... SELECT_TOOL(2) + N..... STOP_SPINDLE_TURNING(0) + N..... CHANGE_TOOL() + N..... COMMENT("interpreter: cutter radius compensation off") + N..... USE_TOOL_LENGTH_OFFSET(0.0000 0.0000 2.5400, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) + N..... SET_SPINDLE_SPEED(0, 100.0000) + N..... START_SPINDLE_CLOCKWISE(0) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(100.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(99.9000, 0.0000, 0.1000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.1000, 0.0000, 0.1000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -3.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(100.0000, 0.0000, -3.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(99.9000, 0.0000, -2.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.1000, 0.0000, -2.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -3.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -6.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(100.0000, 0.0000, -6.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(99.9000, 0.0000, -5.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.1000, 0.0000, -5.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -6.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -9.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(100.0000, 0.0000, -9.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(99.9000, 0.0000, -8.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.1000, 0.0000, -8.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -9.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -12.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(100.0000, 0.0000, -12.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(99.9000, 0.0000, -11.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.1000, 0.0000, -11.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -12.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -15.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(100.0000, 0.0000, -15.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(99.9000, 0.0000, -14.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.1000, 0.0000, -14.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -15.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -18.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(100.0000, 0.0000, -18.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(99.9000, 0.0000, -17.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.1000, 0.0000, -17.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -18.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -21.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(100.0000, 0.0000, -21.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(99.9000, 0.0000, -20.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.1000, 0.0000, -20.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -21.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -24.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(100.0000, 0.0000, -24.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(99.9000, 0.0000, -23.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.1000, 0.0000, -23.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -24.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -27.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(100.0000, 0.0000, -27.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(99.9000, 0.0000, -26.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.1000, 0.0000, -26.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -27.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -30.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(100.0000, 0.0000, -30.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(99.9000, 0.0000, -29.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.1000, 0.0000, -29.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -30.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -33.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(100.0000, 0.0000, -33.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(99.9000, 0.0000, -32.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.1000, 0.0000, -32.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -33.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -36.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(100.0000, 0.0000, -36.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(99.9000, 0.0000, -35.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.1000, 0.0000, -35.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -36.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -39.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(100.0000, 0.0000, -39.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(99.9000, 0.0000, -38.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.1000, 0.0000, -38.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -39.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -40.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(100.0000, 0.0000, -39.9990, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(100.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SELECT_PLANE(CANON_PLANE_XY) + N..... SET_FEED_MODE(0, 0) + N..... SET_FEED_RATE(0.0000) + N..... STOP_SPINDLE_TURNING(0) + N..... SET_SPINDLE_MODE(0 0.0000) + N..... PALLET_SHUTTLE() + N..... PROGRAM_END() + N..... ON_RESET() + N..... ON_RESET() diff --git a/wasm-port/vendor/linuxcnc/tests/interp/g72-facing/g72-iterations-present.ngc b/wasm-port/vendor/linuxcnc/tests/interp/g72-facing/g72-iterations-present.ngc new file mode 100644 index 0000000..86647a7 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/g72-facing/g72-iterations-present.ngc @@ -0,0 +1,10 @@ +G54 G18 G21 F400 +G40 T2M6G43 +M3 S100 +o100 sub +G1 X50 Z-40F10000 +X100 Z-39.999 +o100 end sub +G72 Q100 X50 Z0 I3 R0.1 +G0 X0 Z0 +M30 diff --git a/wasm-port/vendor/linuxcnc/tests/interp/g72-facing/test.sh b/wasm-port/vendor/linuxcnc/tests/interp/g72-facing/test.sh new file mode 100755 index 0000000..ebf7465 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/g72-facing/test.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# +# Test working G71, derived from problem reported in +# https://github.com/LinuxCNC/linuxcnc/issues/707. + +rs274 -g g72-iterations-present.ngc | awk '{$1=""; print}' > result & +pid=$! + +# Give it 10 seconds to complete +count=10 +while [ 0 -lt $count ] && kill -0 $pid > /dev/null 2>&1 ; do + sleep 1 + count=$((count - 1)) +done + +if kill -0 $pid > /dev/null 2>&1; then + kill -9 $pid + echo "E: g71-iterations-present.ngc program seem to be stuck, killing" + exit 1 +fi + +exit 0 diff --git a/wasm-port/vendor/linuxcnc/tests/interp/g72-missing-iteration/expected b/wasm-port/vendor/linuxcnc/tests/interp/g72-missing-iteration/expected new file mode 100644 index 0000000..56181de --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/g72-missing-iteration/expected @@ -0,0 +1,104 @@ + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SET_FEED_REFERENCE(CANON_XYZ) + N..... ON_RESET() + N..... SET_FEED_RATE(400.0000) + N..... SELECT_PLANE(CANON_PLANE_XZ) + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... COMMENT("interpreter: continuing to use same coordinate system") + N..... SELECT_TOOL(2) + N..... STOP_SPINDLE_TURNING(0) + N..... CHANGE_TOOL() + N..... COMMENT("interpreter: cutter radius compensation off") + N..... USE_TOOL_LENGTH_OFFSET(0.0000 0.0000 2.5400, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) + N..... SET_SPINDLE_SPEED(0, 100.0000) + N..... START_SPINDLE_CLOCKWISE(0) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(100.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(99.9000, 0.0000, 0.1000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.1000, 0.0000, 0.1000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -3.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(100.0000, 0.0000, -3.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(99.9000, 0.0000, -2.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.1000, 0.0000, -2.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -3.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -6.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(100.0000, 0.0000, -6.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(99.9000, 0.0000, -5.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.1000, 0.0000, -5.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -6.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -9.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(100.0000, 0.0000, -9.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(99.9000, 0.0000, -8.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.1000, 0.0000, -8.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -9.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -12.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(100.0000, 0.0000, -12.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(99.9000, 0.0000, -11.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.1000, 0.0000, -11.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -12.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -15.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(100.0000, 0.0000, -15.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(99.9000, 0.0000, -14.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.1000, 0.0000, -14.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -15.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -18.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(100.0000, 0.0000, -18.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(99.9000, 0.0000, -17.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.1000, 0.0000, -17.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -18.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -21.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(100.0000, 0.0000, -21.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(99.9000, 0.0000, -20.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.1000, 0.0000, -20.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -21.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -24.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(100.0000, 0.0000, -24.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(99.9000, 0.0000, -23.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.1000, 0.0000, -23.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -24.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -27.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(100.0000, 0.0000, -27.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(99.9000, 0.0000, -26.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.1000, 0.0000, -26.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -27.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -30.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(100.0000, 0.0000, -30.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(99.9000, 0.0000, -29.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.1000, 0.0000, -29.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -30.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -33.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(100.0000, 0.0000, -33.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(99.9000, 0.0000, -32.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.1000, 0.0000, -32.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -33.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -36.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(100.0000, 0.0000, -36.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(99.9000, 0.0000, -35.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.1000, 0.0000, -35.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -36.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -39.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(100.0000, 0.0000, -39.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(99.9000, 0.0000, -38.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.1000, 0.0000, -38.9000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -39.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(50.0000, 0.0000, -40.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(100.0000, 0.0000, -40.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(100.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SELECT_PLANE(CANON_PLANE_XY) + N..... SET_FEED_MODE(0, 0) + N..... SET_FEED_RATE(0.0000) + N..... STOP_SPINDLE_TURNING(0) + N..... SET_SPINDLE_MODE(0 0.0000) + N..... PALLET_SHUTTLE() + N..... PROGRAM_END() + N..... ON_RESET() + N..... ON_RESET() diff --git a/wasm-port/vendor/linuxcnc/tests/interp/g72-missing-iteration/g72-iterations-missing.ngc b/wasm-port/vendor/linuxcnc/tests/interp/g72-missing-iteration/g72-iterations-missing.ngc new file mode 100644 index 0000000..b1b5dba --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/g72-missing-iteration/g72-iterations-missing.ngc @@ -0,0 +1,10 @@ +G54 G18 G21 F400 +G40 T2M6G43 +M3 S100 +o100 sub +G1 X50 Z-40F10000 +X100 Z-40 +o100 end sub +G72 Q100 X50 Z0 I3 R0.1 +G0 X0 Z0 +M30 diff --git a/wasm-port/vendor/linuxcnc/tests/interp/g72-missing-iteration/test.sh b/wasm-port/vendor/linuxcnc/tests/interp/g72-missing-iteration/test.sh new file mode 100755 index 0000000..26f13b2 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/g72-missing-iteration/test.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# +# Demonstrate G71 problem reported in +# https://github.com/LinuxCNC/linuxcnc/issues/707. When Z limit is +# 39.999, everything work, when it is 40, the facing is done without +# iterations. + +rs274 -g g72-iterations-missing.ngc | awk '{$1=""; print}' > result & +pid=$! + +# Give it 10 seconds to complete +count=10 +while [ 0 -lt $count ] && kill -0 $pid > /dev/null 2>&1 ; do + sleep 1 + count=$((count - 1)) +done + +if kill -0 $pid > /dev/null 2>&1; then + kill -9 $pid + echo "E: g71-iterations-missing.ngc program seem to be stuck, killing" + exit 1 +fi + +exit 0 diff --git a/wasm-port/vendor/linuxcnc/tests/interp/g76/README b/wasm-port/vendor/linuxcnc/tests/interp/g76/README new file mode 100644 index 0000000..b35bb44 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/g76/README @@ -0,0 +1 @@ +Test that g76 works as expected diff --git a/wasm-port/vendor/linuxcnc/tests/interp/g76/expected b/wasm-port/vendor/linuxcnc/tests/interp/g76/expected new file mode 100644 index 0000000..c2c4921 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/g76/expected @@ -0,0 +1,397 @@ + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SET_FEED_REFERENCE(CANON_XYZ) + N..... ON_RESET() + N..... COMMENT("cut a small 1/4-20 thread and part it") + N..... SELECT_PLANE(CANON_PLANE_XZ) + N..... USE_LENGTH_UNITS(CANON_UNITS_INCHES) + N..... SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, 0.000000) + N..... SET_NAIVECAM_TOLERANCE(0.0000) + N..... COMMENT("thread") + N..... SELECT_TOOL(4) + N..... STOP_SPINDLE_TURNING(0) + N..... CHANGE_TOOL() + N..... USE_TOOL_LENGTH_OFFSET(0.0000 0.0000 0.7000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) + N..... SET_SPINDLE_SPEED(0, 800.0000) + N..... START_SPINDLE_CLOCKWISE(0) + N..... DWELL(1.0000) + N..... STRAIGHT_TRAVERSE(0.2000, 0.0000, 0.2000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("p = thread pitch, distance per revolution") + N..... COMMENT("z = end of drive line") + N..... COMMENT("i = offset from drive line to thread peaks") + N..... COMMENT("negative i means the threads are at a smaller radius than the drive line,") + N..... COMMENT("so i is negative for outside threads, positive for inside threads") + N..... COMMENT("j = initial cut depth; subsequent depths follow degression formula") + N..... COMMENT("r = depth degression: 1.0 = constant depth, 2.0 = constant area") + N..... COMMENT("any number >= 1.0 allowed") + N..... COMMENT("k = full thread depth") + N..... COMMENT("q = "compound slide" angle") + N..... COMMENT("h = number of spring passes") + N..... COMMENT("e = distance along drive line used for tapered start/end") + N..... COMMENT("l = which ends get the taper: 0 = neither, 1 = begin, 2 = end, 3 = both") + N..... STRAIGHT_TRAVERSE(0.2370, 0.0000, 0.1955, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.1170, 0.0000, 0.1955, 0.0000, 0.0000, 0.0000) + N..... DISABLE_FEED_OVERRIDE() + N..... START_SPEED_FEED_SYNC(0.050000,0) + N..... STRAIGHT_FEED(0.1170, 0.0000, -0.4291, 0.0000, 0.0000, 0.0000) + N..... START_SPEED_FEED_SYNC(0.067268,0) + N..... STRAIGHT_FEED(0.1620, 0.0000, -0.4791, 0.0000, 0.0000, 0.0000) + N..... STOP_SPEED_FEED_SYNCH() + N..... STRAIGHT_TRAVERSE(0.2370, 0.0000, -0.4791, 0.0000, 0.0000, 0.0000) + N..... ENABLE_FEED_OVERRIDE() + N..... STRAIGHT_TRAVERSE(0.2337, 0.0000, 0.1936, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.1137, 0.0000, 0.1936, 0.0000, 0.0000, 0.0000) + N..... DISABLE_FEED_OVERRIDE() + N..... START_SPEED_FEED_SYNC(0.050000,0) + N..... STRAIGHT_FEED(0.1137, 0.0000, -0.4309, 0.0000, 0.0000, 0.0000) + N..... START_SPEED_FEED_SYNC(0.067268,0) + N..... STRAIGHT_FEED(0.1587, 0.0000, -0.4809, 0.0000, 0.0000, 0.0000) + N..... STOP_SPEED_FEED_SYNCH() + N..... STRAIGHT_TRAVERSE(0.2337, 0.0000, -0.4809, 0.0000, 0.0000, 0.0000) + N..... ENABLE_FEED_OVERRIDE() + N..... STRAIGHT_TRAVERSE(0.2311, 0.0000, 0.1922, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.1111, 0.0000, 0.1922, 0.0000, 0.0000, 0.0000) + N..... DISABLE_FEED_OVERRIDE() + N..... START_SPEED_FEED_SYNC(0.050000,0) + N..... STRAIGHT_FEED(0.1111, 0.0000, -0.4324, 0.0000, 0.0000, 0.0000) + N..... START_SPEED_FEED_SYNC(0.067268,0) + N..... STRAIGHT_FEED(0.1561, 0.0000, -0.4824, 0.0000, 0.0000, 0.0000) + N..... STOP_SPEED_FEED_SYNCH() + N..... STRAIGHT_TRAVERSE(0.2311, 0.0000, -0.4824, 0.0000, 0.0000, 0.0000) + N..... ENABLE_FEED_OVERRIDE() + N..... STRAIGHT_TRAVERSE(0.2290, 0.0000, 0.1909, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.1090, 0.0000, 0.1909, 0.0000, 0.0000, 0.0000) + N..... DISABLE_FEED_OVERRIDE() + N..... START_SPEED_FEED_SYNC(0.050000,0) + N..... STRAIGHT_FEED(0.1090, 0.0000, -0.4336, 0.0000, 0.0000, 0.0000) + N..... START_SPEED_FEED_SYNC(0.067268,0) + N..... STRAIGHT_FEED(0.1540, 0.0000, -0.4836, 0.0000, 0.0000, 0.0000) + N..... STOP_SPEED_FEED_SYNCH() + N..... STRAIGHT_TRAVERSE(0.2290, 0.0000, -0.4836, 0.0000, 0.0000, 0.0000) + N..... ENABLE_FEED_OVERRIDE() + N..... STRAIGHT_TRAVERSE(0.2271, 0.0000, 0.1899, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.1071, 0.0000, 0.1899, 0.0000, 0.0000, 0.0000) + N..... DISABLE_FEED_OVERRIDE() + N..... START_SPEED_FEED_SYNC(0.050000,0) + N..... STRAIGHT_FEED(0.1071, 0.0000, -0.4347, 0.0000, 0.0000, 0.0000) + N..... START_SPEED_FEED_SYNC(0.067268,0) + N..... STRAIGHT_FEED(0.1521, 0.0000, -0.4847, 0.0000, 0.0000, 0.0000) + N..... STOP_SPEED_FEED_SYNCH() + N..... STRAIGHT_TRAVERSE(0.2271, 0.0000, -0.4847, 0.0000, 0.0000, 0.0000) + N..... ENABLE_FEED_OVERRIDE() + N..... STRAIGHT_TRAVERSE(0.2254, 0.0000, 0.1889, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.1054, 0.0000, 0.1889, 0.0000, 0.0000, 0.0000) + N..... DISABLE_FEED_OVERRIDE() + N..... START_SPEED_FEED_SYNC(0.050000,0) + N..... STRAIGHT_FEED(0.1054, 0.0000, -0.4356, 0.0000, 0.0000, 0.0000) + N..... START_SPEED_FEED_SYNC(0.067268,0) + N..... STRAIGHT_FEED(0.1504, 0.0000, -0.4856, 0.0000, 0.0000, 0.0000) + N..... STOP_SPEED_FEED_SYNCH() + N..... STRAIGHT_TRAVERSE(0.2254, 0.0000, -0.4856, 0.0000, 0.0000, 0.0000) + N..... ENABLE_FEED_OVERRIDE() + N..... STRAIGHT_TRAVERSE(0.2238, 0.0000, 0.1880, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.1038, 0.0000, 0.1880, 0.0000, 0.0000, 0.0000) + N..... DISABLE_FEED_OVERRIDE() + N..... START_SPEED_FEED_SYNC(0.050000,0) + N..... STRAIGHT_FEED(0.1038, 0.0000, -0.4365, 0.0000, 0.0000, 0.0000) + N..... START_SPEED_FEED_SYNC(0.067268,0) + N..... STRAIGHT_FEED(0.1488, 0.0000, -0.4865, 0.0000, 0.0000, 0.0000) + N..... STOP_SPEED_FEED_SYNCH() + N..... STRAIGHT_TRAVERSE(0.2238, 0.0000, -0.4865, 0.0000, 0.0000, 0.0000) + N..... ENABLE_FEED_OVERRIDE() + N..... STRAIGHT_TRAVERSE(0.2224, 0.0000, 0.1872, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.1024, 0.0000, 0.1872, 0.0000, 0.0000, 0.0000) + N..... DISABLE_FEED_OVERRIDE() + N..... START_SPEED_FEED_SYNC(0.050000,0) + N..... STRAIGHT_FEED(0.1024, 0.0000, -0.4373, 0.0000, 0.0000, 0.0000) + N..... START_SPEED_FEED_SYNC(0.067268,0) + N..... STRAIGHT_FEED(0.1474, 0.0000, -0.4873, 0.0000, 0.0000, 0.0000) + N..... STOP_SPEED_FEED_SYNCH() + N..... STRAIGHT_TRAVERSE(0.2224, 0.0000, -0.4873, 0.0000, 0.0000, 0.0000) + N..... ENABLE_FEED_OVERRIDE() + N..... STRAIGHT_TRAVERSE(0.2210, 0.0000, 0.1864, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.1010, 0.0000, 0.1864, 0.0000, 0.0000, 0.0000) + N..... DISABLE_FEED_OVERRIDE() + N..... START_SPEED_FEED_SYNC(0.050000,0) + N..... STRAIGHT_FEED(0.1010, 0.0000, -0.4381, 0.0000, 0.0000, 0.0000) + N..... START_SPEED_FEED_SYNC(0.067268,0) + N..... STRAIGHT_FEED(0.1460, 0.0000, -0.4881, 0.0000, 0.0000, 0.0000) + N..... STOP_SPEED_FEED_SYNCH() + N..... STRAIGHT_TRAVERSE(0.2210, 0.0000, -0.4881, 0.0000, 0.0000, 0.0000) + N..... ENABLE_FEED_OVERRIDE() + N..... STRAIGHT_TRAVERSE(0.2197, 0.0000, 0.1857, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.0997, 0.0000, 0.1857, 0.0000, 0.0000, 0.0000) + N..... DISABLE_FEED_OVERRIDE() + N..... START_SPEED_FEED_SYNC(0.050000,0) + N..... STRAIGHT_FEED(0.0997, 0.0000, -0.4389, 0.0000, 0.0000, 0.0000) + N..... START_SPEED_FEED_SYNC(0.067268,0) + N..... STRAIGHT_FEED(0.1447, 0.0000, -0.4889, 0.0000, 0.0000, 0.0000) + N..... STOP_SPEED_FEED_SYNCH() + N..... STRAIGHT_TRAVERSE(0.2197, 0.0000, -0.4889, 0.0000, 0.0000, 0.0000) + N..... ENABLE_FEED_OVERRIDE() + N..... STRAIGHT_TRAVERSE(0.2185, 0.0000, 0.1850, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.0985, 0.0000, 0.1850, 0.0000, 0.0000, 0.0000) + N..... DISABLE_FEED_OVERRIDE() + N..... START_SPEED_FEED_SYNC(0.050000,0) + N..... STRAIGHT_FEED(0.0985, 0.0000, -0.4396, 0.0000, 0.0000, 0.0000) + N..... START_SPEED_FEED_SYNC(0.067268,0) + N..... STRAIGHT_FEED(0.1435, 0.0000, -0.4896, 0.0000, 0.0000, 0.0000) + N..... STOP_SPEED_FEED_SYNCH() + N..... STRAIGHT_TRAVERSE(0.2185, 0.0000, -0.4896, 0.0000, 0.0000, 0.0000) + N..... ENABLE_FEED_OVERRIDE() + N..... STRAIGHT_TRAVERSE(0.2173, 0.0000, 0.1843, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.0973, 0.0000, 0.1843, 0.0000, 0.0000, 0.0000) + N..... DISABLE_FEED_OVERRIDE() + N..... START_SPEED_FEED_SYNC(0.050000,0) + N..... STRAIGHT_FEED(0.0973, 0.0000, -0.4402, 0.0000, 0.0000, 0.0000) + N..... START_SPEED_FEED_SYNC(0.067268,0) + N..... STRAIGHT_FEED(0.1423, 0.0000, -0.4902, 0.0000, 0.0000, 0.0000) + N..... STOP_SPEED_FEED_SYNCH() + N..... STRAIGHT_TRAVERSE(0.2173, 0.0000, -0.4902, 0.0000, 0.0000, 0.0000) + N..... ENABLE_FEED_OVERRIDE() + N..... STRAIGHT_TRAVERSE(0.2162, 0.0000, 0.1837, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.0962, 0.0000, 0.1837, 0.0000, 0.0000, 0.0000) + N..... DISABLE_FEED_OVERRIDE() + N..... START_SPEED_FEED_SYNC(0.050000,0) + N..... STRAIGHT_FEED(0.0962, 0.0000, -0.4409, 0.0000, 0.0000, 0.0000) + N..... START_SPEED_FEED_SYNC(0.067268,0) + N..... STRAIGHT_FEED(0.1412, 0.0000, -0.4909, 0.0000, 0.0000, 0.0000) + N..... STOP_SPEED_FEED_SYNCH() + N..... STRAIGHT_TRAVERSE(0.2162, 0.0000, -0.4909, 0.0000, 0.0000, 0.0000) + N..... ENABLE_FEED_OVERRIDE() + N..... STRAIGHT_TRAVERSE(0.2151, 0.0000, 0.1831, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.0951, 0.0000, 0.1831, 0.0000, 0.0000, 0.0000) + N..... DISABLE_FEED_OVERRIDE() + N..... START_SPEED_FEED_SYNC(0.050000,0) + N..... STRAIGHT_FEED(0.0951, 0.0000, -0.4415, 0.0000, 0.0000, 0.0000) + N..... START_SPEED_FEED_SYNC(0.067268,0) + N..... STRAIGHT_FEED(0.1401, 0.0000, -0.4915, 0.0000, 0.0000, 0.0000) + N..... STOP_SPEED_FEED_SYNCH() + N..... STRAIGHT_TRAVERSE(0.2151, 0.0000, -0.4915, 0.0000, 0.0000, 0.0000) + N..... ENABLE_FEED_OVERRIDE() + N..... STRAIGHT_TRAVERSE(0.2140, 0.0000, 0.1825, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.0940, 0.0000, 0.1825, 0.0000, 0.0000, 0.0000) + N..... DISABLE_FEED_OVERRIDE() + N..... START_SPEED_FEED_SYNC(0.050000,0) + N..... STRAIGHT_FEED(0.0940, 0.0000, -0.4421, 0.0000, 0.0000, 0.0000) + N..... START_SPEED_FEED_SYNC(0.067268,0) + N..... STRAIGHT_FEED(0.1390, 0.0000, -0.4921, 0.0000, 0.0000, 0.0000) + N..... STOP_SPEED_FEED_SYNCH() + N..... STRAIGHT_TRAVERSE(0.2140, 0.0000, -0.4921, 0.0000, 0.0000, 0.0000) + N..... ENABLE_FEED_OVERRIDE() + N..... STRAIGHT_TRAVERSE(0.2130, 0.0000, 0.1819, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.0930, 0.0000, 0.1819, 0.0000, 0.0000, 0.0000) + N..... DISABLE_FEED_OVERRIDE() + N..... START_SPEED_FEED_SYNC(0.050000,0) + N..... STRAIGHT_FEED(0.0930, 0.0000, -0.4426, 0.0000, 0.0000, 0.0000) + N..... START_SPEED_FEED_SYNC(0.067268,0) + N..... STRAIGHT_FEED(0.1380, 0.0000, -0.4926, 0.0000, 0.0000, 0.0000) + N..... STOP_SPEED_FEED_SYNCH() + N..... STRAIGHT_TRAVERSE(0.2130, 0.0000, -0.4926, 0.0000, 0.0000, 0.0000) + N..... ENABLE_FEED_OVERRIDE() + N..... STRAIGHT_TRAVERSE(0.2120, 0.0000, 0.1813, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.0920, 0.0000, 0.1813, 0.0000, 0.0000, 0.0000) + N..... DISABLE_FEED_OVERRIDE() + N..... START_SPEED_FEED_SYNC(0.050000,0) + N..... STRAIGHT_FEED(0.0920, 0.0000, -0.4432, 0.0000, 0.0000, 0.0000) + N..... START_SPEED_FEED_SYNC(0.067268,0) + N..... STRAIGHT_FEED(0.1370, 0.0000, -0.4932, 0.0000, 0.0000, 0.0000) + N..... STOP_SPEED_FEED_SYNCH() + N..... STRAIGHT_TRAVERSE(0.2120, 0.0000, -0.4932, 0.0000, 0.0000, 0.0000) + N..... ENABLE_FEED_OVERRIDE() + N..... STRAIGHT_TRAVERSE(0.2111, 0.0000, 0.1808, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.0911, 0.0000, 0.1808, 0.0000, 0.0000, 0.0000) + N..... DISABLE_FEED_OVERRIDE() + N..... START_SPEED_FEED_SYNC(0.050000,0) + N..... STRAIGHT_FEED(0.0911, 0.0000, -0.4437, 0.0000, 0.0000, 0.0000) + N..... START_SPEED_FEED_SYNC(0.067268,0) + N..... STRAIGHT_FEED(0.1361, 0.0000, -0.4937, 0.0000, 0.0000, 0.0000) + N..... STOP_SPEED_FEED_SYNCH() + N..... STRAIGHT_TRAVERSE(0.2111, 0.0000, -0.4937, 0.0000, 0.0000, 0.0000) + N..... ENABLE_FEED_OVERRIDE() + N..... STRAIGHT_TRAVERSE(0.2101, 0.0000, 0.1803, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.0901, 0.0000, 0.1803, 0.0000, 0.0000, 0.0000) + N..... DISABLE_FEED_OVERRIDE() + N..... START_SPEED_FEED_SYNC(0.050000,0) + N..... STRAIGHT_FEED(0.0901, 0.0000, -0.4443, 0.0000, 0.0000, 0.0000) + N..... START_SPEED_FEED_SYNC(0.067268,0) + N..... STRAIGHT_FEED(0.1351, 0.0000, -0.4943, 0.0000, 0.0000, 0.0000) + N..... STOP_SPEED_FEED_SYNCH() + N..... STRAIGHT_TRAVERSE(0.2101, 0.0000, -0.4943, 0.0000, 0.0000, 0.0000) + N..... ENABLE_FEED_OVERRIDE() + N..... STRAIGHT_TRAVERSE(0.2092, 0.0000, 0.1798, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.0892, 0.0000, 0.1798, 0.0000, 0.0000, 0.0000) + N..... DISABLE_FEED_OVERRIDE() + N..... START_SPEED_FEED_SYNC(0.050000,0) + N..... STRAIGHT_FEED(0.0892, 0.0000, -0.4448, 0.0000, 0.0000, 0.0000) + N..... START_SPEED_FEED_SYNC(0.067268,0) + N..... STRAIGHT_FEED(0.1342, 0.0000, -0.4948, 0.0000, 0.0000, 0.0000) + N..... STOP_SPEED_FEED_SYNCH() + N..... STRAIGHT_TRAVERSE(0.2092, 0.0000, -0.4948, 0.0000, 0.0000, 0.0000) + N..... ENABLE_FEED_OVERRIDE() + N..... STRAIGHT_TRAVERSE(0.2083, 0.0000, 0.1793, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.0883, 0.0000, 0.1793, 0.0000, 0.0000, 0.0000) + N..... DISABLE_FEED_OVERRIDE() + N..... START_SPEED_FEED_SYNC(0.050000,0) + N..... STRAIGHT_FEED(0.0883, 0.0000, -0.4453, 0.0000, 0.0000, 0.0000) + N..... START_SPEED_FEED_SYNC(0.067268,0) + N..... STRAIGHT_FEED(0.1333, 0.0000, -0.4953, 0.0000, 0.0000, 0.0000) + N..... STOP_SPEED_FEED_SYNCH() + N..... STRAIGHT_TRAVERSE(0.2083, 0.0000, -0.4953, 0.0000, 0.0000, 0.0000) + N..... ENABLE_FEED_OVERRIDE() + N..... STRAIGHT_TRAVERSE(0.2075, 0.0000, 0.1788, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.0875, 0.0000, 0.1788, 0.0000, 0.0000, 0.0000) + N..... DISABLE_FEED_OVERRIDE() + N..... START_SPEED_FEED_SYNC(0.050000,0) + N..... STRAIGHT_FEED(0.0875, 0.0000, -0.4458, 0.0000, 0.0000, 0.0000) + N..... START_SPEED_FEED_SYNC(0.067268,0) + N..... STRAIGHT_FEED(0.1325, 0.0000, -0.4958, 0.0000, 0.0000, 0.0000) + N..... STOP_SPEED_FEED_SYNCH() + N..... STRAIGHT_TRAVERSE(0.2075, 0.0000, -0.4958, 0.0000, 0.0000, 0.0000) + N..... ENABLE_FEED_OVERRIDE() + N..... STRAIGHT_TRAVERSE(0.2066, 0.0000, 0.1783, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.0866, 0.0000, 0.1783, 0.0000, 0.0000, 0.0000) + N..... DISABLE_FEED_OVERRIDE() + N..... START_SPEED_FEED_SYNC(0.050000,0) + N..... STRAIGHT_FEED(0.0866, 0.0000, -0.4462, 0.0000, 0.0000, 0.0000) + N..... START_SPEED_FEED_SYNC(0.067268,0) + N..... STRAIGHT_FEED(0.1316, 0.0000, -0.4962, 0.0000, 0.0000, 0.0000) + N..... STOP_SPEED_FEED_SYNCH() + N..... STRAIGHT_TRAVERSE(0.2066, 0.0000, -0.4962, 0.0000, 0.0000, 0.0000) + N..... ENABLE_FEED_OVERRIDE() + N..... STRAIGHT_TRAVERSE(0.2058, 0.0000, 0.1778, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.0858, 0.0000, 0.1778, 0.0000, 0.0000, 0.0000) + N..... DISABLE_FEED_OVERRIDE() + N..... START_SPEED_FEED_SYNC(0.050000,0) + N..... STRAIGHT_FEED(0.0858, 0.0000, -0.4467, 0.0000, 0.0000, 0.0000) + N..... START_SPEED_FEED_SYNC(0.067268,0) + N..... STRAIGHT_FEED(0.1308, 0.0000, -0.4967, 0.0000, 0.0000, 0.0000) + N..... STOP_SPEED_FEED_SYNCH() + N..... STRAIGHT_TRAVERSE(0.2058, 0.0000, -0.4967, 0.0000, 0.0000, 0.0000) + N..... ENABLE_FEED_OVERRIDE() + N..... STRAIGHT_TRAVERSE(0.2050, 0.0000, 0.1774, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.0850, 0.0000, 0.1774, 0.0000, 0.0000, 0.0000) + N..... DISABLE_FEED_OVERRIDE() + N..... START_SPEED_FEED_SYNC(0.050000,0) + N..... STRAIGHT_FEED(0.0850, 0.0000, -0.4472, 0.0000, 0.0000, 0.0000) + N..... START_SPEED_FEED_SYNC(0.067268,0) + N..... STRAIGHT_FEED(0.1300, 0.0000, -0.4972, 0.0000, 0.0000, 0.0000) + N..... STOP_SPEED_FEED_SYNCH() + N..... STRAIGHT_TRAVERSE(0.2050, 0.0000, -0.4972, 0.0000, 0.0000, 0.0000) + N..... ENABLE_FEED_OVERRIDE() + N..... STRAIGHT_TRAVERSE(0.2042, 0.0000, 0.1769, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.0842, 0.0000, 0.1769, 0.0000, 0.0000, 0.0000) + N..... DISABLE_FEED_OVERRIDE() + N..... START_SPEED_FEED_SYNC(0.050000,0) + N..... STRAIGHT_FEED(0.0842, 0.0000, -0.4476, 0.0000, 0.0000, 0.0000) + N..... START_SPEED_FEED_SYNC(0.067268,0) + N..... STRAIGHT_FEED(0.1292, 0.0000, -0.4976, 0.0000, 0.0000, 0.0000) + N..... STOP_SPEED_FEED_SYNCH() + N..... STRAIGHT_TRAVERSE(0.2042, 0.0000, -0.4976, 0.0000, 0.0000, 0.0000) + N..... ENABLE_FEED_OVERRIDE() + N..... STRAIGHT_TRAVERSE(0.2034, 0.0000, 0.1765, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.0834, 0.0000, 0.1765, 0.0000, 0.0000, 0.0000) + N..... DISABLE_FEED_OVERRIDE() + N..... START_SPEED_FEED_SYNC(0.050000,0) + N..... STRAIGHT_FEED(0.0834, 0.0000, -0.4481, 0.0000, 0.0000, 0.0000) + N..... START_SPEED_FEED_SYNC(0.067268,0) + N..... STRAIGHT_FEED(0.1284, 0.0000, -0.4981, 0.0000, 0.0000, 0.0000) + N..... STOP_SPEED_FEED_SYNCH() + N..... STRAIGHT_TRAVERSE(0.2034, 0.0000, -0.4981, 0.0000, 0.0000, 0.0000) + N..... ENABLE_FEED_OVERRIDE() + N..... STRAIGHT_TRAVERSE(0.2027, 0.0000, 0.1760, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.0827, 0.0000, 0.1760, 0.0000, 0.0000, 0.0000) + N..... DISABLE_FEED_OVERRIDE() + N..... START_SPEED_FEED_SYNC(0.050000,0) + N..... STRAIGHT_FEED(0.0827, 0.0000, -0.4485, 0.0000, 0.0000, 0.0000) + N..... START_SPEED_FEED_SYNC(0.067268,0) + N..... STRAIGHT_FEED(0.1277, 0.0000, -0.4985, 0.0000, 0.0000, 0.0000) + N..... STOP_SPEED_FEED_SYNCH() + N..... STRAIGHT_TRAVERSE(0.2027, 0.0000, -0.4985, 0.0000, 0.0000, 0.0000) + N..... ENABLE_FEED_OVERRIDE() + N..... STRAIGHT_TRAVERSE(0.2019, 0.0000, 0.1756, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.0819, 0.0000, 0.1756, 0.0000, 0.0000, 0.0000) + N..... DISABLE_FEED_OVERRIDE() + N..... START_SPEED_FEED_SYNC(0.050000,0) + N..... STRAIGHT_FEED(0.0819, 0.0000, -0.4489, 0.0000, 0.0000, 0.0000) + N..... START_SPEED_FEED_SYNC(0.067268,0) + N..... STRAIGHT_FEED(0.1269, 0.0000, -0.4989, 0.0000, 0.0000, 0.0000) + N..... STOP_SPEED_FEED_SYNCH() + N..... STRAIGHT_TRAVERSE(0.2019, 0.0000, -0.4989, 0.0000, 0.0000, 0.0000) + N..... ENABLE_FEED_OVERRIDE() + N..... STRAIGHT_TRAVERSE(0.2012, 0.0000, 0.1752, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.0812, 0.0000, 0.1752, 0.0000, 0.0000, 0.0000) + N..... DISABLE_FEED_OVERRIDE() + N..... START_SPEED_FEED_SYNC(0.050000,0) + N..... STRAIGHT_FEED(0.0812, 0.0000, -0.4493, 0.0000, 0.0000, 0.0000) + N..... START_SPEED_FEED_SYNC(0.067268,0) + N..... STRAIGHT_FEED(0.1262, 0.0000, -0.4993, 0.0000, 0.0000, 0.0000) + N..... STOP_SPEED_FEED_SYNCH() + N..... STRAIGHT_TRAVERSE(0.2012, 0.0000, -0.4993, 0.0000, 0.0000, 0.0000) + N..... ENABLE_FEED_OVERRIDE() + N..... STRAIGHT_TRAVERSE(0.2005, 0.0000, 0.1748, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.0805, 0.0000, 0.1748, 0.0000, 0.0000, 0.0000) + N..... DISABLE_FEED_OVERRIDE() + N..... START_SPEED_FEED_SYNC(0.050000,0) + N..... STRAIGHT_FEED(0.0805, 0.0000, -0.4497, 0.0000, 0.0000, 0.0000) + N..... START_SPEED_FEED_SYNC(0.067268,0) + N..... STRAIGHT_FEED(0.1255, 0.0000, -0.4997, 0.0000, 0.0000, 0.0000) + N..... STOP_SPEED_FEED_SYNCH() + N..... STRAIGHT_TRAVERSE(0.2005, 0.0000, -0.4997, 0.0000, 0.0000, 0.0000) + N..... ENABLE_FEED_OVERRIDE() + N..... STRAIGHT_TRAVERSE(0.2000, 0.0000, 0.1745, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.0800, 0.0000, 0.1745, 0.0000, 0.0000, 0.0000) + N..... DISABLE_FEED_OVERRIDE() + N..... START_SPEED_FEED_SYNC(0.050000,0) + N..... STRAIGHT_FEED(0.0800, 0.0000, -0.4500, 0.0000, 0.0000, 0.0000) + N..... START_SPEED_FEED_SYNC(0.067268,0) + N..... STRAIGHT_FEED(0.1250, 0.0000, -0.5000, 0.0000, 0.0000, 0.0000) + N..... STOP_SPEED_FEED_SYNCH() + N..... STRAIGHT_TRAVERSE(0.2000, 0.0000, -0.5000, 0.0000, 0.0000, 0.0000) + N..... ENABLE_FEED_OVERRIDE() + N..... STRAIGHT_TRAVERSE(0.2000, 0.0000, 0.1745, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.0800, 0.0000, 0.1745, 0.0000, 0.0000, 0.0000) + N..... DISABLE_FEED_OVERRIDE() + N..... START_SPEED_FEED_SYNC(0.050000,0) + N..... STRAIGHT_FEED(0.0800, 0.0000, -0.4500, 0.0000, 0.0000, 0.0000) + N..... START_SPEED_FEED_SYNC(0.067268,0) + N..... STRAIGHT_FEED(0.1250, 0.0000, -0.5000, 0.0000, 0.0000, 0.0000) + N..... STOP_SPEED_FEED_SYNCH() + N..... STRAIGHT_TRAVERSE(0.2000, 0.0000, -0.5000, 0.0000, 0.0000, 0.0000) + N..... ENABLE_FEED_OVERRIDE() + N..... STRAIGHT_TRAVERSE(0.2000, 0.0000, 0.1745, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.0800, 0.0000, 0.1745, 0.0000, 0.0000, 0.0000) + N..... DISABLE_FEED_OVERRIDE() + N..... START_SPEED_FEED_SYNC(0.050000,0) + N..... STRAIGHT_FEED(0.0800, 0.0000, -0.4500, 0.0000, 0.0000, 0.0000) + N..... START_SPEED_FEED_SYNC(0.067268,0) + N..... STRAIGHT_FEED(0.1250, 0.0000, -0.5000, 0.0000, 0.0000, 0.0000) + N..... STOP_SPEED_FEED_SYNCH() + N..... STRAIGHT_TRAVERSE(0.2000, 0.0000, -0.5000, 0.0000, 0.0000, 0.0000) + N..... ENABLE_FEED_OVERRIDE() + N..... STRAIGHT_TRAVERSE(0.2000, 0.0000, 0.1745, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.0800, 0.0000, 0.1745, 0.0000, 0.0000, 0.0000) + N..... DISABLE_FEED_OVERRIDE() + N..... START_SPEED_FEED_SYNC(0.050000,0) + N..... STRAIGHT_FEED(0.0800, 0.0000, -0.4500, 0.0000, 0.0000, 0.0000) + N..... START_SPEED_FEED_SYNC(0.067268,0) + N..... STRAIGHT_FEED(0.1250, 0.0000, -0.5000, 0.0000, 0.0000, 0.0000) + N..... STOP_SPEED_FEED_SYNCH() + N..... STRAIGHT_TRAVERSE(0.2000, 0.0000, -0.5000, 0.0000, 0.0000, 0.0000) + N..... ENABLE_FEED_OVERRIDE() + N..... STRAIGHT_TRAVERSE(0.2000, 0.0000, -0.5000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.5000, 0.0000, -0.5000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.5000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STOP_SPINDLE_TURNING(0) + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SELECT_PLANE(CANON_PLANE_XY) + N..... SET_FEED_MODE(0, 0) + N..... SET_FEED_RATE(0.0000) + N..... STOP_SPINDLE_TURNING(0) + N..... SET_SPINDLE_MODE(0 0.0000) + N..... PROGRAM_END() + N..... ON_RESET() + N..... ON_RESET() diff --git a/wasm-port/vendor/linuxcnc/tests/interp/g76/g76only.ngc b/wasm-port/vendor/linuxcnc/tests/interp/g76/g76only.ngc new file mode 100644 index 0000000..c8dfc99 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/g76/g76only.ngc @@ -0,0 +1,30 @@ +(cut a small 1/4-20 thread and part it) + +g20 g64 g18 + +(thread) +t4 m6 +g43 +s800 m3 +g4p1 +g0z.2x.2 + +(p = thread pitch, distance per revolution) +(z = end of drive line) +(i = offset from drive line to thread peaks) +( negative i means the threads are at a smaller radius than the drive line,) +( so i is negative for outside threads, positive for inside threads) +(j = initial cut depth; subsequent depths follow degression formula) +(r = depth degression: 1.0 = constant depth, 2.0 = constant area) +( any number >= 1.0 allowed) +(k = full thread depth) +(q = "compound slide" angle) +(h = number of spring passes) +(e = distance along drive line used for tapered start/end) +(l = which ends get the taper: 0 = neither, 1 = begin, 2 = end, 3 = both) +g76 p.05 z-.5 i-.075 j.008 k.045 h3 r2.0 q29.5 e.05 l2 +g0x.5 +g0z0 +m5 + +m2 diff --git a/wasm-port/vendor/linuxcnc/tests/interp/g76/test.sh b/wasm-port/vendor/linuxcnc/tests/interp/g76/test.sh new file mode 100644 index 0000000..1993dcb --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/g76/test.sh @@ -0,0 +1,3 @@ +#!/bin/bash +rs274 -t test.tbl -g g76only.ngc | awk '{$1=""; print}' +exit "${PIPESTATUS[0]}" diff --git a/wasm-port/vendor/linuxcnc/tests/interp/g76/test.tbl b/wasm-port/vendor/linuxcnc/tests/interp/g76/test.tbl new file mode 100644 index 0000000..5f3da5c --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/g76/test.tbl @@ -0,0 +1,5 @@ +T1 P1 Z0.5 D0.0625;first tool +T2 P2 Z0.7 D0.125; +T3 P3 Z0.5 D0.25; +T4 P4 Z0.7 D1.0; +T32 P32 Z0.5 D0.0;last tool \ No newline at end of file diff --git a/wasm-port/vendor/linuxcnc/tests/interp/good/good-arc.big.imperial.center-format.ngc b/wasm-port/vendor/linuxcnc/tests/interp/good/good-arc.big.imperial.center-format.ngc new file mode 100644 index 0000000..fc77c53 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/good/good-arc.big.imperial.center-format.ngc @@ -0,0 +1,5 @@ +g20 +f1 +g0x0y0z0 +g2 x600 i[300 + [100 * [0.00099 * sqrt[2]]]] +m2 diff --git a/wasm-port/vendor/linuxcnc/tests/interp/good/good-arc.big.metric.center-format.ngc b/wasm-port/vendor/linuxcnc/tests/interp/good/good-arc.big.metric.center-format.ngc new file mode 100644 index 0000000..4e90177 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/good/good-arc.big.metric.center-format.ngc @@ -0,0 +1,5 @@ +g21 +f1 +g0x0y0z0 +g2 x6000 i[3000 + [100 * [0.0099 * sqrt[2]]]] +m2 diff --git a/wasm-port/vendor/linuxcnc/tests/interp/good/good-arc.medium.imperial.center-format.ngc b/wasm-port/vendor/linuxcnc/tests/interp/good/good-arc.medium.imperial.center-format.ngc new file mode 100644 index 0000000..6c6e4a5 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/good/good-arc.medium.imperial.center-format.ngc @@ -0,0 +1,5 @@ +g20 +f1 +g0x0y0z0 +g2 x200 i[0.9995 * 100] +m2 diff --git a/wasm-port/vendor/linuxcnc/tests/interp/good/good-arc.medium.metric.center-format.ngc b/wasm-port/vendor/linuxcnc/tests/interp/good/good-arc.medium.metric.center-format.ngc new file mode 100644 index 0000000..8439c78 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/good/good-arc.medium.metric.center-format.ngc @@ -0,0 +1,5 @@ +g21 +f1 +g0x0y0z0 +g2 x2000 i[0.9995 * 1000] +m2 diff --git a/wasm-port/vendor/linuxcnc/tests/interp/good/good-arc.small.imperial.center-format.ngc b/wasm-port/vendor/linuxcnc/tests/interp/good/good-arc.small.imperial.center-format.ngc new file mode 100644 index 0000000..39891d8 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/good/good-arc.small.imperial.center-format.ngc @@ -0,0 +1,5 @@ +g20 +f1 +g0x0y0z0 +g2 x5.000 y0 i[2.500 - [0.00099 * sqrt[2]]] +m2 diff --git a/wasm-port/vendor/linuxcnc/tests/interp/good/good-arc.small.metric.center-format.ngc b/wasm-port/vendor/linuxcnc/tests/interp/good/good-arc.small.metric.center-format.ngc new file mode 100644 index 0000000..81dc8d0 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/good/good-arc.small.metric.center-format.ngc @@ -0,0 +1,5 @@ +g21 +f1 +g0x0y0z0 +g2 x50.00 y0 i[25.00 - [0.0099 * sqrt[2]]] +m2 diff --git a/wasm-port/vendor/linuxcnc/tests/interp/inside-corners/README b/wasm-port/vendor/linuxcnc/tests/interp/inside-corners/README new file mode 100644 index 0000000..cf5d8b4 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/inside-corners/README @@ -0,0 +1,6 @@ +This is a test program that shows all (?) the cases of lines and +arcs coming together to form concave corners, convex corners, +and tangencies. + +This test does the same complicated path in XY and ZX planes. + diff --git a/wasm-port/vendor/linuxcnc/tests/interp/inside-corners/expected b/wasm-port/vendor/linuxcnc/tests/interp/inside-corners/expected new file mode 100644 index 0000000..0312994 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/inside-corners/expected @@ -0,0 +1,592 @@ + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SET_FEED_REFERENCE(CANON_XYZ) + N..... ON_RESET() + N..... SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, 0.000000) + N..... SET_NAIVECAM_TOLERANCE(0.0000) + N..... SELECT_PLANE(CANON_PLANE_XY) + N..... USE_LENGTH_UNITS(CANON_UNITS_INCHES) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... USE_TOOL_LENGTH_OFFSET(0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000, 0.0000 0.0000 0.0000) + N..... COMMENT("interpreter: feed mode set to units per minute") + N..... SET_FEED_MODE(0, 0) + N..... SET_FEED_RATE(0.0000) + N..... COMMENT("interpreter: continuing to use same coordinate system") + N..... COMMENT("interpreter: motion mode set to none") + N..... STOP_SPINDLE_TURNING(0) + N..... STRAIGHT_TRAVERSE(0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000) + N..... PROGRAM_STOP() + N..... SET_SPINDLE_SPEED(0, 1000.0000) + N..... START_SPINDLE_CLOCKWISE(0) + N..... DWELL(3.0000) + N..... STRAIGHT_TRAVERSE(0.0000, 0.0000, 0.0200, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.0000, 0.0000, 0.0200, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(0.0000, 0.0000, -0.1000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on left") + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(0.6767, 0.2334, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(0.3359, 0.4419, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.2281, 1.3456, 0.6280, 1.0458, 1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(0.1253, 0.9881, 0.6188, 1.3456, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(0.7669, 1.4548, 0.3690, 1.3275, 1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(0.6867, 1.7527, 0.9356, 1.6600, 1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(0.3459, 1.7626, 0.5180, 1.8156, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(0.0652, 1.5342, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(0.0652, 2.4577, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(0.6065, 2.4577, 0.3359, 2.4577, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.4888, 2.4577, 1.0476, 2.4577, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.8597, 2.4577, 1.6743, 2.4577, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.3585, 2.0307, 1.4272, 2.4577, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(2.3911, 2.1499, 1.7888, 2.8353, 1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(2.1404, 1.3952, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.7494, 1.6236, 1.9143, 1.4570, 1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(2.5014, 1.3456, 2.0605, 1.3092, 1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(2.7720, 1.4846, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(2.6618, 2.8450, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(2.2708, 2.8450, 2.4663, 2.8292, 1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.8296, 2.8450, 2.0502, 2.8450, 1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(1.8296, 3.5600, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(1.2883, 3.5600, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.2883, 3.2720, 1.2883, 3.4160, 1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(1.4587, 3.2720, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.4587, 3.0138, 1.4587, 3.1429, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(0.7970, 3.4408, 1.4587, 3.7400, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.0376, 3.8083, 1.0341, 3.5480, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(3.2332, 3.5004, 0.9193, -5.0194, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(3.2132, 2.9940, 3.1651, 3.2495, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(3.0728, 2.5968, 3.2582, 2.7547, 1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(3.4437, 2.1003, -0.6286, -0.5553, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(3.1530, 0.9682, 2.7799, 1.6674, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(3.2633, 0.4518, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(2.6317, 0.8391, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(2.3409, 0.3227, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(2.1805, 0.4419, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(1.7093, 0.1440, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(1.4086, 0.4121, -0.1000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(1.0000, 0.0000, -0.1000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(1.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(1.0000, 0.0000, 0.0200, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.0000, 0.0000, 0.0200, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(0.0000, 0.0000, -0.1000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on right") + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(0.7012, 0.1625, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(0.7158, 0.2974, 0.6767, 0.2334, 1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.7051, 0.3040, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.2952, 1.3791, 0.6280, 1.0458, 1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.1531, 1.3456, 1.2281, 1.3456, 1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(0.4443, 0.8405, 0.6188, 1.3456, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(0.8618, 1.3275, 0.3690, 1.3275, 1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(0.6164, 1.7789, 0.9356, 1.6600, 1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(0.4176, 1.7847, 0.5180, 1.8156, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(0.2986, 1.8208, 0.3459, 1.7626, 1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.1402, 1.6919, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(0.1402, 2.4577, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(0.5315, 2.4577, 0.3359, 2.4577, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(0.6815, 2.4577, 0.6065, 2.4577, 1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(1.4138, 2.4577, 1.0476, 2.4577, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.5638, 2.4577, 1.4888, 2.4577, 1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(1.7847, 2.4577, 1.6743, 2.4577, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.3704, 2.1047, 1.4272, 2.4577, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.3231, 1.9646, 1.3585, 2.0307, 1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(2.2497, 1.9620, 1.7888, 2.8353, 1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(2.1489, 1.6587, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.6966, 1.6769, 1.9143, 1.4570, 1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(2.5778, 1.3005, 2.0605, 1.3092, 1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(2.8063, 1.4179, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(2.8468, 1.4907, 2.7720, 1.4846, 1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(2.7366, 2.8511, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(2.2822, 3.0282, 2.4663, 2.8292, 1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.9046, 3.1023, 2.0502, 2.8450, 1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(1.9046, 3.5600, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.8296, 3.6350, 1.8296, 3.5600, 1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(1.2883, 3.6350, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.2883, 3.1970, 1.2883, 3.4160, 1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(1.4587, 3.1970, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.4587, 3.0888, 1.4587, 3.1429, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(0.8653, 3.4717, 1.4587, 3.7400, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.0366, 3.7333, 1.0341, 3.5480, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(3.2135, 3.4280, 0.9193, -5.0194, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(3.1993, 3.0677, 3.1651, 3.2495, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(3.0157, 2.5482, 3.2582, 2.7547, 1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(3.3809, 2.0593, -0.6286, -0.5553, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(3.1177, 1.0344, 2.7799, 1.6674, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(3.0797, 0.9525, 3.1530, 0.9682, 1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(3.1534, 0.6072, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(2.6709, 0.9030, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(2.5663, 0.8759, 2.6317, 0.8391, 1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(2.3173, 0.4337, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(2.2252, 0.5021, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(2.1404, 0.5053, 2.1805, 0.4419, 1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(1.7170, 0.2376, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(1.4585, 0.4681, -0.1000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(1.0000, 0.0000, -0.1000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(1.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(1.0000, 0.0000, 0.0200, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.0000, 0.0000, 0.0200, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(0.0000, 0.0000, -0.1000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on left") + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(0.5019, 0.2524, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(0.2968, 0.3779, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(0.3686, 0.5094, 0.3359, 0.4419, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(1.2235, 1.0250, 0.6280, 1.0458, 1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(0.0646, 0.9441, 0.6188, 1.3456, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(0.1690, 1.0490, 0.1253, 0.9881, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(0.6955, 1.4319, 0.3690, 1.3275, 1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(0.8145, 1.5127, 0.7669, 1.4548, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(0.7570, 1.7265, 0.9356, 1.6600, 1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(0.3250, 1.6489, 0.5180, 1.8156, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(0.1125, 1.4760, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(-0.0098, 1.5342, 0.0652, 1.5342, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-0.0098, 2.4577, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(0.5885, 2.6936, 0.3359, 2.4577, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.5194, 2.6670, 1.0476, 2.4577, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.9347, 2.4577, 1.6743, 2.4577, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.6616, 2.0076, 1.4272, 2.4577, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(2.3416, 2.2062, 1.7888, 2.8353, 1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(2.4623, 2.1263, 2.3911, 2.1499, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(2.2116, 1.3716, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(2.0681, 1.4150, 2.1404, 1.3952, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(1.8022, 1.5703, 1.9143, 1.4570, 1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(2.4267, 1.3394, 2.0605, 1.3092, 1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(2.4671, 1.4123, 2.5014, 1.3456, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(2.6932, 1.5284, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(2.5870, 2.8389, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(2.3456, 2.8390, 2.4663, 2.8292, 1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(2.1958, 2.8450, 2.2708, 2.8450, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(1.9046, 2.8450, 2.0502, 2.8450, 1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.7546, 2.8450, 1.8296, 2.8450, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(1.7546, 3.4850, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(1.2883, 3.4850, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.2883, 3.3470, 1.2883, 3.4160, 1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(1.4587, 3.3470, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.4587, 2.9388, 1.4587, 3.1429, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(0.7287, 3.4099, 1.4587, 3.7400, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.0386, 3.8833, 1.0341, 3.5480, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(3.2529, 3.5728, 0.9193, -5.0194, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(3.2271, 2.9203, 3.1651, 3.2495, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(3.1299, 2.6454, 3.2582, 2.7547, 1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(3.5065, 2.1413, -0.6286, -0.5553, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(3.2377, 0.9305, 2.7799, 1.6674, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(3.3366, 0.4675, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(3.2241, 0.3879, 3.2633, 0.4518, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(2.6589, 0.7345, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(2.4063, 0.2859, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(2.2962, 0.2625, 2.3409, 0.3227, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(2.1771, 0.3510, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(1.7494, 0.0806, -0.1000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.6594, 0.0880, 1.7093, 0.1440, -1, -0.1000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(1.3587, 0.3561, -0.1000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(1.0000, 0.0000, -0.1000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(1.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000) + N..... SELECT_PLANE(CANON_PLANE_XZ) + N..... STRAIGHT_TRAVERSE(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on left") + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(0.2334, 0.0000, 0.6767, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(0.4419, 0.0000, 0.3359, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.2281, 1.3456, 0.6280, 1.0458, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(0.1253, 0.9881, 0.6188, 1.3456, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(0.7669, 1.4548, 0.3690, 1.3275, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(0.6867, 1.7527, 0.9356, 1.6600, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(0.3459, 1.7626, 0.5180, 1.8156, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(1.5342, 0.0000, 0.0652, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(2.4577, 0.0000, 0.0652, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(0.6065, 2.4577, 0.3359, 2.4577, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.4888, 2.4577, 1.0476, 2.4577, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.8597, 2.4577, 1.6743, 2.4577, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.3585, 2.0307, 1.4272, 2.4577, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(2.3911, 2.1499, 1.7888, 2.8353, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(1.3952, 0.0000, 2.1404, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.7494, 1.6236, 1.9143, 1.4570, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(2.5014, 1.3456, 2.0605, 1.3092, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(1.4846, 0.0000, 2.7720, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(2.8450, 0.0000, 2.6618, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(2.2708, 2.8450, 2.4663, 2.8292, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.8296, 2.8450, 2.0502, 2.8450, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(3.5600, 0.0000, 1.8296, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(3.5600, 0.0000, 1.2883, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.2883, 3.2720, 1.2883, 3.4160, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(3.2720, 0.0000, 1.4587, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.4587, 3.0138, 1.4587, 3.1429, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(0.7970, 3.4408, 1.4587, 3.7400, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.0376, 3.8083, 1.0341, 3.5480, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(3.2332, 3.5004, 0.9193, -5.0194, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(3.2132, 2.9940, 3.1651, 3.2495, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(3.0728, 2.5968, 3.2582, 2.7547, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(3.4437, 2.1003, -0.6286, -0.5553, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(3.1530, 0.9682, 2.7799, 1.6674, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(0.4518, 0.0000, 3.2633, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(0.8391, 0.0000, 2.6317, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(0.3227, 0.0000, 2.3409, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(0.4419, 0.0000, 2.1805, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(0.1440, 0.0000, 1.7093, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(0.4121, 0.0000, 1.4086, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000) + N..... SELECT_PLANE(CANON_PLANE_XZ) + N..... STRAIGHT_TRAVERSE(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on right") + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(0.1625, 0.0000, 0.7012, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(0.7158, 0.2974, 0.6767, 0.2334, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.3040, 0.0000, 0.7051, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.2952, 1.3791, 0.6280, 1.0458, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.1531, 1.3456, 1.2281, 1.3456, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(0.4443, 0.8405, 0.6188, 1.3456, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(0.8618, 1.3275, 0.3690, 1.3275, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(0.6164, 1.7789, 0.9356, 1.6600, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(0.4176, 1.7847, 0.5180, 1.8156, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(0.2986, 1.8208, 0.3459, 1.7626, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(1.6919, 0.0000, 0.1402, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(2.4577, 0.0000, 0.1402, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(0.5315, 2.4577, 0.3359, 2.4577, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(0.6815, 2.4577, 0.6065, 2.4577, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(1.4138, 2.4577, 1.0476, 2.4577, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.5638, 2.4577, 1.4888, 2.4577, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(1.7847, 2.4577, 1.6743, 2.4577, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.3704, 2.1047, 1.4272, 2.4577, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.3231, 1.9646, 1.3585, 2.0307, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(2.2497, 1.9620, 1.7888, 2.8353, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(1.6587, 0.0000, 2.1489, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.6966, 1.6769, 1.9143, 1.4570, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(2.5778, 1.3005, 2.0605, 1.3092, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(1.4179, 0.0000, 2.8063, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(2.8468, 1.4907, 2.7720, 1.4846, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(2.8511, 0.0000, 2.7366, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(2.2822, 3.0282, 2.4663, 2.8292, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.9046, 3.1023, 2.0502, 2.8450, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(3.5600, 0.0000, 1.9046, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.8296, 3.6350, 1.8296, 3.5600, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(3.6350, 0.0000, 1.2883, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.2883, 3.1970, 1.2883, 3.4160, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(3.1970, 0.0000, 1.4587, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.4587, 3.0888, 1.4587, 3.1429, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(0.8653, 3.4717, 1.4587, 3.7400, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.0366, 3.7333, 1.0341, 3.5480, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(3.2135, 3.4280, 0.9193, -5.0194, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(3.1993, 3.0677, 3.1651, 3.2495, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(3.0157, 2.5482, 3.2582, 2.7547, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(3.3809, 2.0593, -0.6286, -0.5553, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(3.1177, 1.0344, 2.7799, 1.6674, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(3.0797, 0.9525, 3.1530, 0.9682, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.6072, 0.0000, 3.1534, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(0.9030, 0.0000, 2.6709, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(2.5663, 0.8759, 2.6317, 0.8391, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.4337, 0.0000, 2.3173, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(0.5021, 0.0000, 2.2252, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(2.1404, 0.5053, 2.1805, 0.4419, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.2376, 0.0000, 1.7170, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(0.4681, 0.0000, 1.4585, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000) + N..... SELECT_PLANE(CANON_PLANE_XZ) + N..... STRAIGHT_TRAVERSE(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on left") + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(0.2524, 0.0000, 0.5019, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(0.3779, 0.0000, 0.2968, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(0.3686, 0.5094, 0.3359, 0.4419, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(1.2235, 1.0250, 0.6280, 1.0458, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(0.0646, 0.9441, 0.6188, 1.3456, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(0.1690, 1.0490, 0.1253, 0.9881, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(0.6955, 1.4319, 0.3690, 1.3275, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(0.8145, 1.5127, 0.7669, 1.4548, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(0.7570, 1.7265, 0.9356, 1.6600, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(0.3250, 1.6489, 0.5180, 1.8156, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(1.4760, 0.0000, 0.1125, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(-0.0098, 1.5342, 0.0652, 1.5342, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(2.4577, 0.0000, -0.0098, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(0.5885, 2.6936, 0.3359, 2.4577, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.5194, 2.6670, 1.0476, 2.4577, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.9347, 2.4577, 1.6743, 2.4577, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.6616, 2.0076, 1.4272, 2.4577, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(2.3416, 2.2062, 1.7888, 2.8353, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(2.4623, 2.1263, 2.3911, 2.1499, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(1.3716, 0.0000, 2.2116, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(2.0681, 1.4150, 2.1404, 1.3952, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(1.8022, 1.5703, 1.9143, 1.4570, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(2.4267, 1.3394, 2.0605, 1.3092, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(2.4671, 1.4123, 2.5014, 1.3456, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(1.5284, 0.0000, 2.6932, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(2.8389, 0.0000, 2.5870, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(2.3456, 2.8390, 2.4663, 2.8292, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(2.1958, 2.8450, 2.2708, 2.8450, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(1.9046, 2.8450, 2.0502, 2.8450, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.7546, 2.8450, 1.8296, 2.8450, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(3.4850, 0.0000, 1.7546, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(3.4850, 0.0000, 1.2883, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.2883, 3.3470, 1.2883, 3.4160, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(3.3470, 0.0000, 1.4587, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.4587, 2.9388, 1.4587, 3.1429, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(0.7287, 3.4099, 1.4587, 3.7400, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.0386, 3.8833, 1.0341, 3.5480, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(3.2529, 3.5728, 0.9193, -5.0194, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(3.2271, 2.9203, 3.1651, 3.2495, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(3.1299, 2.6454, 3.2582, 2.7547, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(3.5065, 2.1413, -0.6286, -0.5553, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(3.2377, 0.9305, 2.7799, 1.6674, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(0.4675, 0.0000, 3.3366, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(3.2241, 0.3879, 3.2633, 0.4518, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.7345, 0.0000, 2.6589, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(0.2859, 0.0000, 2.4063, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(2.2962, 0.2625, 2.3409, 0.3227, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.3510, 0.0000, 2.1771, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(0.0806, 0.0000, 1.7494, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(8.0000) + N..... ARC_FEED(1.6594, 0.0880, 1.7093, 0.1440, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.3561, 0.0000, 1.3587, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... SET_FEED_RATE(8.0000) + N..... STRAIGHT_FEED(0.0000, 0.0000, 1.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SELECT_PLANE(CANON_PLANE_XY) + N..... SET_FEED_MODE(0, 0) + N..... SET_FEED_RATE(0.0000) + N..... STOP_SPINDLE_TURNING(0) + N..... SET_SPINDLE_MODE(0 0.0000) + N..... PROGRAM_END() + N..... ON_RESET() + N..... ON_RESET() diff --git a/wasm-port/vendor/linuxcnc/tests/interp/inside-corners/test.ngc b/wasm-port/vendor/linuxcnc/tests/interp/inside-corners/test.ngc new file mode 100644 index 0000000..00d9fd9 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/inside-corners/test.ngc @@ -0,0 +1,115 @@ +G64 +G17 G20 G40 G49 +G54 G80 G90 G94 +M5 +G00 Z1.0000 +M00 +S1000 M3 +G04 P3 +o100 sub +G00 Z0.0200 +G00 X0.0000 Y0.0000 +G01 Z-0.1000 F8.00 +G41.1 D#100 +G01 X0.6767 Y0.2334 F8.00 +G01 X0.3359 Y0.4419 F8.00 +G03 X1.2281 Y1.3456 I0.2921 J0.6039 F8.00 +G02 X0.1253 Y0.9881 I-0.6093 J0.0000 F8.00 +G03 X0.7669 Y1.4548 I0.2437 J0.3394 F8.00 +G03 X0.6867 Y1.7527 I0.1687 J0.2052 F8.00 +G02 X0.3459 Y1.7626 I-0.1687 J0.0629 F8.00 +G01 X0.0652 Y1.5342 F8.00 +G01 X0.0652 Y2.4577 F8.00 +G02 X0.6065 Y2.4577 I0.2707 J0.0000 F8.00 +G02 X1.4888 Y2.4577 I0.4411 J0.0000 F8.00 +G02 X1.8597 Y2.4577 I0.1855 J0.0000 F8.00 +G02 X1.3585 Y2.0307 I-0.4325 J0.0000 F8.00 +G03 X2.3911 Y2.1499 I0.4303 J0.8046 F8.00 +G01 X2.1404 Y1.3952 F8.00 +G03 X1.7494 Y1.6236 I-0.2261 J0.0618 F8.00 +G03 X2.5014 Y1.3456 I0.3111 J-0.3144 F8.00 +G01 X2.7720 Y1.4846 F8.00 +G01 X2.6618 Y2.8450 F8.00 +G03 X2.2708 Y2.8450 I-0.1955 J-0.0158 F8.00 +G03 X1.8296 Y2.8450 I-0.2206 J0.0000 F8.00 +G01 X1.8296 Y3.5600 F8.00 ; XXX +G01 X1.2883 Y3.5600 F8.00 +G03 X1.2883 Y3.2720 I0.0000 J-0.1440 F8.00 +G01 X1.4587 Y3.2720 F8.00 +G02 X1.4587 Y3.0138 I0.0000 J-0.1291 F8.00 +G02 X0.7970 Y3.4408 I0.0000 J0.7262 F8.00 +G02 X1.0376 Y3.8083 I0.2371 J0.1072 F8.00 +G02 X3.2332 Y3.5004 I-0.1183 J-8.8277 F8.00 +G02 X3.2132 Y2.9940 I-0.0681 J-0.2509 F8.00 +G03 X3.0728 Y2.5968 I0.0450 J-0.2393 F8.00 +G02 X3.4437 Y2.1003 I-3.7014 J-3.1521 F8.00 +G02 X3.1530 Y0.9682 I-0.6638 J-0.4329 F8.00 +G01 X3.2633 Y0.4518 F8.00 +G01 X2.6317 Y0.8391 F8.00 +G01 X2.3409 Y0.3227 F8.00 +G01 X2.1805 Y0.4419 F8.00 +G01 X1.7093 Y0.1440 F8.00 +G01 X1.4086 Y0.4121 F8.00 +G40 +G01 X1.0000 Y0.0000 F8.00 +G00 Z1.0000 +o100 endsub +#100=0 +o100 call +#100=-.15 +o100 call +#100=.15 +o100 call +o101 sub +G18 +G00 Z0.0000 X0.0000 +G41.1 D#100 +G01 Z0.6767 X0.2334 F8.00 +G01 Z0.3359 X0.4419 F8.00 +G03 Z1.2281 X1.3456 K0.2921 I0.6039 F8.00 +G02 Z0.1253 X0.9881 K-0.6093 I0.0000 F8.00 +G03 Z0.7669 X1.4548 K0.2437 I0.3394 F8.00 +G03 Z0.6867 X1.7527 K0.1687 I0.2052 F8.00 +G02 Z0.3459 X1.7626 K-0.1687 I0.0629 F8.00 +G01 Z0.0652 X1.5342 F8.00 +G01 Z0.0652 X2.4577 F8.00 +G02 Z0.6065 X2.4577 K0.2707 I0.0000 F8.00 +G02 Z1.4888 X2.4577 K0.4411 I0.0000 F8.00 +G02 Z1.8597 X2.4577 K0.1855 I0.0000 F8.00 +G02 Z1.3585 X2.0307 K-0.4325 I0.0000 F8.00 +G03 Z2.3911 X2.1499 K0.4303 I0.8046 F8.00 +G01 Z2.1404 X1.3952 F8.00 +G03 Z1.7494 X1.6236 K-0.2261 I0.0618 F8.00 +G03 Z2.5014 X1.3456 K0.3111 I-0.3144 F8.00 +G01 Z2.7720 X1.4846 F8.00 +G01 Z2.6618 X2.8450 F8.00 +G03 Z2.2708 X2.8450 K-0.1955 I-0.0158 F8.00 +G03 Z1.8296 X2.8450 K-0.2206 I0.0000 F8.00 +G01 Z1.8296 X3.5600 F8.00 ; XXX +G01 Z1.2883 X3.5600 F8.00 +G03 Z1.2883 X3.2720 K0.0000 I-0.1440 F8.00 +G01 Z1.4587 X3.2720 F8.00 +G02 Z1.4587 X3.0138 K0.0000 I-0.1291 F8.00 +G02 Z0.7970 X3.4408 K0.0000 I0.7262 F8.00 +G02 Z1.0376 X3.8083 K0.2371 I0.1072 F8.00 +G02 Z3.2332 X3.5004 K-0.1183 I-8.8277 F8.00 +G02 Z3.2132 X2.9940 K-0.0681 I-0.2509 F8.00 +G03 Z3.0728 X2.5968 K0.0450 I-0.2393 F8.00 +G02 Z3.4437 X2.1003 K-3.7014 I-3.1521 F8.00 +G02 Z3.1530 X0.9682 K-0.6638 I-0.4329 F8.00 +G01 Z3.2633 X0.4518 F8.00 +G01 Z2.6317 X0.8391 F8.00 +G01 Z2.3409 X0.3227 F8.00 +G01 Z2.1805 X0.4419 F8.00 +G01 Z1.7093 X0.1440 F8.00 +G01 Z1.4086 X0.4121 F8.00 +G40 +G01 Z1.0000 X0.0000 F8.00 +o101 endsub +#100=0 +o101 call +#100=-.15 +o101 call +#100=.15 +o101 call +M02 diff --git a/wasm-port/vendor/linuxcnc/tests/interp/inside-corners/test.sh b/wasm-port/vendor/linuxcnc/tests/interp/inside-corners/test.sh new file mode 100644 index 0000000..2afa80d --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/inside-corners/test.sh @@ -0,0 +1,3 @@ +#!/bin/bash +rs274 -g test.ngc | awk '{$1=""; print}' +exit "${PIPESTATUS[0]}" diff --git a/wasm-port/vendor/linuxcnc/tests/interp/inverse-time-with-comp/README b/wasm-port/vendor/linuxcnc/tests/interp/inverse-time-with-comp/README new file mode 100644 index 0000000..164d422 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/inverse-time-with-comp/README @@ -0,0 +1,2 @@ +This test tests inverse time feed mode and that the feeds should +be the same whether or not compensation is on. diff --git a/wasm-port/vendor/linuxcnc/tests/interp/inverse-time-with-comp/expected b/wasm-port/vendor/linuxcnc/tests/interp/inverse-time-with-comp/expected new file mode 100644 index 0000000..e2193e7 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/inverse-time-with-comp/expected @@ -0,0 +1,114 @@ + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SET_FEED_REFERENCE(CANON_XYZ) + N..... ON_RESET() + N..... USE_LENGTH_UNITS(CANON_UNITS_INCHES) + N..... STRAIGHT_TRAVERSE(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on right") + N..... COMMENT("interpreter: feed mode set to inverse time") + N..... SET_FEED_MODE(0, 0) + N..... SET_FEED_RATE(30.0000) + N..... STRAIGHT_FEED(1.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(20.0000) + N..... STRAIGHT_FEED(1.0000, 1.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(40.0000) + N..... STRAIGHT_FEED(-1.0000, 1.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(40.0000) + N..... STRAIGHT_FEED(-1.0000, 2.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: feed mode set to units per minute") + N..... SET_FEED_MODE(0, 0) + N..... SET_FEED_RATE(0.0000) + N..... SET_FEED_RATE(33.0000) + N..... STRAIGHT_FEED(1.0000, 2.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(1.0000, 3.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.0000, 3.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.0000, 4.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: feed mode set to inverse time") + N..... SET_FEED_MODE(0, 0) + N..... SET_FEED_RATE(10.0000) + N..... ARC_FEED(0.0000, 5.0000, 0.0000, 4.5000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: feed mode set to units per minute") + N..... SET_FEED_MODE(0, 0) + N..... SET_FEED_RATE(0.0000) + N..... SET_FEED_RATE(25.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(0.0000, 6.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on right") + N..... COMMENT("interpreter: feed mode set to inverse time") + N..... SET_FEED_MODE(0, 0) + N..... SET_FEED_RATE(30.0000) + N..... STRAIGHT_FEED(1.0000, -0.2000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(20.0000) + N..... ARC_FEED(1.2000, 0.0000, 1.0000, 0.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(1.2000, 1.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(40.0000) + N..... ARC_FEED(1.0000, 1.2000, 1.0000, 1.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-0.8000, 1.2000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(40.0000) + N..... STRAIGHT_FEED(-0.8000, 1.8000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: feed mode set to units per minute") + N..... SET_FEED_MODE(0, 0) + N..... SET_FEED_RATE(0.0000) + N..... SET_FEED_RATE(33.0000) + N..... STRAIGHT_FEED(1.0000, 1.8000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(1.2000, 2.0000, 1.0000, 2.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(1.2000, 3.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(1.0000, 3.2000, 1.0000, 3.0000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.2000, 3.2000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.2000, 3.8292, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: feed mode set to inverse time") + N..... SET_FEED_MODE(0, 0) + N..... SET_FEED_RATE(10.0000) + N..... ARC_FEED(0.0000, 5.2000, 0.0000, 4.5000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: feed mode set to units per minute") + N..... SET_FEED_MODE(0, 0) + N..... SET_FEED_RATE(0.0000) + N..... SET_FEED_RATE(25.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(0.0000, 6.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: cutter radius compensation on left") + N..... COMMENT("interpreter: feed mode set to inverse time") + N..... SET_FEED_MODE(0, 0) + N..... SET_FEED_RATE(30.0000) + N..... STRAIGHT_FEED(0.8000, 0.2000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(20.0000) + N..... STRAIGHT_FEED(0.8000, 0.8000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(40.0000) + N..... STRAIGHT_FEED(-1.0000, 0.8000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_FEED_RATE(40.0000) + N..... ARC_FEED(-1.2000, 1.0000, -1.0000, 1.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-1.2000, 2.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: feed mode set to units per minute") + N..... SET_FEED_MODE(0, 0) + N..... SET_FEED_RATE(0.0000) + N..... SET_FEED_RATE(33.0000) + N..... ARC_FEED(-1.0000, 2.2000, -1.0000, 2.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.8000, 2.2000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(0.8000, 2.8000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-0.0000, 2.8000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(-0.2000, 3.0000, 0.0000, 3.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(-0.2000, 4.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: feed mode set to inverse time") + N..... SET_FEED_MODE(0, 0) + N..... SET_FEED_RATE(10.0000) + N..... ARC_FEED(0.0000, 4.2000, 0.0000, 4.0000, -1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... ARC_FEED(0.0000, 4.8000, 0.0000, 4.5000, 1, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: feed mode set to units per minute") + N..... SET_FEED_MODE(0, 0) + N..... SET_FEED_RATE(0.0000) + N..... SET_FEED_RATE(25.0000) + N..... COMMENT("interpreter: cutter radius compensation off") + N..... STRAIGHT_FEED(0.0000, 6.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SET_FEED_MODE(0, 0) + N..... SET_FEED_RATE(0.0000) + N..... STOP_SPINDLE_TURNING(0) + N..... SET_SPINDLE_MODE(0 0.0000) + N..... PROGRAM_END() + N..... ON_RESET() + N..... ON_RESET() diff --git a/wasm-port/vendor/linuxcnc/tests/interp/inverse-time-with-comp/inverse.ngc b/wasm-port/vendor/linuxcnc/tests/interp/inverse-time-with-comp/inverse.ngc new file mode 100644 index 0000000..085a996 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/inverse-time-with-comp/inverse.ngc @@ -0,0 +1,23 @@ +g20 +o100 sub +g0x0y0z0 +g42.1d#100 +g93g1x1f30 ;30 ipm +y1f20 ;20 ipm +x-1f20 ;40 ipm +y2f40 ;40 ipm +g94 +x1f33 ;33ipm +y3 +x0 +y4 +g93g3y5j.5f[20/3.14159265359] ;10 ipm +g40g94g1y6f25 +o100 endsub +#100=0 +o100 call +#100=.4 +o100 call +#100=-.4 +o100 call +m2 diff --git a/wasm-port/vendor/linuxcnc/tests/interp/inverse-time-with-comp/test.sh b/wasm-port/vendor/linuxcnc/tests/interp/inverse-time-with-comp/test.sh new file mode 100644 index 0000000..cec720f --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/inverse-time-with-comp/test.sh @@ -0,0 +1,3 @@ +#!/bin/bash +rs274 -g inverse.ngc | awk '{$1=""; print}' +exit "${PIPESTATUS[0]}" diff --git a/wasm-port/vendor/linuxcnc/tests/interp/m98m99/03-error-M98-no-P-word/expected b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/03-error-M98-no-P-word/expected new file mode 100644 index 0000000..10d4b4c --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/03-error-M98-no-P-word/expected @@ -0,0 +1,12 @@ +executing + 1 N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + 2 N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + 3 N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + 4 N..... SET_XY_ROTATION(0.0000) + 5 N..... SET_FEED_REFERENCE(CANON_XYZ) + 6 N..... ON_RESET() + 7 N..... COMMENT("Fanuc M98 requires P-word ") +Found 'm98' code with no P-word +M98 + 8 N..... ON_RESET() + 9 N..... ON_RESET() diff --git a/wasm-port/vendor/linuxcnc/tests/interp/m98m99/03-error-M98-no-P-word/test.ngc b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/03-error-M98-no-P-word/test.ngc new file mode 100644 index 0000000..383bdfb --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/03-error-M98-no-P-word/test.ngc @@ -0,0 +1,9 @@ +% +( Fanuc M98 requires P-word ) + +M98 + +O1 +#1 = 13 +M99 +% diff --git a/wasm-port/vendor/linuxcnc/tests/interp/m98m99/03-error-M98-no-P-word/test.sh b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/03-error-M98-no-P-word/test.sh new file mode 100755 index 0000000..56d1f14 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/03-error-M98-no-P-word/test.sh @@ -0,0 +1,7 @@ +#!/bin/bash +if ! rs274 -g test.ngc 2>&1; then + # expected to fail + exit 0 +fi + +exit 1 diff --git a/wasm-port/vendor/linuxcnc/tests/interp/m98m99/04-M98-but-no-sub/expected b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/04-M98-but-no-sub/expected new file mode 100644 index 0000000..60227fb --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/04-M98-but-no-sub/expected @@ -0,0 +1,10 @@ + 1 N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + 2 N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + 3 N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + 4 N..... SET_XY_ROTATION(0.0000) + 5 N..... SET_FEED_REFERENCE(CANON_XYZ) + 6 N..... ON_RESET() + 7 N..... COMMENT("M98 call non-existant sub ") + 8 N..... FINISH() + 9 N..... ON_RESET() + 10 N..... ON_RESET() diff --git a/wasm-port/vendor/linuxcnc/tests/interp/m98m99/04-M98-but-no-sub/test.ngc b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/04-M98-but-no-sub/test.ngc new file mode 100644 index 0000000..52889e0 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/04-M98-but-no-sub/test.ngc @@ -0,0 +1,6 @@ +% +( M98 call non-existant sub ) + +M98 P1 +M30 +% diff --git a/wasm-port/vendor/linuxcnc/tests/interp/m98m99/04-M98-but-no-sub/test.sh b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/04-M98-but-no-sub/test.sh new file mode 100755 index 0000000..2bc8cf4 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/04-M98-but-no-sub/test.sh @@ -0,0 +1,2 @@ +#!/bin/bash -e +! rs274 -g test.ngc diff --git a/wasm-port/vendor/linuxcnc/tests/interp/m98m99/05-M98-loops/expected b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/05-M98-loops/expected new file mode 100644 index 0000000..592cb83 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/05-M98-loops/expected @@ -0,0 +1,135 @@ + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SET_FEED_REFERENCE(CANON_XYZ) + N..... ON_RESET() + N..... COMMENT("A simple O sub example ") + N..... SET_FEED_RATE(40.0000) + N..... STRAIGHT_TRAVERSE(0.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: distance mode changed to incremental") + N..... COMMENT("interpreter: retract mode set to r_plane") + N..... STRAIGHT_TRAVERSE(0.0000, 0.0000, 0.5000, 0.0000, 0.0000, 0.0000) + N..... SET_MOTION_CONTROL_MODE(CANON_EXACT_PATH) + N..... STRAIGHT_TRAVERSE(1.0000, 0.0000, 0.5000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(1.0000, 0.0000, -0.5000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(1.0000, 0.0000, 0.5000, 0.0000, 0.0000, 0.0000) + N..... SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, 0.000000) + N..... SET_NAIVECAM_TOLERANCE(0.0000) + SUB O1 PARAM1 = 1.000000 + N..... COMMENT("interpreter: retract mode set to r_plane") + N..... STRAIGHT_TRAVERSE(1.0000, 0.0000, 0.5000, 0.0000, 0.0000, 0.0000) + N..... SET_MOTION_CONTROL_MODE(CANON_EXACT_PATH) + N..... STRAIGHT_TRAVERSE(2.0000, 0.0000, 0.5000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(2.0000, 0.0000, -0.5000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(2.0000, 0.0000, 0.5000, 0.0000, 0.0000, 0.0000) + N..... SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, 0.000000) + N..... SET_NAIVECAM_TOLERANCE(0.0000) + SUB O1 PARAM1 = 2.000000 + N..... COMMENT("interpreter: retract mode set to r_plane") + N..... STRAIGHT_TRAVERSE(2.0000, 0.0000, 0.5000, 0.0000, 0.0000, 0.0000) + N..... SET_MOTION_CONTROL_MODE(CANON_EXACT_PATH) + N..... STRAIGHT_TRAVERSE(3.0000, 0.0000, 0.5000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(3.0000, 0.0000, -0.5000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(3.0000, 0.0000, 0.5000, 0.0000, 0.0000, 0.0000) + N..... SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, 0.000000) + N..... SET_NAIVECAM_TOLERANCE(0.0000) + SUB O1 PARAM1 = 3.000000 + N..... COMMENT("interpreter: retract mode set to r_plane") + N..... STRAIGHT_TRAVERSE(3.0000, 0.0000, 0.5000, 0.0000, 0.0000, 0.0000) + N..... SET_MOTION_CONTROL_MODE(CANON_EXACT_PATH) + N..... STRAIGHT_TRAVERSE(4.0000, 0.0000, 0.5000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(4.0000, 0.0000, -0.5000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(4.0000, 0.0000, 0.5000, 0.0000, 0.0000, 0.0000) + N..... SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, 0.000000) + N..... SET_NAIVECAM_TOLERANCE(0.0000) + SUB O1 PARAM1 = 4.000000 + N..... COMMENT("interpreter: retract mode set to r_plane") + N..... STRAIGHT_TRAVERSE(4.0000, 0.0000, 0.5000, 0.0000, 0.0000, 0.0000) + N..... SET_MOTION_CONTROL_MODE(CANON_EXACT_PATH) + N..... STRAIGHT_TRAVERSE(5.0000, 0.0000, 0.5000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(5.0000, 0.0000, -0.5000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(5.0000, 0.0000, 0.5000, 0.0000, 0.0000, 0.0000) + N..... SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, 0.000000) + N..... SET_NAIVECAM_TOLERANCE(0.0000) + SUB O1 PARAM1 = 5.000000 + N..... COMMENT("interpreter: retract mode set to r_plane") + N..... STRAIGHT_TRAVERSE(5.0000, 0.0000, 0.5000, 0.0000, 0.0000, 0.0000) + N..... SET_MOTION_CONTROL_MODE(CANON_EXACT_PATH) + N..... STRAIGHT_TRAVERSE(6.0000, 0.0000, 0.5000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(6.0000, 0.0000, -0.5000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(6.0000, 0.0000, 0.5000, 0.0000, 0.0000, 0.0000) + N..... SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, 0.000000) + N..... SET_NAIVECAM_TOLERANCE(0.0000) + SUB O1 PARAM1 = 6.000000 + N..... COMMENT("interpreter: retract mode set to r_plane") + N..... STRAIGHT_TRAVERSE(6.0000, 0.0000, 0.5000, 0.0000, 0.0000, 0.0000) + N..... SET_MOTION_CONTROL_MODE(CANON_EXACT_PATH) + N..... STRAIGHT_TRAVERSE(7.0000, 0.0000, 0.5000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(7.0000, 0.0000, -0.5000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(7.0000, 0.0000, 0.5000, 0.0000, 0.0000, 0.0000) + N..... SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, 0.000000) + N..... SET_NAIVECAM_TOLERANCE(0.0000) + SUB O1 PARAM1 = 7.000000 + N..... COMMENT("interpreter: retract mode set to r_plane") + N..... STRAIGHT_TRAVERSE(7.0000, 0.0000, 0.5000, 0.0000, 0.0000, 0.0000) + N..... SET_MOTION_CONTROL_MODE(CANON_EXACT_PATH) + N..... STRAIGHT_TRAVERSE(8.0000, 0.0000, 0.5000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(8.0000, 0.0000, -0.5000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(8.0000, 0.0000, 0.5000, 0.0000, 0.0000, 0.0000) + N..... SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, 0.000000) + N..... SET_NAIVECAM_TOLERANCE(0.0000) + SUB O1 PARAM1 = 8.000000 + N..... COMMENT("interpreter: retract mode set to r_plane") + N..... STRAIGHT_TRAVERSE(8.0000, 0.0000, 0.5000, 0.0000, 0.0000, 0.0000) + N..... SET_MOTION_CONTROL_MODE(CANON_EXACT_PATH) + N..... STRAIGHT_TRAVERSE(9.0000, 0.0000, 0.5000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(9.0000, 0.0000, -0.5000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(9.0000, 0.0000, 0.5000, 0.0000, 0.0000, 0.0000) + N..... SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, 0.000000) + N..... SET_NAIVECAM_TOLERANCE(0.0000) + SUB O1 PARAM1 = 9.000000 + N..... COMMENT("interpreter: retract mode set to r_plane") + N..... STRAIGHT_TRAVERSE(9.0000, 0.0000, 0.5000, 0.0000, 0.0000, 0.0000) + N..... SET_MOTION_CONTROL_MODE(CANON_EXACT_PATH) + N..... STRAIGHT_TRAVERSE(10.0000, 0.0000, 0.5000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(10.0000, 0.0000, -0.5000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(10.0000, 0.0000, 0.5000, 0.0000, 0.0000, 0.0000) + N..... SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, 0.000000) + N..... SET_NAIVECAM_TOLERANCE(0.0000) + SUB O1 PARAM1 = 10.000000 + MAIN 10LOOP PARAM1 = 10.000000 + N..... COMMENT("interpreter: distance mode changed to absolute") + N..... STRAIGHT_TRAVERSE(0.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000) + MAIN 0LOOP PARAM1 = 0.000000 + N..... STRAIGHT_TRAVERSE(0.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000) + N..... COMMENT("interpreter: distance mode changed to incremental") + N..... COMMENT("interpreter: retract mode set to r_plane") + N..... STRAIGHT_TRAVERSE(0.0000, 0.0000, 0.5000, 0.0000, 0.0000, 0.0000) + N..... SET_MOTION_CONTROL_MODE(CANON_EXACT_PATH) + N..... STRAIGHT_TRAVERSE(1.0000, 0.0000, 0.5000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(1.0000, 0.0000, -0.5000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(1.0000, 0.0000, 0.5000, 0.0000, 0.0000, 0.0000) + N..... SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, 0.000000) + N..... SET_NAIVECAM_TOLERANCE(0.0000) + SUB O1 PARAM1 = 1.000000 + N..... COMMENT("interpreter: retract mode set to r_plane") + N..... STRAIGHT_TRAVERSE(1.0000, 0.0000, 0.5000, 0.0000, 0.0000, 0.0000) + N..... SET_MOTION_CONTROL_MODE(CANON_EXACT_PATH) + N..... STRAIGHT_TRAVERSE(2.0000, 0.0000, 0.5000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_FEED(2.0000, 0.0000, -0.5000, 0.0000, 0.0000, 0.0000) + N..... STRAIGHT_TRAVERSE(2.0000, 0.0000, 0.5000, 0.0000, 0.0000, 0.0000) + N..... SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, 0.000000) + N..... SET_NAIVECAM_TOLERANCE(0.0000) + SUB O1 PARAM1 = 2.000000 + MAIN 2LOOP PARAM1 = 2.000000 + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SET_FEED_MODE(0, 0) + N..... SET_FEED_RATE(0.0000) + N..... STOP_SPINDLE_TURNING(0) + N..... SET_SPINDLE_MODE(0 0.0000) + N..... PALLET_SHUTTLE() + N..... PROGRAM_END() + N..... ON_RESET() + N..... ON_RESET() diff --git a/wasm-port/vendor/linuxcnc/tests/interp/m98m99/05-M98-loops/test.ngc b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/05-M98-loops/test.ngc new file mode 100644 index 0000000..ed3606c --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/05-M98-loops/test.ngc @@ -0,0 +1,27 @@ +% +( A simple O sub example ) + +F40 +; Test with 10 loops +#1 = 0 +G90 G0 X0 Y0 Z0.25 +M98 P1 L10 +(PRINT,X MAIN 10LOOP PARAM1 = #1) +; Test with 0 loops +#1 = 0 +G90 G0 X0 Y0 Z0.25 +M98 P1 L0 +(PRINT,X MAIN 0LOOP PARAM1 = #1) +; Test with 2 loops +#1 = 0 +G90 G0 X0 Y0 Z0.25 +M98 P1 L2 +(PRINT,X MAIN 2LOOP PARAM1 = #1) +M30 + +O1 +G91 G99 G81 X1 Z-1.0 R0.25 ; Drill to Z-1.0 +#1 = [#1 + 1] +(PRINT,X SUB O1 PARAM1 = #1) +M99 +% diff --git a/wasm-port/vendor/linuxcnc/tests/interp/m98m99/05-M98-loops/test.sh b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/05-M98-loops/test.sh new file mode 100755 index 0000000..2afa80d --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/05-M98-loops/test.sh @@ -0,0 +1,3 @@ +#!/bin/bash +rs274 -g test.ngc | awk '{$1=""; print}' +exit "${PIPESTATUS[0]}" diff --git a/wasm-port/vendor/linuxcnc/tests/interp/m98m99/06-error-mixed-sub-styles/O...-called-with-O..._call.ngc b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/06-error-mixed-sub-styles/O...-called-with-O..._call.ngc new file mode 100644 index 0000000..45ef766 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/06-error-mixed-sub-styles/O...-called-with-O..._call.ngc @@ -0,0 +1,9 @@ +% +( Fanuc 'O...' sub must be called with M98 ) + +O1 call + +O1 +(PRINT,X FANUC) +M99 +% diff --git a/wasm-port/vendor/linuxcnc/tests/interp/m98m99/06-error-mixed-sub-styles/O...-ended-with-O..._endsub.ngc b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/06-error-mixed-sub-styles/O...-ended-with-O..._endsub.ngc new file mode 100644 index 0000000..5719ba2 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/06-error-mixed-sub-styles/O...-ended-with-O..._endsub.ngc @@ -0,0 +1,9 @@ +% +( Fanuc 'O...' sub must end with M99 ) + +M98 P1 + +O1 +(PRINT,X FANUC) +O1 endsub +% diff --git a/wasm-port/vendor/linuxcnc/tests/interp/m98m99/06-error-mixed-sub-styles/O...-sub-called-with-M98.ngc b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/06-error-mixed-sub-styles/O...-sub-called-with-M98.ngc new file mode 100644 index 0000000..1d4fc9c --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/06-error-mixed-sub-styles/O...-sub-called-with-M98.ngc @@ -0,0 +1,9 @@ +% +( RS274NGC 'O...' sub must not be called with M98 ) + +M98 P1 + +O1 sub +(PRINT,X FANUC) +O1 endsub +% diff --git a/wasm-port/vendor/linuxcnc/tests/interp/m98m99/06-error-mixed-sub-styles/O...-sub-ended-with-M99.ngc b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/06-error-mixed-sub-styles/O...-sub-ended-with-M99.ngc new file mode 100644 index 0000000..1a777ed --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/06-error-mixed-sub-styles/O...-sub-ended-with-M99.ngc @@ -0,0 +1,9 @@ +% +( RS274NGC 'O... sub' sub must not end with M99 ) + +O1 call + +O1 sub +(PRINT,X FANUC) +M99 +% diff --git a/wasm-port/vendor/linuxcnc/tests/interp/m98m99/06-error-mixed-sub-styles/expected b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/06-error-mixed-sub-styles/expected new file mode 100644 index 0000000..fa874f3 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/06-error-mixed-sub-styles/expected @@ -0,0 +1,50 @@ +executing + 1 N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + 2 N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + 3 N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + 4 N..... SET_XY_ROTATION(0.0000) + 5 N..... SET_FEED_REFERENCE(CANON_XYZ) + 6 N..... ON_RESET() + 7 N..... COMMENT("Fanuc 'O...' sub must be called with M98 ") +Fanuc 'O....' subroutine must be called with 'M98' +O1 + 8 N..... ON_RESET() + 9 N..... ON_RESET() +executing + 1 N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + 2 N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + 3 N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + 4 N..... SET_XY_ROTATION(0.0000) + 5 N..... SET_FEED_REFERENCE(CANON_XYZ) + 6 N..... ON_RESET() + 7 N..... COMMENT("Fanuc 'O...' sub must end with M99 ") +X FANUC +Fanuc 'O....' subroutine definition must end with 'M99' +O1 endsub + 8 N..... ON_RESET() + 9 N..... ON_RESET() +executing + 1 N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + 2 N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + 3 N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + 4 N..... SET_XY_ROTATION(0.0000) + 5 N..... SET_FEED_REFERENCE(CANON_XYZ) + 6 N..... ON_RESET() + 7 N..... COMMENT("RS274NGC 'O...' sub must not be called with M98 ") +'O.... sub' subroutine must be called with 'O.... call' +O1 sub + 8 N..... ON_RESET() + 9 N..... ON_RESET() +executing + 1 N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + 2 N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + 3 N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + 4 N..... SET_XY_ROTATION(0.0000) + 5 N..... SET_FEED_REFERENCE(CANON_XYZ) + 6 N..... ON_RESET() + 7 N..... COMMENT("RS274NGC 'O... sub' sub must not end with M99 ") +X FANUC +'O.... endsub' or 'O.... return' must follow 'O.... sub' subroutine definition +M99 + 8 N..... ON_RESET() + 9 N..... ON_RESET() diff --git a/wasm-port/vendor/linuxcnc/tests/interp/m98m99/06-error-mixed-sub-styles/test.sh b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/06-error-mixed-sub-styles/test.sh new file mode 100755 index 0000000..a22c9dd --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/06-error-mixed-sub-styles/test.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# All expected to fail + +# Fanuc 'O...' sub definition mixed with RS274NGC 'O... endsub'/'O... call' +! rs274 -g O...-called-with-O..._call.ngc 2>&1 || exit 1 +! rs274 -g O...-ended-with-O..._endsub.ngc 2>&1 || exit 1 + +# RS274 'O... sub' sub definition mixed with Fanuc 'M99'/'M98' +! rs274 -g O...-sub-called-with-M98.ngc 2>&1 || exit 1 +! rs274 -g O...-sub-ended-with-M99.ngc 2>&1 || exit 1 diff --git a/wasm-port/vendor/linuxcnc/tests/interp/m98m99/09-disable-fanuc-subs/expected b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/09-disable-fanuc-subs/expected new file mode 100644 index 0000000..903a76e --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/09-disable-fanuc-subs/expected @@ -0,0 +1,206 @@ +program: fanuc; INI: fanuc +executing +N..... USE_LENGTH_UNITS(CANON_UNITS_MM) +N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) +N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) +N..... SET_XY_ROTATION(0.0000) +N..... SET_FEED_REFERENCE(CANON_XYZ) +N..... ON_RESET() +N..... COMMENT("A simple O sub example ") +N..... SET_FEED_RATE(40.0000) +N..... STRAIGHT_TRAVERSE(0.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000) +N..... COMMENT("interpreter: distance mode changed to incremental") +N..... STRAIGHT_TRAVERSE(1.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000) +N..... COMMENT("interpreter: distance mode changed to absolute") +N..... COMMENT("interpreter: retract mode set to r_plane") +N..... SET_MOTION_CONTROL_MODE(CANON_EXACT_PATH) +N..... STRAIGHT_TRAVERSE(1.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000) +N..... STRAIGHT_FEED(1.0000, 0.0000, -1.0000, 0.0000, 0.0000, 0.0000) +N..... STRAIGHT_TRAVERSE(1.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000) +N..... SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, 0.000000) +N..... SET_NAIVECAM_TOLERANCE(0.0000) +N..... COMMENT("interpreter: distance mode changed to incremental") +N..... STRAIGHT_TRAVERSE(2.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000) +N..... COMMENT("interpreter: distance mode changed to absolute") +N..... COMMENT("interpreter: retract mode set to r_plane") +N..... SET_MOTION_CONTROL_MODE(CANON_EXACT_PATH) +N..... STRAIGHT_TRAVERSE(2.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000) +N..... STRAIGHT_FEED(2.0000, 0.0000, -1.0000, 0.0000, 0.0000, 0.0000) +N..... STRAIGHT_TRAVERSE(2.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000) +N..... SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, 0.000000) +N..... SET_NAIVECAM_TOLERANCE(0.0000) +N..... COMMENT("interpreter: distance mode changed to incremental") +N..... STRAIGHT_TRAVERSE(3.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000) +N..... COMMENT("interpreter: distance mode changed to absolute") +N..... COMMENT("interpreter: retract mode set to r_plane") +N..... SET_MOTION_CONTROL_MODE(CANON_EXACT_PATH) +N..... STRAIGHT_TRAVERSE(3.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000) +N..... STRAIGHT_FEED(3.0000, 0.0000, -1.0000, 0.0000, 0.0000, 0.0000) +N..... STRAIGHT_TRAVERSE(3.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000) +N..... SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, 0.000000) +N..... SET_NAIVECAM_TOLERANCE(0.0000) +N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) +N..... SET_XY_ROTATION(0.0000) +N..... SET_FEED_MODE(0, 0) +N..... SET_FEED_RATE(0.0000) +N..... STOP_SPINDLE_TURNING(0) +N..... SET_SPINDLE_MODE(0 0.0000) +N..... PALLET_SHUTTLE() +N..... PROGRAM_END() +N..... ON_RESET() +program: rs274ngc; INI: fanuc +executing +N..... USE_LENGTH_UNITS(CANON_UNITS_MM) +N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) +N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) +N..... SET_XY_ROTATION(0.0000) +N..... SET_FEED_REFERENCE(CANON_XYZ) +N..... ON_RESET() +N..... COMMENT("A simple O sub example ") +N..... SET_FEED_RATE(40.0000) +N..... STRAIGHT_TRAVERSE(0.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000) +N..... COMMENT("interpreter: distance mode changed to incremental") +N..... STRAIGHT_TRAVERSE(1.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000) +N..... COMMENT("interpreter: distance mode changed to absolute") +N..... COMMENT("interpreter: retract mode set to r_plane") +N..... SET_MOTION_CONTROL_MODE(CANON_EXACT_PATH) +N..... STRAIGHT_TRAVERSE(1.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000) +N..... STRAIGHT_FEED(1.0000, 0.0000, -1.0000, 0.0000, 0.0000, 0.0000) +N..... STRAIGHT_TRAVERSE(1.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000) +N..... SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, 0.000000) +N..... SET_NAIVECAM_TOLERANCE(0.0000) +N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) +N..... SET_XY_ROTATION(0.0000) +N..... SET_FEED_MODE(0, 0) +N..... SET_FEED_RATE(0.0000) +N..... STOP_SPINDLE_TURNING(0) +N..... SET_SPINDLE_MODE(0 0.0000) +N..... PALLET_SHUTTLE() +N..... PROGRAM_END() +N..... ON_RESET() +program: fanuc; INI: NO fanuc +executing +N..... USE_LENGTH_UNITS(CANON_UNITS_MM) +N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) +N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) +N..... SET_XY_ROTATION(0.0000) +N..... SET_FEED_REFERENCE(CANON_XYZ) +N..... ON_RESET() +N..... COMMENT("A simple O sub example ") +N..... SET_FEED_RATE(40.0000) +N..... STRAIGHT_TRAVERSE(0.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000) +DISABLE_FANUC_STYLE_SUB set in INI file, but found m98 +M98 P1 L3 +N..... ON_RESET() +program: rs274ngc; INI: NO fanuc +executing +N..... USE_LENGTH_UNITS(CANON_UNITS_MM) +N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) +N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) +N..... SET_XY_ROTATION(0.0000) +N..... SET_FEED_REFERENCE(CANON_XYZ) +N..... ON_RESET() +N..... COMMENT("A simple O sub example ") +N..... SET_FEED_RATE(40.0000) +N..... STRAIGHT_TRAVERSE(0.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000) +N..... COMMENT("interpreter: distance mode changed to incremental") +N..... STRAIGHT_TRAVERSE(1.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000) +N..... COMMENT("interpreter: distance mode changed to absolute") +N..... COMMENT("interpreter: retract mode set to r_plane") +N..... SET_MOTION_CONTROL_MODE(CANON_EXACT_PATH) +N..... STRAIGHT_TRAVERSE(1.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000) +N..... STRAIGHT_FEED(1.0000, 0.0000, -1.0000, 0.0000, 0.0000, 0.0000) +N..... STRAIGHT_TRAVERSE(1.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000) +N..... SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, 0.000000) +N..... SET_NAIVECAM_TOLERANCE(0.0000) +N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) +N..... SET_XY_ROTATION(0.0000) +N..... SET_FEED_MODE(0, 0) +N..... SET_FEED_RATE(0.0000) +N..... STOP_SPINDLE_TURNING(0) +N..... SET_SPINDLE_MODE(0 0.0000) +N..... PALLET_SHUTTLE() +N..... PROGRAM_END() +N..... ON_RESET() +program: fanuc; INI: (none) +executing +N..... USE_LENGTH_UNITS(CANON_UNITS_MM) +N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) +N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) +N..... SET_XY_ROTATION(0.0000) +N..... SET_FEED_REFERENCE(CANON_XYZ) +N..... ON_RESET() +N..... COMMENT("A simple O sub example ") +N..... SET_FEED_RATE(40.0000) +N..... STRAIGHT_TRAVERSE(0.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000) +N..... COMMENT("interpreter: distance mode changed to incremental") +N..... STRAIGHT_TRAVERSE(1.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000) +N..... COMMENT("interpreter: distance mode changed to absolute") +N..... COMMENT("interpreter: retract mode set to r_plane") +N..... SET_MOTION_CONTROL_MODE(CANON_EXACT_PATH) +N..... STRAIGHT_TRAVERSE(1.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000) +N..... STRAIGHT_FEED(1.0000, 0.0000, -1.0000, 0.0000, 0.0000, 0.0000) +N..... STRAIGHT_TRAVERSE(1.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000) +N..... SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, 0.000000) +N..... SET_NAIVECAM_TOLERANCE(0.0000) +N..... COMMENT("interpreter: distance mode changed to incremental") +N..... STRAIGHT_TRAVERSE(2.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000) +N..... COMMENT("interpreter: distance mode changed to absolute") +N..... COMMENT("interpreter: retract mode set to r_plane") +N..... SET_MOTION_CONTROL_MODE(CANON_EXACT_PATH) +N..... STRAIGHT_TRAVERSE(2.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000) +N..... STRAIGHT_FEED(2.0000, 0.0000, -1.0000, 0.0000, 0.0000, 0.0000) +N..... STRAIGHT_TRAVERSE(2.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000) +N..... SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, 0.000000) +N..... SET_NAIVECAM_TOLERANCE(0.0000) +N..... COMMENT("interpreter: distance mode changed to incremental") +N..... STRAIGHT_TRAVERSE(3.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000) +N..... COMMENT("interpreter: distance mode changed to absolute") +N..... COMMENT("interpreter: retract mode set to r_plane") +N..... SET_MOTION_CONTROL_MODE(CANON_EXACT_PATH) +N..... STRAIGHT_TRAVERSE(3.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000) +N..... STRAIGHT_FEED(3.0000, 0.0000, -1.0000, 0.0000, 0.0000, 0.0000) +N..... STRAIGHT_TRAVERSE(3.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000) +N..... SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, 0.000000) +N..... SET_NAIVECAM_TOLERANCE(0.0000) +N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) +N..... SET_XY_ROTATION(0.0000) +N..... SET_FEED_MODE(0, 0) +N..... SET_FEED_RATE(0.0000) +N..... STOP_SPINDLE_TURNING(0) +N..... SET_SPINDLE_MODE(0 0.0000) +N..... PALLET_SHUTTLE() +N..... PROGRAM_END() +N..... ON_RESET() +N..... ON_RESET() +program: rs274ngc; INI: (none) +executing +N..... USE_LENGTH_UNITS(CANON_UNITS_MM) +N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) +N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) +N..... SET_XY_ROTATION(0.0000) +N..... SET_FEED_REFERENCE(CANON_XYZ) +N..... ON_RESET() +N..... COMMENT("A simple O sub example ") +N..... SET_FEED_RATE(40.0000) +N..... STRAIGHT_TRAVERSE(0.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000) +N..... COMMENT("interpreter: distance mode changed to incremental") +N..... STRAIGHT_TRAVERSE(1.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000) +N..... COMMENT("interpreter: distance mode changed to absolute") +N..... COMMENT("interpreter: retract mode set to r_plane") +N..... SET_MOTION_CONTROL_MODE(CANON_EXACT_PATH) +N..... STRAIGHT_TRAVERSE(1.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000) +N..... STRAIGHT_FEED(1.0000, 0.0000, -1.0000, 0.0000, 0.0000, 0.0000) +N..... STRAIGHT_TRAVERSE(1.0000, 0.0000, 0.2500, 0.0000, 0.0000, 0.0000) +N..... SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, 0.000000) +N..... SET_NAIVECAM_TOLERANCE(0.0000) +N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) +N..... SET_XY_ROTATION(0.0000) +N..... SET_FEED_MODE(0, 0) +N..... SET_FEED_RATE(0.0000) +N..... STOP_SPINDLE_TURNING(0) +N..... SET_SPINDLE_MODE(0 0.0000) +N..... PALLET_SHUTTLE() +N..... PROGRAM_END() +N..... ON_RESET() +N..... ON_RESET() diff --git a/wasm-port/vendor/linuxcnc/tests/interp/m98m99/09-disable-fanuc-subs/test-fanuc.ini b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/09-disable-fanuc-subs/test-fanuc.ini new file mode 100644 index 0000000..d9cea8b --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/09-disable-fanuc-subs/test-fanuc.ini @@ -0,0 +1,2 @@ +[RS274NGC] +DISABLE_FANUC_STYLE_SUB = 0 diff --git a/wasm-port/vendor/linuxcnc/tests/interp/m98m99/09-disable-fanuc-subs/test-fanuc.ngc b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/09-disable-fanuc-subs/test-fanuc.ngc new file mode 100644 index 0000000..1d62d77 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/09-disable-fanuc-subs/test-fanuc.ngc @@ -0,0 +1,13 @@ +% +( A simple O sub example ) + +F40 +G90 G0 X0 Y0 Z0.25 +M98 P1 L3 +M30 + +O1 +G91 G0 X1 ; Jog 1" along X (relative) +G90 G99 G81 Z-1.0 R0.25 ; Drill to Z-1.0 +M99 +% diff --git a/wasm-port/vendor/linuxcnc/tests/interp/m98m99/09-disable-fanuc-subs/test-no-fanuc.ini b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/09-disable-fanuc-subs/test-no-fanuc.ini new file mode 100644 index 0000000..55b6997 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/09-disable-fanuc-subs/test-no-fanuc.ini @@ -0,0 +1,4 @@ +[RS274NGC] +DISABLE_FANUC_STYLE_SUB = 1 +[EMC] +DEBUG = 2147483647 diff --git a/wasm-port/vendor/linuxcnc/tests/interp/m98m99/09-disable-fanuc-subs/test-rs274ngc.ngc b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/09-disable-fanuc-subs/test-rs274ngc.ngc new file mode 100644 index 0000000..9576c86 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/09-disable-fanuc-subs/test-rs274ngc.ngc @@ -0,0 +1,13 @@ +% +( A simple O sub example ) + +O1 sub +G91 G0 X1 ; Jog 1" along X (relative) +G90 G99 G81 Z-1.0 R0.25 ; Drill to Z-1.0 +O1 endsub + +F40 +G90 G0 X0 Y0 Z0.25 +O1 call +M30 +% diff --git a/wasm-port/vendor/linuxcnc/tests/interp/m98m99/09-disable-fanuc-subs/test.sh b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/09-disable-fanuc-subs/test.sh new file mode 100755 index 0000000..2c7ef53 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/09-disable-fanuc-subs/test.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +trim() { sed 's/^ *[0-9][0-9]* //'; } + +# Fanuc enabled: +# - with Fanuc sub: pass +echo "program: fanuc; INI: fanuc" +rs274 -g -i test-fanuc.ini test-fanuc.ngc 2>&1 | trim +# - with rs274ngc sub: pass (rs274ngc subs not disabled) +echo "program: rs274ngc; INI: fanuc" +rs274 -g -i test-fanuc.ini test-rs274ngc.ngc 2>&1 | trim + +# Fanuc disabled: +# - with Fanuc sub: fail +echo "program: fanuc; INI: NO fanuc" +{ ! rs274 -g -i test-no-fanuc.ini test-fanuc.ngc 2>&1; } | trim || exit 1 +# - with rs274ngc sub: pass +echo "program: rs274ngc; INI: NO fanuc" +rs274 -g -i test-no-fanuc.ini test-rs274ngc.ngc 2>&1 | trim + +# Default (Fanuc enabled): +# - with Fanuc sub: pass +echo "program: fanuc; INI: (none)" +rs274 -g test-fanuc.ngc 2>&1 | trim +# - with rs274ngc sub: pass (rs274ngc subs not disabled) +echo "program: rs274ngc; INI: (none)" +rs274 -g test-rs274ngc.ngc 2>&1 | trim diff --git a/wasm-port/vendor/linuxcnc/tests/interp/m98m99/11-main-program-oword/expected b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/11-main-program-oword/expected new file mode 100644 index 0000000..bd15de5 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/11-main-program-oword/expected @@ -0,0 +1,145 @@ +Legal test end-main-with-m2: + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SET_FEED_REFERENCE(CANON_XYZ) + N..... ON_RESET() + N..... COMMENT("legal example") + N..... COMMENT("Main program defined with numeric O-word title, terminated by M2") + N..... STRAIGHT_TRAVERSE(1.0000, 2.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("calling sub 2") + N..... COMMENT("in sub 2") + N..... STRAIGHT_TRAVERSE(1.0000, 2.0000, 3.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("returning from sub 2") + N..... COMMENT("returned from sub 2") + N..... COMMENT("end of main") + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SET_FEED_MODE(0, 0) + N..... SET_FEED_RATE(0.0000) + N..... STOP_SPINDLE_TURNING(0) + N..... SET_SPINDLE_MODE(0 0.0000) + N..... PROGRAM_END() + N..... ON_RESET() + N..... ON_RESET() +Legal test end-main-with-m02: + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SET_FEED_REFERENCE(CANON_XYZ) + N..... ON_RESET() + N..... COMMENT("legal example") + N..... COMMENT("Main program defined with numeric O-word title, terminated by M02") + N..... STRAIGHT_TRAVERSE(1.0000, 2.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("calling sub 2") + N..... COMMENT("in sub 2") + N..... STRAIGHT_TRAVERSE(1.0000, 2.0000, 3.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("returning from sub 2") + N..... COMMENT("returned from sub 2") + N..... COMMENT("end of main") + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SET_FEED_MODE(0, 0) + N..... SET_FEED_RATE(0.0000) + N..... STOP_SPINDLE_TURNING(0) + N..... SET_SPINDLE_MODE(0 0.0000) + N..... PROGRAM_END() + N..... ON_RESET() + N..... ON_RESET() +Legal test end-main-with-m30: + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SET_FEED_REFERENCE(CANON_XYZ) + N..... ON_RESET() + N..... COMMENT("legal example") + N..... COMMENT("Main program defined with numeric O-word title, terminated by M30") + N..... STRAIGHT_TRAVERSE(1.0000, 2.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("calling sub 2") + N..... COMMENT("in sub 2") + N..... STRAIGHT_TRAVERSE(1.0000, 2.0000, 3.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("returning from sub 2") + N..... COMMENT("returned from sub 2") + N..... COMMENT("end of main") + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SET_FEED_MODE(0, 0) + N..... SET_FEED_RATE(0.0000) + N..... STOP_SPINDLE_TURNING(0) + N..... SET_SPINDLE_MODE(0 0.0000) + N..... PALLET_SHUTTLE() + N..... PROGRAM_END() + N..... ON_RESET() + N..... ON_RESET() +Legal test end-main-with-percent: + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SET_FEED_REFERENCE(CANON_XYZ) + N..... ON_RESET() + N..... COMMENT("legal example") + N..... COMMENT("Main program defined with numeric O-word title, terminated by percent") + N..... STRAIGHT_TRAVERSE(1.0000, 2.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("calling sub 2") + N..... COMMENT("in sub 2") + N..... STRAIGHT_TRAVERSE(1.0000, 2.0000, 3.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("returning from sub 2") + N..... COMMENT("returned from sub 2") + N..... COMMENT("end of main signaled by percent") + N..... FINISH() + N..... ON_RESET() + N..... ON_RESET() +Illegal test end-main-with-eof: + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SET_FEED_REFERENCE(CANON_XYZ) + N..... ON_RESET() + N..... COMMENT("legal example") + N..... COMMENT("Main program defined with numeric O-word title, terminated by EOF") + N..... STRAIGHT_TRAVERSE(1.0000, 2.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("calling sub 2") + N..... COMMENT("in sub 2") + N..... STRAIGHT_TRAVERSE(1.0000, 2.0000, 3.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("returning from sub 2") + N..... COMMENT("returned from sub 2") + N..... COMMENT("end of main signaled by EOF") + N..... ON_RESET() + N..... ON_RESET() +Illegal test no-m30-before-osub: + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SET_FEED_REFERENCE(CANON_XYZ) + N..... ON_RESET() + N..... COMMENT("illegal example") + N..... COMMENT("Define rs274-style sub before numeric O-word main program end") + N..... STRAIGHT_TRAVERSE(1.0000, 2.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("calling sub 2") + N..... COMMENT("in sub 2") + N..... STRAIGHT_TRAVERSE(1.0000, 2.0000, 3.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("returning from sub 2") + N..... COMMENT("returned from sub 2") + N..... COMMENT("Illegal: O-sub with no M02 or M30 terminating main") + N..... ON_RESET() + N..... ON_RESET() +Illegal test sub-after-percent: + N..... USE_LENGTH_UNITS(CANON_UNITS_MM) + N..... SET_G5X_OFFSET(1, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_G92_OFFSET(0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... SET_XY_ROTATION(0.0000) + N..... SET_FEED_REFERENCE(CANON_XYZ) + N..... ON_RESET() + N..... COMMENT("illegal example") + N..... COMMENT("Define sub after percent [= after EOF]") + N..... STRAIGHT_TRAVERSE(1.0000, 2.0000, 0.0000, 0.0000, 0.0000, 0.0000) + N..... COMMENT("calling sub 2") + N..... FINISH() + N..... ON_RESET() + N..... ON_RESET() diff --git a/wasm-port/vendor/linuxcnc/tests/interp/m98m99/11-main-program-oword/test-illegal-end-main-with-eof.ngc b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/11-main-program-oword/test-illegal-end-main-with-eof.ngc new file mode 100644 index 0000000..464924d --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/11-main-program-oword/test-illegal-end-main-with-eof.ngc @@ -0,0 +1,15 @@ +(legal example) +(Main program defined with numeric O-word title, terminated by EOF) +O2 sub (subprogram begin) (program end signaled by O2 sub) +(in sub 2) +G0 Z3 +(returning from sub 2) +O2 endsub + +O1 (main program begin) +G0 X1Y2 +(calling sub 2) +O2 call +(returned from sub 2) + +(end of main signaled by EOF) diff --git a/wasm-port/vendor/linuxcnc/tests/interp/m98m99/11-main-program-oword/test-illegal-no-m30-before-osub.ngc b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/11-main-program-oword/test-illegal-no-m30-before-osub.ngc new file mode 100644 index 0000000..1125e45 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/11-main-program-oword/test-illegal-no-m30-before-osub.ngc @@ -0,0 +1,14 @@ +(illegal example) +(Define rs274-style sub before numeric O-word main program end) +O1 (main program begin) +G0 X1Y2 +(calling sub 2) +O2 call +(returned from sub 2) + +(Illegal: O-sub with no M02 or M30 terminating main) +O2 sub (subprogram begin) +(in sub 2) +G0 Z3 +(returning from sub 2) +O2 endsub diff --git a/wasm-port/vendor/linuxcnc/tests/interp/m98m99/11-main-program-oword/test-illegal-sub-after-percent.ngc b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/11-main-program-oword/test-illegal-sub-after-percent.ngc new file mode 100644 index 0000000..85c47de --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/11-main-program-oword/test-illegal-sub-after-percent.ngc @@ -0,0 +1,25 @@ +% +(illegal example) +(Define sub after percent [= after EOF]) +O1 (main program begin) +G0 X1Y2 +(calling sub 2) +O2 call +(returned from sub 2) +% +(Nothing should follow % sign) + +(From http://linuxcnc.org/docs/html/gcode/overview.html#_overview ) +( The useful contents of a file demarcated by percents stop after ) +( the second percent line. Anything after that is ignored. ) + +(From Smid 3rd Ed. p. 62) +( The percent sign (%) after M30 is a special _stop_code_. This ) +( symbol terminates the loading of a program from an external ) +( device. It is also called the _end-of-file_marker_. ) + +O2 sub (subprogram begin) (program end signaled by O2 sub) +(in sub 2) +G0 Z3 +(returning from sub 2) +O2 endsub diff --git a/wasm-port/vendor/linuxcnc/tests/interp/m98m99/11-main-program-oword/test-legal-end-main-with-m02.ngc b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/11-main-program-oword/test-legal-end-main-with-m02.ngc new file mode 100644 index 0000000..24449b4 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/11-main-program-oword/test-legal-end-main-with-m02.ngc @@ -0,0 +1,15 @@ +(legal example) +(Main program defined with numeric O-word title, terminated by M02) +O1 (main program begin) +G0 X1Y2 +(calling sub 2) +O2 call +(returned from sub 2) +M02 (end of main) +(should never get here) + +O2 sub (subprogram begin) (program end signaled by O2 sub) +(in sub 2) +G0 Z3 +(returning from sub 2) +O2 endsub diff --git a/wasm-port/vendor/linuxcnc/tests/interp/m98m99/11-main-program-oword/test-legal-end-main-with-m2.ngc b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/11-main-program-oword/test-legal-end-main-with-m2.ngc new file mode 100644 index 0000000..10aa274 --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/11-main-program-oword/test-legal-end-main-with-m2.ngc @@ -0,0 +1,15 @@ +(legal example) +(Main program defined with numeric O-word title, terminated by M2) +O1 (main program begin) +G0 X1Y2 +(calling sub 2) +O2 call +(returned from sub 2) +M2 (end of main) +(should never get here) + +O2 sub (subprogram begin) (program end signaled by O2 sub) +(in sub 2) +G0 Z3 +(returning from sub 2) +O2 endsub diff --git a/wasm-port/vendor/linuxcnc/tests/interp/m98m99/11-main-program-oword/test-legal-end-main-with-m30.ngc b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/11-main-program-oword/test-legal-end-main-with-m30.ngc new file mode 100644 index 0000000..e357f4e --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/11-main-program-oword/test-legal-end-main-with-m30.ngc @@ -0,0 +1,15 @@ +(legal example) +(Main program defined with numeric O-word title, terminated by M30) +O1 (main program begin) +G0 X1Y2 +(calling sub 2) +O2 call +(returned from sub 2) +M30 (end of main) +(should never get here) + +O2 sub (subprogram begin) (program end signaled by O2 sub) +(in sub 2) +G0 Z3 +(returning from sub 2) +O2 endsub diff --git a/wasm-port/vendor/linuxcnc/tests/interp/m98m99/11-main-program-oword/test-legal-end-main-with-percent.ngc b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/11-main-program-oword/test-legal-end-main-with-percent.ngc new file mode 100644 index 0000000..0ce23fe --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/11-main-program-oword/test-legal-end-main-with-percent.ngc @@ -0,0 +1,17 @@ +% +(legal example) +(Main program defined with numeric O-word title, terminated by percent) +O2 sub (subprogram begin) (program end signaled by O2 sub) +(in sub 2) +G0 Z3 +(returning from sub 2) +O2 endsub + +O1 (main program begin) +G0 X1Y2 +(calling sub 2) +O2 call +(returned from sub 2) + +(end of main signaled by percent) +% diff --git a/wasm-port/vendor/linuxcnc/tests/interp/m98m99/11-main-program-oword/test.sh b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/11-main-program-oword/test.sh new file mode 100644 index 0000000..34c1b2b --- /dev/null +++ b/wasm-port/vendor/linuxcnc/tests/interp/m98m99/11-main-program-oword/test.sh @@ -0,0 +1,44 @@ +#!/bin/bash -e + +LEGAL_TESTS=" + end-main-with-m2 + end-main-with-m02 + end-main-with-m30 + end-main-with-percent +" + +ILLEGAL_TESTS=" + end-main-with-eof + no-m30-before-osub + sub-after-percent +" + +# +# Run legal tests +# +for t in $LEGAL_TESTS; do + echo "Legal test ${t}:" + rs274 -g "test-legal-${t}.ngc" | awk '{$1=""; print}' + res=${PIPESTATUS[0]} + if test "$res" = 0; then + echo "Success: Test '${t}' exited ${res}" >&2 + else + echo "Error: Test '${t}' exited ${res}" >&2 + exit "$res" + fi +done + +# Run illegal tests +# +for t in $ILLEGAL_TESTS; do + echo "Illegal test ${t}:" + res=-1 + rs274 -g "test-illegal-${t}.ngc" | awk '{$1=""; print}' + res=${PIPESTATUS[0]} + if test "$res" = 0; then + echo "Error: Illegal test '${t}' exited ${res}" >&2 + exit "$res" + else + echo "Success: Illegal test '${t}' exited ${res} (non-zero=success)" >&2 + fi +done