Expand LinuxCNC interpreter regression coverage

This commit is contained in:
2026-06-09 14:54:54 +08:00
parent 50757e45ba
commit 5bd8f12872
143 changed files with 10895 additions and 219 deletions

1
.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
wasm-port/vendor/linuxcnc/tests/** whitespace=-trailing-space,-blank-at-eof

View File

@@ -100,12 +100,40 @@ wasm-port/tests/browser/verify_interp_browser.sh
wasm-port/tests/host/verify_host_smokes.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`, INI-declared `[DISPLAY]OPEN_FILE`, `[EMCIO]TOOL_TABLE`,
`[RS274NGC]PARAMETER_FILE`, `[RS274NGC]SUBROUTINE_PATH`, `[RS274NGC]PARAMETER_FILE`, `[RS274NGC]SUBROUTINE_PATH`,
`[RS274NGC]USER_M_PATH`, and remap-NGC files from the vendored source `[RS274NGC]USER_M_PATH`, and remap-NGC files from the vendored source
manifest. That planner is a host filesystem helper only; execution still goes manifest without browser directory enumeration. `planSimConfigStaging()` is the
through vendored LinuxCNC interpreter/remap/tool/parameter code. `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 ## 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 `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, named-parameter harness path for LinuxCNC built-in, INI-backed, HAL-backed,
and missing named-parameter lookup. and missing named-parameter lookup.
It also writes selected G-code fixtures into the It also writes selected G-code fixtures and vendored `tests/interp/g10`
Emscripten filesystem through the SDK and runs them through LinuxCNC regressions into the Emscripten filesystem through the SDK and runs them
`Interp::open()`, `Interp::read()`, and `Interp::execute()` to validate the through LinuxCNC `Interp::open()`, `Interp::read()`, and `Interp::execute()`
file execution path. It also writes the vendored LinuxCNC `xyzac-trt` and 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 `xyzbc-trt` table-rotary-tilting sample machine INI, `remap_subs/*.ngc`, and
`xyzac_switchkins.ngc`/`xyzbc_switchkins.ngc`, `xyzac_switchkins.ngc`/`xyzbc_switchkins.ngc`,
`xyzac_switchkins_test_1.ngc`, `xyzac_switchkins_test_2.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/do-while-break`, `tests/interp/oword-bug315`,
`tests/interp/oword-bug315-p2`, `tests/interp/exists`, `tests/interp/oword-bug315-p2`, `tests/interp/exists`,
`tests/interp/return-value`, `tests/interp/subs-follow-main`, `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`, selected `tests/interp/rotation` pure interpreter cases, `tests/interp/iniparam`,
`tests/interp/iniparam-failassign`, `tests/interp/iniparam-failassign`,
`tests/interp/sub-call-from-sub`, `tests/interp/sequence-number`, and `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/oword-bug315`, `tests/interp/oword-bug315-p2`,
`tests/interp/exists`, `tests/interp/return-value`, `tests/interp/exists`, `tests/interp/return-value`,
`tests/interp/subs-follow-main`, `tests/interp/fractional-linenumbers`, `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 `.ngc` files plus
`tests/interp/sub-call-from-sub` `test.ini`, `test.ngc`, and `subs/*.ngc` `tests/interp/sub-call-from-sub` `test.ini`, `test.ngc`, and `subs/*.ngc`
files and `tests/interp/sequence-number` `test.ini`, `test.ngc`, and 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`, `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 `tests/interp/magic_comments/param_format_printing` `test.ngc`,
plus selected pure-interpreter `tests/interp/m98m99` cases covering plus selected pure-interpreter `tests/interp/m98m99` cases covering
Fanuc-style `M98/M99`, parameter scope, nested numbered subprograms, Fanuc-style `M98/M99`, missing-P-word, missing-subprogram, mixed
subprograms after main program text, leading-zero O-word lookup, named and Fanuc/RS274NGC sub-style, and `DISABLE_FANUC_STYLE_SUB` INI-gated errors,
numbered main programs, and expression-based O-sub/M98 calls, 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 into the browser WASM filesystem and
validates those upstream validates those upstream
interpreter regressions through `runFile()` or `runFileWithIni()`, without 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_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_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_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_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. | | `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 | | 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_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_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 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_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_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/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/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_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. | | `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 ## Fixture Coverage
@@ -493,6 +533,7 @@ Positive G-code fixtures currently cover:
- comment logging canonical calls - comment logging canonical calls
- local, INI-backed named parameters and numbered parameters - local, INI-backed named parameters and numbered parameters
- O-word subroutines - O-word subroutines
- continue-on-error O-word unwind
- program-end modal reset - program-end modal reset
- canonical runtime edge calls - 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 path additionally covers the same canonical-event fixture group, plus
`namedparam_ini_semantics` and `namedparam_semantics` through the INI-aware `namedparam_ini_semantics` and `namedparam_semantics` through the INI-aware
file execution ABI, 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 `position_params` uses a dedicated file-path expectation under
`tests/fixtures/canon_file/` because LinuxCNC file execution advances the `tests/fixtures/canon_file/` because LinuxCNC file execution advances the
post-execute position parameters differently than the line-by-line MDI smoke; 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, tool-reload, tool select/change/length-offset, M61 current-tool-number update,
canned-cycle, state-tag motion, tool-table setup, and O-word subroutine canned-cycle, state-tag motion, tool-table setup, and O-word subroutine
fixtures, plus vendored `tests/interp/flowsnake` recursive O-word toolpath, 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 vendored `tests/interp/g33.1` rigid-tap file execution, NURBS dispatch
boundaries, and the boundaries, and the
comparable canonical runtime edge and program-end cleanup calls. 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 absolute-position `#<_abs_x>`, `#<_abs_y>`, and `#<_abs_z>` reporting under
G54, G92, XY rotation, and unit changes plus rotated-coordinate `G28` and G54, G92, XY rotation, and unit changes plus rotated-coordinate `G28` and
`G53` endpoint behavior, selected `tests/interp/m98m99` `G53` endpoint behavior, selected `tests/interp/m98m99`
Fanuc-style `M98/M99` subprogram calls, parameter-scope differences, Fanuc-style `M98/M99` subprogram calls, missing-P-word, missing-subprogram,
nested numbered subprograms, subprograms after main program text, mixed Fanuc/RS274NGC sub-style, and `DISABLE_FANUC_STYLE_SUB` INI-gated
leading-zero O-word lookup, named/numbered main programs, and O-expression errors, main-program O-word termination rules, parameter-scope differences,
calls, plus `(ABORT,...)` hot-comment numbered, named, and INI-parameter 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 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.

View File

@@ -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. | | 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. | | 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. | | 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 ## Enforced Non-Drift Rules

View File

@@ -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 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. | | 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 Asset Queue
| LinuxCNC test path | Status | Current target | Notes | | 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/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/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/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/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/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/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/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` | 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/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/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/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/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/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-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/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/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/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/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. | | `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. |

View File

@@ -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` | | 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` | | 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` | | 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` | | 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 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` | | 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` | | 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` | | 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 | | 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` | | 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 | | 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/` | | HAL runtime | named parameter lookup, kinematics component lifecycle, and runtime status edges | Standalone HAL adapter under `runtime/core/linuxcnc_wrap/` |

View File

@@ -10,6 +10,7 @@
#include <sstream> #include <sstream>
#include <string> #include <string>
#include <vector> #include <vector>
#include <unistd.h>
#include "canon_event_sink.hh" #include "canon_event_sink.hh"
#include "emc/ini/inifile.hh" #include "emc/ini/inifile.hh"
@@ -79,7 +80,7 @@ void initialize_minimal_interp(Interp &interp)
standalone::reset_external_axis_mask(); standalone::reset_external_axis_mask();
interp._setup.length_units = CANON_UNITS_MM; interp._setup.length_units = CANON_UNITS_MM;
interp._setup.distance_mode = DISTANCE_MODE::ABSOLUTE; 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.feed_mode = FEED_MODE::UNITS_PER_MINUTE;
interp._setup.plane = CANON_PLANE::XY; interp._setup.plane = CANON_PLANE::XY;
interp._setup.motion_mode = G_0; 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<std::string> load_program(int argc, char **argv) std::vector<std::string> load_program(int argc, char **argv)
{ {
if (argc <= 1) { if (argc <= 1) {
@@ -273,7 +314,17 @@ int main(int argc, char **argv)
standalone::reset_canon_events(); standalone::reset_canon_events();
initialize_minimal_interp(file_interp); initialize_minimal_interp(file_interp);
apply_ini_search_paths(file_interp, ini_path); 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) { if (file_open_rc == INTERP_OK) {
while (true) { while (true) {
const int file_read_rc = file_interp.read(); const int file_read_rc = file_interp.read();

View File

@@ -22,6 +22,7 @@ namespace standalone {
static std::vector<std::string> g_canon_events; static std::vector<std::string> g_canon_events;
static double g_external_feed_rate = 0.0; 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 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() void reset_canon_events()
{ {
@@ -55,6 +56,25 @@ int external_axis_mask()
return g_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<std::size_t>(max_size), "%s",
g_parameter_file_name.c_str());
}
} // namespace standalone } // namespace standalone
bool GET_BLOCK_DELETE(void) { return false; } 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; } double GET_EXTERNAL_ORIGIN_Z() { return 0.0; }
void GET_EXTERNAL_PARAMETER_FILE_NAME(char *filename, int max_size) void GET_EXTERNAL_PARAMETER_FILE_NAME(char *filename, int max_size)
{ {
if (max_size > 0) { standalone::get_parameter_file_name(filename, max_size);
filename[0] = '\0'; }
} 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; } CANON_PLANE GET_EXTERNAL_PLANE() { return CANON_PLANE::XY; }
double GET_EXTERNAL_POSITION_A() { return 0.0; } double GET_EXTERNAL_POSITION_A() { return 0.0; }
double GET_EXTERNAL_POSITION_B() { return 0.0; } double GET_EXTERNAL_POSITION_B() { return 0.0; }

View File

@@ -10,6 +10,7 @@
#include <vector> #include <vector>
#include <emscripten/emscripten.h> #include <emscripten/emscripten.h>
#include <unistd.h>
#include "canon_event_sink.hh" #include "canon_event_sink.hh"
#include "emc/ini/inifile.hh" #include "emc/ini/inifile.hh"
@@ -111,7 +112,7 @@ void initialize_minimal_interp(Interp &interp)
standalone::reset_external_axis_mask(); standalone::reset_external_axis_mask();
interp._setup.length_units = CANON_UNITS_MM; interp._setup.length_units = CANON_UNITS_MM;
interp._setup.distance_mode = DISTANCE_MODE::ABSOLUTE; 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.feed_mode = FEED_MODE::UNITS_PER_MINUTE;
interp._setup.plane = CANON_PLANE::XY; interp._setup.plane = CANON_PLANE::XY;
interp._setup.motion_mode = G_0; 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; 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) int apply_ini_search_paths(Interp &interp, const linuxcnc::IniFile &ini, const std::string &machine_dir)
{ {
standalone::apply_machine_axis_config(interp, ini); standalone::apply_machine_axis_config(interp, ini);
@@ -452,6 +464,36 @@ bool apply_ini_search_paths(Interp &interp, const char *ini_path)
return true; 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) bool parse_remaps_from_ini(Interp &interp, std::ostringstream &output, const char *ini_path)
{ {
const std::string machine_dir = parent_path(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; std::ostringstream output;
apply_ini_search_paths(interp, ini_path); 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); const int open_rc = interp.open(path);
output << "file_open=" << open_rc << "\n"; output << "file_open=" << open_rc << "\n";

View File

@@ -5,5 +5,8 @@ namespace standalone {
void reset_external_axis_mask(); void reset_external_axis_mask();
void set_external_axis_mask(int axis_mask); void set_external_axis_mask(int axis_mask);
int external_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 } // namespace standalone

View File

@@ -25,6 +25,7 @@ Use `src/index.js` for stable imports:
import { import {
createLinuxCncIniSdk, createLinuxCncIniSdk,
createLinuxCncInterpSdk, createLinuxCncInterpSdk,
planIniFileContextStaging,
planSimConfigStaging, planSimConfigStaging,
} from "./src/index.js"; } 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()` then forwards to `runFileWithIni()` by default or to `runFiveAxisRemapFile()`
when `executionMode: "fiveAxisRemap"` is explicitly requested. 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 representative LinuxCNC `configs/sim` programs. Callers provide the vendored
source manifest text, machine relative path, INI file name, and INI text. The source manifest text, machine relative path, INI file name, and INI text. It
planner reads only INI file references and the manifest, then returns the INI, uses `planIniFileContextStaging()` with a `configs/sim/<machine>` source root
`[DISPLAY]OPEN_FILE`, `[EMCIO]TOOL_TABLE`, `[RS274NGC]PARAMETER_FILE`, and `configs/sim` upward-search boundary.
`[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.
`runFileWithIniContinueOnError()` uses the same LinuxCNC-backed file execution `runFileWithIniContinueOnError()` uses the same LinuxCNC-backed file execution
path but keeps the runner loop going after LinuxCNC reports an error, matching path but keeps the runner loop going after LinuxCNC reports an error, matching

View File

@@ -1,3 +1,6 @@
export { createLinuxCncIniSdk } from "./linuxcnc-ini.js"; export { createLinuxCncIniSdk } from "./linuxcnc-ini.js";
export { createLinuxCncInterpSdk } from "./linuxcnc-interp.js"; export { createLinuxCncInterpSdk } from "./linuxcnc-interp.js";
export { planSimConfigStaging } from "./sim-config-staging.js"; export {
planIniFileContextStaging,
planSimConfigStaging,
} from "./sim-config-staging.js";

View File

@@ -98,14 +98,14 @@ function isSubroutinePath(path) {
return path.toLowerCase().endsWith(".ngc"); return path.toLowerCase().endsWith(".ngc");
} }
function findUpwardByBasename(manifestSet, sourceDir, fileName) { function findUpwardByBasename(manifestSet, sourceDir, fileName, searchRootRel) {
let current = sourceDir; let current = sourceDir;
while (current.startsWith("configs/sim")) { while (!searchRootRel || current === searchRootRel || current.startsWith(`${searchRootRel}/`)) {
const candidate = normalizeRel(`${current}/${fileName}`); const candidate = normalizeRel(`${current}/${fileName}`);
if (manifestSet.has(candidate)) { if (manifestSet.has(candidate)) {
return candidate; return candidate;
} }
if (current === "configs/sim") { if (!current || current === searchRootRel) {
break; break;
} }
current = dirname(current); current = dirname(current);
@@ -113,7 +113,7 @@ function findUpwardByBasename(manifestSet, sourceDir, fileName) {
return null; return null;
} }
function sourceForReference(manifestSet, sourceDir, reference) { function sourceForReference(manifestSet, sourceDir, reference, searchRootRel) {
if (!reference || reference.startsWith("/")) { if (!reference || reference.startsWith("/")) {
return null; return null;
} }
@@ -121,7 +121,7 @@ function sourceForReference(manifestSet, sourceDir, reference) {
if (manifestSet.has(sourceRel)) { if (manifestSet.has(sourceRel)) {
return sourceRel; return sourceRel;
} }
return findUpwardByBasename(manifestSet, sourceDir, basename(reference)); return findUpwardByBasename(manifestSet, sourceDir, basename(reference), searchRootRel);
} }
function addPlannedFile(plan, manifestSet, sourceRel, targetRel, options = {}) { function addPlannedFile(plan, manifestSet, sourceRel, targetRel, options = {}) {
@@ -141,12 +141,13 @@ function addPlannedFile(plan, manifestSet, sourceRel, targetRel, options = {}) {
plan.set(sourceRel, { plan.set(sourceRel, {
sourceRel, sourceRel,
wasmPath: targetPathFor(options.wasmDir, targetRel),
path: targetPathFor(options.wasmDir, targetRel), path: targetPathFor(options.wasmDir, targetRel),
executable, executable,
}); });
} }
function addDirectoryFiles(plan, manifestEntries, sourceDir, targetDir, predicate, options) { function addDirectoryFiles(plan, manifestEntries, manifestSet, sourceDir, targetDir, predicate, options) {
const prefix = sourceDir ? `${sourceDir}/` : ""; const prefix = sourceDir ? `${sourceDir}/` : "";
for (const sourceRel of manifestEntries) { for (const sourceRel of manifestEntries) {
if (!sourceRel.startsWith(prefix)) { if (!sourceRel.startsWith(prefix)) {
@@ -156,7 +157,7 @@ function addDirectoryFiles(plan, manifestEntries, sourceDir, targetDir, predicat
if (childRel.includes("/") || !predicate(sourceRel)) { if (childRel.includes("/") || !predicate(sourceRel)) {
continue; 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, iniText,
programFile = null, programFile = null,
wasmDir = `/work/sim/${machineRel}`, 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 manifestEntries = cleanManifest(manifestText);
const manifestSet = new Set(manifestEntries); const manifestSet = new Set(manifestEntries);
const iniValues = parseIni(iniText); const iniValues = parseIni(iniText);
const plan = new Map(); const plan = new Map();
const sourceDir = sourceRelFor(machineRel, dirname(iniFile)); const normalizedSourceRoot = normalizeRel(sourceRootRel);
const iniSourceRel = sourceRelFor(machineRel, iniFile); const normalizedSearchRoot = normalizeRel(sourceSearchRootRel);
const sourceDir = normalizeRel(`${normalizedSourceRoot}/${dirname(iniFile)}`);
const iniSourceRel = normalizeRel(`${normalizedSourceRoot}/${iniFile}`);
const programReference = programFile ?? firstIniValue(iniValues, "DISPLAY", "OPEN_FILE"); const programReference = programFile ?? firstIniValue(iniValues, "DISPLAY", "OPEN_FILE");
addPlannedFile(plan, manifestSet, iniSourceRel, iniFile, { wasmDir, required: true }); addPlannedFile(plan, manifestSet, iniSourceRel, iniFile, { wasmDir, required: true });
if (programReference) { if (programReference) {
const programSourceRel = sourceForReference(manifestSet, sourceDir, programReference); const programSourceRel = sourceForReference(
manifestSet,
sourceDir,
programReference,
normalizedSearchRoot,
);
addPlannedFile(plan, manifestSet, programSourceRel, programReference, { addPlannedFile(plan, manifestSet, programSourceRel, programReference, {
wasmDir, wasmDir,
required: true, required: true,
@@ -204,39 +232,54 @@ export function planSimConfigStaging({
if (!reference) { if (!reference) {
continue; continue;
} }
const sourceRel = sourceForReference(manifestSet, sourceDir, reference); const sourceRel = sourceForReference(manifestSet, sourceDir, reference, normalizedSearchRoot);
addPlannedFile(plan, manifestSet, sourceRel, reference, { wasmDir }); addPlannedFile(plan, manifestSet, sourceRel, reference, { wasmDir });
} }
const subroutineDirs = splitSearchPath( const subroutineDirs = allIniValues(iniValues, "RS274NGC", "SUBROUTINE_PATH")
firstIniValue(iniValues, "RS274NGC", "SUBROUTINE_PATH") ?? "", .flatMap(splitSearchPath);
);
for (const dirEntry of subroutineDirs) { for (const dirEntry of subroutineDirs) {
if (dirEntry.startsWith("/")) { if (dirEntry.startsWith("/")) {
continue; continue;
} }
const sourceSubdir = normalizeRel(`${sourceDir}/${dirEntry}`); const sourceSubdir = normalizeRel(`${sourceDir}/${dirEntry}`);
const targetSubdir = normalizeRel(dirEntry); const targetSubdir = normalizeRel(dirEntry);
addDirectoryFiles(plan, manifestEntries, sourceSubdir, targetSubdir, isSubroutinePath, { addDirectoryFiles(
wasmDir, 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("/")) { if (dirEntry.startsWith("/")) {
continue; continue;
} }
const sourceUserMDir = normalizeRel(`${sourceDir}/${dirEntry}`); const sourceUserMDir = normalizeRel(`${sourceDir}/${dirEntry}`);
const targetUserMDir = normalizeRel(dirEntry); const targetUserMDir = normalizeRel(dirEntry);
addDirectoryFiles(plan, manifestEntries, sourceUserMDir, targetUserMDir, isUserMCodePath, { addDirectoryFiles(
wasmDir, plan,
executable: true, manifestEntries,
}); manifestSet,
sourceUserMDir,
targetUserMDir,
isUserMCodePath,
{ wasmDir, executable: true },
);
} }
for (const remapName of remapNgcNames(iniValues)) { for (const remapName of remapNgcNames(iniValues)) {
for (const dirEntry of subroutineDirs) { 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}`), { addPlannedFile(plan, manifestSet, sourceRel, normalizeRel(`${dirEntry}/${remapName}`), {
wasmDir, wasmDir,
}); });

File diff suppressed because it is too large Load Diff

View File

@@ -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=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=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=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 canon_event=COMMENT: interpreter: IJK distance mode changed to absolute

View File

@@ -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.return_value.run
check_exitcode linuxcnc_interp_minimal_harness.subs_follow_main.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.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.namedparam_bug424.run
check_exitcode linuxcnc_interp_minimal_harness.flowsnake.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_1.run
check_exitcode linuxcnc_interp_minimal_harness.bad_exists_2.run check_exitcode linuxcnc_interp_minimal_harness.bad_exists_2.run
check_exitcode linuxcnc_interp_minimal_harness.bad_exists_3.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_bridgemill.run
check_exitcode linuxcnc_interp_minimal_harness.sim_geometry_xyzc.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.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
check_exitcode linuxcnc_parameter_file_harness.run check_exitcode linuxcnc_parameter_file_harness.run
check_exitcode linuxcnc_interp_init_harness 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=SET_SPINDLE_SPEED spindle=0 speed=1200" "$FRACTIONAL_LINENUMBERS_STDOUT"
grep -Fq "canon_event=PROGRAM_END" "$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" 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_open=0" "$NAMEDPARAM_BUG424_STDOUT"
grep -Fq "file_read_count=6" "$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_y=1" "$FLOWSNAKE_STDOUT"
grep -Fq "setup.current_z=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() { check_bad_file_fixture() {
local name="$1" local name="$1"
local read_count="$2" local read_count="$2"
@@ -1173,6 +1291,10 @@ check_bad_file_fixture() {
grep -Fq "canon_event=ON_RESET" "$stdout_file" 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_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_2 2 1 "Expected ] reading bracketed parameter"
check_bad_file_fixture bad_exists_3 3 2 "Parameter number out of range" 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 "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" 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" 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_open=0" "$M98M99_07_NESTED_SUBS_STDOUT"
grep -Fq "file_read_count=163" "$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=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" 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" 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_open=0" "$M98M99_10_M98_P001_STDOUT"
grep -Fq "file_read_count=8" "$M98M99_10_M98_P001_STDOUT" grep -Fq "file_read_count=8" "$M98M99_10_M98_P001_STDOUT"
@@ -1429,6 +1705,74 @@ if awk '
exit 1 exit 1
fi 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" 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_open=0" "$M98M99_13_NAMED_PROGRAM_NAMED_STDOUT"
grep -Fq "file_read_count=4" "$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 "In sub 200" "$M98M99_14_O_EXPRESSION_CALL_STDOUT"
grep -Fq "canon_event=PROGRAM_END" "$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 for fixture in "$GCODE_FIXTURE_DIR"/*.ngc; do
name="$(basename "$fixture" .ngc)" name="$(basename "$fixture" .ngc)"
if [[ "$name" == "disable_fanuc_style_sub_m98" ]]; then if [[ "$name" == "disable_fanuc_style_sub_m98" ]]; then

File diff suppressed because it is too large Load Diff

View File

@@ -5,6 +5,7 @@ import assert from "node:assert/strict";
import { import {
createLinuxCncInterpSdk, createLinuxCncInterpSdk,
planIniFileContextStaging,
planSimConfigStaging, planSimConfigStaging,
} from "../../../runtime/sdk/src/index.js"; } from "../../../runtime/sdk/src/index.js";
@@ -79,6 +80,59 @@ assert.deepEqual(
], ],
"synthetic sim-config staging plan", "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) { function simMachine(machineRel, iniFile, programFile = null) {
const iniText = readFileSync( const iniText = readFileSync(

View File

@@ -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" 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" 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" 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" NAMEDPARAM_BUG424_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/namedparam-bug424/test.ngc"
FLOWSNAKE_FIXTURE="$ROOT_DIR/vendor/linuxcnc/tests/interp/flowsnake/flowsnake.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_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_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" 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" 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" 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" 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_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_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" 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" 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_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_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_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_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_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_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_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" 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_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_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" 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" 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" <<EOF
[EMCIO]
TOOL_TABLE = $tool_table
[TRAJ]
COORDINATES = X Y Z A B C U V W
EOF
}
write_tool_table_ini() {
local file="$1"
local tool_table="$2"
write_file_if_changed "$file" <<EOF
[EMCIO]
TOOL_TABLE = $tool_table
[TRAJ]
COORDINATES = X Y Z A B C U V W
EOF
}
write_g92_persistence_files() {
write_file_if_changed "$G92_PERSISTENCE_FIXTURE" <<EOF
(PRINT,Startup G92 params: #5210 #5211 #5212 #5213)
M30
EOF
write_file_if_changed "$G92_PERSISTENCE_PARAMETER_FILE" <<EOF
5210 1
5211 1.25
5212 2.5
5213 3.75
5220 1
EOF
write_file_if_changed "$G92_PERSISTENCE_INI" <<EOF
[RS274NGC]
PARAMETER_FILE = $(basename "$G92_PERSISTENCE_PARAMETER_FILE")
[TRAJ]
COORDINATES = X Y Z
EOF
write_file_if_changed "$G92_PERSISTENCE_DISABLED_INI" <<EOF
[RS274NGC]
PARAMETER_FILE = $(basename "$G92_PERSISTENCE_PARAMETER_FILE")
DISABLE_G92_PERSISTENCE = 1
[TRAJ]
COORDINATES = X Y Z
EOF
}
command_matches() { command_matches() {
local file="$1" local file="$1"
shift shift
@@ -1479,8 +1622,32 @@ run_interp_minimal_fixture interp_exists "$EXISTS_FIXTURE"
run_interp_minimal_fixture return_value "$RETURN_VALUE_FIXTURE" run_interp_minimal_fixture return_value "$RETURN_VALUE_FIXTURE"
run_interp_minimal_fixture subs_follow_main "$SUBS_FOLLOW_MAIN_FIXTURE" run_interp_minimal_fixture subs_follow_main "$SUBS_FOLLOW_MAIN_FIXTURE"
run_interp_minimal_fixture fractional_linenumbers "$FRACTIONAL_LINENUMBERS_FIXTURE" run_interp_minimal_fixture fractional_linenumbers "$FRACTIONAL_LINENUMBERS_FIXTURE"
run_interp_minimal_fixture cam_nisley_bare "$CAM_NISLEY_FIXTURE"
write_tool_table_ini "$CAM_NISLEY_INI" "$CAM_NISLEY_TOOL_TABLE"
run_interp_minimal_fixture cam_nisley "$CAM_NISLEY_FIXTURE" "$CAM_NISLEY_INI"
run_interp_minimal_fixture crazy_paths "$CRAZY_PATHS_FIXTURE"
run_interp_minimal_fixture namedparam_bug424 "$NAMEDPARAM_BUG424_FIXTURE" run_interp_minimal_fixture namedparam_bug424 "$NAMEDPARAM_BUG424_FIXTURE"
run_interp_minimal_fixture flowsnake "$FLOWSNAKE_FIXTURE" run_interp_minimal_fixture flowsnake "$FLOWSNAKE_FIXTURE"
run_interp_minimal_fixture inside_corners "$INSIDE_CORNERS_FIXTURE"
run_interp_minimal_fixture inverse_time_with_comp "$INVERSE_TIME_WITH_COMP_FIXTURE"
write_ccomp_ini "$CCOMP_LATHE_COMP_INI" "$CCOMP_LATHE_COMP_TOOL_TABLE"
write_ccomp_ini "$CCOMP_MILL_G90G91G92_INI" "$CCOMP_MILL_G90G91G92_TOOL_TABLE"
write_ccomp_ini "$CCOMP_MILL_LINE_ARC_ENTRY_INI" "$CCOMP_MILL_LINE_ARC_ENTRY_TOOL_TABLE"
write_ccomp_ini "$CCOMP_MILL_ZCHANGES_INI" "$CCOMP_MILL_ZCHANGES_TOOL_TABLE"
run_interp_minimal_fixture ccomp_lathe_comp "$CCOMP_LATHE_COMP_FIXTURE" "$CCOMP_LATHE_COMP_INI"
run_interp_minimal_fixture ccomp_mill_g90g91g92 "$CCOMP_MILL_G90G91G92_FIXTURE" "$CCOMP_MILL_G90G91G92_INI"
run_interp_minimal_fixture ccomp_mill_line_arc_entry "$CCOMP_MILL_LINE_ARC_ENTRY_FIXTURE" "$CCOMP_MILL_LINE_ARC_ENTRY_INI"
run_interp_minimal_fixture ccomp_mill_zchanges "$CCOMP_MILL_ZCHANGES_FIXTURE" "$CCOMP_MILL_ZCHANGES_INI"
run_interp_minimal_fixture bad_a_in_canned_cycle "$BAD_A_IN_CANNED_CYCLE_FIXTURE"
run_interp_minimal_fixture bad_a_in_canned_cycle2 "$BAD_A_IN_CANNED_CYCLE2_FIXTURE"
run_interp_minimal_fixture bad_arc_big_imperial_center_format "$BAD_ARC_BIG_IMPERIAL_CENTER_FORMAT_FIXTURE"
run_interp_minimal_fixture bad_arc_big_metric_center_format "$BAD_ARC_BIG_METRIC_CENTER_FORMAT_FIXTURE"
run_interp_minimal_fixture bad_arc_medium_imperial_center_format "$BAD_ARC_MEDIUM_IMPERIAL_CENTER_FORMAT_FIXTURE"
run_interp_minimal_fixture bad_arc_medium_metric_center_format "$BAD_ARC_MEDIUM_METRIC_CENTER_FORMAT_FIXTURE"
run_interp_minimal_fixture bad_arc_small_imperial_center_format "$BAD_ARC_SMALL_IMPERIAL_CENTER_FORMAT_FIXTURE"
run_interp_minimal_fixture bad_arc_small_metric_center_format "$BAD_ARC_SMALL_METRIC_CENTER_FORMAT_FIXTURE"
run_interp_minimal_fixture bad_ccomp_arcexit "$BAD_CCOMP_ARCEXIT_FIXTURE"
run_interp_minimal_fixture bad_ccomp_gouging "$BAD_CCOMP_GOUGING_FIXTURE"
run_interp_minimal_fixture bad_exists_1 "$BAD_EXISTS_1_FIXTURE" run_interp_minimal_fixture bad_exists_1 "$BAD_EXISTS_1_FIXTURE"
run_interp_minimal_fixture bad_exists_2 "$BAD_EXISTS_2_FIXTURE" run_interp_minimal_fixture bad_exists_2 "$BAD_EXISTS_2_FIXTURE"
run_interp_minimal_fixture bad_exists_3 "$BAD_EXISTS_3_FIXTURE" run_interp_minimal_fixture bad_exists_3 "$BAD_EXISTS_3_FIXTURE"
@@ -1494,6 +1661,20 @@ run_interp_minimal_fixture bad_no_ijr "$BAD_NO_IJR_FIXTURE"
run_interp_minimal_fixture bad_probe_no_axes "$BAD_PROBE_NO_AXES_FIXTURE" run_interp_minimal_fixture bad_probe_no_axes "$BAD_PROBE_NO_AXES_FIXTURE"
run_interp_minimal_fixture g33_1 "$G33_1_FIXTURE" run_interp_minimal_fixture g33_1 "$G33_1_FIXTURE"
run_interp_minimal_fixture g6164 "$G6164_FIXTURE" run_interp_minimal_fixture g6164 "$G6164_FIXTURE"
run_interp_minimal_fixture g72_facing "$G72_FACING_FIXTURE"
run_interp_minimal_fixture g72_missing_iteration "$G72_MISSING_ITERATION_FIXTURE"
run_interp_minimal_fixture g71_endless_loop "$G71_ENDLESS_LOOP_FIXTURE"
run_interp_minimal_fixture g71_endless_loop2 "$G71_ENDLESS_LOOP2_FIXTURE"
run_interp_minimal_fixture g71_endless_loop_2 "$G71_ENDLESS_LOOP_2_FIXTURE"
run_interp_minimal_fixture g71_with_g70 "$G71_WITH_G70_FIXTURE"
write_tool_table_ini "$G76_INI" "$G76_TOOL_TABLE"
run_interp_minimal_fixture g76 "$G76_FIXTURE" "$G76_INI"
run_interp_minimal_fixture good_arc_big_imperial_center_format "$GOOD_ARC_BIG_IMPERIAL_CENTER_FORMAT_FIXTURE"
run_interp_minimal_fixture good_arc_big_metric_center_format "$GOOD_ARC_BIG_METRIC_CENTER_FORMAT_FIXTURE"
run_interp_minimal_fixture good_arc_medium_imperial_center_format "$GOOD_ARC_MEDIUM_IMPERIAL_CENTER_FORMAT_FIXTURE"
run_interp_minimal_fixture good_arc_medium_metric_center_format "$GOOD_ARC_MEDIUM_METRIC_CENTER_FORMAT_FIXTURE"
run_interp_minimal_fixture good_arc_small_imperial_center_format "$GOOD_ARC_SMALL_IMPERIAL_CENTER_FORMAT_FIXTURE"
run_interp_minimal_fixture good_arc_small_metric_center_format "$GOOD_ARC_SMALL_METRIC_CENTER_FORMAT_FIXTURE"
run_interp_minimal_fixture rotation_abs_pts "$ROTATION_ABS_PTS_FIXTURE" run_interp_minimal_fixture rotation_abs_pts "$ROTATION_ABS_PTS_FIXTURE"
run_interp_minimal_fixture rotation_g28 "$ROTATION_G28_FIXTURE" run_interp_minimal_fixture rotation_g28 "$ROTATION_G28_FIXTURE"
run_interp_minimal_fixture rotation_g53 "$ROTATION_G53_FIXTURE" run_interp_minimal_fixture rotation_g53 "$ROTATION_G53_FIXTURE"
@@ -1509,12 +1690,44 @@ run_interp_minimal_fixture m19 "$M19_FIXTURE" "$M19_INI"
run_interp_minimal_fixture magic_comments_param_format "$MAGIC_COMMENTS_PARAM_FORMAT_FIXTURE" run_interp_minimal_fixture magic_comments_param_format "$MAGIC_COMMENTS_PARAM_FORMAT_FIXTURE"
run_interp_minimal_fixture m98m99_01_basics "$M98M99_01_BASICS_FIXTURE" run_interp_minimal_fixture m98m99_01_basics "$M98M99_01_BASICS_FIXTURE"
run_interp_minimal_fixture m98m99_02_variables "$M98M99_02_VARIABLES_FIXTURE" run_interp_minimal_fixture m98m99_02_variables "$M98M99_02_VARIABLES_FIXTURE"
run_interp_minimal_fixture m98m99_03_error_m98_no_p_word "$M98M99_03_ERROR_M98_NO_P_WORD_FIXTURE"
run_interp_minimal_fixture m98m99_04_m98_but_no_sub "$M98M99_04_M98_BUT_NO_SUB_FIXTURE"
run_interp_minimal_fixture m98m99_05_m98_loops "$M98M99_05_M98_LOOPS_FIXTURE"
run_interp_minimal_fixture m98m99_06_called_with_o_call "$M98M99_06_CALLED_WITH_O_CALL_FIXTURE"
run_interp_minimal_fixture m98m99_06_ended_with_o_endsub "$M98M99_06_ENDED_WITH_O_ENDSUB_FIXTURE"
run_interp_minimal_fixture m98m99_06_sub_called_with_m98 "$M98M99_06_SUB_CALLED_WITH_M98_FIXTURE"
run_interp_minimal_fixture m98m99_06_sub_ended_with_m99 "$M98M99_06_SUB_ENDED_WITH_M99_FIXTURE"
run_interp_minimal_fixture m98m99_07_nested_subs "$M98M99_07_NESTED_SUBS_FIXTURE" run_interp_minimal_fixture m98m99_07_nested_subs "$M98M99_07_NESTED_SUBS_FIXTURE"
run_interp_minimal_fixture m98m99_08_sub_follows_main "$M98M99_08_SUB_FOLLOWS_MAIN_FIXTURE" run_interp_minimal_fixture m98m99_08_sub_follows_main "$M98M99_08_SUB_FOLLOWS_MAIN_FIXTURE"
run_interp_minimal_fixture m98m99_09_fanuc_ini "$M98M99_09_FANUC_FIXTURE" "$M98M99_09_FANUC_INI"
run_interp_minimal_fixture m98m99_09_rs274ngc_ini "$M98M99_09_RS274NGC_FIXTURE" "$M98M99_09_FANUC_INI"
run_interp_minimal_fixture m98m99_09_fanuc_no_fanuc "$M98M99_09_FANUC_FIXTURE" "$M98M99_09_NO_FANUC_INI"
run_interp_minimal_fixture m98m99_09_rs274ngc_no_fanuc "$M98M99_09_RS274NGC_FIXTURE" "$M98M99_09_NO_FANUC_INI"
run_interp_minimal_fixture m98m99_09_fanuc_default "$M98M99_09_FANUC_FIXTURE"
run_interp_minimal_fixture m98m99_09_rs274ngc_default "$M98M99_09_RS274NGC_FIXTURE"
run_interp_minimal_fixture m98m99_10_m98_p001 "$M98M99_10_M98_P001_FIXTURE" run_interp_minimal_fixture m98m99_10_m98_p001 "$M98M99_10_M98_P001_FIXTURE"
run_interp_minimal_fixture m98m99_11_legal_m2 "$M98M99_11_LEGAL_M2_FIXTURE"
run_interp_minimal_fixture m98m99_11_legal_m02 "$M98M99_11_LEGAL_M02_FIXTURE"
run_interp_minimal_fixture m98m99_11_legal_m30 "$M98M99_11_LEGAL_M30_FIXTURE"
run_interp_minimal_fixture m98m99_11_legal_percent "$M98M99_11_LEGAL_PERCENT_FIXTURE"
run_interp_minimal_fixture m98m99_11_illegal_eof "$M98M99_11_ILLEGAL_EOF_FIXTURE"
run_interp_minimal_fixture m98m99_11_illegal_no_m30 "$M98M99_11_ILLEGAL_NO_M30_FIXTURE"
run_interp_minimal_fixture m98m99_11_illegal_sub_after_percent "$M98M99_11_ILLEGAL_SUB_AFTER_PERCENT_FIXTURE"
run_interp_minimal_fixture m98m99_13_named_program_named "$M98M99_13_NAMED_PROGRAM_NAMED_FIXTURE" run_interp_minimal_fixture m98m99_13_named_program_named "$M98M99_13_NAMED_PROGRAM_NAMED_FIXTURE"
run_interp_minimal_fixture m98m99_13_named_program_numbered "$M98M99_13_NAMED_PROGRAM_NUMBERED_FIXTURE" run_interp_minimal_fixture m98m99_13_named_program_numbered "$M98M99_13_NAMED_PROGRAM_NUMBERED_FIXTURE"
run_interp_minimal_fixture m98m99_14_o_expression_call "$M98M99_14_O_EXPRESSION_CALL_FIXTURE" run_interp_minimal_fixture m98m99_14_o_expression_call "$M98M99_14_O_EXPRESSION_CALL_FIXTURE"
write_tool_table_ini "$G10_L1_L10_INI" "$G10_L1_L10_TOOL_TABLE"
write_tool_table_ini "$G10_L11_INI" "$G10_L11_TOOL_TABLE"
write_tool_table_ini "$G10_WITH_G92_INI" "$G10_WITH_G92_TOOL_TABLE"
run_interp_minimal_fixture g10_l1_l10 "$G10_L1_L10_FIXTURE" "$G10_L1_L10_INI"
run_interp_minimal_fixture g10_l11 "$G10_L11_FIXTURE" "$G10_L11_INI"
run_interp_minimal_fixture g10_l2_while_active "$G10_L2_WHILE_ACTIVE_FIXTURE"
run_interp_minimal_fixture g10_l20_while_active "$G10_L20_WHILE_ACTIVE_FIXTURE"
run_interp_minimal_fixture g10_with_g92 "$G10_WITH_G92_FIXTURE" "$G10_WITH_G92_INI"
run_interp_minimal_fixture g52_g92_interaction "$G52_G92_INTERACTION_FIXTURE"
write_g92_persistence_files
run_interp_minimal_fixture g92_persistence_enabled "$G92_PERSISTENCE_FIXTURE" "$G92_PERSISTENCE_INI"
run_interp_minimal_fixture g92_persistence_disabled "$G92_PERSISTENCE_FIXTURE" "$G92_PERSISTENCE_DISABLED_INI"
run_interp_minimal_fixture sim_axis_foam "$SIM_AXIS_FOAM_FIXTURE" "$SIM_AXIS_FOAM_INI" continue_on_error run_interp_minimal_fixture sim_axis_foam "$SIM_AXIS_FOAM_FIXTURE" "$SIM_AXIS_FOAM_INI" continue_on_error
run_interp_minimal_fixture sim_bridgemill "$SIM_BRIDGEMILL_FIXTURE" "$SIM_BRIDGEMILL_INI" continue_on_error run_interp_minimal_fixture sim_bridgemill "$SIM_BRIDGEMILL_FIXTURE" "$SIM_BRIDGEMILL_INI" continue_on_error
run_interp_minimal_fixture sim_geometry_xyzc "$SIM_GEOMETRY_XYZC_FIXTURE" "$SIM_GEOMETRY_XYZC_INI" continue_on_error run_interp_minimal_fixture sim_geometry_xyzc "$SIM_GEOMETRY_XYZC_FIXTURE" "$SIM_GEOMETRY_XYZC_INI" continue_on_error

View File

@@ -32,9 +32,29 @@ if [[ ! -f "$MANIFEST_FILE" ]]; then
exit 1 exit 1
fi 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
}
while IFS= read -r src_rel; do while IFS= read -r src_rel; do
[[ -z "$src_rel" ]] && continue [[ -z "$src_rel" ]] && continue
[[ "${src_rel:0:1}" == "#" ]] && continue [[ "${src_rel:0:1}" == "#" ]] && continue
if ! validate_manifest_path "$src_rel"; then
echo "invalid manifest path: $src_rel" >&2
exit 1
fi
copy_file "$src_rel" copy_file "$src_rel"
done < "$MANIFEST_FILE" done < "$MANIFEST_FILE"

View File

@@ -233,15 +233,45 @@ tests/interp/m98m99/01-basics/test.sh
tests/interp/m98m99/02-variables/expected tests/interp/m98m99/02-variables/expected
tests/interp/m98m99/02-variables/test.ngc tests/interp/m98m99/02-variables/test.ngc
tests/interp/m98m99/02-variables/test.sh 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/expected
tests/interp/m98m99/07-nested-subs/test.ngc tests/interp/m98m99/07-nested-subs/test.ngc
tests/interp/m98m99/07-nested-subs/test.sh tests/interp/m98m99/07-nested-subs/test.sh
tests/interp/m98m99/08-sub-follows-main/expected 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.ngc
tests/interp/m98m99/08-sub-follows-main/test.sh 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/expected
tests/interp/m98m99/10-M98-P001/test.ngc tests/interp/m98m99/10-M98-P001/test.ngc
tests/interp/m98m99/10-M98-P001/test.sh 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/expected
tests/interp/m98m99/13-named-program/test-named.ngc tests/interp/m98m99/13-named-program/test-named.ngc
tests/interp/m98m99/13-named-program/test-numbered.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/expected
tests/interp/fractional-linenumbers/test.ngc tests/interp/fractional-linenumbers/test.ngc
tests/interp/fractional-linenumbers/test.sh 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/README
tests/interp/namedparam-bug424/expected tests/interp/namedparam-bug424/expected
tests/interp/namedparam-bug424/test.ngc tests/interp/namedparam-bug424/test.ngc
@@ -284,6 +322,40 @@ tests/interp/flowsnake/README
tests/interp/flowsnake/expected tests/interp/flowsnake/expected
tests/interp/flowsnake/flowsnake.ngc tests/interp/flowsnake/flowsnake.ngc
tests/interp/flowsnake/test.sh 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-1.ngc
tests/interp/bad/exists-2.ngc tests/interp/bad/exists-2.ngc
tests/interp/bad/exists-3.ngc tests/interp/bad/exists-3.ngc
@@ -301,6 +373,56 @@ tests/interp/g33.1/test.sh
tests/interp/g6164/expected tests/interp/g6164/expected
tests/interp/g6164/test.ngc tests/interp/g6164/test.ngc
tests/interp/g6164/test.sh 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/expected
tests/interp/rotation/abs-pts/test.ngc tests/interp/rotation/abs-pts/test.ngc
tests/interp/rotation/abs-pts/test.sh tests/interp/rotation/abs-pts/test.sh

View File

@@ -24,6 +24,22 @@ if [[ ! -f "$MANIFEST_FILE" ]]; then
exit 1 exit 1
fi 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" mkdir -p "$BUILD_DIR"
vendor_sync_fingerprint() { vendor_sync_fingerprint() {
@@ -65,7 +81,7 @@ while IFS= read -r src_rel; do
[[ -z "$src_rel" ]] && continue [[ -z "$src_rel" ]] && continue
[[ "${src_rel:0:1}" == "#" ]] && 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 echo "invalid manifest path: $src_rel" >&2
exit 1 exit 1
fi fi

View File

@@ -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()

View File

@@ -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

View File

@@ -0,0 +1,3 @@
#!/bin/bash
rs274 -t test.tbl -g test.ngc | awk '{$1=""; print}'
exit "${PIPESTATUS[0]}"

View File

@@ -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;

View File

@@ -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()

View File

@@ -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

View File

@@ -0,0 +1,3 @@
#!/bin/bash
rs274 -t test.tbl -g test.ngc | awk '{$1=""; print}'
exit "${PIPESTATUS[0]}"

View File

@@ -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

View File

@@ -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()

View File

@@ -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

View File

@@ -0,0 +1,3 @@
#!/bin/bash
rs274 -t test.tbl -g test.ngc | awk '{$1=""; print}'
exit "${PIPESTATUS[0]}"

View File

@@ -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

View File

@@ -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()

View File

@@ -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

View File

@@ -0,0 +1,3 @@
#!/bin/bash
rs274 -t test.tbl -g test.ngc | awk '{$1=""; print}'
exit "${PIPESTATUS[0]}"

View File

@@ -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

View File

@@ -0,0 +1,3 @@
;Cannot put an a in canned cycle
g81 x0 y0 z-1 r0 f12
a90

View File

@@ -0,0 +1,2 @@
;Cannot put an a in canned cycle
g81 x0 y0 z-1 r0 a90 f12

View File

@@ -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]]]]

View File

@@ -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]]]]

View File

@@ -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]

View File

@@ -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]

View File

@@ -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]]]

View File

@@ -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]]]

View File

@@ -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

View File

@@ -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

View File

@@ -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
%

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,3 @@
#!/bin/bash
rs274 -t test.tbl -g cam.ngc | awk '{$1=""; print}'
exit "${PIPESTATUS[0]}"

View File

@@ -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

View File

@@ -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.

View File

@@ -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()

View File

@@ -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

View File

@@ -0,0 +1,3 @@
#!/bin/bash
rs274 -g test.ngc | awk '{$1=""; print}'
exit "${PIPESTATUS[0]}"

View File

@@ -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()

View File

@@ -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

View File

@@ -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]}"

View File

@@ -0,0 +1 @@
T1 P1 X0 Y0 Z0 ;

View File

@@ -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()

View File

@@ -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

View File

@@ -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]}"

View File

@@ -0,0 +1 @@
T1 P1 X0 Y0 Z0 ;

View File

@@ -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()

View File

@@ -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

View File

@@ -0,0 +1,3 @@
#!/bin/bash
rs274 -g test.ngc | awk '{$1=""; print}'
exit "${PIPESTATUS[0]}"

View File

@@ -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()

View File

@@ -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

View File

@@ -0,0 +1,3 @@
#!/bin/bash
rs274 -g test.ngc | awk '{$1=""; print}' | sed 's/-0\.0000/0.0000/g'
exit "${PIPESTATUS[0]}"

View File

@@ -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()

View File

@@ -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

View File

@@ -0,0 +1,3 @@
#!/bin/bash
rs274 -g test.ngc -t test.tbl | awk '{$1=""; print}'
exit "${PIPESTATUS[0]}"

View File

@@ -0,0 +1 @@
t1 p1 x0 y0 z0

View File

@@ -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()

View File

@@ -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

View File

@@ -0,0 +1,3 @@
#!/bin/bash
rs274 -g g52-g92-interaction.ngc

View File

@@ -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()

View File

@@ -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

View File

@@ -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

View File

@@ -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()

View File

@@ -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

View File

@@ -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

View File

@@ -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()

View File

@@ -0,0 +1,40 @@
#<_initial>=20
#<_final>=19.726
#<_champher>=0.5
#<_zmax>=0
#<_zmin>=-25
#<doc>=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-#<doc>]
;m7
G71 Q100 Z[#<_zmax>+0.8+#<doc>] X#<_initial> D#<doc> I#<doc> R0.3
G52 z0
;m7
g42
G70 Q100 Z[#<_zmax>+1] X#<_initial> D#<doc> P1
g40
M9
G0X[#<_initial>+5]
M2

View File

@@ -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

View File

@@ -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()

View File

@@ -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

View File

@@ -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

View File

@@ -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()

View File

@@ -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

View File

@@ -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

View File

@@ -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()

View File

@@ -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

View File

@@ -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

View File

@@ -0,0 +1 @@
Test that g76 works as expected

View File

@@ -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()

View File

@@ -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

View File

@@ -0,0 +1,3 @@
#!/bin/bash
rs274 -t test.tbl -g g76only.ngc | awk '{$1=""; print}'
exit "${PIPESTATUS[0]}"

View File

@@ -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

View File

@@ -0,0 +1,5 @@
g20
f1
g0x0y0z0
g2 x600 i[300 + [100 * [0.00099 * sqrt[2]]]]
m2

Some files were not shown because too many files have changed in this diff Show More