[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: pcb.git: branch: master updated (1d82803aa20acc5e379e53a548a0ba4e29d23339)
The branch, master has been updated
via 1d82803aa20acc5e379e53a548a0ba4e29d23339 (commit)
via a858a225f69176e913e811d9f3a6b155d5cffb4c (commit)
via a34b5d9ff0851ca54546263b9f06c84cf78854a1 (commit)
via b6f4fb5561420d11f0a3051f19fe671e07f3f840 (commit)
via 78f02193b05e6952c2d5b2b0bb6d44a762f62529 (commit)
via 1177764cfa2f2af70a25b3acc058b414301860b7 (commit)
via f546e9fa060abab5d1bc6f2bb7e27ab28c8180f8 (commit)
via 2a38d72638f8acb7e625ad03b3a3314c2d2055bd (commit)
via 728eb911f9cf88f20d5eb33c0bd62e0637b4115d (commit)
via a55da655ae12c0934141d64ec423fa9131fd2483 (commit)
via 100197a9f6d182979837a7338a147848219ad506 (commit)
via d05f2f19a2a14ab1634c8477f7e189e8e26a3d9a (commit)
via 356e5c1f7d58f3930056ee39bc2ed11346b64d14 (commit)
via cd063cb3a69922c7be3ad2df7511a5fd6e1392b5 (commit)
via 9d3843a6b72ac6bdcd4d76d28162a700f1a7923b (commit)
via f39ac9ce9e0141c8f1e3828d280fd8df95da4522 (commit)
via 83dba626f35195a00f1ef2f23ab2d235b4f6757b (commit)
from 48b13a7ef095b479235c69b08c57bac74e81b3b6 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
src/hid/gcode/gcode.c | 334 +++++++++++++-------
.../gcode_oneline-0.0350.drill.gcode} | 7 +-
.../gcode_oneline-bottom.gcode} | 3 +-
.../gcode_oneline-top.gcode} | 3 +-
.../golden/hid_gcode1/gcode_oneline.gcode.top.cnc | 34 --
....drill.cnc => gcode_oneline-0.8890.drill.gcode} | 7 +-
...gcode.bottom.cnc => gcode_oneline-bottom.gcode} | 3 +-
...eline.gcode.top.cnc => gcode_oneline-top.gcode} | 3 +-
....drill.cnc => gcode_oneline-0.0350.drill.gcode} | 7 +-
...gcode.bottom.cnc => gcode_oneline-bottom.gcode} | 3 +-
...eline.gcode.top.cnc => gcode_oneline-top.gcode} | 3 +-
.../out-0.0350.drill.gcode} | 7 +-
.../out-bottom.gcode} | 3 +-
.../out-top.gcode} | 3 +-
tests/golden/hid_gcode2/out.bottom.cnc | 34 --
tests/golden/hid_gcode2/out.drill.cnc | 12 -
tests/golden/hid_gcode2/out.top.cnc | 34 --
.../gcode_oneline-0.0350.drill.gcode} | 7 +-
tests/golden/hid_gcode3/gcode_oneline-bottom.gcode | 41 +++
tests/golden/hid_gcode3/gcode_oneline-top.gcode | 41 +++
.../hid_gcode3/gcode_oneline.gcode.bottom.cnc | 40 ---
.../hid_gcode3/gcode_oneline.gcode.drill.cnc | 12 -
.../golden/hid_gcode3/gcode_oneline.gcode.top.cnc | 40 ---
.../gcode_oneline-0.0350.drill.gcode} | 7 +-
.../gcode_oneline-bottom.gcode} | 5 +-
.../gcode_oneline-top.gcode} | 5 +-
.../hid_gcode4/gcode_oneline.gcode.bottom.cnc | 34 --
.../hid_gcode4/gcode_oneline.gcode.drill.cnc | 12 -
.../golden/hid_gcode4/gcode_oneline.gcode.top.cnc | 34 --
.../gcode_oneline-0.0350.drill.gcode} | 9 +-
.../gcode_oneline-bottom.gcode} | 5 +-
.../gcode_oneline-top.gcode} | 5 +-
.../hid_gcode5/gcode_oneline.gcode.bottom.cnc | 34 --
.../hid_gcode5/gcode_oneline.gcode.drill.cnc | 12 -
.../golden/hid_gcode5/gcode_oneline.gcode.top.cnc | 34 --
.../gcode_oneline-0.0350.drill.gcode} | 7 +-
tests/golden/hid_gcode6/gcode_oneline-bottom.gcode | 39 +++
tests/golden/hid_gcode6/gcode_oneline-top.gcode | 39 +++
.../hid_gcode6/gcode_oneline.gcode.bottom.cnc | 43 ---
.../hid_gcode6/gcode_oneline.gcode.drill.cnc | 12 -
.../golden/hid_gcode6/gcode_oneline.gcode.top.cnc | 43 ---
.../gcode_oneline-0.0350.drill.gcode} | 7 +-
.../gcode_oneline-bottom.gcode} | 3 +-
.../gcode_oneline-top.gcode} | 3 +-
.../hid_gcode7/gcode_oneline.gcode.bottom.cnc | 34 --
.../hid_gcode7/gcode_oneline.gcode.drill.cnc | 12 -
.../gcode_oneline-0.8890.drill.gcode} | 7 +-
.../gcode_oneline-bottom.gcode} | 3 +-
.../gcode_oneline-top.gcode} | 3 +-
.../hid_gcode8/gcode_oneline.gcode.bottom.cnc | 34 --
.../hid_gcode8/gcode_oneline.gcode.drill.cnc | 12 -
.../golden/hid_gcode8/gcode_oneline.gcode.top.cnc | 34 --
....drill.cnc => gcode_oneline-0.0350.drill.gcode} | 7 +-
...gcode.bottom.cnc => gcode_oneline-bottom.gcode} | 3 +-
...eline.gcode.top.cnc => gcode_oneline-top.gcode} | 3 +-
tests/run_tests.sh | 62 ++--
tests/tests.list | 32 +-
57 files changed, 515 insertions(+), 804 deletions(-)
copy tests/golden/{hid_gcode9/gcode_oneline.gcode.drill.cnc => hid_gcode1/gcode_oneline-0.0350.drill.gcode} (69%)
copy tests/golden/{hid_gcode9/gcode_oneline.gcode.bottom.cnc => hid_gcode1/gcode_oneline-bottom.gcode} (92%)
copy tests/golden/{hid_gcode9/gcode_oneline.gcode.top.cnc => hid_gcode1/gcode_oneline-top.gcode} (92%)
delete mode 100644 tests/golden/hid_gcode1/gcode_oneline.gcode.top.cnc
rename tests/golden/hid_gcode10/{gcode_oneline.gcode.drill.cnc => gcode_oneline-0.8890.drill.gcode} (69%)
rename tests/golden/hid_gcode10/{gcode_oneline.gcode.bottom.cnc => gcode_oneline-bottom.gcode} (93%)
rename tests/golden/hid_gcode10/{gcode_oneline.gcode.top.cnc => gcode_oneline-top.gcode} (93%)
rename tests/golden/hid_gcode11/{gcode_oneline.gcode.drill.cnc => gcode_oneline-0.0350.drill.gcode} (69%)
rename tests/golden/hid_gcode11/{gcode_oneline.gcode.bottom.cnc => gcode_oneline-bottom.gcode} (94%)
rename tests/golden/hid_gcode11/{gcode_oneline.gcode.top.cnc => gcode_oneline-top.gcode} (94%)
copy tests/golden/{hid_gcode9/gcode_oneline.gcode.drill.cnc => hid_gcode2/out-0.0350.drill.gcode} (69%)
copy tests/golden/{hid_gcode9/gcode_oneline.gcode.bottom.cnc => hid_gcode2/out-bottom.gcode} (92%)
copy tests/golden/{hid_gcode9/gcode_oneline.gcode.top.cnc => hid_gcode2/out-top.gcode} (92%)
delete mode 100644 tests/golden/hid_gcode2/out.bottom.cnc
delete mode 100644 tests/golden/hid_gcode2/out.drill.cnc
delete mode 100644 tests/golden/hid_gcode2/out.top.cnc
copy tests/golden/{hid_gcode9/gcode_oneline.gcode.drill.cnc => hid_gcode3/gcode_oneline-0.0350.drill.gcode} (69%)
create mode 100644 tests/golden/hid_gcode3/gcode_oneline-bottom.gcode
create mode 100644 tests/golden/hid_gcode3/gcode_oneline-top.gcode
delete mode 100644 tests/golden/hid_gcode3/gcode_oneline.gcode.bottom.cnc
delete mode 100644 tests/golden/hid_gcode3/gcode_oneline.gcode.drill.cnc
delete mode 100644 tests/golden/hid_gcode3/gcode_oneline.gcode.top.cnc
copy tests/golden/{hid_gcode9/gcode_oneline.gcode.drill.cnc => hid_gcode4/gcode_oneline-0.0350.drill.gcode} (69%)
copy tests/golden/{hid_gcode9/gcode_oneline.gcode.bottom.cnc => hid_gcode4/gcode_oneline-bottom.gcode} (88%)
copy tests/golden/{hid_gcode9/gcode_oneline.gcode.top.cnc => hid_gcode4/gcode_oneline-top.gcode} (88%)
delete mode 100644 tests/golden/hid_gcode4/gcode_oneline.gcode.bottom.cnc
delete mode 100644 tests/golden/hid_gcode4/gcode_oneline.gcode.drill.cnc
delete mode 100644 tests/golden/hid_gcode4/gcode_oneline.gcode.top.cnc
copy tests/golden/{hid_gcode9/gcode_oneline.gcode.drill.cnc => hid_gcode5/gcode_oneline-0.0350.drill.gcode} (62%)
copy tests/golden/{hid_gcode9/gcode_oneline.gcode.bottom.cnc => hid_gcode5/gcode_oneline-bottom.gcode} (89%)
copy tests/golden/{hid_gcode9/gcode_oneline.gcode.top.cnc => hid_gcode5/gcode_oneline-top.gcode} (89%)
delete mode 100644 tests/golden/hid_gcode5/gcode_oneline.gcode.bottom.cnc
delete mode 100644 tests/golden/hid_gcode5/gcode_oneline.gcode.drill.cnc
delete mode 100644 tests/golden/hid_gcode5/gcode_oneline.gcode.top.cnc
copy tests/golden/{hid_gcode9/gcode_oneline.gcode.drill.cnc => hid_gcode6/gcode_oneline-0.0350.drill.gcode} (69%)
create mode 100644 tests/golden/hid_gcode6/gcode_oneline-bottom.gcode
create mode 100644 tests/golden/hid_gcode6/gcode_oneline-top.gcode
delete mode 100644 tests/golden/hid_gcode6/gcode_oneline.gcode.bottom.cnc
delete mode 100644 tests/golden/hid_gcode6/gcode_oneline.gcode.drill.cnc
delete mode 100644 tests/golden/hid_gcode6/gcode_oneline.gcode.top.cnc
copy tests/golden/{hid_gcode9/gcode_oneline.gcode.drill.cnc => hid_gcode7/gcode_oneline-0.0350.drill.gcode} (70%)
copy tests/golden/{hid_gcode9/gcode_oneline.gcode.bottom.cnc => hid_gcode7/gcode_oneline-bottom.gcode} (92%)
copy tests/golden/{hid_gcode9/gcode_oneline.gcode.top.cnc => hid_gcode7/gcode_oneline-top.gcode} (92%)
delete mode 100644 tests/golden/hid_gcode7/gcode_oneline.gcode.bottom.cnc
delete mode 100644 tests/golden/hid_gcode7/gcode_oneline.gcode.drill.cnc
rename tests/golden/{hid_gcode1/gcode_oneline.gcode.drill.cnc => hid_gcode8/gcode_oneline-0.8890.drill.gcode} (69%)
rename tests/golden/{hid_gcode1/gcode_oneline.gcode.bottom.cnc => hid_gcode8/gcode_oneline-bottom.gcode} (93%)
rename tests/golden/{hid_gcode7/gcode_oneline.gcode.top.cnc => hid_gcode8/gcode_oneline-top.gcode} (93%)
delete mode 100644 tests/golden/hid_gcode8/gcode_oneline.gcode.bottom.cnc
delete mode 100644 tests/golden/hid_gcode8/gcode_oneline.gcode.drill.cnc
delete mode 100644 tests/golden/hid_gcode8/gcode_oneline.gcode.top.cnc
rename tests/golden/hid_gcode9/{gcode_oneline.gcode.drill.cnc => gcode_oneline-0.0350.drill.gcode} (69%)
rename tests/golden/hid_gcode9/{gcode_oneline.gcode.bottom.cnc => gcode_oneline-bottom.gcode} (92%)
rename tests/golden/hid_gcode9/{gcode_oneline.gcode.top.cnc => gcode_oneline-top.gcode} (92%)
=================
Commit Messages
=================
commit 1d82803aa20acc5e379e53a548a0ba4e29d23339
Author: Dima Kogan <dima@xxxxxxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>
reference gcode tests now match the latest generated gcode
:100644 100644 63f6a2d... 4e978bd... M tests/golden/hid_gcode1/gcode_oneline-0.0350.drill.gcode
:100644 100644 2031270... d8f7d01... M tests/golden/hid_gcode1/gcode_oneline-bottom.gcode
:100644 100644 afd6cb2... 6aca656... M tests/golden/hid_gcode1/gcode_oneline-top.gcode
:100644 100644 7deace0... 8ddf366... M tests/golden/hid_gcode10/gcode_oneline-0.8890.drill.gcode
:100644 100644 19a703d... 3c4f9da... M tests/golden/hid_gcode10/gcode_oneline-bottom.gcode
:100644 100644 a1d48bd... de9db0c... M tests/golden/hid_gcode10/gcode_oneline-top.gcode
:100644 100644 37b9668... a857934... M tests/golden/hid_gcode11/gcode_oneline-0.0350.drill.gcode
:100644 100644 c144b05... cb47417... M tests/golden/hid_gcode11/gcode_oneline-bottom.gcode
:100644 100644 ddf7394... 9a74775... M tests/golden/hid_gcode11/gcode_oneline-top.gcode
:100644 100644 f7c6d78... 4e978bd... M tests/golden/hid_gcode2/out-0.0350.drill.gcode
:100644 100644 c3b0526... d8f7d01... M tests/golden/hid_gcode2/out-bottom.gcode
:100644 100644 ca2b079... 6aca656... M tests/golden/hid_gcode2/out-top.gcode
:100644 100644 e7be01d... 4e978bd... M tests/golden/hid_gcode3/gcode_oneline-0.0350.drill.gcode
:100644 100644 e67b085... e066761... M tests/golden/hid_gcode3/gcode_oneline-bottom.gcode
:100644 100644 d7c8c9f... 77fa466... M tests/golden/hid_gcode3/gcode_oneline-top.gcode
:100644 100644 c648655... 4e978bd... M tests/golden/hid_gcode4/gcode_oneline-0.0350.drill.gcode
:100644 100644 d049972... 7a4cf41... M tests/golden/hid_gcode4/gcode_oneline-bottom.gcode
:100644 100644 78e64a5... 9a83d97... M tests/golden/hid_gcode4/gcode_oneline-top.gcode
:100644 100644 77d8d60... da70a5b... M tests/golden/hid_gcode5/gcode_oneline-0.0350.drill.gcode
:100644 100644 8041f98... 40aa456... M tests/golden/hid_gcode5/gcode_oneline-bottom.gcode
:100644 100644 e3bbd7e... 07819ff... M tests/golden/hid_gcode5/gcode_oneline-top.gcode
:100644 100644 6b44265... 4e978bd... M tests/golden/hid_gcode6/gcode_oneline-0.0350.drill.gcode
:100644 100644 7d33799... 5440510... M tests/golden/hid_gcode6/gcode_oneline-bottom.gcode
:100644 100644 7dfd6a0... c9cd5e6... M tests/golden/hid_gcode6/gcode_oneline-top.gcode
:100644 100644 e8c41bf... 1edd7fb... M tests/golden/hid_gcode7/gcode_oneline-0.0350.drill.gcode
:100644 100644 b92e532... 10719a2... M tests/golden/hid_gcode7/gcode_oneline-bottom.gcode
:100644 100644 4c64804... 369c625... M tests/golden/hid_gcode7/gcode_oneline-top.gcode
:100644 100644 77ac526... 3bb6ff3... M tests/golden/hid_gcode8/gcode_oneline-0.8890.drill.gcode
:100644 100644 286cab5... 00742fa... M tests/golden/hid_gcode8/gcode_oneline-bottom.gcode
:100644 100644 a57aeb7... e402b4c... M tests/golden/hid_gcode8/gcode_oneline-top.gcode
:100644 100644 c4b730a... 75c7fa7... M tests/golden/hid_gcode9/gcode_oneline-0.0350.drill.gcode
:100644 100644 49ebcd5... 10719a2... M tests/golden/hid_gcode9/gcode_oneline-bottom.gcode
:100644 100644 638cec1... 369c625... M tests/golden/hid_gcode9/gcode_oneline-top.gcode
commit a858a225f69176e913e811d9f3a6b155d5cffb4c
Author: Dima Kogan <dima@xxxxxxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>
gcode tests: stripping creation timestamp more robustly
:100755 100755 085e8ca... 4ceeeb0... M tests/run_tests.sh
commit a34b5d9ff0851ca54546263b9f06c84cf78854a1
Author: Dima Kogan <dima@xxxxxxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>
fixed broken bom, xy and gcode testing
I was comparing the reference files to themselves. Now comparing reference and test files
:100755 100755 9544377... 085e8ca... M tests/run_tests.sh
commit b6f4fb5561420d11f0a3051f19fe671e07f3f840
Author: Dima Kogan <dima@xxxxxxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>
test script: local-ized all variables passed into functions. stuff no longer gets overwritten
:100755 100755 11009f8... 9544377... M tests/run_tests.sh
commit 78f02193b05e6952c2d5b2b0bb6d44a762f62529
Author: Dima Kogan <dima@xxxxxxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>
test script: added missing boilerplate to set normalized filenames
:100755 100755 abd894d... 11009f8... M tests/run_tests.sh
commit 1177764cfa2f2af70a25b3acc058b414301860b7
Author: Dima Kogan <dima@xxxxxxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>
unit test script: fixed incorrect file existence check
:100755 100755 e9a4ac2... abd894d... M tests/run_tests.sh
commit f546e9fa060abab5d1bc6f2bb7e27ab28c8180f8
Author: Dima Kogan <dima@xxxxxxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>
gcode tests now look for the new size-specific drill files
:000000 100644 0000000... 63f6a2d... A tests/golden/hid_gcode1/gcode_oneline-0.0350.drill.gcode
:100644 000000 63f6a2d... 0000000... D tests/golden/hid_gcode1/gcode_oneline-drill.gcode
:000000 100644 0000000... 7deace0... A tests/golden/hid_gcode10/gcode_oneline-0.8890.drill.gcode
:100644 000000 7deace0... 0000000... D tests/golden/hid_gcode10/gcode_oneline-drill.gcode
:000000 100644 0000000... 37b9668... A tests/golden/hid_gcode11/gcode_oneline-0.0350.drill.gcode
:100644 000000 37b9668... 0000000... D tests/golden/hid_gcode11/gcode_oneline-drill.gcode
:000000 100644 0000000... f7c6d78... A tests/golden/hid_gcode2/out-0.0350.drill.gcode
:100644 000000 f7c6d78... 0000000... D tests/golden/hid_gcode2/out-drill.gcode
:000000 100644 0000000... e7be01d... A tests/golden/hid_gcode3/gcode_oneline-0.0350.drill.gcode
:100644 000000 e7be01d... 0000000... D tests/golden/hid_gcode3/gcode_oneline-drill.gcode
:000000 100644 0000000... c648655... A tests/golden/hid_gcode4/gcode_oneline-0.0350.drill.gcode
:100644 000000 c648655... 0000000... D tests/golden/hid_gcode4/gcode_oneline-drill.gcode
:000000 100644 0000000... 77d8d60... A tests/golden/hid_gcode5/gcode_oneline-0.0350.drill.gcode
:100644 000000 77d8d60... 0000000... D tests/golden/hid_gcode5/gcode_oneline-drill.gcode
:000000 100644 0000000... 6b44265... A tests/golden/hid_gcode6/gcode_oneline-0.0350.drill.gcode
:100644 000000 6b44265... 0000000... D tests/golden/hid_gcode6/gcode_oneline-drill.gcode
:000000 100644 0000000... e8c41bf... A tests/golden/hid_gcode7/gcode_oneline-0.0350.drill.gcode
:100644 000000 e8c41bf... 0000000... D tests/golden/hid_gcode7/gcode_oneline-drill.gcode
:000000 100644 0000000... 77ac526... A tests/golden/hid_gcode8/gcode_oneline-0.8890.drill.gcode
:100644 000000 77ac526... 0000000... D tests/golden/hid_gcode8/gcode_oneline-drill.gcode
:000000 100644 0000000... c4b730a... A tests/golden/hid_gcode9/gcode_oneline-0.0350.drill.gcode
:100644 000000 c4b730a... 0000000... D tests/golden/hid_gcode9/gcode_oneline-drill.gcode
:100644 100644 a9a396d... e9812bf... M tests/tests.list
commit 2a38d72638f8acb7e625ad03b3a3314c2d2055bd
Author: Dima Kogan <dima@xxxxxxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>
updated tests.list to use tool diameter instead of radius when testing gcode
:100644 100644 25e820e... a9a396d... M tests/tests.list
commit 728eb911f9cf88f20d5eb33c0bd62e0637b4115d
Author: Dima Kogan <dima@xxxxxxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>
fixed incorrect comment in tests.list
:100644 100644 422e8e5... 25e820e... M tests/tests.list
commit a55da655ae12c0934141d64ec423fa9131fd2483
Author: Dima Kogan <dima@xxxxxxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>
added some forgotten newlines in the gcode output
:100644 100644 31874d0... 65fd843... M src/hid/gcode/gcode.c
commit 100197a9f6d182979837a7338a147848219ad506
Author: Dima Kogan <dima@xxxxxxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>
g-code exporter now outputs NC-drills for different hole sizes into different files
:100644 100644 2e80e6e... 31874d0... M src/hid/gcode/gcode.c
commit d05f2f19a2a14ab1634c8477f7e189e8e26a3d9a
Author: Dima Kogan <dima@xxxxxxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>
a few tab->spaces conversions in comments
:100644 100644 8a8d011... 2e80e6e... M src/hid/gcode/gcode.c
commit 356e5c1f7d58f3930056ee39bc2ed11346b64d14
Author: Dima Kogan <dima@xxxxxxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>
removed some trailing whitespace in comments
:100644 100644 25f35be... 8a8d011... M src/hid/gcode/gcode.c
commit cd063cb3a69922c7be3ad2df7511a5fd6e1392b5
Author: Dima Kogan <dima@xxxxxxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>
gcode exporter: reworked and cleaned up sort_drill()
This function no longer deallocates the memory passed into it, which is a
potential source of issues for the unsuspecting caller. Instead it sorts the
data in-place
:100644 100644 790aa61... 25f35be... M src/hid/gcode/gcode.c
commit 9d3843a6b72ac6bdcd4d76d28162a700f1a7923b
Author: Dima Kogan <dima@xxxxxxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>
gcode exporter: minor whitespace corrections
:100644 100644 1774ea0... 790aa61... M src/hid/gcode/gcode.c
commit f39ac9ce9e0141c8f1e3828d280fd8df95da4522
Author: Dima Kogan <dima@xxxxxxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>
gcode exporter: made some functions static
:100644 100644 d9f2ec1... 1774ea0... M src/hid/gcode/gcode.c
commit 83dba626f35195a00f1ef2f23ab2d235b4f6757b
Author: Dima Kogan <dima@xxxxxxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>
renamed golden test files to match new gcode output filenames
:000000 100644 0000000... 2031270... A tests/golden/hid_gcode1/gcode_oneline-bottom.gcode
:000000 100644 0000000... 63f6a2d... A tests/golden/hid_gcode1/gcode_oneline-drill.gcode
:000000 100644 0000000... afd6cb2... A tests/golden/hid_gcode1/gcode_oneline-top.gcode
:100644 000000 2031270... 0000000... D tests/golden/hid_gcode1/gcode_oneline.gcode.bottom.cnc
:100644 000000 63f6a2d... 0000000... D tests/golden/hid_gcode1/gcode_oneline.gcode.drill.cnc
:100644 000000 afd6cb2... 0000000... D tests/golden/hid_gcode1/gcode_oneline.gcode.top.cnc
:000000 100644 0000000... 19a703d... A tests/golden/hid_gcode10/gcode_oneline-bottom.gcode
:000000 100644 0000000... 7deace0... A tests/golden/hid_gcode10/gcode_oneline-drill.gcode
:000000 100644 0000000... a1d48bd... A tests/golden/hid_gcode10/gcode_oneline-top.gcode
:100644 000000 19a703d... 0000000... D tests/golden/hid_gcode10/gcode_oneline.gcode.bottom.cnc
:100644 000000 7deace0... 0000000... D tests/golden/hid_gcode10/gcode_oneline.gcode.drill.cnc
:100644 000000 a1d48bd... 0000000... D tests/golden/hid_gcode10/gcode_oneline.gcode.top.cnc
:000000 100644 0000000... c144b05... A tests/golden/hid_gcode11/gcode_oneline-bottom.gcode
:000000 100644 0000000... 37b9668... A tests/golden/hid_gcode11/gcode_oneline-drill.gcode
:000000 100644 0000000... ddf7394... A tests/golden/hid_gcode11/gcode_oneline-top.gcode
:100644 000000 c144b05... 0000000... D tests/golden/hid_gcode11/gcode_oneline.gcode.bottom.cnc
:100644 000000 37b9668... 0000000... D tests/golden/hid_gcode11/gcode_oneline.gcode.drill.cnc
:100644 000000 ddf7394... 0000000... D tests/golden/hid_gcode11/gcode_oneline.gcode.top.cnc
:000000 100644 0000000... c3b0526... A tests/golden/hid_gcode2/out-bottom.gcode
:000000 100644 0000000... f7c6d78... A tests/golden/hid_gcode2/out-drill.gcode
:000000 100644 0000000... ca2b079... A tests/golden/hid_gcode2/out-top.gcode
:100644 000000 c3b0526... 0000000... D tests/golden/hid_gcode2/out.bottom.cnc
:100644 000000 f7c6d78... 0000000... D tests/golden/hid_gcode2/out.drill.cnc
:100644 000000 ca2b079... 0000000... D tests/golden/hid_gcode2/out.top.cnc
:000000 100644 0000000... e67b085... A tests/golden/hid_gcode3/gcode_oneline-bottom.gcode
:000000 100644 0000000... e7be01d... A tests/golden/hid_gcode3/gcode_oneline-drill.gcode
:000000 100644 0000000... d7c8c9f... A tests/golden/hid_gcode3/gcode_oneline-top.gcode
:100644 000000 e67b085... 0000000... D tests/golden/hid_gcode3/gcode_oneline.gcode.bottom.cnc
:100644 000000 e7be01d... 0000000... D tests/golden/hid_gcode3/gcode_oneline.gcode.drill.cnc
:100644 000000 d7c8c9f... 0000000... D tests/golden/hid_gcode3/gcode_oneline.gcode.top.cnc
:000000 100644 0000000... d049972... A tests/golden/hid_gcode4/gcode_oneline-bottom.gcode
:000000 100644 0000000... c648655... A tests/golden/hid_gcode4/gcode_oneline-drill.gcode
:000000 100644 0000000... 78e64a5... A tests/golden/hid_gcode4/gcode_oneline-top.gcode
:100644 000000 d049972... 0000000... D tests/golden/hid_gcode4/gcode_oneline.gcode.bottom.cnc
:100644 000000 c648655... 0000000... D tests/golden/hid_gcode4/gcode_oneline.gcode.drill.cnc
:100644 000000 78e64a5... 0000000... D tests/golden/hid_gcode4/gcode_oneline.gcode.top.cnc
:000000 100644 0000000... 8041f98... A tests/golden/hid_gcode5/gcode_oneline-bottom.gcode
:000000 100644 0000000... 77d8d60... A tests/golden/hid_gcode5/gcode_oneline-drill.gcode
:000000 100644 0000000... e3bbd7e... A tests/golden/hid_gcode5/gcode_oneline-top.gcode
:100644 000000 8041f98... 0000000... D tests/golden/hid_gcode5/gcode_oneline.gcode.bottom.cnc
:100644 000000 77d8d60... 0000000... D tests/golden/hid_gcode5/gcode_oneline.gcode.drill.cnc
:100644 000000 e3bbd7e... 0000000... D tests/golden/hid_gcode5/gcode_oneline.gcode.top.cnc
:000000 100644 0000000... 7d33799... A tests/golden/hid_gcode6/gcode_oneline-bottom.gcode
:000000 100644 0000000... 6b44265... A tests/golden/hid_gcode6/gcode_oneline-drill.gcode
:000000 100644 0000000... 7dfd6a0... A tests/golden/hid_gcode6/gcode_oneline-top.gcode
:100644 000000 7d33799... 0000000... D tests/golden/hid_gcode6/gcode_oneline.gcode.bottom.cnc
:100644 000000 6b44265... 0000000... D tests/golden/hid_gcode6/gcode_oneline.gcode.drill.cnc
:100644 000000 7dfd6a0... 0000000... D tests/golden/hid_gcode6/gcode_oneline.gcode.top.cnc
:000000 100644 0000000... b92e532... A tests/golden/hid_gcode7/gcode_oneline-bottom.gcode
:000000 100644 0000000... e8c41bf... A tests/golden/hid_gcode7/gcode_oneline-drill.gcode
:000000 100644 0000000... 4c64804... A tests/golden/hid_gcode7/gcode_oneline-top.gcode
:100644 000000 b92e532... 0000000... D tests/golden/hid_gcode7/gcode_oneline.gcode.bottom.cnc
:100644 000000 e8c41bf... 0000000... D tests/golden/hid_gcode7/gcode_oneline.gcode.drill.cnc
:100644 000000 4c64804... 0000000... D tests/golden/hid_gcode7/gcode_oneline.gcode.top.cnc
:000000 100644 0000000... 286cab5... A tests/golden/hid_gcode8/gcode_oneline-bottom.gcode
:000000 100644 0000000... 77ac526... A tests/golden/hid_gcode8/gcode_oneline-drill.gcode
:000000 100644 0000000... a57aeb7... A tests/golden/hid_gcode8/gcode_oneline-top.gcode
:100644 000000 286cab5... 0000000... D tests/golden/hid_gcode8/gcode_oneline.gcode.bottom.cnc
:100644 000000 77ac526... 0000000... D tests/golden/hid_gcode8/gcode_oneline.gcode.drill.cnc
:100644 000000 a57aeb7... 0000000... D tests/golden/hid_gcode8/gcode_oneline.gcode.top.cnc
:000000 100644 0000000... 49ebcd5... A tests/golden/hid_gcode9/gcode_oneline-bottom.gcode
:000000 100644 0000000... c4b730a... A tests/golden/hid_gcode9/gcode_oneline-drill.gcode
:000000 100644 0000000... 638cec1... A tests/golden/hid_gcode9/gcode_oneline-top.gcode
:100644 000000 49ebcd5... 0000000... D tests/golden/hid_gcode9/gcode_oneline.gcode.bottom.cnc
:100644 000000 c4b730a... 0000000... D tests/golden/hid_gcode9/gcode_oneline.gcode.drill.cnc
:100644 000000 638cec1... 0000000... D tests/golden/hid_gcode9/gcode_oneline.gcode.top.cnc
:100644 100644 3433452... 422e8e5... M tests/tests.list
=========
Changes
=========
commit 1d82803aa20acc5e379e53a548a0ba4e29d23339
Author: Dima Kogan <dima@xxxxxxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>
reference gcode tests now match the latest generated gcode
diff --git a/tests/golden/hid_gcode1/gcode_oneline-0.0350.drill.gcode b/tests/golden/hid_gcode1/gcode_oneline-0.0350.drill.gcode
index 63f6a2d..4e978bd 100644
--- a/tests/golden/hid_gcode1/gcode_oneline-0.0350.drill.gcode
+++ b/tests/golden/hid_gcode1/gcode_oneline-0.0350.drill.gcode
@@ -1,12 +1,13 @@
(Created by G-code exporter)
(drill file: 1 drills)
-( Tue Mar 9 17:31:54 2010 )
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=-2.000000 (drill depth)
+( Sun Nov 13 16:33:40 2011 )
+(Unit: inch)
+(Board size: 2.00x1.00 inches)
+#100=0.002000 (safe Z)
+#102=-0.002000 (drill depth)
(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G81 X27.940000 Y12.700000 Z#101 R#100
+G17 G20 G90 G64 P0.003 M3 S3000 M7 F1
+G0 Z#100
+G81 X1.100000 Y0.500000 Z#102 R#100
M5 M9 M2
(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode1/gcode_oneline-bottom.gcode b/tests/golden/hid_gcode1/gcode_oneline-bottom.gcode
index 2031270..d8f7d01 100644
--- a/tests/golden/hid_gcode1/gcode_oneline-bottom.gcode
+++ b/tests/golden/hid_gcode1/gcode_oneline-bottom.gcode
@@ -1,34 +1,35 @@
(Created by G-code exporter)
-( Tue Mar 9 17:31:54 2010 )
+( Sun Nov 13 16:33:40 2011 )
(600 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=-0.050000 (cutting depth)
+(Unit: inch)
+(Tool diameter: 0.000200 inch)
+(Board size: 2.00x1.00 inches)
+#100=0.002000 (safe Z)
+#101=-0.000050 (cutting depth)
(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G17 G20 G90 G64 P0.003 M3 S3000 M7 F1
G0 Z#100
(polygon 1)
-G0 X27.770667 Y13.546667 (start point)
+G0 X1.093333 Y0.530000 (start point)
G1 Z#101
-G1 X27.559000 Y13.462000
-G1 X27.305000 Y13.292667
-G1 X7.450667 Y13.292667
-G1 X7.196667 Y13.081000
-G1 X6.985000 Y12.827000
-G1 X6.985000 Y12.530667
-G1 X7.196667 Y12.276667
-G1 X7.450667 Y12.065000
-G1 X27.305000 Y12.065000
-G1 X27.643667 Y11.853333
-G1 X28.194000 Y11.853333
-G1 X28.532667 Y12.065000
-G1 X28.744333 Y12.403667
-G1 X28.744333 Y12.954000
-G1 X28.532667 Y13.292667
-G1 X28.194000 Y13.504333
-G1 X27.770667 Y13.546667
+G1 X1.083333 Y0.525000
+G1 X1.076667 Y0.520000
+G1 X0.291667 Y0.518333
+G1 X0.280000 Y0.506667
+G1 X0.280000 Y0.491667
+G1 X0.291667 Y0.480000
+G1 X1.076667 Y0.478333
+G1 X1.088333 Y0.470000
+G1 X1.100000 Y0.468333
+G1 X1.113333 Y0.471667
+G1 X1.123333 Y0.480000
+G1 X1.130000 Y0.493333
+G1 X1.130000 Y0.505000
+G1 X1.123333 Y0.518333
+G1 X1.115000 Y0.525000
+G1 X1.103333 Y0.530000
+G1 X1.093333 Y0.530000
G0 Z#100
-(polygon end, distance 45.38)
-(end, total distance 45.38mm = 1.79in)
+(polygon end, distance 1.77)
+(end, total distance 44.84mm = 1.77in)
M5 M9 M2
diff --git a/tests/golden/hid_gcode1/gcode_oneline-top.gcode b/tests/golden/hid_gcode1/gcode_oneline-top.gcode
index afd6cb2..6aca656 100644
--- a/tests/golden/hid_gcode1/gcode_oneline-top.gcode
+++ b/tests/golden/hid_gcode1/gcode_oneline-top.gcode
@@ -1,34 +1,35 @@
(Created by G-code exporter)
-( Tue Mar 9 17:31:51 2010 )
+( Sun Nov 13 16:33:40 2011 )
(600 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=-0.050000 (cutting depth)
+(Unit: inch)
+(Tool diameter: 0.000200 inch)
+(Board size: 2.00x1.00 inches)
+#100=0.002000 (safe Z)
+#101=-0.000050 (cutting depth)
(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G17 G20 G90 G64 P0.003 M3 S3000 M7 F1
G0 Z#100
(polygon 1)
-G0 X22.733000 Y13.546667 (start point)
+G0 X0.895000 Y0.530000 (start point)
G1 Z#101
-G1 X22.521333 Y13.462000
-G1 X22.267333 Y13.292667
-G1 X2.413000 Y13.292667
-G1 X2.159000 Y13.081000
-G1 X1.947333 Y12.827000
-G1 X1.947333 Y12.530667
-G1 X2.159000 Y12.276667
-G1 X2.413000 Y12.065000
-G1 X22.267333 Y12.065000
-G1 X22.606000 Y11.853333
-G1 X23.156333 Y11.853333
-G1 X23.495000 Y12.065000
-G1 X23.706667 Y12.403667
-G1 X23.706667 Y12.954000
-G1 X23.495000 Y13.292667
-G1 X23.156333 Y13.504333
-G1 X22.733000 Y13.546667
+G1 X0.885000 Y0.525000
+G1 X0.878333 Y0.520000
+G1 X0.093333 Y0.518333
+G1 X0.081667 Y0.506667
+G1 X0.081667 Y0.491667
+G1 X0.093333 Y0.480000
+G1 X0.878333 Y0.478333
+G1 X0.890000 Y0.470000
+G1 X0.901667 Y0.468333
+G1 X0.915000 Y0.471667
+G1 X0.925000 Y0.480000
+G1 X0.931667 Y0.493333
+G1 X0.931667 Y0.505000
+G1 X0.925000 Y0.518333
+G1 X0.916667 Y0.525000
+G1 X0.905000 Y0.530000
+G1 X0.895000 Y0.530000
G0 Z#100
-(polygon end, distance 45.38)
-(end, total distance 45.38mm = 1.79in)
+(polygon end, distance 1.77)
+(end, total distance 44.84mm = 1.77in)
M5 M9 M2
diff --git a/tests/golden/hid_gcode10/gcode_oneline-0.8890.drill.gcode b/tests/golden/hid_gcode10/gcode_oneline-0.8890.drill.gcode
index 7deace0..8ddf366 100644
--- a/tests/golden/hid_gcode10/gcode_oneline-0.8890.drill.gcode
+++ b/tests/golden/hid_gcode10/gcode_oneline-0.8890.drill.gcode
@@ -1,12 +1,13 @@
(Created by G-code exporter)
(drill file: 1 drills)
-( Tue Mar 9 17:45:32 2010 )
+( Sun Nov 13 16:33:41 2011 )
(Unit: mm)
(Board size: 50.80x25.40 mm)
#100=0.002000 (safe Z)
-#101=-0.002000 (drill depth)
+#102=-0.002000 (drill depth)
(---------------------------------)
G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G81 X27.940000 Y12.700000 Z#101 R#100
+G0 Z#100
+G81 X27.940000 Y12.700000 Z#102 R#100
M5 M9 M2
(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode10/gcode_oneline-bottom.gcode b/tests/golden/hid_gcode10/gcode_oneline-bottom.gcode
index 19a703d..3c4f9da 100644
--- a/tests/golden/hid_gcode10/gcode_oneline-bottom.gcode
+++ b/tests/golden/hid_gcode10/gcode_oneline-bottom.gcode
@@ -1,7 +1,8 @@
(Created by G-code exporter)
-( Tue Mar 9 17:45:32 2010 )
+( Sun Nov 13 16:33:41 2011 )
(600 dpi)
(Unit: mm)
+(Tool diameter: 0.000200 mm)
(Board size: 50.80x25.40 mm)
#100=0.002000 (safe Z)
#101=-0.000050 (cutting depth)
diff --git a/tests/golden/hid_gcode10/gcode_oneline-top.gcode b/tests/golden/hid_gcode10/gcode_oneline-top.gcode
index a1d48bd..de9db0c 100644
--- a/tests/golden/hid_gcode10/gcode_oneline-top.gcode
+++ b/tests/golden/hid_gcode10/gcode_oneline-top.gcode
@@ -1,7 +1,8 @@
(Created by G-code exporter)
-( Tue Mar 9 17:45:28 2010 )
+( Sun Nov 13 16:33:41 2011 )
(600 dpi)
(Unit: mm)
+(Tool diameter: 0.000200 mm)
(Board size: 50.80x25.40 mm)
#100=0.002000 (safe Z)
#101=-0.000050 (cutting depth)
diff --git a/tests/golden/hid_gcode11/gcode_oneline-0.0350.drill.gcode b/tests/golden/hid_gcode11/gcode_oneline-0.0350.drill.gcode
index 37b9668..a857934 100644
--- a/tests/golden/hid_gcode11/gcode_oneline-0.0350.drill.gcode
+++ b/tests/golden/hid_gcode11/gcode_oneline-0.0350.drill.gcode
@@ -1,12 +1,13 @@
(Created by G-code exporter)
(drill file: 1 drills)
-( Tue Mar 9 17:45:55 2010 )
+( Sun Nov 13 16:33:41 2011 )
(Unit: inch)
(Board size: 2.00x1.00 inches)
#100=2.000000 (safe Z)
-#101=-2.000000 (drill depth)
+#102=-2.000000 (drill depth)
(---------------------------------)
G17 G20 G90 G64 P0.003 M3 S3000 M7 F1
-G81 X1.100000 Y0.500000 Z#101 R#100
+G0 Z#100
+G81 X1.100000 Y0.500000 Z#102 R#100
M5 M9 M2
(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode11/gcode_oneline-bottom.gcode b/tests/golden/hid_gcode11/gcode_oneline-bottom.gcode
index c144b05..cb47417 100644
--- a/tests/golden/hid_gcode11/gcode_oneline-bottom.gcode
+++ b/tests/golden/hid_gcode11/gcode_oneline-bottom.gcode
@@ -1,7 +1,8 @@
(Created by G-code exporter)
-( Tue Mar 9 17:45:55 2010 )
+( Sun Nov 13 16:33:41 2011 )
(600 dpi)
(Unit: inch)
+(Tool diameter: 0.200000 inch)
(Board size: 2.00x1.00 inches)
#100=2.000000 (safe Z)
#101=-0.050000 (cutting depth)
diff --git a/tests/golden/hid_gcode11/gcode_oneline-top.gcode b/tests/golden/hid_gcode11/gcode_oneline-top.gcode
index ddf7394..9a74775 100644
--- a/tests/golden/hid_gcode11/gcode_oneline-top.gcode
+++ b/tests/golden/hid_gcode11/gcode_oneline-top.gcode
@@ -1,7 +1,8 @@
(Created by G-code exporter)
-( Tue Mar 9 17:45:43 2010 )
+( Sun Nov 13 16:33:41 2011 )
(600 dpi)
(Unit: inch)
+(Tool diameter: 0.200000 inch)
(Board size: 2.00x1.00 inches)
#100=2.000000 (safe Z)
#101=-0.050000 (cutting depth)
diff --git a/tests/golden/hid_gcode2/out-0.0350.drill.gcode b/tests/golden/hid_gcode2/out-0.0350.drill.gcode
index f7c6d78..4e978bd 100644
--- a/tests/golden/hid_gcode2/out-0.0350.drill.gcode
+++ b/tests/golden/hid_gcode2/out-0.0350.drill.gcode
@@ -1,12 +1,13 @@
(Created by G-code exporter)
(drill file: 1 drills)
-( Tue Mar 9 17:35:19 2010 )
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=-2.000000 (drill depth)
+( Sun Nov 13 16:33:40 2011 )
+(Unit: inch)
+(Board size: 2.00x1.00 inches)
+#100=0.002000 (safe Z)
+#102=-0.002000 (drill depth)
(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G81 X27.940000 Y12.700000 Z#101 R#100
+G17 G20 G90 G64 P0.003 M3 S3000 M7 F1
+G0 Z#100
+G81 X1.100000 Y0.500000 Z#102 R#100
M5 M9 M2
(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode2/out-bottom.gcode b/tests/golden/hid_gcode2/out-bottom.gcode
index c3b0526..d8f7d01 100644
--- a/tests/golden/hid_gcode2/out-bottom.gcode
+++ b/tests/golden/hid_gcode2/out-bottom.gcode
@@ -1,34 +1,35 @@
(Created by G-code exporter)
-( Tue Mar 9 17:35:19 2010 )
+( Sun Nov 13 16:33:40 2011 )
(600 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=-0.050000 (cutting depth)
+(Unit: inch)
+(Tool diameter: 0.000200 inch)
+(Board size: 2.00x1.00 inches)
+#100=0.002000 (safe Z)
+#101=-0.000050 (cutting depth)
(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G17 G20 G90 G64 P0.003 M3 S3000 M7 F1
G0 Z#100
(polygon 1)
-G0 X27.770667 Y13.546667 (start point)
+G0 X1.093333 Y0.530000 (start point)
G1 Z#101
-G1 X27.559000 Y13.462000
-G1 X27.305000 Y13.292667
-G1 X7.450667 Y13.292667
-G1 X7.196667 Y13.081000
-G1 X6.985000 Y12.827000
-G1 X6.985000 Y12.530667
-G1 X7.196667 Y12.276667
-G1 X7.450667 Y12.065000
-G1 X27.305000 Y12.065000
-G1 X27.643667 Y11.853333
-G1 X28.194000 Y11.853333
-G1 X28.532667 Y12.065000
-G1 X28.744333 Y12.403667
-G1 X28.744333 Y12.954000
-G1 X28.532667 Y13.292667
-G1 X28.194000 Y13.504333
-G1 X27.770667 Y13.546667
+G1 X1.083333 Y0.525000
+G1 X1.076667 Y0.520000
+G1 X0.291667 Y0.518333
+G1 X0.280000 Y0.506667
+G1 X0.280000 Y0.491667
+G1 X0.291667 Y0.480000
+G1 X1.076667 Y0.478333
+G1 X1.088333 Y0.470000
+G1 X1.100000 Y0.468333
+G1 X1.113333 Y0.471667
+G1 X1.123333 Y0.480000
+G1 X1.130000 Y0.493333
+G1 X1.130000 Y0.505000
+G1 X1.123333 Y0.518333
+G1 X1.115000 Y0.525000
+G1 X1.103333 Y0.530000
+G1 X1.093333 Y0.530000
G0 Z#100
-(polygon end, distance 45.38)
-(end, total distance 45.38mm = 1.79in)
+(polygon end, distance 1.77)
+(end, total distance 44.84mm = 1.77in)
M5 M9 M2
diff --git a/tests/golden/hid_gcode2/out-top.gcode b/tests/golden/hid_gcode2/out-top.gcode
index ca2b079..6aca656 100644
--- a/tests/golden/hid_gcode2/out-top.gcode
+++ b/tests/golden/hid_gcode2/out-top.gcode
@@ -1,34 +1,35 @@
(Created by G-code exporter)
-( Tue Mar 9 17:35:16 2010 )
+( Sun Nov 13 16:33:40 2011 )
(600 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=-0.050000 (cutting depth)
+(Unit: inch)
+(Tool diameter: 0.000200 inch)
+(Board size: 2.00x1.00 inches)
+#100=0.002000 (safe Z)
+#101=-0.000050 (cutting depth)
(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G17 G20 G90 G64 P0.003 M3 S3000 M7 F1
G0 Z#100
(polygon 1)
-G0 X22.733000 Y13.546667 (start point)
+G0 X0.895000 Y0.530000 (start point)
G1 Z#101
-G1 X22.521333 Y13.462000
-G1 X22.267333 Y13.292667
-G1 X2.413000 Y13.292667
-G1 X2.159000 Y13.081000
-G1 X1.947333 Y12.827000
-G1 X1.947333 Y12.530667
-G1 X2.159000 Y12.276667
-G1 X2.413000 Y12.065000
-G1 X22.267333 Y12.065000
-G1 X22.606000 Y11.853333
-G1 X23.156333 Y11.853333
-G1 X23.495000 Y12.065000
-G1 X23.706667 Y12.403667
-G1 X23.706667 Y12.954000
-G1 X23.495000 Y13.292667
-G1 X23.156333 Y13.504333
-G1 X22.733000 Y13.546667
+G1 X0.885000 Y0.525000
+G1 X0.878333 Y0.520000
+G1 X0.093333 Y0.518333
+G1 X0.081667 Y0.506667
+G1 X0.081667 Y0.491667
+G1 X0.093333 Y0.480000
+G1 X0.878333 Y0.478333
+G1 X0.890000 Y0.470000
+G1 X0.901667 Y0.468333
+G1 X0.915000 Y0.471667
+G1 X0.925000 Y0.480000
+G1 X0.931667 Y0.493333
+G1 X0.931667 Y0.505000
+G1 X0.925000 Y0.518333
+G1 X0.916667 Y0.525000
+G1 X0.905000 Y0.530000
+G1 X0.895000 Y0.530000
G0 Z#100
-(polygon end, distance 45.38)
-(end, total distance 45.38mm = 1.79in)
+(polygon end, distance 1.77)
+(end, total distance 44.84mm = 1.77in)
M5 M9 M2
diff --git a/tests/golden/hid_gcode3/gcode_oneline-0.0350.drill.gcode b/tests/golden/hid_gcode3/gcode_oneline-0.0350.drill.gcode
index e7be01d..4e978bd 100644
--- a/tests/golden/hid_gcode3/gcode_oneline-0.0350.drill.gcode
+++ b/tests/golden/hid_gcode3/gcode_oneline-0.0350.drill.gcode
@@ -1,12 +1,13 @@
(Created by G-code exporter)
(drill file: 1 drills)
-( Tue Mar 9 17:36:04 2010 )
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=-2.000000 (drill depth)
+( Sun Nov 13 16:33:40 2011 )
+(Unit: inch)
+(Board size: 2.00x1.00 inches)
+#100=0.002000 (safe Z)
+#102=-0.002000 (drill depth)
(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G81 X27.940000 Y12.700000 Z#101 R#100
+G17 G20 G90 G64 P0.003 M3 S3000 M7 F1
+G0 Z#100
+G81 X1.100000 Y0.500000 Z#102 R#100
M5 M9 M2
(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode3/gcode_oneline-bottom.gcode b/tests/golden/hid_gcode3/gcode_oneline-bottom.gcode
index e67b085..e066761 100644
--- a/tests/golden/hid_gcode3/gcode_oneline-bottom.gcode
+++ b/tests/golden/hid_gcode3/gcode_oneline-bottom.gcode
@@ -1,40 +1,41 @@
(Created by G-code exporter)
-( Tue Mar 9 17:36:04 2010 )
+( Sun Nov 13 16:33:40 2011 )
(1200 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=-0.050000 (cutting depth)
+(Unit: inch)
+(Tool diameter: 0.000200 inch)
+(Board size: 2.00x1.00 inches)
+#100=0.002000 (safe Z)
+#101=-0.000050 (cutting depth)
(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G17 G20 G90 G64 P0.003 M3 S3000 M7 F1
G0 Z#100
(polygon 1)
-G0 X27.813000 Y13.546667 (start point)
+G0 X1.095000 Y0.530000 (start point)
G1 Z#101
-G1 X27.664833 Y13.504333
-G1 X27.453167 Y13.398500
-G1 X27.326167 Y13.292667
-G1 X7.535333 Y13.292667
-G1 X7.323667 Y13.229167
-G1 X7.069667 Y12.975167
-G1 X7.006167 Y12.763500
-G1 X7.006167 Y12.615333
-G1 X7.069667 Y12.403667
-G1 X7.323667 Y12.149667
-G1 X7.535333 Y12.086167
-G1 X27.326167 Y12.086167
-G1 X27.495500 Y11.959167
-G1 X27.728333 Y11.853333
-G1 X28.130500 Y11.853333
-G1 X28.448000 Y12.001500
-G1 X28.638500 Y12.213167
-G1 X28.765500 Y12.488333
-G1 X28.765500 Y12.890500
-G1 X28.638500 Y13.165667
-G1 X28.448000 Y13.377333
-G1 X28.130500 Y13.525500
-G1 X27.813000 Y13.546667
+G1 X1.088333 Y0.527500
+G1 X1.081667 Y0.524167
+G1 X1.078333 Y0.520000
+G1 X0.297500 Y0.520000
+G1 X0.290833 Y0.518333
+G1 X0.280833 Y0.508333
+G1 X0.279167 Y0.501667
+G1 X0.279167 Y0.497500
+G1 X0.280833 Y0.490833
+G1 X0.290833 Y0.480833
+G1 X0.297500 Y0.479167
+G1 X1.078333 Y0.479167
+G1 X1.082500 Y0.474167
+G1 X1.092500 Y0.470000
+G1 X1.106667 Y0.470000
+G1 X1.115833 Y0.474167
+G1 X1.125000 Y0.482500
+G1 X1.129167 Y0.492500
+G1 X1.129167 Y0.506667
+G1 X1.125000 Y0.516667
+G1 X1.115833 Y0.525000
+G1 X1.106667 Y0.529167
+G1 X1.095000 Y0.530000
G0 Z#100
-(polygon end, distance 45.35)
-(end, total distance 45.35mm = 1.79in)
+(polygon end, distance 1.77)
+(end, total distance 44.84mm = 1.77in)
M5 M9 M2
diff --git a/tests/golden/hid_gcode3/gcode_oneline-top.gcode b/tests/golden/hid_gcode3/gcode_oneline-top.gcode
index d7c8c9f..77fa466 100644
--- a/tests/golden/hid_gcode3/gcode_oneline-top.gcode
+++ b/tests/golden/hid_gcode3/gcode_oneline-top.gcode
@@ -1,40 +1,41 @@
(Created by G-code exporter)
-( Tue Mar 9 17:35:46 2010 )
+( Sun Nov 13 16:33:40 2011 )
(1200 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=-0.050000 (cutting depth)
+(Unit: inch)
+(Tool diameter: 0.000200 inch)
+(Board size: 2.00x1.00 inches)
+#100=0.002000 (safe Z)
+#101=-0.000050 (cutting depth)
(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G17 G20 G90 G64 P0.003 M3 S3000 M7 F1
G0 Z#100
(polygon 1)
-G0 X22.754167 Y13.546667 (start point)
+G0 X0.895833 Y0.530000 (start point)
G1 Z#101
-G1 X22.606000 Y13.504333
-G1 X22.394333 Y13.398500
-G1 X22.267333 Y13.292667
-G1 X2.476500 Y13.292667
-G1 X2.264833 Y13.229167
-G1 X2.010833 Y12.975167
-G1 X1.947333 Y12.763500
-G1 X1.947333 Y12.615333
-G1 X2.010833 Y12.403667
-G1 X2.264833 Y12.149667
-G1 X2.476500 Y12.086167
-G1 X22.267333 Y12.086167
-G1 X22.436667 Y11.959167
-G1 X22.669500 Y11.853333
-G1 X23.071667 Y11.853333
-G1 X23.389167 Y12.001500
-G1 X23.579667 Y12.213167
-G1 X23.706667 Y12.488333
-G1 X23.706667 Y12.890500
-G1 X23.579667 Y13.165667
-G1 X23.389167 Y13.377333
-G1 X23.071667 Y13.525500
-G1 X22.754167 Y13.546667
+G1 X0.889167 Y0.527500
+G1 X0.882500 Y0.524167
+G1 X0.879167 Y0.520000
+G1 X0.098333 Y0.520000
+G1 X0.091667 Y0.518333
+G1 X0.081667 Y0.508333
+G1 X0.080000 Y0.501667
+G1 X0.080000 Y0.497500
+G1 X0.081667 Y0.490833
+G1 X0.091667 Y0.480833
+G1 X0.098333 Y0.479167
+G1 X0.879167 Y0.479167
+G1 X0.883333 Y0.474167
+G1 X0.893333 Y0.470000
+G1 X0.907500 Y0.470000
+G1 X0.916667 Y0.474167
+G1 X0.925833 Y0.482500
+G1 X0.930000 Y0.492500
+G1 X0.930000 Y0.506667
+G1 X0.925833 Y0.516667
+G1 X0.916667 Y0.525000
+G1 X0.907500 Y0.529167
+G1 X0.895833 Y0.530000
G0 Z#100
-(polygon end, distance 45.35)
-(end, total distance 45.35mm = 1.79in)
+(polygon end, distance 1.77)
+(end, total distance 44.84mm = 1.77in)
M5 M9 M2
diff --git a/tests/golden/hid_gcode4/gcode_oneline-0.0350.drill.gcode b/tests/golden/hid_gcode4/gcode_oneline-0.0350.drill.gcode
index c648655..4e978bd 100644
--- a/tests/golden/hid_gcode4/gcode_oneline-0.0350.drill.gcode
+++ b/tests/golden/hid_gcode4/gcode_oneline-0.0350.drill.gcode
@@ -1,12 +1,13 @@
(Created by G-code exporter)
(drill file: 1 drills)
-( Tue Mar 9 17:36:12 2010 )
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=-2.000000 (drill depth)
+( Sun Nov 13 16:33:40 2011 )
+(Unit: inch)
+(Board size: 2.00x1.00 inches)
+#100=0.002000 (safe Z)
+#102=-0.002000 (drill depth)
(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G81 X27.940000 Y12.700000 Z#101 R#100
+G17 G20 G90 G64 P0.003 M3 S3000 M7 F1
+G0 Z#100
+G81 X1.100000 Y0.500000 Z#102 R#100
M5 M9 M2
(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode4/gcode_oneline-bottom.gcode b/tests/golden/hid_gcode4/gcode_oneline-bottom.gcode
index d049972..7a4cf41 100644
--- a/tests/golden/hid_gcode4/gcode_oneline-bottom.gcode
+++ b/tests/golden/hid_gcode4/gcode_oneline-bottom.gcode
@@ -1,34 +1,35 @@
(Created by G-code exporter)
-( Tue Mar 9 17:36:12 2010 )
+( Sun Nov 13 16:33:40 2011 )
(600 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=5.000000 (cutting depth)
+(Unit: inch)
+(Tool diameter: 0.000200 inch)
+(Board size: 2.00x1.00 inches)
+#100=0.002000 (safe Z)
+#101=0.005000 (cutting depth)
(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G17 G20 G90 G64 P0.003 M3 S3000 M7 F1
G0 Z#100
(polygon 1)
-G0 X27.770667 Y13.546667 (start point)
+G0 X1.093333 Y0.530000 (start point)
G1 Z#101
-G1 X27.559000 Y13.462000
-G1 X27.305000 Y13.292667
-G1 X7.450667 Y13.292667
-G1 X7.196667 Y13.081000
-G1 X6.985000 Y12.827000
-G1 X6.985000 Y12.530667
-G1 X7.196667 Y12.276667
-G1 X7.450667 Y12.065000
-G1 X27.305000 Y12.065000
-G1 X27.643667 Y11.853333
-G1 X28.194000 Y11.853333
-G1 X28.532667 Y12.065000
-G1 X28.744333 Y12.403667
-G1 X28.744333 Y12.954000
-G1 X28.532667 Y13.292667
-G1 X28.194000 Y13.504333
-G1 X27.770667 Y13.546667
+G1 X1.083333 Y0.525000
+G1 X1.076667 Y0.520000
+G1 X0.291667 Y0.518333
+G1 X0.280000 Y0.506667
+G1 X0.280000 Y0.491667
+G1 X0.291667 Y0.480000
+G1 X1.076667 Y0.478333
+G1 X1.088333 Y0.470000
+G1 X1.100000 Y0.468333
+G1 X1.113333 Y0.471667
+G1 X1.123333 Y0.480000
+G1 X1.130000 Y0.493333
+G1 X1.130000 Y0.505000
+G1 X1.123333 Y0.518333
+G1 X1.115000 Y0.525000
+G1 X1.103333 Y0.530000
+G1 X1.093333 Y0.530000
G0 Z#100
-(polygon end, distance 45.38)
-(end, total distance 45.38mm = 1.79in)
+(polygon end, distance 1.77)
+(end, total distance 44.84mm = 1.77in)
M5 M9 M2
diff --git a/tests/golden/hid_gcode4/gcode_oneline-top.gcode b/tests/golden/hid_gcode4/gcode_oneline-top.gcode
index 78e64a5..9a83d97 100644
--- a/tests/golden/hid_gcode4/gcode_oneline-top.gcode
+++ b/tests/golden/hid_gcode4/gcode_oneline-top.gcode
@@ -1,34 +1,35 @@
(Created by G-code exporter)
-( Tue Mar 9 17:36:08 2010 )
+( Sun Nov 13 16:33:40 2011 )
(600 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=5.000000 (cutting depth)
+(Unit: inch)
+(Tool diameter: 0.000200 inch)
+(Board size: 2.00x1.00 inches)
+#100=0.002000 (safe Z)
+#101=0.005000 (cutting depth)
(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G17 G20 G90 G64 P0.003 M3 S3000 M7 F1
G0 Z#100
(polygon 1)
-G0 X22.733000 Y13.546667 (start point)
+G0 X0.895000 Y0.530000 (start point)
G1 Z#101
-G1 X22.521333 Y13.462000
-G1 X22.267333 Y13.292667
-G1 X2.413000 Y13.292667
-G1 X2.159000 Y13.081000
-G1 X1.947333 Y12.827000
-G1 X1.947333 Y12.530667
-G1 X2.159000 Y12.276667
-G1 X2.413000 Y12.065000
-G1 X22.267333 Y12.065000
-G1 X22.606000 Y11.853333
-G1 X23.156333 Y11.853333
-G1 X23.495000 Y12.065000
-G1 X23.706667 Y12.403667
-G1 X23.706667 Y12.954000
-G1 X23.495000 Y13.292667
-G1 X23.156333 Y13.504333
-G1 X22.733000 Y13.546667
+G1 X0.885000 Y0.525000
+G1 X0.878333 Y0.520000
+G1 X0.093333 Y0.518333
+G1 X0.081667 Y0.506667
+G1 X0.081667 Y0.491667
+G1 X0.093333 Y0.480000
+G1 X0.878333 Y0.478333
+G1 X0.890000 Y0.470000
+G1 X0.901667 Y0.468333
+G1 X0.915000 Y0.471667
+G1 X0.925000 Y0.480000
+G1 X0.931667 Y0.493333
+G1 X0.931667 Y0.505000
+G1 X0.925000 Y0.518333
+G1 X0.916667 Y0.525000
+G1 X0.905000 Y0.530000
+G1 X0.895000 Y0.530000
G0 Z#100
-(polygon end, distance 45.38)
-(end, total distance 45.38mm = 1.79in)
+(polygon end, distance 1.77)
+(end, total distance 44.84mm = 1.77in)
M5 M9 M2
diff --git a/tests/golden/hid_gcode5/gcode_oneline-0.0350.drill.gcode b/tests/golden/hid_gcode5/gcode_oneline-0.0350.drill.gcode
index 77d8d60..da70a5b 100644
--- a/tests/golden/hid_gcode5/gcode_oneline-0.0350.drill.gcode
+++ b/tests/golden/hid_gcode5/gcode_oneline-0.0350.drill.gcode
@@ -1,12 +1,13 @@
(Created by G-code exporter)
(drill file: 1 drills)
-( Tue Mar 9 18:06:42 2010 )
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=10.000000 (safe Z)
-#101=-2.000000 (drill depth)
+( Sun Nov 13 16:33:40 2011 )
+(Unit: inch)
+(Board size: 2.00x1.00 inches)
+#100=0.010000 (safe Z)
+#102=-0.002000 (drill depth)
(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G81 X27.940000 Y12.700000 Z#101 R#100
+G17 G20 G90 G64 P0.003 M3 S3000 M7 F1
+G0 Z#100
+G81 X1.100000 Y0.500000 Z#102 R#100
M5 M9 M2
(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode5/gcode_oneline-bottom.gcode b/tests/golden/hid_gcode5/gcode_oneline-bottom.gcode
index 8041f98..40aa456 100644
--- a/tests/golden/hid_gcode5/gcode_oneline-bottom.gcode
+++ b/tests/golden/hid_gcode5/gcode_oneline-bottom.gcode
@@ -1,34 +1,35 @@
(Created by G-code exporter)
-( Tue Mar 9 18:06:42 2010 )
+( Sun Nov 13 16:33:40 2011 )
(600 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=10.000000 (safe Z)
-#101=-0.050000 (cutting depth)
+(Unit: inch)
+(Tool diameter: 0.000200 inch)
+(Board size: 2.00x1.00 inches)
+#100=0.010000 (safe Z)
+#101=-0.000050 (cutting depth)
(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G17 G20 G90 G64 P0.003 M3 S3000 M7 F1
G0 Z#100
(polygon 1)
-G0 X27.770667 Y13.546667 (start point)
+G0 X1.093333 Y0.530000 (start point)
G1 Z#101
-G1 X27.559000 Y13.462000
-G1 X27.305000 Y13.292667
-G1 X7.450667 Y13.292667
-G1 X7.196667 Y13.081000
-G1 X6.985000 Y12.827000
-G1 X6.985000 Y12.530667
-G1 X7.196667 Y12.276667
-G1 X7.450667 Y12.065000
-G1 X27.305000 Y12.065000
-G1 X27.643667 Y11.853333
-G1 X28.194000 Y11.853333
-G1 X28.532667 Y12.065000
-G1 X28.744333 Y12.403667
-G1 X28.744333 Y12.954000
-G1 X28.532667 Y13.292667
-G1 X28.194000 Y13.504333
-G1 X27.770667 Y13.546667
+G1 X1.083333 Y0.525000
+G1 X1.076667 Y0.520000
+G1 X0.291667 Y0.518333
+G1 X0.280000 Y0.506667
+G1 X0.280000 Y0.491667
+G1 X0.291667 Y0.480000
+G1 X1.076667 Y0.478333
+G1 X1.088333 Y0.470000
+G1 X1.100000 Y0.468333
+G1 X1.113333 Y0.471667
+G1 X1.123333 Y0.480000
+G1 X1.130000 Y0.493333
+G1 X1.130000 Y0.505000
+G1 X1.123333 Y0.518333
+G1 X1.115000 Y0.525000
+G1 X1.103333 Y0.530000
+G1 X1.093333 Y0.530000
G0 Z#100
-(polygon end, distance 45.38)
-(end, total distance 45.38mm = 1.79in)
+(polygon end, distance 1.77)
+(end, total distance 44.84mm = 1.77in)
M5 M9 M2
diff --git a/tests/golden/hid_gcode5/gcode_oneline-top.gcode b/tests/golden/hid_gcode5/gcode_oneline-top.gcode
index e3bbd7e..07819ff 100644
--- a/tests/golden/hid_gcode5/gcode_oneline-top.gcode
+++ b/tests/golden/hid_gcode5/gcode_oneline-top.gcode
@@ -1,34 +1,35 @@
(Created by G-code exporter)
-( Tue Mar 9 18:06:40 2010 )
+( Sun Nov 13 16:33:40 2011 )
(600 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=10.000000 (safe Z)
-#101=-0.050000 (cutting depth)
+(Unit: inch)
+(Tool diameter: 0.000200 inch)
+(Board size: 2.00x1.00 inches)
+#100=0.010000 (safe Z)
+#101=-0.000050 (cutting depth)
(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G17 G20 G90 G64 P0.003 M3 S3000 M7 F1
G0 Z#100
(polygon 1)
-G0 X22.733000 Y13.546667 (start point)
+G0 X0.895000 Y0.530000 (start point)
G1 Z#101
-G1 X22.521333 Y13.462000
-G1 X22.267333 Y13.292667
-G1 X2.413000 Y13.292667
-G1 X2.159000 Y13.081000
-G1 X1.947333 Y12.827000
-G1 X1.947333 Y12.530667
-G1 X2.159000 Y12.276667
-G1 X2.413000 Y12.065000
-G1 X22.267333 Y12.065000
-G1 X22.606000 Y11.853333
-G1 X23.156333 Y11.853333
-G1 X23.495000 Y12.065000
-G1 X23.706667 Y12.403667
-G1 X23.706667 Y12.954000
-G1 X23.495000 Y13.292667
-G1 X23.156333 Y13.504333
-G1 X22.733000 Y13.546667
+G1 X0.885000 Y0.525000
+G1 X0.878333 Y0.520000
+G1 X0.093333 Y0.518333
+G1 X0.081667 Y0.506667
+G1 X0.081667 Y0.491667
+G1 X0.093333 Y0.480000
+G1 X0.878333 Y0.478333
+G1 X0.890000 Y0.470000
+G1 X0.901667 Y0.468333
+G1 X0.915000 Y0.471667
+G1 X0.925000 Y0.480000
+G1 X0.931667 Y0.493333
+G1 X0.931667 Y0.505000
+G1 X0.925000 Y0.518333
+G1 X0.916667 Y0.525000
+G1 X0.905000 Y0.530000
+G1 X0.895000 Y0.530000
G0 Z#100
-(polygon end, distance 45.38)
-(end, total distance 45.38mm = 1.79in)
+(polygon end, distance 1.77)
+(end, total distance 44.84mm = 1.77in)
M5 M9 M2
diff --git a/tests/golden/hid_gcode6/gcode_oneline-0.0350.drill.gcode b/tests/golden/hid_gcode6/gcode_oneline-0.0350.drill.gcode
index 6b44265..4e978bd 100644
--- a/tests/golden/hid_gcode6/gcode_oneline-0.0350.drill.gcode
+++ b/tests/golden/hid_gcode6/gcode_oneline-0.0350.drill.gcode
@@ -1,12 +1,13 @@
(Created by G-code exporter)
(drill file: 1 drills)
-( Tue Mar 9 17:45:05 2010 )
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=-2.000000 (drill depth)
+( Sun Nov 13 16:33:40 2011 )
+(Unit: inch)
+(Board size: 2.00x1.00 inches)
+#100=0.002000 (safe Z)
+#102=-0.002000 (drill depth)
(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G81 X27.940000 Y12.700000 Z#101 R#100
+G17 G20 G90 G64 P0.003 M3 S3000 M7 F1
+G0 Z#100
+G81 X1.100000 Y0.500000 Z#102 R#100
M5 M9 M2
(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode6/gcode_oneline-bottom.gcode b/tests/golden/hid_gcode6/gcode_oneline-bottom.gcode
index 7d33799..5440510 100644
--- a/tests/golden/hid_gcode6/gcode_oneline-bottom.gcode
+++ b/tests/golden/hid_gcode6/gcode_oneline-bottom.gcode
@@ -1,43 +1,39 @@
(Created by G-code exporter)
-( Tue Mar 9 17:45:05 2010 )
+( Sun Nov 13 16:33:40 2011 )
(600 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=-0.050000 (cutting depth)
+(Unit: inch)
+(Tool diameter: 0.030000 inch)
+(Board size: 2.00x1.00 inches)
+#100=0.002000 (safe Z)
+#101=-0.000050 (cutting depth)
(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G17 G20 G90 G64 P0.003 M3 S3000 M7 F1
G0 Z#100
(polygon 1)
-G0 X0.000000 Y25.400000 (start point)
+G0 X1.091667 Y0.545000 (start point)
G1 Z#101
-G1 X0.000000 Y0.000000
-G1 X37.295667 Y0.000000
-G1 X38.057667 Y0.635000
-G1 X39.073667 Y1.524000
-G1 X39.962667 Y2.540000
-G1 X40.597667 Y3.302000
-G1 X41.486667 Y4.656667
-G1 X41.952333 Y5.503333
-G1 X42.418000 Y6.477000
-G1 X42.883667 Y7.704667
-G1 X43.264667 Y9.017000
-G1 X43.518667 Y10.329333
-G1 X43.645667 Y11.514667
-G1 X43.645667 Y13.843000
-G1 X43.518667 Y15.028333
-G1 X43.264667 Y16.340667
-G1 X42.883667 Y17.653000
-G1 X42.418000 Y18.880667
-G1 X41.952333 Y19.854333
-G1 X41.486667 Y20.701000
-G1 X40.597667 Y22.055667
-G1 X39.962667 Y22.817667
-G1 X39.073667 Y23.833667
-G1 X38.057667 Y24.722667
-G1 X37.253333 Y25.400000
-G1 X0.000000 Y25.400000
+G1 X1.080000 Y0.540000
+G1 X1.071667 Y0.535000
+G1 X0.291667 Y0.535000
+G1 X0.278333 Y0.528333
+G1 X0.268333 Y0.516667
+G1 X0.263333 Y0.505000
+G1 X0.263333 Y0.491667
+G1 X0.270000 Y0.478333
+G1 X0.281667 Y0.468333
+G1 X0.293333 Y0.463333
+G1 X1.071667 Y0.463333
+G1 X1.086667 Y0.455000
+G1 X1.111667 Y0.455000
+G1 X1.125000 Y0.461667
+G1 X1.135000 Y0.470000
+G1 X1.143333 Y0.486667
+G1 X1.143333 Y0.511667
+G1 X1.135000 Y0.528333
+G1 X1.125000 Y0.536667
+G1 X1.111667 Y0.543333
+G1 X1.091667 Y0.545000
G0 Z#100
-(polygon end, distance 129.45)
-(end, total distance 129.45mm = 5.10in)
+(polygon end, distance 1.86)
+(end, total distance 47.25mm = 1.86in)
M5 M9 M2
diff --git a/tests/golden/hid_gcode6/gcode_oneline-top.gcode b/tests/golden/hid_gcode6/gcode_oneline-top.gcode
index 7dfd6a0..c9cd5e6 100644
--- a/tests/golden/hid_gcode6/gcode_oneline-top.gcode
+++ b/tests/golden/hid_gcode6/gcode_oneline-top.gcode
@@ -1,43 +1,39 @@
(Created by G-code exporter)
-( Tue Mar 9 17:39:31 2010 )
+( Sun Nov 13 16:33:40 2011 )
(600 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=-0.050000 (cutting depth)
+(Unit: inch)
+(Tool diameter: 0.030000 inch)
+(Board size: 2.00x1.00 inches)
+#100=0.002000 (safe Z)
+#101=-0.000050 (cutting depth)
(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G17 G20 G90 G64 P0.003 M3 S3000 M7 F1
G0 Z#100
(polygon 1)
-G0 X0.000000 Y25.400000 (start point)
+G0 X0.893333 Y0.545000 (start point)
G1 Z#101
-G1 X0.000000 Y0.000000
-G1 X32.258000 Y0.000000
-G1 X33.020000 Y0.635000
-G1 X34.036000 Y1.524000
-G1 X34.925000 Y2.540000
-G1 X35.560000 Y3.302000
-G1 X36.449000 Y4.656667
-G1 X36.914667 Y5.503333
-G1 X37.380333 Y6.477000
-G1 X37.846000 Y7.704667
-G1 X38.227000 Y9.017000
-G1 X38.481000 Y10.329333
-G1 X38.608000 Y11.514667
-G1 X38.608000 Y13.843000
-G1 X38.481000 Y15.028333
-G1 X38.227000 Y16.340667
-G1 X37.846000 Y17.653000
-G1 X37.380333 Y18.880667
-G1 X36.914667 Y19.854333
-G1 X36.449000 Y20.701000
-G1 X35.560000 Y22.055667
-G1 X34.925000 Y22.817667
-G1 X34.036000 Y23.833667
-G1 X33.020000 Y24.722667
-G1 X32.215667 Y25.400000
-G1 X0.000000 Y25.400000
+G1 X0.881667 Y0.540000
+G1 X0.873333 Y0.535000
+G1 X0.093333 Y0.535000
+G1 X0.080000 Y0.528333
+G1 X0.070000 Y0.516667
+G1 X0.065000 Y0.505000
+G1 X0.065000 Y0.491667
+G1 X0.071667 Y0.478333
+G1 X0.083333 Y0.468333
+G1 X0.095000 Y0.463333
+G1 X0.873333 Y0.463333
+G1 X0.888333 Y0.455000
+G1 X0.913333 Y0.455000
+G1 X0.926667 Y0.461667
+G1 X0.936667 Y0.470000
+G1 X0.945000 Y0.486667
+G1 X0.945000 Y0.511667
+G1 X0.936667 Y0.528333
+G1 X0.926667 Y0.536667
+G1 X0.913333 Y0.543333
+G1 X0.893333 Y0.545000
G0 Z#100
-(polygon end, distance 119.38)
-(end, total distance 119.38mm = 4.70in)
+(polygon end, distance 1.86)
+(end, total distance 47.25mm = 1.86in)
M5 M9 M2
diff --git a/tests/golden/hid_gcode7/gcode_oneline-0.0350.drill.gcode b/tests/golden/hid_gcode7/gcode_oneline-0.0350.drill.gcode
index e8c41bf..1edd7fb 100644
--- a/tests/golden/hid_gcode7/gcode_oneline-0.0350.drill.gcode
+++ b/tests/golden/hid_gcode7/gcode_oneline-0.0350.drill.gcode
@@ -1,12 +1,13 @@
(Created by G-code exporter)
(drill file: 1 drills)
-( Tue Mar 9 17:45:12 2010 )
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=70.000000 (drill depth)
+( Sun Nov 13 16:33:41 2011 )
+(Unit: inch)
+(Board size: 2.00x1.00 inches)
+#100=0.002000 (safe Z)
+#102=0.070000 (drill depth)
(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G81 X27.940000 Y12.700000 Z#101 R#100
+G17 G20 G90 G64 P0.003 M3 S3000 M7 F1
+G0 Z#100
+G81 X1.100000 Y0.500000 Z#102 R#100
M5 M9 M2
(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode7/gcode_oneline-bottom.gcode b/tests/golden/hid_gcode7/gcode_oneline-bottom.gcode
index b92e532..10719a2 100644
--- a/tests/golden/hid_gcode7/gcode_oneline-bottom.gcode
+++ b/tests/golden/hid_gcode7/gcode_oneline-bottom.gcode
@@ -1,34 +1,35 @@
(Created by G-code exporter)
-( Tue Mar 9 17:45:12 2010 )
+( Sun Nov 13 16:33:41 2011 )
(600 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=-0.050000 (cutting depth)
+(Unit: inch)
+(Tool diameter: 0.000200 inch)
+(Board size: 2.00x1.00 inches)
+#100=0.002000 (safe Z)
+#101=-0.000050 (cutting depth)
(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G17 G20 G90 G64 P0.003 M3 S3000 M7 F1
G0 Z#100
(polygon 1)
-G0 X27.770667 Y13.546667 (start point)
+G0 X1.093333 Y0.530000 (start point)
G1 Z#101
-G1 X27.559000 Y13.462000
-G1 X27.305000 Y13.292667
-G1 X7.450667 Y13.292667
-G1 X7.196667 Y13.081000
-G1 X6.985000 Y12.827000
-G1 X6.985000 Y12.530667
-G1 X7.196667 Y12.276667
-G1 X7.450667 Y12.065000
-G1 X27.305000 Y12.065000
-G1 X27.643667 Y11.853333
-G1 X28.194000 Y11.853333
-G1 X28.532667 Y12.065000
-G1 X28.744333 Y12.403667
-G1 X28.744333 Y12.954000
-G1 X28.532667 Y13.292667
-G1 X28.194000 Y13.504333
-G1 X27.770667 Y13.546667
+G1 X1.083333 Y0.525000
+G1 X1.076667 Y0.520000
+G1 X0.291667 Y0.518333
+G1 X0.280000 Y0.506667
+G1 X0.280000 Y0.491667
+G1 X0.291667 Y0.480000
+G1 X1.076667 Y0.478333
+G1 X1.088333 Y0.470000
+G1 X1.100000 Y0.468333
+G1 X1.113333 Y0.471667
+G1 X1.123333 Y0.480000
+G1 X1.130000 Y0.493333
+G1 X1.130000 Y0.505000
+G1 X1.123333 Y0.518333
+G1 X1.115000 Y0.525000
+G1 X1.103333 Y0.530000
+G1 X1.093333 Y0.530000
G0 Z#100
-(polygon end, distance 45.38)
-(end, total distance 45.38mm = 1.79in)
+(polygon end, distance 1.77)
+(end, total distance 44.84mm = 1.77in)
M5 M9 M2
diff --git a/tests/golden/hid_gcode7/gcode_oneline-top.gcode b/tests/golden/hid_gcode7/gcode_oneline-top.gcode
index 4c64804..369c625 100644
--- a/tests/golden/hid_gcode7/gcode_oneline-top.gcode
+++ b/tests/golden/hid_gcode7/gcode_oneline-top.gcode
@@ -1,34 +1,35 @@
(Created by G-code exporter)
-( Tue Mar 9 17:45:08 2010 )
+( Sun Nov 13 16:33:41 2011 )
(600 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=-0.050000 (cutting depth)
+(Unit: inch)
+(Tool diameter: 0.000200 inch)
+(Board size: 2.00x1.00 inches)
+#100=0.002000 (safe Z)
+#101=-0.000050 (cutting depth)
(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G17 G20 G90 G64 P0.003 M3 S3000 M7 F1
G0 Z#100
(polygon 1)
-G0 X22.733000 Y13.546667 (start point)
+G0 X0.895000 Y0.530000 (start point)
G1 Z#101
-G1 X22.521333 Y13.462000
-G1 X22.267333 Y13.292667
-G1 X2.413000 Y13.292667
-G1 X2.159000 Y13.081000
-G1 X1.947333 Y12.827000
-G1 X1.947333 Y12.530667
-G1 X2.159000 Y12.276667
-G1 X2.413000 Y12.065000
-G1 X22.267333 Y12.065000
-G1 X22.606000 Y11.853333
-G1 X23.156333 Y11.853333
-G1 X23.495000 Y12.065000
-G1 X23.706667 Y12.403667
-G1 X23.706667 Y12.954000
-G1 X23.495000 Y13.292667
-G1 X23.156333 Y13.504333
-G1 X22.733000 Y13.546667
+G1 X0.885000 Y0.525000
+G1 X0.878333 Y0.520000
+G1 X0.093333 Y0.518333
+G1 X0.081667 Y0.506667
+G1 X0.081667 Y0.491667
+G1 X0.093333 Y0.480000
+G1 X0.878333 Y0.478333
+G1 X0.890000 Y0.470000
+G1 X0.901667 Y0.468333
+G1 X0.915000 Y0.471667
+G1 X0.925000 Y0.480000
+G1 X0.931667 Y0.493333
+G1 X0.931667 Y0.505000
+G1 X0.925000 Y0.518333
+G1 X0.916667 Y0.525000
+G1 X0.905000 Y0.530000
+G1 X0.895000 Y0.530000
G0 Z#100
-(polygon end, distance 45.38)
-(end, total distance 45.38mm = 1.79in)
+(polygon end, distance 1.77)
+(end, total distance 44.84mm = 1.77in)
M5 M9 M2
diff --git a/tests/golden/hid_gcode8/gcode_oneline-0.8890.drill.gcode b/tests/golden/hid_gcode8/gcode_oneline-0.8890.drill.gcode
index 77ac526..3bb6ff3 100644
--- a/tests/golden/hid_gcode8/gcode_oneline-0.8890.drill.gcode
+++ b/tests/golden/hid_gcode8/gcode_oneline-0.8890.drill.gcode
@@ -1,12 +1,13 @@
(Created by G-code exporter)
(drill file: 1 drills)
-( Tue Mar 9 17:45:19 2010 )
+( Sun Nov 13 16:33:41 2011 )
(Unit: mm)
(Board size: 50.80x25.40 mm)
#100=2.000000 (safe Z)
-#101=-2.000000 (drill depth)
+#102=-2.000000 (drill depth)
(---------------------------------)
G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G81 X27.940000 Y12.700000 Z#101 R#100
+G0 Z#100
+G81 X27.940000 Y12.700000 Z#102 R#100
M5 M9 M2
(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode8/gcode_oneline-bottom.gcode b/tests/golden/hid_gcode8/gcode_oneline-bottom.gcode
index 286cab5..00742fa 100644
--- a/tests/golden/hid_gcode8/gcode_oneline-bottom.gcode
+++ b/tests/golden/hid_gcode8/gcode_oneline-bottom.gcode
@@ -1,7 +1,8 @@
(Created by G-code exporter)
-( Tue Mar 9 17:45:19 2010 )
+( Sun Nov 13 16:33:41 2011 )
(600 dpi)
(Unit: mm)
+(Tool diameter: 0.200000 mm)
(Board size: 50.80x25.40 mm)
#100=2.000000 (safe Z)
#101=-0.050000 (cutting depth)
diff --git a/tests/golden/hid_gcode8/gcode_oneline-top.gcode b/tests/golden/hid_gcode8/gcode_oneline-top.gcode
index a57aeb7..e402b4c 100644
--- a/tests/golden/hid_gcode8/gcode_oneline-top.gcode
+++ b/tests/golden/hid_gcode8/gcode_oneline-top.gcode
@@ -1,7 +1,8 @@
(Created by G-code exporter)
-( Tue Mar 9 17:45:16 2010 )
+( Sun Nov 13 16:33:41 2011 )
(600 dpi)
(Unit: mm)
+(Tool diameter: 0.200000 mm)
(Board size: 50.80x25.40 mm)
#100=2.000000 (safe Z)
#101=-0.050000 (cutting depth)
diff --git a/tests/golden/hid_gcode9/gcode_oneline-0.0350.drill.gcode b/tests/golden/hid_gcode9/gcode_oneline-0.0350.drill.gcode
index c4b730a..75c7fa7 100644
--- a/tests/golden/hid_gcode9/gcode_oneline-0.0350.drill.gcode
+++ b/tests/golden/hid_gcode9/gcode_oneline-0.0350.drill.gcode
@@ -1,12 +1,13 @@
(Created by G-code exporter)
(drill file: 1 drills)
-( Tue Mar 9 17:45:25 2010 )
+( Sun Nov 13 16:33:41 2011 )
(Unit: inch)
(Board size: 2.00x1.00 inches)
#100=0.002000 (safe Z)
-#101=-0.002000 (drill depth)
+#102=-0.002000 (drill depth)
(---------------------------------)
G17 G20 G90 G64 P0.003 M3 S3000 M7 F1
-G81 X1.100000 Y0.500000 Z#101 R#100
+G0 Z#100
+G81 X1.100000 Y0.500000 Z#102 R#100
M5 M9 M2
(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode9/gcode_oneline-bottom.gcode b/tests/golden/hid_gcode9/gcode_oneline-bottom.gcode
index 49ebcd5..10719a2 100644
--- a/tests/golden/hid_gcode9/gcode_oneline-bottom.gcode
+++ b/tests/golden/hid_gcode9/gcode_oneline-bottom.gcode
@@ -1,7 +1,8 @@
(Created by G-code exporter)
-( Tue Mar 9 17:45:25 2010 )
+( Sun Nov 13 16:33:41 2011 )
(600 dpi)
(Unit: inch)
+(Tool diameter: 0.000200 inch)
(Board size: 2.00x1.00 inches)
#100=0.002000 (safe Z)
#101=-0.000050 (cutting depth)
diff --git a/tests/golden/hid_gcode9/gcode_oneline-top.gcode b/tests/golden/hid_gcode9/gcode_oneline-top.gcode
index 638cec1..369c625 100644
--- a/tests/golden/hid_gcode9/gcode_oneline-top.gcode
+++ b/tests/golden/hid_gcode9/gcode_oneline-top.gcode
@@ -1,7 +1,8 @@
(Created by G-code exporter)
-( Tue Mar 9 17:45:22 2010 )
+( Sun Nov 13 16:33:41 2011 )
(600 dpi)
(Unit: inch)
+(Tool diameter: 0.000200 inch)
(Board size: 2.00x1.00 inches)
#100=0.002000 (safe Z)
#101=-0.000050 (cutting depth)
commit a858a225f69176e913e811d9f3a6b155d5cffb4c
Author: Dima Kogan <dima@xxxxxxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>
gcode tests: stripping creation timestamp more robustly
diff --git a/tests/run_tests.sh b/tests/run_tests.sh
index 085e8ca..4ceeeb0 100755
--- a/tests/run_tests.sh
+++ b/tests/run_tests.sh
@@ -391,10 +391,8 @@ compare_xy() {
normalize_gcode() {
local f1="$1"
local f2="$2"
- $AWK '
- d == 1 {gsub(/ .* /, "Creation Date and Time"); d = 0;}
- /^\(Created by G-code exporter\)/ {d=1}
- {print}' \
+ # matches string such as '( Tue Mar 9 17:45:43 2010 )'
+ $AWK --posix '!/^\( *[A-Z][a-z]{2} [A-Z][a-z]{2} [01 ][0-9] [0-9]{2}:[0-9]{2}:[0-9]{2} [0-9]{4} *\)$/' \
$f1 > $f2
}
commit a34b5d9ff0851ca54546263b9f06c84cf78854a1
Author: Dima Kogan <dima@xxxxxxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>
fixed broken bom, xy and gcode testing
I was comparing the reference files to themselves. Now comparing reference and test files
diff --git a/tests/run_tests.sh b/tests/run_tests.sh
index 9544377..085e8ca 100755
--- a/tests/run_tests.sh
+++ b/tests/run_tests.sh
@@ -346,8 +346,8 @@ compare_bom() {
# 8,"Small outline package, narrow (150mil)","SO8",USO90_TOP USO180_TOP USO270_TOP USO0_TOP USO270_BOT USO180_BOT USO90_BOT USO0_BOT
# For comparison, we need to ignore changes in the Date and Author lines.
- local cf1=${tmpd}/`basename $f1`
- local cf2=${tmpd}/`basename $f2`
+ local cf1=${tmpd}/`basename $f1`-ref
+ local cf2=${tmpd}/`basename $f2`-out
normalize_bom $f1 $cf1
normalize_bom $f2 $cf2
@@ -375,8 +375,8 @@ compare_xy() {
local f2="$2"
compare_check "compare_xy" "$f1" "$f2" || return 1
- local cf1=${tmpd}/`basename $f1`
- local cf2=${tmpd}/`basename $f2`
+ local cf1=${tmpd}/`basename $f1`-ref
+ local cf2=${tmpd}/`basename $f2`-out
normalize_xy "$f1" "$cf1"
normalize_xy "$f2" "$cf2"
run_diff "$cf1" "$cf2" || test_failed=yes
@@ -404,11 +404,12 @@ compare_gcode() {
compare_check "compare_gcode" "$f1" "$f2" || return 1
# For comparison, we need to ignore changes in the Date and Author lines.
- local cf1=${tmpd}/`basename $f1`
- local cf2=${tmpd}/`basename $f2`
+ local cf1=${tmpd}/`basename $f1`-ref
+ local cf2=${tmpd}/`basename $f2`-out
normalize_gcode $f1 $cf1
normalize_gcode $f2 $cf2
+
run_diff "$cf1" "$cf2" || test_failed=yes
}
commit b6f4fb5561420d11f0a3051f19fe671e07f3f840
Author: Dima Kogan <dima@xxxxxxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>
test script: local-ized all variables passed into functions. stuff no longer gets overwritten
diff --git a/tests/run_tests.sh b/tests/run_tests.sh
index 11009f8..9544377 100755
--- a/tests/run_tests.sh
+++ b/tests/run_tests.sh
@@ -276,9 +276,9 @@ fi
# test as skipped and give an error message
#
compare_check() {
- fn="$1"
- f1="$2"
- f2="$3"
+ local fn="$1"
+ local f1="$2"
+ local f2="$3"
if test ! -f "$f1" ; then
echo "$0: ${fn}(): $f1 does not exist"
@@ -303,8 +303,8 @@ compare_check() {
# run_diff "file1" "file2"
#
run_diff() {
- f1="$1"
- f2="$2"
+ local f1="$1"
+ local f2="$2"
diff -U 2 $f1 $f2
if test $? -ne 0 ; then return 1 ; fi
return 0
@@ -317,8 +317,8 @@ run_diff() {
# used to remove things like creation date from BOM files
normalize_bom() {
- f1="$1"
- f2="$2"
+ local f1="$1"
+ local f2="$2"
$AWK '
/^# Date:/ {print "# Date: today"; next}
/^# Author:/ {print "# Author: PCB"; next}
@@ -328,8 +328,8 @@ normalize_bom() {
# top level function to compare BOM output
compare_bom() {
- f1="$1"
- f2="$2"
+ local f1="$1"
+ local f2="$2"
compare_check "compare_bom" "$f1" "$f2" || return 1
# an example BOM file is:
@@ -346,8 +346,8 @@ compare_bom() {
# 8,"Small outline package, narrow (150mil)","SO8",USO90_TOP USO180_TOP USO270_TOP USO0_TOP USO270_BOT USO180_BOT USO90_BOT USO0_BOT
# For comparison, we need to ignore changes in the Date and Author lines.
- cf1=${tmpd}/`basename $f1`
- cf2=${tmpd}/`basename $f2`
+ local cf1=${tmpd}/`basename $f1`
+ local cf2=${tmpd}/`basename $f2`
normalize_bom $f1 $cf1
normalize_bom $f2 $cf2
@@ -361,8 +361,8 @@ compare_bom() {
# used to remove things like creation date from BOM files
normalize_xy() {
- f1="$1"
- f2="$2"
+ local f1="$1"
+ local f2="$2"
$AWK '
/^# Date:/ {print "# Date: today"; next}
/^# Author:/ {print "# Author: PCB"; next}
@@ -371,12 +371,12 @@ normalize_xy() {
}
compare_xy() {
- f1="$1"
- f2="$2"
+ local f1="$1"
+ local f2="$2"
compare_check "compare_xy" "$f1" "$f2" || return 1
- cf1=${tmpd}/`basename $f1`
- cf2=${tmpd}/`basename $f2`
+ local cf1=${tmpd}/`basename $f1`
+ local cf2=${tmpd}/`basename $f2`
normalize_xy "$f1" "$cf1"
normalize_xy "$f2" "$cf2"
run_diff "$cf1" "$cf2" || test_failed=yes
@@ -389,8 +389,8 @@ compare_xy() {
# used to remove things like creation date from gcode files
normalize_gcode() {
- f1="$1"
- f2="$2"
+ local f1="$1"
+ local f2="$2"
$AWK '
d == 1 {gsub(/ .* /, "Creation Date and Time"); d = 0;}
/^\(Created by G-code exporter\)/ {d=1}
@@ -399,13 +399,13 @@ normalize_gcode() {
}
compare_gcode() {
- f1="$1"
- f2="$2"
+ local f1="$1"
+ local f2="$2"
compare_check "compare_gcode" "$f1" "$f2" || return 1
# For comparison, we need to ignore changes in the Date and Author lines.
- cf1=${tmpd}/`basename $f1`
- cf2=${tmpd}/`basename $f2`
+ local cf1=${tmpd}/`basename $f1`
+ local cf2=${tmpd}/`basename $f2`
normalize_gcode $f1 $cf1
normalize_gcode $f2 $cf2
@@ -418,8 +418,8 @@ compare_gcode() {
#
compare_rs274x() {
- f1="$1"
- f2="$2"
+ local f1="$1"
+ local f2="$2"
compare_check "compare_rs274x" "$f1" "$f2" || return 1
# use gerbv to export our reference RS274-X file and our generated
@@ -451,8 +451,8 @@ compare_cnc() {
#
compare_image() {
- f1="$1"
- f2="$2"
+ local f1="$1"
+ local f2="$2"
compare_check "compare_image" "$f1" "$f2" || return 1
# now see if the image files are the same
commit 78f02193b05e6952c2d5b2b0bb6d44a762f62529
Author: Dima Kogan <dima@xxxxxxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>
test script: added missing boilerplate to set normalized filenames
diff --git a/tests/run_tests.sh b/tests/run_tests.sh
index abd894d..11009f8 100755
--- a/tests/run_tests.sh
+++ b/tests/run_tests.sh
@@ -374,6 +374,9 @@ compare_xy() {
f1="$1"
f2="$2"
compare_check "compare_xy" "$f1" "$f2" || return 1
+
+ cf1=${tmpd}/`basename $f1`
+ cf2=${tmpd}/`basename $f2`
normalize_xy "$f1" "$cf1"
normalize_xy "$f2" "$cf2"
run_diff "$cf1" "$cf2" || test_failed=yes
commit 1177764cfa2f2af70a25b3acc058b414301860b7
Author: Dima Kogan <dima@xxxxxxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>
unit test script: fixed incorrect file existence check
diff --git a/tests/run_tests.sh b/tests/run_tests.sh
index e9a4ac2..abd894d 100755
--- a/tests/run_tests.sh
+++ b/tests/run_tests.sh
@@ -280,7 +280,7 @@ compare_check() {
f1="$2"
f2="$3"
- if test ! -f "$f2" ; then
+ if test ! -f "$f1" ; then
echo "$0: ${fn}(): $f1 does not exist"
test_skipped=yes
return 1
commit f546e9fa060abab5d1bc6f2bb7e27ab28c8180f8
Author: Dima Kogan <dima@xxxxxxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>
gcode tests now look for the new size-specific drill files
diff --git a/tests/golden/hid_gcode1/gcode_oneline-0.0350.drill.gcode b/tests/golden/hid_gcode1/gcode_oneline-0.0350.drill.gcode
new file mode 100644
index 0000000..63f6a2d
--- /dev/null
+++ b/tests/golden/hid_gcode1/gcode_oneline-0.0350.drill.gcode
@@ -0,0 +1,12 @@
+(Created by G-code exporter)
+(drill file: 1 drills)
+( Tue Mar 9 17:31:54 2010 )
+(Unit: mm)
+(Board size: 50.80x25.40 mm)
+#100=2.000000 (safe Z)
+#101=-2.000000 (drill depth)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G81 X27.940000 Y12.700000 Z#101 R#100
+M5 M9 M2
+(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode1/gcode_oneline-drill.gcode b/tests/golden/hid_gcode1/gcode_oneline-drill.gcode
deleted file mode 100644
index 63f6a2d..0000000
--- a/tests/golden/hid_gcode1/gcode_oneline-drill.gcode
+++ /dev/null
@@ -1,12 +0,0 @@
-(Created by G-code exporter)
-(drill file: 1 drills)
-( Tue Mar 9 17:31:54 2010 )
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=-2.000000 (drill depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G81 X27.940000 Y12.700000 Z#101 R#100
-M5 M9 M2
-(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode10/gcode_oneline-0.8890.drill.gcode b/tests/golden/hid_gcode10/gcode_oneline-0.8890.drill.gcode
new file mode 100644
index 0000000..7deace0
--- /dev/null
+++ b/tests/golden/hid_gcode10/gcode_oneline-0.8890.drill.gcode
@@ -0,0 +1,12 @@
+(Created by G-code exporter)
+(drill file: 1 drills)
+( Tue Mar 9 17:45:32 2010 )
+(Unit: mm)
+(Board size: 50.80x25.40 mm)
+#100=0.002000 (safe Z)
+#101=-0.002000 (drill depth)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G81 X27.940000 Y12.700000 Z#101 R#100
+M5 M9 M2
+(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode10/gcode_oneline-drill.gcode b/tests/golden/hid_gcode10/gcode_oneline-drill.gcode
deleted file mode 100644
index 7deace0..0000000
--- a/tests/golden/hid_gcode10/gcode_oneline-drill.gcode
+++ /dev/null
@@ -1,12 +0,0 @@
-(Created by G-code exporter)
-(drill file: 1 drills)
-( Tue Mar 9 17:45:32 2010 )
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=0.002000 (safe Z)
-#101=-0.002000 (drill depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G81 X27.940000 Y12.700000 Z#101 R#100
-M5 M9 M2
-(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode11/gcode_oneline-0.0350.drill.gcode b/tests/golden/hid_gcode11/gcode_oneline-0.0350.drill.gcode
new file mode 100644
index 0000000..37b9668
--- /dev/null
+++ b/tests/golden/hid_gcode11/gcode_oneline-0.0350.drill.gcode
@@ -0,0 +1,12 @@
+(Created by G-code exporter)
+(drill file: 1 drills)
+( Tue Mar 9 17:45:55 2010 )
+(Unit: inch)
+(Board size: 2.00x1.00 inches)
+#100=2.000000 (safe Z)
+#101=-2.000000 (drill depth)
+(---------------------------------)
+G17 G20 G90 G64 P0.003 M3 S3000 M7 F1
+G81 X1.100000 Y0.500000 Z#101 R#100
+M5 M9 M2
+(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode11/gcode_oneline-drill.gcode b/tests/golden/hid_gcode11/gcode_oneline-drill.gcode
deleted file mode 100644
index 37b9668..0000000
--- a/tests/golden/hid_gcode11/gcode_oneline-drill.gcode
+++ /dev/null
@@ -1,12 +0,0 @@
-(Created by G-code exporter)
-(drill file: 1 drills)
-( Tue Mar 9 17:45:55 2010 )
-(Unit: inch)
-(Board size: 2.00x1.00 inches)
-#100=2.000000 (safe Z)
-#101=-2.000000 (drill depth)
-(---------------------------------)
-G17 G20 G90 G64 P0.003 M3 S3000 M7 F1
-G81 X1.100000 Y0.500000 Z#101 R#100
-M5 M9 M2
-(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode2/out-0.0350.drill.gcode b/tests/golden/hid_gcode2/out-0.0350.drill.gcode
new file mode 100644
index 0000000..f7c6d78
--- /dev/null
+++ b/tests/golden/hid_gcode2/out-0.0350.drill.gcode
@@ -0,0 +1,12 @@
+(Created by G-code exporter)
+(drill file: 1 drills)
+( Tue Mar 9 17:35:19 2010 )
+(Unit: mm)
+(Board size: 50.80x25.40 mm)
+#100=2.000000 (safe Z)
+#101=-2.000000 (drill depth)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G81 X27.940000 Y12.700000 Z#101 R#100
+M5 M9 M2
+(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode2/out-drill.gcode b/tests/golden/hid_gcode2/out-drill.gcode
deleted file mode 100644
index f7c6d78..0000000
--- a/tests/golden/hid_gcode2/out-drill.gcode
+++ /dev/null
@@ -1,12 +0,0 @@
-(Created by G-code exporter)
-(drill file: 1 drills)
-( Tue Mar 9 17:35:19 2010 )
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=-2.000000 (drill depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G81 X27.940000 Y12.700000 Z#101 R#100
-M5 M9 M2
-(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode3/gcode_oneline-0.0350.drill.gcode b/tests/golden/hid_gcode3/gcode_oneline-0.0350.drill.gcode
new file mode 100644
index 0000000..e7be01d
--- /dev/null
+++ b/tests/golden/hid_gcode3/gcode_oneline-0.0350.drill.gcode
@@ -0,0 +1,12 @@
+(Created by G-code exporter)
+(drill file: 1 drills)
+( Tue Mar 9 17:36:04 2010 )
+(Unit: mm)
+(Board size: 50.80x25.40 mm)
+#100=2.000000 (safe Z)
+#101=-2.000000 (drill depth)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G81 X27.940000 Y12.700000 Z#101 R#100
+M5 M9 M2
+(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode3/gcode_oneline-drill.gcode b/tests/golden/hid_gcode3/gcode_oneline-drill.gcode
deleted file mode 100644
index e7be01d..0000000
--- a/tests/golden/hid_gcode3/gcode_oneline-drill.gcode
+++ /dev/null
@@ -1,12 +0,0 @@
-(Created by G-code exporter)
-(drill file: 1 drills)
-( Tue Mar 9 17:36:04 2010 )
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=-2.000000 (drill depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G81 X27.940000 Y12.700000 Z#101 R#100
-M5 M9 M2
-(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode4/gcode_oneline-0.0350.drill.gcode b/tests/golden/hid_gcode4/gcode_oneline-0.0350.drill.gcode
new file mode 100644
index 0000000..c648655
--- /dev/null
+++ b/tests/golden/hid_gcode4/gcode_oneline-0.0350.drill.gcode
@@ -0,0 +1,12 @@
+(Created by G-code exporter)
+(drill file: 1 drills)
+( Tue Mar 9 17:36:12 2010 )
+(Unit: mm)
+(Board size: 50.80x25.40 mm)
+#100=2.000000 (safe Z)
+#101=-2.000000 (drill depth)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G81 X27.940000 Y12.700000 Z#101 R#100
+M5 M9 M2
+(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode4/gcode_oneline-drill.gcode b/tests/golden/hid_gcode4/gcode_oneline-drill.gcode
deleted file mode 100644
index c648655..0000000
--- a/tests/golden/hid_gcode4/gcode_oneline-drill.gcode
+++ /dev/null
@@ -1,12 +0,0 @@
-(Created by G-code exporter)
-(drill file: 1 drills)
-( Tue Mar 9 17:36:12 2010 )
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=-2.000000 (drill depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G81 X27.940000 Y12.700000 Z#101 R#100
-M5 M9 M2
-(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode5/gcode_oneline-0.0350.drill.gcode b/tests/golden/hid_gcode5/gcode_oneline-0.0350.drill.gcode
new file mode 100644
index 0000000..77d8d60
--- /dev/null
+++ b/tests/golden/hid_gcode5/gcode_oneline-0.0350.drill.gcode
@@ -0,0 +1,12 @@
+(Created by G-code exporter)
+(drill file: 1 drills)
+( Tue Mar 9 18:06:42 2010 )
+(Unit: mm)
+(Board size: 50.80x25.40 mm)
+#100=10.000000 (safe Z)
+#101=-2.000000 (drill depth)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G81 X27.940000 Y12.700000 Z#101 R#100
+M5 M9 M2
+(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode5/gcode_oneline-drill.gcode b/tests/golden/hid_gcode5/gcode_oneline-drill.gcode
deleted file mode 100644
index 77d8d60..0000000
--- a/tests/golden/hid_gcode5/gcode_oneline-drill.gcode
+++ /dev/null
@@ -1,12 +0,0 @@
-(Created by G-code exporter)
-(drill file: 1 drills)
-( Tue Mar 9 18:06:42 2010 )
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=10.000000 (safe Z)
-#101=-2.000000 (drill depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G81 X27.940000 Y12.700000 Z#101 R#100
-M5 M9 M2
-(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode6/gcode_oneline-0.0350.drill.gcode b/tests/golden/hid_gcode6/gcode_oneline-0.0350.drill.gcode
new file mode 100644
index 0000000..6b44265
--- /dev/null
+++ b/tests/golden/hid_gcode6/gcode_oneline-0.0350.drill.gcode
@@ -0,0 +1,12 @@
+(Created by G-code exporter)
+(drill file: 1 drills)
+( Tue Mar 9 17:45:05 2010 )
+(Unit: mm)
+(Board size: 50.80x25.40 mm)
+#100=2.000000 (safe Z)
+#101=-2.000000 (drill depth)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G81 X27.940000 Y12.700000 Z#101 R#100
+M5 M9 M2
+(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode6/gcode_oneline-drill.gcode b/tests/golden/hid_gcode6/gcode_oneline-drill.gcode
deleted file mode 100644
index 6b44265..0000000
--- a/tests/golden/hid_gcode6/gcode_oneline-drill.gcode
+++ /dev/null
@@ -1,12 +0,0 @@
-(Created by G-code exporter)
-(drill file: 1 drills)
-( Tue Mar 9 17:45:05 2010 )
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=-2.000000 (drill depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G81 X27.940000 Y12.700000 Z#101 R#100
-M5 M9 M2
-(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode7/gcode_oneline-0.0350.drill.gcode b/tests/golden/hid_gcode7/gcode_oneline-0.0350.drill.gcode
new file mode 100644
index 0000000..e8c41bf
--- /dev/null
+++ b/tests/golden/hid_gcode7/gcode_oneline-0.0350.drill.gcode
@@ -0,0 +1,12 @@
+(Created by G-code exporter)
+(drill file: 1 drills)
+( Tue Mar 9 17:45:12 2010 )
+(Unit: mm)
+(Board size: 50.80x25.40 mm)
+#100=2.000000 (safe Z)
+#101=70.000000 (drill depth)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G81 X27.940000 Y12.700000 Z#101 R#100
+M5 M9 M2
+(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode7/gcode_oneline-drill.gcode b/tests/golden/hid_gcode7/gcode_oneline-drill.gcode
deleted file mode 100644
index e8c41bf..0000000
--- a/tests/golden/hid_gcode7/gcode_oneline-drill.gcode
+++ /dev/null
@@ -1,12 +0,0 @@
-(Created by G-code exporter)
-(drill file: 1 drills)
-( Tue Mar 9 17:45:12 2010 )
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=70.000000 (drill depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G81 X27.940000 Y12.700000 Z#101 R#100
-M5 M9 M2
-(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode8/gcode_oneline-0.8890.drill.gcode b/tests/golden/hid_gcode8/gcode_oneline-0.8890.drill.gcode
new file mode 100644
index 0000000..77ac526
--- /dev/null
+++ b/tests/golden/hid_gcode8/gcode_oneline-0.8890.drill.gcode
@@ -0,0 +1,12 @@
+(Created by G-code exporter)
+(drill file: 1 drills)
+( Tue Mar 9 17:45:19 2010 )
+(Unit: mm)
+(Board size: 50.80x25.40 mm)
+#100=2.000000 (safe Z)
+#101=-2.000000 (drill depth)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G81 X27.940000 Y12.700000 Z#101 R#100
+M5 M9 M2
+(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode8/gcode_oneline-drill.gcode b/tests/golden/hid_gcode8/gcode_oneline-drill.gcode
deleted file mode 100644
index 77ac526..0000000
--- a/tests/golden/hid_gcode8/gcode_oneline-drill.gcode
+++ /dev/null
@@ -1,12 +0,0 @@
-(Created by G-code exporter)
-(drill file: 1 drills)
-( Tue Mar 9 17:45:19 2010 )
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=-2.000000 (drill depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G81 X27.940000 Y12.700000 Z#101 R#100
-M5 M9 M2
-(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode9/gcode_oneline-0.0350.drill.gcode b/tests/golden/hid_gcode9/gcode_oneline-0.0350.drill.gcode
new file mode 100644
index 0000000..c4b730a
--- /dev/null
+++ b/tests/golden/hid_gcode9/gcode_oneline-0.0350.drill.gcode
@@ -0,0 +1,12 @@
+(Created by G-code exporter)
+(drill file: 1 drills)
+( Tue Mar 9 17:45:25 2010 )
+(Unit: inch)
+(Board size: 2.00x1.00 inches)
+#100=0.002000 (safe Z)
+#101=-0.002000 (drill depth)
+(---------------------------------)
+G17 G20 G90 G64 P0.003 M3 S3000 M7 F1
+G81 X1.100000 Y0.500000 Z#101 R#100
+M5 M9 M2
+(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode9/gcode_oneline-drill.gcode b/tests/golden/hid_gcode9/gcode_oneline-drill.gcode
deleted file mode 100644
index c4b730a..0000000
--- a/tests/golden/hid_gcode9/gcode_oneline-drill.gcode
+++ /dev/null
@@ -1,12 +0,0 @@
-(Created by G-code exporter)
-(drill file: 1 drills)
-( Tue Mar 9 17:45:25 2010 )
-(Unit: inch)
-(Board size: 2.00x1.00 inches)
-#100=0.002000 (safe Z)
-#101=-0.002000 (drill depth)
-(---------------------------------)
-G17 G20 G90 G64 P0.003 M3 S3000 M7 F1
-G81 X1.100000 Y0.500000 Z#101 R#100
-M5 M9 M2
-(end, total distance 0.00mm = 0.00in)
diff --git a/tests/tests.list b/tests/tests.list
index a9a396d..e9812bf 100644
--- a/tests/tests.list
+++ b/tests/tests.list
@@ -106,17 +106,17 @@ hid_bom4 | bom_general.pcb | bom | --xy-in-mm | | bom:bom_general.bom xy:bom_ge
# --drill depth <num> Drilling depth.
# --measurement-unit <mm|mil|um|inch> Measurement unit
#
-hid_gcode1 | gcode_oneline.pcb | gcode | | | gcode:gcode_oneline-top.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-drill.gcode
-hid_gcode2 | gcode_oneline.pcb | gcode | --basename out.gcode | | gcode:out-top.gcode gcode:out-bottom.gcode gcode:out-drill.gcode
-hid_gcode3 | gcode_oneline.pcb | gcode | --dpi 1200 | | gcode:gcode_oneline-top.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-drill.gcode
-hid_gcode4 | gcode_oneline.pcb | gcode | --mill-depth 5 | | gcode:gcode_oneline-top.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-drill.gcode
-hid_gcode5 | gcode_oneline.pcb | gcode | --safe-Z 10 | | gcode:gcode_oneline-top.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-drill.gcode
-hid_gcode6 | gcode_oneline.pcb | gcode | --tool-diameter 30 | | gcode:gcode_oneline-top.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-drill.gcode
-hid_gcode7 | gcode_oneline.pcb | gcode | --drill-depth 70 | | gcode:gcode_oneline-top.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-drill.gcode
-hid_gcode8 | gcode_oneline.pcb | gcode | --measurement-unit mm | | gcode:gcode_oneline-top.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-drill.gcode
-hid_gcode9 | gcode_oneline.pcb | gcode | --measurement-unit mil | | gcode:gcode_oneline-top.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-drill.gcode
-hid_gcode10 | gcode_oneline.pcb | gcode | --measurement-unit um | | gcode:gcode_oneline-top.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-drill.gcode
-hid_gcode11 | gcode_oneline.pcb | gcode | --measurement-unit inch | | gcode:gcode_oneline-top.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-drill.gcode
+hid_gcode1 | gcode_oneline.pcb | gcode | | | gcode:gcode_oneline-top.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-0.0350.drill.gcode
+hid_gcode2 | gcode_oneline.pcb | gcode | --basename out.gcode | | gcode:out-top.gcode gcode:out-bottom.gcode gcode:out-0.0350.drill.gcode
+hid_gcode3 | gcode_oneline.pcb | gcode | --dpi 1200 | | gcode:gcode_oneline-top.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-0.0350.drill.gcode
+hid_gcode4 | gcode_oneline.pcb | gcode | --mill-depth 5 | | gcode:gcode_oneline-top.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-0.0350.drill.gcode
+hid_gcode5 | gcode_oneline.pcb | gcode | --safe-Z 10 | | gcode:gcode_oneline-top.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-0.0350.drill.gcode
+hid_gcode6 | gcode_oneline.pcb | gcode | --tool-diameter 30 | | gcode:gcode_oneline-top.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-0.0350.drill.gcode
+hid_gcode7 | gcode_oneline.pcb | gcode | --drill-depth 70 | | gcode:gcode_oneline-top.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-0.0350.drill.gcode
+hid_gcode8 | gcode_oneline.pcb | gcode | --measurement-unit mm | | gcode:gcode_oneline-top.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-0.8890.drill.gcode
+hid_gcode9 | gcode_oneline.pcb | gcode | --measurement-unit mil | | gcode:gcode_oneline-top.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-0.0350.drill.gcode
+hid_gcode10 | gcode_oneline.pcb | gcode | --measurement-unit um | | gcode:gcode_oneline-top.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-0.8890.drill.gcode
+hid_gcode11 | gcode_oneline.pcb | gcode | --measurement-unit inch | | gcode:gcode_oneline-top.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-0.0350.drill.gcode
#
######################################################################
# ---------------------------------------------
commit 2a38d72638f8acb7e625ad03b3a3314c2d2055bd
Author: Dima Kogan <dima@xxxxxxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>
updated tests.list to use tool diameter instead of radius when testing gcode
diff --git a/tests/tests.list b/tests/tests.list
index 25e820e..a9a396d 100644
--- a/tests/tests.list
+++ b/tests/tests.list
@@ -102,7 +102,7 @@ hid_bom4 | bom_general.pcb | bom | --xy-in-mm | | bom:bom_general.bom xy:bom_ge
# --dpi <num> Resolution of intermediate image (pixels/inch).
# --mill-depth <num> Milling depth.
# --safe-Z <num> Safe Z for traverse move.
-# --tool-radius <num> Milling tool radius compensation.
+# --tool-diameter <num> Milling tool diameter compensation.
# --drill depth <num> Drilling depth.
# --measurement-unit <mm|mil|um|inch> Measurement unit
#
@@ -111,7 +111,7 @@ hid_gcode2 | gcode_oneline.pcb | gcode | --basename out.gcode | | gcode:out-top.
hid_gcode3 | gcode_oneline.pcb | gcode | --dpi 1200 | | gcode:gcode_oneline-top.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-drill.gcode
hid_gcode4 | gcode_oneline.pcb | gcode | --mill-depth 5 | | gcode:gcode_oneline-top.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-drill.gcode
hid_gcode5 | gcode_oneline.pcb | gcode | --safe-Z 10 | | gcode:gcode_oneline-top.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-drill.gcode
-hid_gcode6 | gcode_oneline.pcb | gcode | --tool-radius 15 | | gcode:gcode_oneline-top.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-drill.gcode
+hid_gcode6 | gcode_oneline.pcb | gcode | --tool-diameter 30 | | gcode:gcode_oneline-top.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-drill.gcode
hid_gcode7 | gcode_oneline.pcb | gcode | --drill-depth 70 | | gcode:gcode_oneline-top.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-drill.gcode
hid_gcode8 | gcode_oneline.pcb | gcode | --measurement-unit mm | | gcode:gcode_oneline-top.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-drill.gcode
hid_gcode9 | gcode_oneline.pcb | gcode | --measurement-unit mil | | gcode:gcode_oneline-top.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-drill.gcode
commit 728eb911f9cf88f20d5eb33c0bd62e0637b4115d
Author: Dima Kogan <dima@xxxxxxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>
fixed incorrect comment in tests.list
diff --git a/tests/tests.list b/tests/tests.list
index 422e8e5..25e820e 100644
--- a/tests/tests.list
+++ b/tests/tests.list
@@ -100,11 +100,11 @@ hid_bom4 | bom_general.pcb | bom | --xy-in-mm | | bom:bom_general.bom xy:bom_ge
# options:
# --basename <string> File name prefix
# --dpi <num> Resolution of intermediate image (pixels/inch).
-# --mill depth <num> Milling depth.
-# --safe Z <num> Safe Z for traverse move.
-# --tool radius <num> Milling tool radius compensation.
+# --mill-depth <num> Milling depth.
+# --safe-Z <num> Safe Z for traverse move.
+# --tool-radius <num> Milling tool radius compensation.
# --drill depth <num> Drilling depth.
-# --measurement unit <mm|mil|um|inch> Measurement unit
+# --measurement-unit <mm|mil|um|inch> Measurement unit
#
hid_gcode1 | gcode_oneline.pcb | gcode | | | gcode:gcode_oneline-top.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-drill.gcode
hid_gcode2 | gcode_oneline.pcb | gcode | --basename out.gcode | | gcode:out-top.gcode gcode:out-bottom.gcode gcode:out-drill.gcode
commit a55da655ae12c0934141d64ec423fa9131fd2483
Author: Dima Kogan <dima@xxxxxxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>
added some forgotten newlines in the gcode output
diff --git a/src/hid/gcode/gcode.c b/src/hid/gcode/gcode.c
index 31874d0..65fd843 100644
--- a/src/hid/gcode/gcode.c
+++ b/src/hid/gcode/gcode.c
@@ -571,9 +571,9 @@ gcode_do_export (HID_Attr_Val * options)
options[HA_tooldiameter].real_value * scale,
metric ? "mm" : "inch");
if (metric)
- pcb_fprintf (gcode_f2, "(Board size: %.2mmx%.2mm mm)", PCB->MaxWidth, PCB->MaxHeight);
+ pcb_fprintf (gcode_f2, "(Board size: %.2mmx%.2mm mm)\n", PCB->MaxWidth, PCB->MaxHeight);
else
- pcb_fprintf (gcode_f2, "(Board size: %.2mix%.2mi inches)", PCB->MaxWidth, PCB->MaxHeight);
+ pcb_fprintf (gcode_f2, "(Board size: %.2mix%.2mi inches)\n", PCB->MaxWidth, PCB->MaxHeight);
if (gcode_advanced)
{
fprintf (gcode_f2, "%s=%f (safe Z)\n",
@@ -653,9 +653,9 @@ gcode_do_export (HID_Attr_Val * options)
fprintf (gcode_f2, "( %s )\n", filename);
fprintf (gcode_f2, "(Unit: %s)\n", metric ? "mm" : "inch");
if (metric)
- pcb_fprintf (gcode_f2, "(Board size: %.2mmx%.2mm mm)", PCB->MaxWidth, PCB->MaxHeight);
+ pcb_fprintf (gcode_f2, "(Board size: %.2mmx%.2mm mm)\n", PCB->MaxWidth, PCB->MaxHeight);
else
- pcb_fprintf (gcode_f2, "(Board size: %.2mix%.2mi inches)", PCB->MaxWidth, PCB->MaxHeight);
+ pcb_fprintf (gcode_f2, "(Board size: %.2mix%.2mi inches)\n", PCB->MaxWidth, PCB->MaxHeight);
if (gcode_advanced)
{
fprintf (gcode_f2, "%s=%f (safe Z)\n",
commit 100197a9f6d182979837a7338a147848219ad506
Author: Dima Kogan <dima@xxxxxxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>
g-code exporter now outputs NC-drills for different hole sizes into different files
diff --git a/src/hid/gcode/gcode.c b/src/hid/gcode/gcode.c
index 2e80e6e..31874d0 100644
--- a/src/hid/gcode/gcode.c
+++ b/src/hid/gcode/gcode.c
@@ -27,7 +27,7 @@
/*
* This HID exports a PCB layout into:
* one layer mask file (PNG format) per copper layer,
- * one G-CODE CNC drill file.
+ * one G-CODE CNC drill file per drill size
* one G-CODE CNC file per copper layer.
* The latter is used by a CNC milling machine to mill the pcb.
*/
@@ -125,15 +125,28 @@ static double gcode_safeZ = 100; /* safe Z (inch) */
static double gcode_toolradius = 0; /* tool radius (1/100 mil) */
static char gcode_advanced = 0;
static int save_drill = 0;
-static int n_drill = 0;
-static int nmax_drill = 0;
-struct drill_struct
+
+/* structure to represent a single hole */
+struct drill_hole
{
double x;
double y;
};
-static struct drill_struct *drill = 0;
+/* structure to represent all holes of a given size */
+struct single_size_drills
+{
+ double diameter_inches;
+
+ int n_holes;
+ int n_holes_allocated;
+ struct drill_hole* holes;
+};
+
+/* at the start we have no drills at all */
+static struct single_size_drills* drills = NULL;
+static int n_drills = 0;
+static int n_drills_allocated = 0;
static const char *units[] = {
"mm",
@@ -226,10 +239,10 @@ gcode_get_filename (char *filename, const char *layername)
* Note that this is O(N^2). We can't use the O(N logN) sort, since our
* shortest-distance origin changes with every point */
static void
-sort_drill (struct drill_struct *drill, int n_drill)
+sort_drill (struct drill_hole *drill, int n_drill)
{
/* I start out by looking for points closest to (0,0) */
- struct drill_struct nearest_target = { 0, 0 };
+ struct drill_hole nearest_target = { 0, 0 };
/* I sort my list by finding the correct point to fill each slot. I don't need
to look at the last one, since it'll be in the right place automatically */
@@ -254,7 +267,7 @@ sort_drill (struct drill_struct *drill, int n_drill)
nearest_target.x,nearest_target.y); */
if (j != imin)
{
- struct drill_struct tmp;
+ struct drill_hole tmp;
tmp = drill[j];
drill[j] = drill[imin];
drill[imin] = tmp;
@@ -609,82 +622,98 @@ gcode_do_export (HID_Attr_Val * options)
fclose (gcode_f2);
if (save_drill)
{
- d = 0;
- sort_drill (drill, n_drill);
- gcode_get_filename (filename, "drill");
- gcode_f2 = fopen (filename, "wb");
- if (!gcode_f2)
- {
- perror (filename);
- return;
- }
- fprintf (gcode_f2, "(Created by G-code exporter)\n");
- fprintf (gcode_f2, "(drill file: %d drills)\n", n_drill);
- sprintf (filename, "%s", ctime (&t));
- filename[strlen (filename) - 1] = 0;
- fprintf (gcode_f2, "( %s )\n", filename);
- fprintf (gcode_f2, "(Unit: %s)\n", metric ? "mm" : "inch");
- if (metric)
- pcb_fprintf (gcode_f2, "(Board size: %.2mmx%.2mm mm)", PCB->MaxWidth, PCB->MaxHeight);
- else
- pcb_fprintf (gcode_f2, "(Board size: %.2mix%.2mi inches)", PCB->MaxWidth, PCB->MaxHeight);
- if (gcode_advanced)
- {
- fprintf (gcode_f2, "%s=%f (safe Z)\n",
- variable_safeZ, gcode_safeZ);
- fprintf (gcode_f2, "%s=%f (drill depth)\n",
- variable_drilldepth, gcode_drilldepth);
- fprintf (gcode_f2, "(---------------------------------)\n");
- fprintf (gcode_f2, "G17 G%d G90 G64 P0.003 M3 S3000 M7 F%d\n",
- metric ? 21 : 20, metric ? 25 : 1);
- }
- else
+ for (int i_drill_file=0; i_drill_file < n_drills; i_drill_file++)
{
- fprintf (gcode_f2, "(---------------------------------)\n");
- fprintf (gcode_f2, "G17\nG%d\nG90\nG64 P0.003\nM3 S3000\nM7\nF%d\n",
- metric ? 21 : 20, metric ? 25 : 1);
- }
- fprintf (gcode_f2, "G0 Z%s\n", variable_safeZ);
- for (r = 0; r < n_drill; r++)
- {
- double drillX, drillY;
-
- if (metric)
+ struct single_size_drills* drill = &drills[i_drill_file];
+
+ d = 0;
+ sort_drill (drill->holes, drill->n_holes);
+
+ {
+ // get the filename with the drill size encoded in it
+ char layername[32];
+ snprintf(layername, sizeof(layername),
+ "%.4f.drill",
+ metric ?
+ drill->diameter_inches * 25.4 :
+ drill->diameter_inches);
+ gcode_get_filename (filename, layername);
+ }
+
+ gcode_f2 = fopen (filename, "wb");
+ if (!gcode_f2)
{
- drillX = drill[r].x * 25.4;
- drillY = drill[r].y * 25.4;
+ perror (filename);
+ return;
}
+ fprintf (gcode_f2, "(Created by G-code exporter)\n");
+ fprintf (gcode_f2, "(drill file: %d drills)\n", drill->n_holes);
+ sprintf (filename, "%s", ctime (&t));
+ filename[strlen (filename) - 1] = 0;
+ fprintf (gcode_f2, "( %s )\n", filename);
+ fprintf (gcode_f2, "(Unit: %s)\n", metric ? "mm" : "inch");
+ if (metric)
+ pcb_fprintf (gcode_f2, "(Board size: %.2mmx%.2mm mm)", PCB->MaxWidth, PCB->MaxHeight);
else
+ pcb_fprintf (gcode_f2, "(Board size: %.2mix%.2mi inches)", PCB->MaxWidth, PCB->MaxHeight);
+ if (gcode_advanced)
{
- drillX = drill[r].x;
- drillY = drill[r].y;
+ fprintf (gcode_f2, "%s=%f (safe Z)\n",
+ variable_safeZ, gcode_safeZ);
+ fprintf (gcode_f2, "%s=%f (drill depth)\n",
+ variable_drilldepth, gcode_drilldepth);
+ fprintf (gcode_f2, "(---------------------------------)\n");
+ fprintf (gcode_f2, "G17 G%d G90 G64 P0.003 M3 S3000 M7 F%d\n",
+ metric ? 21 : 20, metric ? 25 : 1);
}
- if (gcode_advanced)
- fprintf (gcode_f2, "G81 X%f Y%f Z%s R%s\n", drillX, drillY,
- variable_drilldepth, variable_safeZ);
else
{
- fprintf (gcode_f2, "G0 X%f Y%f\n", drillX, drillY);
- fprintf (gcode_f2, "G1 Z%s\n", variable_drilldepth);
- fprintf (gcode_f2, "G0 Z%s\n", variable_safeZ);
+ fprintf (gcode_f2, "(---------------------------------)\n");
+ fprintf (gcode_f2, "G17\nG%d\nG90\nG64 P0.003\nM3 S3000\nM7\nF%d\n",
+ metric ? 21 : 20, metric ? 25 : 1);
}
- if (r > 0)
- d +=
- sqrt ((drill[r].x - drill[r - 1].x) * (drill[r].x -
- drill[r - 1].x) +
- (drill[r].y - drill[r - 1].y) * (drill[r].y -
- drill[r - 1].y));
+ fprintf (gcode_f2, "G0 Z%s\n", variable_safeZ);
+ for (r = 0; r < drill->n_holes; r++)
+ {
+ double drillX, drillY;
+
+ if (metric)
+ {
+ drillX = drill->holes[r].x * 25.4;
+ drillY = drill->holes[r].y * 25.4;
+ }
+ else
+ {
+ drillX = drill->holes[r].x;
+ drillY = drill->holes[r].y;
+ }
+ if (gcode_advanced)
+ fprintf (gcode_f2, "G81 X%f Y%f Z%s R%s\n", drillX, drillY,
+ variable_drilldepth, variable_safeZ);
+ else
+ {
+ fprintf (gcode_f2, "G0 X%f Y%f\n", drillX, drillY);
+ fprintf (gcode_f2, "G1 Z%s\n", variable_drilldepth);
+ fprintf (gcode_f2, "G0 Z%s\n", variable_safeZ);
+ }
+ if (r > 0)
+ d += hypot( drill->holes[r].x - drill->holes[r - 1].x,
+ drill->holes[r].y - drill->holes[r - 1].y );
+ }
+ if (gcode_advanced)
+ fprintf (gcode_f2, "M5 M9 M2\n");
+ else
+ fprintf (gcode_f2, "M5\nM9\nM2\n");
+ fprintf (gcode_f2, "(end, total distance %.2fmm = %.2fin)\n",
+ 25.4 * d, d);
+ fclose (gcode_f2);
+
+ free(drills[i_drill_file].holes);
}
- if (gcode_advanced)
- fprintf (gcode_f2, "M5 M9 M2\n");
- else
- fprintf (gcode_f2, "M5\nM9\nM2\n");
- fprintf (gcode_f2, "(end, total distance %.2fmm = %.2fin)\n",
- 25.4 * d, d);
- fclose (gcode_f2);
- free (drill);
- drill = NULL;
- n_drill = nmax_drill = 0;
+
+ free (drills);
+ drills = NULL;
+ n_drills = n_drills_allocated = 0;
}
free (filename);
@@ -1018,6 +1047,83 @@ gcode_draw_arc (hidGC gc, Coord cx, Coord cy, Coord width, Coord height,
gdBrushed);
}
+/* given a hole size, return the structure that currently holds the data for
+ that hole size. If there isn't one, make it */
+static int _drill_size_comparator(const void* _size0, const void* _size1)
+{
+ double size0 = ((const struct single_size_drills*)_size0)->diameter_inches;
+ double size1 = ((const struct single_size_drills*)_size1)->diameter_inches;
+ if (size0 == size1)
+ return 0;
+
+ if (size0 < size1)
+ return -1;
+
+ return 1;
+}
+static struct single_size_drills*
+get_drill(double diameter_inches)
+{
+ /* see if we already have this size. If so, return that structure */
+ struct single_size_drills* drill =
+ bsearch (&diameter_inches,
+ drills, n_drills, sizeof (drills[0]),
+ _drill_size_comparator);
+ if (drill != NULL)
+ return drill;
+
+ /* haven't seen this hole size before, so make a new structure for it */
+ if (n_drills == n_drills_allocated)
+ {
+ n_drills_allocated += 100;
+ drills =
+ (struct single_size_drills *) realloc (drills,
+ n_drills_allocated *
+ sizeof (struct single_size_drills));
+ }
+
+ /* I now add the structure to the list, making sure to keep the list
+ * sorted. Ideally the bsearch() call above would have given me the location
+ * to insert this element while keeping things sorted, but it doesn't. For
+ * simplicity I manually lsearch() to find this location myself */
+ {
+ int i = 0;
+ for (; i<n_drills; i++)
+ if (drills[i].diameter_inches >= diameter_inches)
+ break;
+
+ if (n_drills != i)
+ memmove (&drills[i+1], &drills[i],
+ (n_drills-i) * sizeof (struct single_size_drills));
+
+ drills[i].diameter_inches = diameter_inches;
+ drills[i].n_holes = 0;
+ drills[i].n_holes_allocated = 0;
+ drills[i].holes = NULL;
+ n_drills++;
+
+ return &drills[i];
+ }
+}
+
+static void
+add_hole (struct single_size_drills* drill,
+ double cx_inches, double cy_inches)
+{
+ if (drill->n_holes == drill->n_holes_allocated)
+ {
+ drill->n_holes_allocated += 100;
+ drill->holes =
+ (struct drill_hole *) realloc (drill->holes,
+ drill->n_holes_allocated *
+ sizeof (struct drill_hole));
+ }
+
+ drill->holes[ drill->n_holes ].x = cx_inches;
+ drill->holes[ drill->n_holes ].y = cy_inches;
+ drill->n_holes++;
+}
+
static void
gcode_fill_circle (hidGC gc, Coord cx, Coord cy, Coord radius)
{
@@ -1031,19 +1137,12 @@ gcode_fill_circle (hidGC gc, Coord cx, Coord cy, Coord radius)
gc->color->c);
if (save_drill && is_drill)
{
- if (n_drill == nmax_drill)
- {
- drill =
- (struct drill_struct *) realloc (drill,
- (nmax_drill +
- 100) *
- sizeof (struct drill_struct));
- nmax_drill += 100;
- }
- drill[n_drill].x = COORD_TO_INCH(PCB->MaxWidth - cx); /* convert to inch, flip: will drill from bottom side */
- drill[n_drill].y = COORD_TO_INCH(PCB->MaxHeight - cy); /* PCB reverses y axis */
- n_drill++;
-/* printf("Circle %d %d\n",cx,cy); */
+ double diameter_inches = COORD_TO_INCH(radius*2);
+
+ struct single_size_drills* drill = get_drill (diameter_inches);
+ add_hole (drill,
+ COORD_TO_INCH(PCB->MaxWidth - cx), /* convert to inch, flip: will drill from bottom side */
+ COORD_TO_INCH(PCB->MaxHeight - cy)); /* PCB reverses y axis */
}
}
commit d05f2f19a2a14ab1634c8477f7e189e8e26a3d9a
Author: Dima Kogan <dima@xxxxxxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>
a few tab->spaces conversions in comments
diff --git a/src/hid/gcode/gcode.c b/src/hid/gcode/gcode.c
index 8a8d011..2e80e6e 100644
--- a/src/hid/gcode/gcode.c
+++ b/src/hid/gcode/gcode.c
@@ -499,7 +499,7 @@ gcode_do_export (HID_Attr_Val * options)
is_solder =
(GetLayerGroupNumberByNumber (idx) ==
GetLayerGroupNumberByNumber (solder_silk_layer)) ? 1 : 0;
- save_drill = is_solder; /* save drills for one layer only */
+ save_drill = is_solder; /* save drills for one layer only */
gcode_start_png (layer_type_to_file_name (idx, FNS_fixed));
hid_save_and_show_layer_ons (save_ons);
gcode_start_png_export ();
@@ -1040,8 +1040,8 @@ gcode_fill_circle (hidGC gc, Coord cx, Coord cy, Coord radius)
sizeof (struct drill_struct));
nmax_drill += 100;
}
- drill[n_drill].x = COORD_TO_INCH(PCB->MaxWidth - cx); /* convert to inch, flip: will drill from bottom side */
- drill[n_drill].y = COORD_TO_INCH(PCB->MaxHeight - cy); /* PCB reverses y axis */
+ drill[n_drill].x = COORD_TO_INCH(PCB->MaxWidth - cx); /* convert to inch, flip: will drill from bottom side */
+ drill[n_drill].y = COORD_TO_INCH(PCB->MaxHeight - cy); /* PCB reverses y axis */
n_drill++;
/* printf("Circle %d %d\n",cx,cy); */
}
commit 356e5c1f7d58f3930056ee39bc2ed11346b64d14
Author: Dima Kogan <dima@xxxxxxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>
removed some trailing whitespace in comments
diff --git a/src/hid/gcode/gcode.c b/src/hid/gcode/gcode.c
index 25f35be..8a8d011 100644
--- a/src/hid/gcode/gcode.c
+++ b/src/hid/gcode/gcode.c
@@ -25,11 +25,11 @@
*/
/*
- * This HID exports a PCB layout into:
+ * This HID exports a PCB layout into:
* one layer mask file (PNG format) per copper layer,
* one G-CODE CNC drill file.
* one G-CODE CNC file per copper layer.
- * The latter is used by a CNC milling machine to mill the pcb.
+ * The latter is used by a CNC milling machine to mill the pcb.
*/
#ifdef HAVE_CONFIG_H
commit cd063cb3a69922c7be3ad2df7511a5fd6e1392b5
Author: Dima Kogan <dima@xxxxxxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>
gcode exporter: reworked and cleaned up sort_drill()
This function no longer deallocates the memory passed into it, which is a
potential source of issues for the unsuspecting caller. Instead it sorts the
data in-place
diff --git a/src/hid/gcode/gcode.c b/src/hid/gcode/gcode.c
index 790aa61..25f35be 100644
--- a/src/hid/gcode/gcode.c
+++ b/src/hid/gcode/gcode.c
@@ -220,36 +220,48 @@ gcode_get_filename (char *filename, const char *layername)
// result is in char *filename
}
-/* Sorts drills in order of distance from the origin */
-static struct drill_struct *
+/* Sorts drills to produce a short tool path. I start with the hole nearest
+ * (0,0) and for each subsequent one, find the hole nearest to the previous.
+ * This isn't guaranteed to find the shortest path, but should be good enough.
+ * Note that this is O(N^2). We can't use the O(N logN) sort, since our
+ * shortest-distance origin changes with every point */
+static void
sort_drill (struct drill_struct *drill, int n_drill)
{
- int i, j, imin;
- double dmin, d;
- struct drill_struct p = { 0, 0 };
- struct drill_struct *temp = (struct drill_struct *)malloc (n_drill * sizeof (struct drill_struct));
- for (j = 0; j < n_drill; j++)
+ /* I start out by looking for points closest to (0,0) */
+ struct drill_struct nearest_target = { 0, 0 };
+
+ /* I sort my list by finding the correct point to fill each slot. I don't need
+ to look at the last one, since it'll be in the right place automatically */
+ for (int j = 0; j < n_drill-1; j++)
{
- dmin = 1e20;
- imin = 0;
- for (i = 0; i < n_drill - j; i++)
+ double dmin = 1e20;
+ int imin = 0;
+ /* look through remaining elements to find the next drill point. This is
+ the one nearest to nearest_target */
+ for (int i = j; i < n_drill; i++)
{
- d =
- (drill[i].x - p.x) * (drill[i].x - p.x) +
- (drill[i].y - p.y) * (drill[i].y - p.y);
+ double d =
+ (drill[i].x - nearest_target.x) * (drill[i].x - nearest_target.x) +
+ (drill[i].y - nearest_target.y) * (drill[i].y - nearest_target.y);
if (d < dmin)
{
imin = i;
dmin = d;
}
}
- /* printf("j=%d imin=%d dmin=%f p=(%f,%f)\n",j,imin,dmin,p.x,p.y); */
- temp[j] = drill[imin];
- drill[imin] = drill[n_drill - j - 1];
- p = temp[j];
+ /* printf("j=%d imin=%d dmin=%f nearest_target=(%f,%f)\n",j,imin,dmin,
+ nearest_target.x,nearest_target.y); */
+ if (j != imin)
+ {
+ struct drill_struct tmp;
+ tmp = drill[j];
+ drill[j] = drill[imin];
+ drill[imin] = tmp;
+ }
+
+ nearest_target = drill[j];
}
- free (drill);
- return temp;
}
/* *** Main export callback ************************************************ */
@@ -598,7 +610,7 @@ gcode_do_export (HID_Attr_Val * options)
if (save_drill)
{
d = 0;
- drill = sort_drill (drill, n_drill);
+ sort_drill (drill, n_drill);
gcode_get_filename (filename, "drill");
gcode_f2 = fopen (filename, "wb");
if (!gcode_f2)
commit 9d3843a6b72ac6bdcd4d76d28162a700f1a7923b
Author: Dima Kogan <dima@xxxxxxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>
gcode exporter: minor whitespace corrections
diff --git a/src/hid/gcode/gcode.c b/src/hid/gcode/gcode.c
index 1774ea0..790aa61 100644
--- a/src/hid/gcode/gcode.c
+++ b/src/hid/gcode/gcode.c
@@ -235,9 +235,8 @@ sort_drill (struct drill_struct *drill, int n_drill)
for (i = 0; i < n_drill - j; i++)
{
d =
- (drill[i].x - p.x) * (drill[i].x - p.x) + (drill[i].y -
- p.y) * (drill[i].y -
- p.y);
+ (drill[i].x - p.x) * (drill[i].x - p.x) +
+ (drill[i].y - p.y) * (drill[i].y - p.y);
if (d < dmin)
{
imin = i;
commit f39ac9ce9e0141c8f1e3828d280fd8df95da4522
Author: Dima Kogan <dima@xxxxxxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>
gcode exporter: made some functions static
diff --git a/src/hid/gcode/gcode.c b/src/hid/gcode/gcode.c
index d9f2ec1..1774ea0 100644
--- a/src/hid/gcode/gcode.c
+++ b/src/hid/gcode/gcode.c
@@ -221,7 +221,7 @@ gcode_get_filename (char *filename, const char *layername)
}
/* Sorts drills in order of distance from the origin */
-struct drill_struct *
+static struct drill_struct *
sort_drill (struct drill_struct *drill, int n_drill)
{
int i, j, imin;
@@ -293,7 +293,7 @@ gcode_get_export_options (int *n)
}
/* Populates gcode_export_group array */
-void
+static void
gcode_choose_groups ()
{
int n, m;
@@ -385,7 +385,7 @@ gcode_finish_png ()
gcode_f = NULL;
}
-void
+static void
gcode_start_png_export ()
{
BoxType region;
commit 83dba626f35195a00f1ef2f23ab2d235b4f6757b
Author: Dima Kogan <dima@xxxxxxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>
renamed golden test files to match new gcode output filenames
diff --git a/tests/golden/hid_gcode1/gcode_oneline-bottom.gcode b/tests/golden/hid_gcode1/gcode_oneline-bottom.gcode
new file mode 100644
index 0000000..2031270
--- /dev/null
+++ b/tests/golden/hid_gcode1/gcode_oneline-bottom.gcode
@@ -0,0 +1,34 @@
+(Created by G-code exporter)
+( Tue Mar 9 17:31:54 2010 )
+(600 dpi)
+(Unit: mm)
+(Board size: 50.80x25.40 mm)
+#100=2.000000 (safe Z)
+#101=-0.050000 (cutting depth)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G0 Z#100
+(polygon 1)
+G0 X27.770667 Y13.546667 (start point)
+G1 Z#101
+G1 X27.559000 Y13.462000
+G1 X27.305000 Y13.292667
+G1 X7.450667 Y13.292667
+G1 X7.196667 Y13.081000
+G1 X6.985000 Y12.827000
+G1 X6.985000 Y12.530667
+G1 X7.196667 Y12.276667
+G1 X7.450667 Y12.065000
+G1 X27.305000 Y12.065000
+G1 X27.643667 Y11.853333
+G1 X28.194000 Y11.853333
+G1 X28.532667 Y12.065000
+G1 X28.744333 Y12.403667
+G1 X28.744333 Y12.954000
+G1 X28.532667 Y13.292667
+G1 X28.194000 Y13.504333
+G1 X27.770667 Y13.546667
+G0 Z#100
+(polygon end, distance 45.38)
+(end, total distance 45.38mm = 1.79in)
+M5 M9 M2
diff --git a/tests/golden/hid_gcode1/gcode_oneline-drill.gcode b/tests/golden/hid_gcode1/gcode_oneline-drill.gcode
new file mode 100644
index 0000000..63f6a2d
--- /dev/null
+++ b/tests/golden/hid_gcode1/gcode_oneline-drill.gcode
@@ -0,0 +1,12 @@
+(Created by G-code exporter)
+(drill file: 1 drills)
+( Tue Mar 9 17:31:54 2010 )
+(Unit: mm)
+(Board size: 50.80x25.40 mm)
+#100=2.000000 (safe Z)
+#101=-2.000000 (drill depth)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G81 X27.940000 Y12.700000 Z#101 R#100
+M5 M9 M2
+(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode1/gcode_oneline-top.gcode b/tests/golden/hid_gcode1/gcode_oneline-top.gcode
new file mode 100644
index 0000000..afd6cb2
--- /dev/null
+++ b/tests/golden/hid_gcode1/gcode_oneline-top.gcode
@@ -0,0 +1,34 @@
+(Created by G-code exporter)
+( Tue Mar 9 17:31:51 2010 )
+(600 dpi)
+(Unit: mm)
+(Board size: 50.80x25.40 mm)
+#100=2.000000 (safe Z)
+#101=-0.050000 (cutting depth)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G0 Z#100
+(polygon 1)
+G0 X22.733000 Y13.546667 (start point)
+G1 Z#101
+G1 X22.521333 Y13.462000
+G1 X22.267333 Y13.292667
+G1 X2.413000 Y13.292667
+G1 X2.159000 Y13.081000
+G1 X1.947333 Y12.827000
+G1 X1.947333 Y12.530667
+G1 X2.159000 Y12.276667
+G1 X2.413000 Y12.065000
+G1 X22.267333 Y12.065000
+G1 X22.606000 Y11.853333
+G1 X23.156333 Y11.853333
+G1 X23.495000 Y12.065000
+G1 X23.706667 Y12.403667
+G1 X23.706667 Y12.954000
+G1 X23.495000 Y13.292667
+G1 X23.156333 Y13.504333
+G1 X22.733000 Y13.546667
+G0 Z#100
+(polygon end, distance 45.38)
+(end, total distance 45.38mm = 1.79in)
+M5 M9 M2
diff --git a/tests/golden/hid_gcode1/gcode_oneline.gcode.bottom.cnc b/tests/golden/hid_gcode1/gcode_oneline.gcode.bottom.cnc
deleted file mode 100644
index 2031270..0000000
--- a/tests/golden/hid_gcode1/gcode_oneline.gcode.bottom.cnc
+++ /dev/null
@@ -1,34 +0,0 @@
-(Created by G-code exporter)
-( Tue Mar 9 17:31:54 2010 )
-(600 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=-0.050000 (cutting depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G0 Z#100
-(polygon 1)
-G0 X27.770667 Y13.546667 (start point)
-G1 Z#101
-G1 X27.559000 Y13.462000
-G1 X27.305000 Y13.292667
-G1 X7.450667 Y13.292667
-G1 X7.196667 Y13.081000
-G1 X6.985000 Y12.827000
-G1 X6.985000 Y12.530667
-G1 X7.196667 Y12.276667
-G1 X7.450667 Y12.065000
-G1 X27.305000 Y12.065000
-G1 X27.643667 Y11.853333
-G1 X28.194000 Y11.853333
-G1 X28.532667 Y12.065000
-G1 X28.744333 Y12.403667
-G1 X28.744333 Y12.954000
-G1 X28.532667 Y13.292667
-G1 X28.194000 Y13.504333
-G1 X27.770667 Y13.546667
-G0 Z#100
-(polygon end, distance 45.38)
-(end, total distance 45.38mm = 1.79in)
-M5 M9 M2
diff --git a/tests/golden/hid_gcode1/gcode_oneline.gcode.drill.cnc b/tests/golden/hid_gcode1/gcode_oneline.gcode.drill.cnc
deleted file mode 100644
index 63f6a2d..0000000
--- a/tests/golden/hid_gcode1/gcode_oneline.gcode.drill.cnc
+++ /dev/null
@@ -1,12 +0,0 @@
-(Created by G-code exporter)
-(drill file: 1 drills)
-( Tue Mar 9 17:31:54 2010 )
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=-2.000000 (drill depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G81 X27.940000 Y12.700000 Z#101 R#100
-M5 M9 M2
-(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode1/gcode_oneline.gcode.top.cnc b/tests/golden/hid_gcode1/gcode_oneline.gcode.top.cnc
deleted file mode 100644
index afd6cb2..0000000
--- a/tests/golden/hid_gcode1/gcode_oneline.gcode.top.cnc
+++ /dev/null
@@ -1,34 +0,0 @@
-(Created by G-code exporter)
-( Tue Mar 9 17:31:51 2010 )
-(600 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=-0.050000 (cutting depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G0 Z#100
-(polygon 1)
-G0 X22.733000 Y13.546667 (start point)
-G1 Z#101
-G1 X22.521333 Y13.462000
-G1 X22.267333 Y13.292667
-G1 X2.413000 Y13.292667
-G1 X2.159000 Y13.081000
-G1 X1.947333 Y12.827000
-G1 X1.947333 Y12.530667
-G1 X2.159000 Y12.276667
-G1 X2.413000 Y12.065000
-G1 X22.267333 Y12.065000
-G1 X22.606000 Y11.853333
-G1 X23.156333 Y11.853333
-G1 X23.495000 Y12.065000
-G1 X23.706667 Y12.403667
-G1 X23.706667 Y12.954000
-G1 X23.495000 Y13.292667
-G1 X23.156333 Y13.504333
-G1 X22.733000 Y13.546667
-G0 Z#100
-(polygon end, distance 45.38)
-(end, total distance 45.38mm = 1.79in)
-M5 M9 M2
diff --git a/tests/golden/hid_gcode10/gcode_oneline-bottom.gcode b/tests/golden/hid_gcode10/gcode_oneline-bottom.gcode
new file mode 100644
index 0000000..19a703d
--- /dev/null
+++ b/tests/golden/hid_gcode10/gcode_oneline-bottom.gcode
@@ -0,0 +1,34 @@
+(Created by G-code exporter)
+( Tue Mar 9 17:45:32 2010 )
+(600 dpi)
+(Unit: mm)
+(Board size: 50.80x25.40 mm)
+#100=0.002000 (safe Z)
+#101=-0.000050 (cutting depth)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G0 Z#100
+(polygon 1)
+G0 X27.770667 Y13.462000 (start point)
+G1 Z#101
+G1 X27.516667 Y13.335000
+G1 X27.347333 Y13.208000
+G1 X7.408333 Y13.165667
+G1 X7.112000 Y12.869333
+G1 X7.112000 Y12.488333
+G1 X7.408333 Y12.192000
+G1 X27.347333 Y12.149667
+G1 X27.643667 Y11.938000
+G1 X27.940000 Y11.895667
+G1 X28.278667 Y11.980333
+G1 X28.532667 Y12.192000
+G1 X28.702000 Y12.530667
+G1 X28.702000 Y12.827000
+G1 X28.532667 Y13.165667
+G1 X28.321000 Y13.335000
+G1 X28.024667 Y13.462000
+G1 X27.770667 Y13.462000
+G0 Z#100
+(polygon end, distance 44.84)
+(end, total distance 44.84mm = 1.77in)
+M5 M9 M2
diff --git a/tests/golden/hid_gcode10/gcode_oneline-drill.gcode b/tests/golden/hid_gcode10/gcode_oneline-drill.gcode
new file mode 100644
index 0000000..7deace0
--- /dev/null
+++ b/tests/golden/hid_gcode10/gcode_oneline-drill.gcode
@@ -0,0 +1,12 @@
+(Created by G-code exporter)
+(drill file: 1 drills)
+( Tue Mar 9 17:45:32 2010 )
+(Unit: mm)
+(Board size: 50.80x25.40 mm)
+#100=0.002000 (safe Z)
+#101=-0.002000 (drill depth)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G81 X27.940000 Y12.700000 Z#101 R#100
+M5 M9 M2
+(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode10/gcode_oneline-top.gcode b/tests/golden/hid_gcode10/gcode_oneline-top.gcode
new file mode 100644
index 0000000..a1d48bd
--- /dev/null
+++ b/tests/golden/hid_gcode10/gcode_oneline-top.gcode
@@ -0,0 +1,34 @@
+(Created by G-code exporter)
+( Tue Mar 9 17:45:28 2010 )
+(600 dpi)
+(Unit: mm)
+(Board size: 50.80x25.40 mm)
+#100=0.002000 (safe Z)
+#101=-0.000050 (cutting depth)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G0 Z#100
+(polygon 1)
+G0 X22.733000 Y13.462000 (start point)
+G1 Z#101
+G1 X22.479000 Y13.335000
+G1 X22.309667 Y13.208000
+G1 X2.370667 Y13.165667
+G1 X2.074333 Y12.869333
+G1 X2.074333 Y12.488333
+G1 X2.370667 Y12.192000
+G1 X22.309667 Y12.149667
+G1 X22.606000 Y11.938000
+G1 X22.902333 Y11.895667
+G1 X23.241000 Y11.980333
+G1 X23.495000 Y12.192000
+G1 X23.664333 Y12.530667
+G1 X23.664333 Y12.827000
+G1 X23.495000 Y13.165667
+G1 X23.283333 Y13.335000
+G1 X22.987000 Y13.462000
+G1 X22.733000 Y13.462000
+G0 Z#100
+(polygon end, distance 44.84)
+(end, total distance 44.84mm = 1.77in)
+M5 M9 M2
diff --git a/tests/golden/hid_gcode10/gcode_oneline.gcode.bottom.cnc b/tests/golden/hid_gcode10/gcode_oneline.gcode.bottom.cnc
deleted file mode 100644
index 19a703d..0000000
--- a/tests/golden/hid_gcode10/gcode_oneline.gcode.bottom.cnc
+++ /dev/null
@@ -1,34 +0,0 @@
-(Created by G-code exporter)
-( Tue Mar 9 17:45:32 2010 )
-(600 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=0.002000 (safe Z)
-#101=-0.000050 (cutting depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G0 Z#100
-(polygon 1)
-G0 X27.770667 Y13.462000 (start point)
-G1 Z#101
-G1 X27.516667 Y13.335000
-G1 X27.347333 Y13.208000
-G1 X7.408333 Y13.165667
-G1 X7.112000 Y12.869333
-G1 X7.112000 Y12.488333
-G1 X7.408333 Y12.192000
-G1 X27.347333 Y12.149667
-G1 X27.643667 Y11.938000
-G1 X27.940000 Y11.895667
-G1 X28.278667 Y11.980333
-G1 X28.532667 Y12.192000
-G1 X28.702000 Y12.530667
-G1 X28.702000 Y12.827000
-G1 X28.532667 Y13.165667
-G1 X28.321000 Y13.335000
-G1 X28.024667 Y13.462000
-G1 X27.770667 Y13.462000
-G0 Z#100
-(polygon end, distance 44.84)
-(end, total distance 44.84mm = 1.77in)
-M5 M9 M2
diff --git a/tests/golden/hid_gcode10/gcode_oneline.gcode.drill.cnc b/tests/golden/hid_gcode10/gcode_oneline.gcode.drill.cnc
deleted file mode 100644
index 7deace0..0000000
--- a/tests/golden/hid_gcode10/gcode_oneline.gcode.drill.cnc
+++ /dev/null
@@ -1,12 +0,0 @@
-(Created by G-code exporter)
-(drill file: 1 drills)
-( Tue Mar 9 17:45:32 2010 )
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=0.002000 (safe Z)
-#101=-0.002000 (drill depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G81 X27.940000 Y12.700000 Z#101 R#100
-M5 M9 M2
-(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode10/gcode_oneline.gcode.top.cnc b/tests/golden/hid_gcode10/gcode_oneline.gcode.top.cnc
deleted file mode 100644
index a1d48bd..0000000
--- a/tests/golden/hid_gcode10/gcode_oneline.gcode.top.cnc
+++ /dev/null
@@ -1,34 +0,0 @@
-(Created by G-code exporter)
-( Tue Mar 9 17:45:28 2010 )
-(600 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=0.002000 (safe Z)
-#101=-0.000050 (cutting depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G0 Z#100
-(polygon 1)
-G0 X22.733000 Y13.462000 (start point)
-G1 Z#101
-G1 X22.479000 Y13.335000
-G1 X22.309667 Y13.208000
-G1 X2.370667 Y13.165667
-G1 X2.074333 Y12.869333
-G1 X2.074333 Y12.488333
-G1 X2.370667 Y12.192000
-G1 X22.309667 Y12.149667
-G1 X22.606000 Y11.938000
-G1 X22.902333 Y11.895667
-G1 X23.241000 Y11.980333
-G1 X23.495000 Y12.192000
-G1 X23.664333 Y12.530667
-G1 X23.664333 Y12.827000
-G1 X23.495000 Y13.165667
-G1 X23.283333 Y13.335000
-G1 X22.987000 Y13.462000
-G1 X22.733000 Y13.462000
-G0 Z#100
-(polygon end, distance 44.84)
-(end, total distance 44.84mm = 1.77in)
-M5 M9 M2
diff --git a/tests/golden/hid_gcode11/gcode_oneline-bottom.gcode b/tests/golden/hid_gcode11/gcode_oneline-bottom.gcode
new file mode 100644
index 0000000..c144b05
--- /dev/null
+++ b/tests/golden/hid_gcode11/gcode_oneline-bottom.gcode
@@ -0,0 +1,49 @@
+(Created by G-code exporter)
+( Tue Mar 9 17:45:55 2010 )
+(600 dpi)
+(Unit: inch)
+(Board size: 2.00x1.00 inches)
+#100=2.000000 (safe Z)
+#101=-0.050000 (cutting depth)
+(---------------------------------)
+G17 G20 G90 G64 P0.003 M3 S3000 M7 F1
+G0 Z#100
+(polygon 1)
+G0 X1.085000 Y0.630000 (start point)
+G1 Z#101
+G1 X1.063333 Y0.625000
+G1 X1.055000 Y0.621667
+G1 X0.276667 Y0.618333
+G1 X0.251667 Y0.610000
+G1 X0.230000 Y0.598333
+G1 X0.200000 Y0.568333
+G1 X0.188333 Y0.546667
+G1 X0.180000 Y0.521667
+G1 X0.180000 Y0.476667
+G1 X0.188333 Y0.451667
+G1 X0.200000 Y0.430000
+G1 X0.230000 Y0.400000
+G1 X0.251667 Y0.388333
+G1 X0.276667 Y0.380000
+G1 X1.055000 Y0.376667
+G1 X1.068333 Y0.371667
+G1 X1.093333 Y0.368333
+G1 X1.121667 Y0.370000
+G1 X1.140000 Y0.375000
+G1 X1.171667 Y0.390000
+G1 X1.191667 Y0.406667
+G1 X1.208333 Y0.426667
+G1 X1.223333 Y0.458333
+G1 X1.228333 Y0.478333
+G1 X1.228333 Y0.520000
+G1 X1.223333 Y0.540000
+G1 X1.208333 Y0.571667
+G1 X1.191667 Y0.591667
+G1 X1.171667 Y0.608333
+G1 X1.140000 Y0.623333
+G1 X1.121667 Y0.628333
+G1 X1.085000 Y0.630000
+G0 Z#100
+(polygon end, distance 2.39)
+(end, total distance 60.74mm = 2.39in)
+M5 M9 M2
diff --git a/tests/golden/hid_gcode11/gcode_oneline-drill.gcode b/tests/golden/hid_gcode11/gcode_oneline-drill.gcode
new file mode 100644
index 0000000..37b9668
--- /dev/null
+++ b/tests/golden/hid_gcode11/gcode_oneline-drill.gcode
@@ -0,0 +1,12 @@
+(Created by G-code exporter)
+(drill file: 1 drills)
+( Tue Mar 9 17:45:55 2010 )
+(Unit: inch)
+(Board size: 2.00x1.00 inches)
+#100=2.000000 (safe Z)
+#101=-2.000000 (drill depth)
+(---------------------------------)
+G17 G20 G90 G64 P0.003 M3 S3000 M7 F1
+G81 X1.100000 Y0.500000 Z#101 R#100
+M5 M9 M2
+(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode11/gcode_oneline-top.gcode b/tests/golden/hid_gcode11/gcode_oneline-top.gcode
new file mode 100644
index 0000000..ddf7394
--- /dev/null
+++ b/tests/golden/hid_gcode11/gcode_oneline-top.gcode
@@ -0,0 +1,45 @@
+(Created by G-code exporter)
+( Tue Mar 9 17:45:43 2010 )
+(600 dpi)
+(Unit: inch)
+(Board size: 2.00x1.00 inches)
+#100=2.000000 (safe Z)
+#101=-0.050000 (cutting depth)
+(---------------------------------)
+G17 G20 G90 G64 P0.003 M3 S3000 M7 F1
+G0 Z#100
+(polygon 1)
+G0 X0.886667 Y0.630000 (start point)
+G1 Z#101
+G1 X0.865000 Y0.625000
+G1 X0.856667 Y0.621667
+G1 X0.078333 Y0.618333
+G1 X0.053333 Y0.610000
+G1 X0.031667 Y0.598333
+G1 X0.000000 Y0.566667
+G1 X0.000000 Y0.431667
+G1 X0.031667 Y0.400000
+G1 X0.053333 Y0.388333
+G1 X0.078333 Y0.380000
+G1 X0.856667 Y0.376667
+G1 X0.870000 Y0.371667
+G1 X0.895000 Y0.368333
+G1 X0.923333 Y0.370000
+G1 X0.941667 Y0.375000
+G1 X0.973333 Y0.390000
+G1 X0.993333 Y0.406667
+G1 X1.010000 Y0.426667
+G1 X1.025000 Y0.458333
+G1 X1.030000 Y0.478333
+G1 X1.030000 Y0.520000
+G1 X1.025000 Y0.540000
+G1 X1.010000 Y0.571667
+G1 X0.993333 Y0.591667
+G1 X0.973333 Y0.608333
+G1 X0.941667 Y0.623333
+G1 X0.923333 Y0.628333
+G1 X0.886667 Y0.630000
+G0 Z#100
+(polygon end, distance 2.38)
+(end, total distance 60.56mm = 2.38in)
+M5 M9 M2
diff --git a/tests/golden/hid_gcode11/gcode_oneline.gcode.bottom.cnc b/tests/golden/hid_gcode11/gcode_oneline.gcode.bottom.cnc
deleted file mode 100644
index c144b05..0000000
--- a/tests/golden/hid_gcode11/gcode_oneline.gcode.bottom.cnc
+++ /dev/null
@@ -1,49 +0,0 @@
-(Created by G-code exporter)
-( Tue Mar 9 17:45:55 2010 )
-(600 dpi)
-(Unit: inch)
-(Board size: 2.00x1.00 inches)
-#100=2.000000 (safe Z)
-#101=-0.050000 (cutting depth)
-(---------------------------------)
-G17 G20 G90 G64 P0.003 M3 S3000 M7 F1
-G0 Z#100
-(polygon 1)
-G0 X1.085000 Y0.630000 (start point)
-G1 Z#101
-G1 X1.063333 Y0.625000
-G1 X1.055000 Y0.621667
-G1 X0.276667 Y0.618333
-G1 X0.251667 Y0.610000
-G1 X0.230000 Y0.598333
-G1 X0.200000 Y0.568333
-G1 X0.188333 Y0.546667
-G1 X0.180000 Y0.521667
-G1 X0.180000 Y0.476667
-G1 X0.188333 Y0.451667
-G1 X0.200000 Y0.430000
-G1 X0.230000 Y0.400000
-G1 X0.251667 Y0.388333
-G1 X0.276667 Y0.380000
-G1 X1.055000 Y0.376667
-G1 X1.068333 Y0.371667
-G1 X1.093333 Y0.368333
-G1 X1.121667 Y0.370000
-G1 X1.140000 Y0.375000
-G1 X1.171667 Y0.390000
-G1 X1.191667 Y0.406667
-G1 X1.208333 Y0.426667
-G1 X1.223333 Y0.458333
-G1 X1.228333 Y0.478333
-G1 X1.228333 Y0.520000
-G1 X1.223333 Y0.540000
-G1 X1.208333 Y0.571667
-G1 X1.191667 Y0.591667
-G1 X1.171667 Y0.608333
-G1 X1.140000 Y0.623333
-G1 X1.121667 Y0.628333
-G1 X1.085000 Y0.630000
-G0 Z#100
-(polygon end, distance 2.39)
-(end, total distance 60.74mm = 2.39in)
-M5 M9 M2
diff --git a/tests/golden/hid_gcode11/gcode_oneline.gcode.drill.cnc b/tests/golden/hid_gcode11/gcode_oneline.gcode.drill.cnc
deleted file mode 100644
index 37b9668..0000000
--- a/tests/golden/hid_gcode11/gcode_oneline.gcode.drill.cnc
+++ /dev/null
@@ -1,12 +0,0 @@
-(Created by G-code exporter)
-(drill file: 1 drills)
-( Tue Mar 9 17:45:55 2010 )
-(Unit: inch)
-(Board size: 2.00x1.00 inches)
-#100=2.000000 (safe Z)
-#101=-2.000000 (drill depth)
-(---------------------------------)
-G17 G20 G90 G64 P0.003 M3 S3000 M7 F1
-G81 X1.100000 Y0.500000 Z#101 R#100
-M5 M9 M2
-(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode11/gcode_oneline.gcode.top.cnc b/tests/golden/hid_gcode11/gcode_oneline.gcode.top.cnc
deleted file mode 100644
index ddf7394..0000000
--- a/tests/golden/hid_gcode11/gcode_oneline.gcode.top.cnc
+++ /dev/null
@@ -1,45 +0,0 @@
-(Created by G-code exporter)
-( Tue Mar 9 17:45:43 2010 )
-(600 dpi)
-(Unit: inch)
-(Board size: 2.00x1.00 inches)
-#100=2.000000 (safe Z)
-#101=-0.050000 (cutting depth)
-(---------------------------------)
-G17 G20 G90 G64 P0.003 M3 S3000 M7 F1
-G0 Z#100
-(polygon 1)
-G0 X0.886667 Y0.630000 (start point)
-G1 Z#101
-G1 X0.865000 Y0.625000
-G1 X0.856667 Y0.621667
-G1 X0.078333 Y0.618333
-G1 X0.053333 Y0.610000
-G1 X0.031667 Y0.598333
-G1 X0.000000 Y0.566667
-G1 X0.000000 Y0.431667
-G1 X0.031667 Y0.400000
-G1 X0.053333 Y0.388333
-G1 X0.078333 Y0.380000
-G1 X0.856667 Y0.376667
-G1 X0.870000 Y0.371667
-G1 X0.895000 Y0.368333
-G1 X0.923333 Y0.370000
-G1 X0.941667 Y0.375000
-G1 X0.973333 Y0.390000
-G1 X0.993333 Y0.406667
-G1 X1.010000 Y0.426667
-G1 X1.025000 Y0.458333
-G1 X1.030000 Y0.478333
-G1 X1.030000 Y0.520000
-G1 X1.025000 Y0.540000
-G1 X1.010000 Y0.571667
-G1 X0.993333 Y0.591667
-G1 X0.973333 Y0.608333
-G1 X0.941667 Y0.623333
-G1 X0.923333 Y0.628333
-G1 X0.886667 Y0.630000
-G0 Z#100
-(polygon end, distance 2.38)
-(end, total distance 60.56mm = 2.38in)
-M5 M9 M2
diff --git a/tests/golden/hid_gcode2/out-bottom.gcode b/tests/golden/hid_gcode2/out-bottom.gcode
new file mode 100644
index 0000000..c3b0526
--- /dev/null
+++ b/tests/golden/hid_gcode2/out-bottom.gcode
@@ -0,0 +1,34 @@
+(Created by G-code exporter)
+( Tue Mar 9 17:35:19 2010 )
+(600 dpi)
+(Unit: mm)
+(Board size: 50.80x25.40 mm)
+#100=2.000000 (safe Z)
+#101=-0.050000 (cutting depth)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G0 Z#100
+(polygon 1)
+G0 X27.770667 Y13.546667 (start point)
+G1 Z#101
+G1 X27.559000 Y13.462000
+G1 X27.305000 Y13.292667
+G1 X7.450667 Y13.292667
+G1 X7.196667 Y13.081000
+G1 X6.985000 Y12.827000
+G1 X6.985000 Y12.530667
+G1 X7.196667 Y12.276667
+G1 X7.450667 Y12.065000
+G1 X27.305000 Y12.065000
+G1 X27.643667 Y11.853333
+G1 X28.194000 Y11.853333
+G1 X28.532667 Y12.065000
+G1 X28.744333 Y12.403667
+G1 X28.744333 Y12.954000
+G1 X28.532667 Y13.292667
+G1 X28.194000 Y13.504333
+G1 X27.770667 Y13.546667
+G0 Z#100
+(polygon end, distance 45.38)
+(end, total distance 45.38mm = 1.79in)
+M5 M9 M2
diff --git a/tests/golden/hid_gcode2/out-drill.gcode b/tests/golden/hid_gcode2/out-drill.gcode
new file mode 100644
index 0000000..f7c6d78
--- /dev/null
+++ b/tests/golden/hid_gcode2/out-drill.gcode
@@ -0,0 +1,12 @@
+(Created by G-code exporter)
+(drill file: 1 drills)
+( Tue Mar 9 17:35:19 2010 )
+(Unit: mm)
+(Board size: 50.80x25.40 mm)
+#100=2.000000 (safe Z)
+#101=-2.000000 (drill depth)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G81 X27.940000 Y12.700000 Z#101 R#100
+M5 M9 M2
+(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode2/out-top.gcode b/tests/golden/hid_gcode2/out-top.gcode
new file mode 100644
index 0000000..ca2b079
--- /dev/null
+++ b/tests/golden/hid_gcode2/out-top.gcode
@@ -0,0 +1,34 @@
+(Created by G-code exporter)
+( Tue Mar 9 17:35:16 2010 )
+(600 dpi)
+(Unit: mm)
+(Board size: 50.80x25.40 mm)
+#100=2.000000 (safe Z)
+#101=-0.050000 (cutting depth)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G0 Z#100
+(polygon 1)
+G0 X22.733000 Y13.546667 (start point)
+G1 Z#101
+G1 X22.521333 Y13.462000
+G1 X22.267333 Y13.292667
+G1 X2.413000 Y13.292667
+G1 X2.159000 Y13.081000
+G1 X1.947333 Y12.827000
+G1 X1.947333 Y12.530667
+G1 X2.159000 Y12.276667
+G1 X2.413000 Y12.065000
+G1 X22.267333 Y12.065000
+G1 X22.606000 Y11.853333
+G1 X23.156333 Y11.853333
+G1 X23.495000 Y12.065000
+G1 X23.706667 Y12.403667
+G1 X23.706667 Y12.954000
+G1 X23.495000 Y13.292667
+G1 X23.156333 Y13.504333
+G1 X22.733000 Y13.546667
+G0 Z#100
+(polygon end, distance 45.38)
+(end, total distance 45.38mm = 1.79in)
+M5 M9 M2
diff --git a/tests/golden/hid_gcode2/out.bottom.cnc b/tests/golden/hid_gcode2/out.bottom.cnc
deleted file mode 100644
index c3b0526..0000000
--- a/tests/golden/hid_gcode2/out.bottom.cnc
+++ /dev/null
@@ -1,34 +0,0 @@
-(Created by G-code exporter)
-( Tue Mar 9 17:35:19 2010 )
-(600 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=-0.050000 (cutting depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G0 Z#100
-(polygon 1)
-G0 X27.770667 Y13.546667 (start point)
-G1 Z#101
-G1 X27.559000 Y13.462000
-G1 X27.305000 Y13.292667
-G1 X7.450667 Y13.292667
-G1 X7.196667 Y13.081000
-G1 X6.985000 Y12.827000
-G1 X6.985000 Y12.530667
-G1 X7.196667 Y12.276667
-G1 X7.450667 Y12.065000
-G1 X27.305000 Y12.065000
-G1 X27.643667 Y11.853333
-G1 X28.194000 Y11.853333
-G1 X28.532667 Y12.065000
-G1 X28.744333 Y12.403667
-G1 X28.744333 Y12.954000
-G1 X28.532667 Y13.292667
-G1 X28.194000 Y13.504333
-G1 X27.770667 Y13.546667
-G0 Z#100
-(polygon end, distance 45.38)
-(end, total distance 45.38mm = 1.79in)
-M5 M9 M2
diff --git a/tests/golden/hid_gcode2/out.drill.cnc b/tests/golden/hid_gcode2/out.drill.cnc
deleted file mode 100644
index f7c6d78..0000000
--- a/tests/golden/hid_gcode2/out.drill.cnc
+++ /dev/null
@@ -1,12 +0,0 @@
-(Created by G-code exporter)
-(drill file: 1 drills)
-( Tue Mar 9 17:35:19 2010 )
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=-2.000000 (drill depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G81 X27.940000 Y12.700000 Z#101 R#100
-M5 M9 M2
-(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode2/out.top.cnc b/tests/golden/hid_gcode2/out.top.cnc
deleted file mode 100644
index ca2b079..0000000
--- a/tests/golden/hid_gcode2/out.top.cnc
+++ /dev/null
@@ -1,34 +0,0 @@
-(Created by G-code exporter)
-( Tue Mar 9 17:35:16 2010 )
-(600 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=-0.050000 (cutting depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G0 Z#100
-(polygon 1)
-G0 X22.733000 Y13.546667 (start point)
-G1 Z#101
-G1 X22.521333 Y13.462000
-G1 X22.267333 Y13.292667
-G1 X2.413000 Y13.292667
-G1 X2.159000 Y13.081000
-G1 X1.947333 Y12.827000
-G1 X1.947333 Y12.530667
-G1 X2.159000 Y12.276667
-G1 X2.413000 Y12.065000
-G1 X22.267333 Y12.065000
-G1 X22.606000 Y11.853333
-G1 X23.156333 Y11.853333
-G1 X23.495000 Y12.065000
-G1 X23.706667 Y12.403667
-G1 X23.706667 Y12.954000
-G1 X23.495000 Y13.292667
-G1 X23.156333 Y13.504333
-G1 X22.733000 Y13.546667
-G0 Z#100
-(polygon end, distance 45.38)
-(end, total distance 45.38mm = 1.79in)
-M5 M9 M2
diff --git a/tests/golden/hid_gcode3/gcode_oneline-bottom.gcode b/tests/golden/hid_gcode3/gcode_oneline-bottom.gcode
new file mode 100644
index 0000000..e67b085
--- /dev/null
+++ b/tests/golden/hid_gcode3/gcode_oneline-bottom.gcode
@@ -0,0 +1,40 @@
+(Created by G-code exporter)
+( Tue Mar 9 17:36:04 2010 )
+(1200 dpi)
+(Unit: mm)
+(Board size: 50.80x25.40 mm)
+#100=2.000000 (safe Z)
+#101=-0.050000 (cutting depth)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G0 Z#100
+(polygon 1)
+G0 X27.813000 Y13.546667 (start point)
+G1 Z#101
+G1 X27.664833 Y13.504333
+G1 X27.453167 Y13.398500
+G1 X27.326167 Y13.292667
+G1 X7.535333 Y13.292667
+G1 X7.323667 Y13.229167
+G1 X7.069667 Y12.975167
+G1 X7.006167 Y12.763500
+G1 X7.006167 Y12.615333
+G1 X7.069667 Y12.403667
+G1 X7.323667 Y12.149667
+G1 X7.535333 Y12.086167
+G1 X27.326167 Y12.086167
+G1 X27.495500 Y11.959167
+G1 X27.728333 Y11.853333
+G1 X28.130500 Y11.853333
+G1 X28.448000 Y12.001500
+G1 X28.638500 Y12.213167
+G1 X28.765500 Y12.488333
+G1 X28.765500 Y12.890500
+G1 X28.638500 Y13.165667
+G1 X28.448000 Y13.377333
+G1 X28.130500 Y13.525500
+G1 X27.813000 Y13.546667
+G0 Z#100
+(polygon end, distance 45.35)
+(end, total distance 45.35mm = 1.79in)
+M5 M9 M2
diff --git a/tests/golden/hid_gcode3/gcode_oneline-drill.gcode b/tests/golden/hid_gcode3/gcode_oneline-drill.gcode
new file mode 100644
index 0000000..e7be01d
--- /dev/null
+++ b/tests/golden/hid_gcode3/gcode_oneline-drill.gcode
@@ -0,0 +1,12 @@
+(Created by G-code exporter)
+(drill file: 1 drills)
+( Tue Mar 9 17:36:04 2010 )
+(Unit: mm)
+(Board size: 50.80x25.40 mm)
+#100=2.000000 (safe Z)
+#101=-2.000000 (drill depth)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G81 X27.940000 Y12.700000 Z#101 R#100
+M5 M9 M2
+(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode3/gcode_oneline-top.gcode b/tests/golden/hid_gcode3/gcode_oneline-top.gcode
new file mode 100644
index 0000000..d7c8c9f
--- /dev/null
+++ b/tests/golden/hid_gcode3/gcode_oneline-top.gcode
@@ -0,0 +1,40 @@
+(Created by G-code exporter)
+( Tue Mar 9 17:35:46 2010 )
+(1200 dpi)
+(Unit: mm)
+(Board size: 50.80x25.40 mm)
+#100=2.000000 (safe Z)
+#101=-0.050000 (cutting depth)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G0 Z#100
+(polygon 1)
+G0 X22.754167 Y13.546667 (start point)
+G1 Z#101
+G1 X22.606000 Y13.504333
+G1 X22.394333 Y13.398500
+G1 X22.267333 Y13.292667
+G1 X2.476500 Y13.292667
+G1 X2.264833 Y13.229167
+G1 X2.010833 Y12.975167
+G1 X1.947333 Y12.763500
+G1 X1.947333 Y12.615333
+G1 X2.010833 Y12.403667
+G1 X2.264833 Y12.149667
+G1 X2.476500 Y12.086167
+G1 X22.267333 Y12.086167
+G1 X22.436667 Y11.959167
+G1 X22.669500 Y11.853333
+G1 X23.071667 Y11.853333
+G1 X23.389167 Y12.001500
+G1 X23.579667 Y12.213167
+G1 X23.706667 Y12.488333
+G1 X23.706667 Y12.890500
+G1 X23.579667 Y13.165667
+G1 X23.389167 Y13.377333
+G1 X23.071667 Y13.525500
+G1 X22.754167 Y13.546667
+G0 Z#100
+(polygon end, distance 45.35)
+(end, total distance 45.35mm = 1.79in)
+M5 M9 M2
diff --git a/tests/golden/hid_gcode3/gcode_oneline.gcode.bottom.cnc b/tests/golden/hid_gcode3/gcode_oneline.gcode.bottom.cnc
deleted file mode 100644
index e67b085..0000000
--- a/tests/golden/hid_gcode3/gcode_oneline.gcode.bottom.cnc
+++ /dev/null
@@ -1,40 +0,0 @@
-(Created by G-code exporter)
-( Tue Mar 9 17:36:04 2010 )
-(1200 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=-0.050000 (cutting depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G0 Z#100
-(polygon 1)
-G0 X27.813000 Y13.546667 (start point)
-G1 Z#101
-G1 X27.664833 Y13.504333
-G1 X27.453167 Y13.398500
-G1 X27.326167 Y13.292667
-G1 X7.535333 Y13.292667
-G1 X7.323667 Y13.229167
-G1 X7.069667 Y12.975167
-G1 X7.006167 Y12.763500
-G1 X7.006167 Y12.615333
-G1 X7.069667 Y12.403667
-G1 X7.323667 Y12.149667
-G1 X7.535333 Y12.086167
-G1 X27.326167 Y12.086167
-G1 X27.495500 Y11.959167
-G1 X27.728333 Y11.853333
-G1 X28.130500 Y11.853333
-G1 X28.448000 Y12.001500
-G1 X28.638500 Y12.213167
-G1 X28.765500 Y12.488333
-G1 X28.765500 Y12.890500
-G1 X28.638500 Y13.165667
-G1 X28.448000 Y13.377333
-G1 X28.130500 Y13.525500
-G1 X27.813000 Y13.546667
-G0 Z#100
-(polygon end, distance 45.35)
-(end, total distance 45.35mm = 1.79in)
-M5 M9 M2
diff --git a/tests/golden/hid_gcode3/gcode_oneline.gcode.drill.cnc b/tests/golden/hid_gcode3/gcode_oneline.gcode.drill.cnc
deleted file mode 100644
index e7be01d..0000000
--- a/tests/golden/hid_gcode3/gcode_oneline.gcode.drill.cnc
+++ /dev/null
@@ -1,12 +0,0 @@
-(Created by G-code exporter)
-(drill file: 1 drills)
-( Tue Mar 9 17:36:04 2010 )
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=-2.000000 (drill depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G81 X27.940000 Y12.700000 Z#101 R#100
-M5 M9 M2
-(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode3/gcode_oneline.gcode.top.cnc b/tests/golden/hid_gcode3/gcode_oneline.gcode.top.cnc
deleted file mode 100644
index d7c8c9f..0000000
--- a/tests/golden/hid_gcode3/gcode_oneline.gcode.top.cnc
+++ /dev/null
@@ -1,40 +0,0 @@
-(Created by G-code exporter)
-( Tue Mar 9 17:35:46 2010 )
-(1200 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=-0.050000 (cutting depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G0 Z#100
-(polygon 1)
-G0 X22.754167 Y13.546667 (start point)
-G1 Z#101
-G1 X22.606000 Y13.504333
-G1 X22.394333 Y13.398500
-G1 X22.267333 Y13.292667
-G1 X2.476500 Y13.292667
-G1 X2.264833 Y13.229167
-G1 X2.010833 Y12.975167
-G1 X1.947333 Y12.763500
-G1 X1.947333 Y12.615333
-G1 X2.010833 Y12.403667
-G1 X2.264833 Y12.149667
-G1 X2.476500 Y12.086167
-G1 X22.267333 Y12.086167
-G1 X22.436667 Y11.959167
-G1 X22.669500 Y11.853333
-G1 X23.071667 Y11.853333
-G1 X23.389167 Y12.001500
-G1 X23.579667 Y12.213167
-G1 X23.706667 Y12.488333
-G1 X23.706667 Y12.890500
-G1 X23.579667 Y13.165667
-G1 X23.389167 Y13.377333
-G1 X23.071667 Y13.525500
-G1 X22.754167 Y13.546667
-G0 Z#100
-(polygon end, distance 45.35)
-(end, total distance 45.35mm = 1.79in)
-M5 M9 M2
diff --git a/tests/golden/hid_gcode4/gcode_oneline-bottom.gcode b/tests/golden/hid_gcode4/gcode_oneline-bottom.gcode
new file mode 100644
index 0000000..d049972
--- /dev/null
+++ b/tests/golden/hid_gcode4/gcode_oneline-bottom.gcode
@@ -0,0 +1,34 @@
+(Created by G-code exporter)
+( Tue Mar 9 17:36:12 2010 )
+(600 dpi)
+(Unit: mm)
+(Board size: 50.80x25.40 mm)
+#100=2.000000 (safe Z)
+#101=5.000000 (cutting depth)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G0 Z#100
+(polygon 1)
+G0 X27.770667 Y13.546667 (start point)
+G1 Z#101
+G1 X27.559000 Y13.462000
+G1 X27.305000 Y13.292667
+G1 X7.450667 Y13.292667
+G1 X7.196667 Y13.081000
+G1 X6.985000 Y12.827000
+G1 X6.985000 Y12.530667
+G1 X7.196667 Y12.276667
+G1 X7.450667 Y12.065000
+G1 X27.305000 Y12.065000
+G1 X27.643667 Y11.853333
+G1 X28.194000 Y11.853333
+G1 X28.532667 Y12.065000
+G1 X28.744333 Y12.403667
+G1 X28.744333 Y12.954000
+G1 X28.532667 Y13.292667
+G1 X28.194000 Y13.504333
+G1 X27.770667 Y13.546667
+G0 Z#100
+(polygon end, distance 45.38)
+(end, total distance 45.38mm = 1.79in)
+M5 M9 M2
diff --git a/tests/golden/hid_gcode4/gcode_oneline-drill.gcode b/tests/golden/hid_gcode4/gcode_oneline-drill.gcode
new file mode 100644
index 0000000..c648655
--- /dev/null
+++ b/tests/golden/hid_gcode4/gcode_oneline-drill.gcode
@@ -0,0 +1,12 @@
+(Created by G-code exporter)
+(drill file: 1 drills)
+( Tue Mar 9 17:36:12 2010 )
+(Unit: mm)
+(Board size: 50.80x25.40 mm)
+#100=2.000000 (safe Z)
+#101=-2.000000 (drill depth)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G81 X27.940000 Y12.700000 Z#101 R#100
+M5 M9 M2
+(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode4/gcode_oneline-top.gcode b/tests/golden/hid_gcode4/gcode_oneline-top.gcode
new file mode 100644
index 0000000..78e64a5
--- /dev/null
+++ b/tests/golden/hid_gcode4/gcode_oneline-top.gcode
@@ -0,0 +1,34 @@
+(Created by G-code exporter)
+( Tue Mar 9 17:36:08 2010 )
+(600 dpi)
+(Unit: mm)
+(Board size: 50.80x25.40 mm)
+#100=2.000000 (safe Z)
+#101=5.000000 (cutting depth)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G0 Z#100
+(polygon 1)
+G0 X22.733000 Y13.546667 (start point)
+G1 Z#101
+G1 X22.521333 Y13.462000
+G1 X22.267333 Y13.292667
+G1 X2.413000 Y13.292667
+G1 X2.159000 Y13.081000
+G1 X1.947333 Y12.827000
+G1 X1.947333 Y12.530667
+G1 X2.159000 Y12.276667
+G1 X2.413000 Y12.065000
+G1 X22.267333 Y12.065000
+G1 X22.606000 Y11.853333
+G1 X23.156333 Y11.853333
+G1 X23.495000 Y12.065000
+G1 X23.706667 Y12.403667
+G1 X23.706667 Y12.954000
+G1 X23.495000 Y13.292667
+G1 X23.156333 Y13.504333
+G1 X22.733000 Y13.546667
+G0 Z#100
+(polygon end, distance 45.38)
+(end, total distance 45.38mm = 1.79in)
+M5 M9 M2
diff --git a/tests/golden/hid_gcode4/gcode_oneline.gcode.bottom.cnc b/tests/golden/hid_gcode4/gcode_oneline.gcode.bottom.cnc
deleted file mode 100644
index d049972..0000000
--- a/tests/golden/hid_gcode4/gcode_oneline.gcode.bottom.cnc
+++ /dev/null
@@ -1,34 +0,0 @@
-(Created by G-code exporter)
-( Tue Mar 9 17:36:12 2010 )
-(600 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=5.000000 (cutting depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G0 Z#100
-(polygon 1)
-G0 X27.770667 Y13.546667 (start point)
-G1 Z#101
-G1 X27.559000 Y13.462000
-G1 X27.305000 Y13.292667
-G1 X7.450667 Y13.292667
-G1 X7.196667 Y13.081000
-G1 X6.985000 Y12.827000
-G1 X6.985000 Y12.530667
-G1 X7.196667 Y12.276667
-G1 X7.450667 Y12.065000
-G1 X27.305000 Y12.065000
-G1 X27.643667 Y11.853333
-G1 X28.194000 Y11.853333
-G1 X28.532667 Y12.065000
-G1 X28.744333 Y12.403667
-G1 X28.744333 Y12.954000
-G1 X28.532667 Y13.292667
-G1 X28.194000 Y13.504333
-G1 X27.770667 Y13.546667
-G0 Z#100
-(polygon end, distance 45.38)
-(end, total distance 45.38mm = 1.79in)
-M5 M9 M2
diff --git a/tests/golden/hid_gcode4/gcode_oneline.gcode.drill.cnc b/tests/golden/hid_gcode4/gcode_oneline.gcode.drill.cnc
deleted file mode 100644
index c648655..0000000
--- a/tests/golden/hid_gcode4/gcode_oneline.gcode.drill.cnc
+++ /dev/null
@@ -1,12 +0,0 @@
-(Created by G-code exporter)
-(drill file: 1 drills)
-( Tue Mar 9 17:36:12 2010 )
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=-2.000000 (drill depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G81 X27.940000 Y12.700000 Z#101 R#100
-M5 M9 M2
-(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode4/gcode_oneline.gcode.top.cnc b/tests/golden/hid_gcode4/gcode_oneline.gcode.top.cnc
deleted file mode 100644
index 78e64a5..0000000
--- a/tests/golden/hid_gcode4/gcode_oneline.gcode.top.cnc
+++ /dev/null
@@ -1,34 +0,0 @@
-(Created by G-code exporter)
-( Tue Mar 9 17:36:08 2010 )
-(600 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=5.000000 (cutting depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G0 Z#100
-(polygon 1)
-G0 X22.733000 Y13.546667 (start point)
-G1 Z#101
-G1 X22.521333 Y13.462000
-G1 X22.267333 Y13.292667
-G1 X2.413000 Y13.292667
-G1 X2.159000 Y13.081000
-G1 X1.947333 Y12.827000
-G1 X1.947333 Y12.530667
-G1 X2.159000 Y12.276667
-G1 X2.413000 Y12.065000
-G1 X22.267333 Y12.065000
-G1 X22.606000 Y11.853333
-G1 X23.156333 Y11.853333
-G1 X23.495000 Y12.065000
-G1 X23.706667 Y12.403667
-G1 X23.706667 Y12.954000
-G1 X23.495000 Y13.292667
-G1 X23.156333 Y13.504333
-G1 X22.733000 Y13.546667
-G0 Z#100
-(polygon end, distance 45.38)
-(end, total distance 45.38mm = 1.79in)
-M5 M9 M2
diff --git a/tests/golden/hid_gcode5/gcode_oneline-bottom.gcode b/tests/golden/hid_gcode5/gcode_oneline-bottom.gcode
new file mode 100644
index 0000000..8041f98
--- /dev/null
+++ b/tests/golden/hid_gcode5/gcode_oneline-bottom.gcode
@@ -0,0 +1,34 @@
+(Created by G-code exporter)
+( Tue Mar 9 18:06:42 2010 )
+(600 dpi)
+(Unit: mm)
+(Board size: 50.80x25.40 mm)
+#100=10.000000 (safe Z)
+#101=-0.050000 (cutting depth)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G0 Z#100
+(polygon 1)
+G0 X27.770667 Y13.546667 (start point)
+G1 Z#101
+G1 X27.559000 Y13.462000
+G1 X27.305000 Y13.292667
+G1 X7.450667 Y13.292667
+G1 X7.196667 Y13.081000
+G1 X6.985000 Y12.827000
+G1 X6.985000 Y12.530667
+G1 X7.196667 Y12.276667
+G1 X7.450667 Y12.065000
+G1 X27.305000 Y12.065000
+G1 X27.643667 Y11.853333
+G1 X28.194000 Y11.853333
+G1 X28.532667 Y12.065000
+G1 X28.744333 Y12.403667
+G1 X28.744333 Y12.954000
+G1 X28.532667 Y13.292667
+G1 X28.194000 Y13.504333
+G1 X27.770667 Y13.546667
+G0 Z#100
+(polygon end, distance 45.38)
+(end, total distance 45.38mm = 1.79in)
+M5 M9 M2
diff --git a/tests/golden/hid_gcode5/gcode_oneline-drill.gcode b/tests/golden/hid_gcode5/gcode_oneline-drill.gcode
new file mode 100644
index 0000000..77d8d60
--- /dev/null
+++ b/tests/golden/hid_gcode5/gcode_oneline-drill.gcode
@@ -0,0 +1,12 @@
+(Created by G-code exporter)
+(drill file: 1 drills)
+( Tue Mar 9 18:06:42 2010 )
+(Unit: mm)
+(Board size: 50.80x25.40 mm)
+#100=10.000000 (safe Z)
+#101=-2.000000 (drill depth)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G81 X27.940000 Y12.700000 Z#101 R#100
+M5 M9 M2
+(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode5/gcode_oneline-top.gcode b/tests/golden/hid_gcode5/gcode_oneline-top.gcode
new file mode 100644
index 0000000..e3bbd7e
--- /dev/null
+++ b/tests/golden/hid_gcode5/gcode_oneline-top.gcode
@@ -0,0 +1,34 @@
+(Created by G-code exporter)
+( Tue Mar 9 18:06:40 2010 )
+(600 dpi)
+(Unit: mm)
+(Board size: 50.80x25.40 mm)
+#100=10.000000 (safe Z)
+#101=-0.050000 (cutting depth)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G0 Z#100
+(polygon 1)
+G0 X22.733000 Y13.546667 (start point)
+G1 Z#101
+G1 X22.521333 Y13.462000
+G1 X22.267333 Y13.292667
+G1 X2.413000 Y13.292667
+G1 X2.159000 Y13.081000
+G1 X1.947333 Y12.827000
+G1 X1.947333 Y12.530667
+G1 X2.159000 Y12.276667
+G1 X2.413000 Y12.065000
+G1 X22.267333 Y12.065000
+G1 X22.606000 Y11.853333
+G1 X23.156333 Y11.853333
+G1 X23.495000 Y12.065000
+G1 X23.706667 Y12.403667
+G1 X23.706667 Y12.954000
+G1 X23.495000 Y13.292667
+G1 X23.156333 Y13.504333
+G1 X22.733000 Y13.546667
+G0 Z#100
+(polygon end, distance 45.38)
+(end, total distance 45.38mm = 1.79in)
+M5 M9 M2
diff --git a/tests/golden/hid_gcode5/gcode_oneline.gcode.bottom.cnc b/tests/golden/hid_gcode5/gcode_oneline.gcode.bottom.cnc
deleted file mode 100644
index 8041f98..0000000
--- a/tests/golden/hid_gcode5/gcode_oneline.gcode.bottom.cnc
+++ /dev/null
@@ -1,34 +0,0 @@
-(Created by G-code exporter)
-( Tue Mar 9 18:06:42 2010 )
-(600 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=10.000000 (safe Z)
-#101=-0.050000 (cutting depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G0 Z#100
-(polygon 1)
-G0 X27.770667 Y13.546667 (start point)
-G1 Z#101
-G1 X27.559000 Y13.462000
-G1 X27.305000 Y13.292667
-G1 X7.450667 Y13.292667
-G1 X7.196667 Y13.081000
-G1 X6.985000 Y12.827000
-G1 X6.985000 Y12.530667
-G1 X7.196667 Y12.276667
-G1 X7.450667 Y12.065000
-G1 X27.305000 Y12.065000
-G1 X27.643667 Y11.853333
-G1 X28.194000 Y11.853333
-G1 X28.532667 Y12.065000
-G1 X28.744333 Y12.403667
-G1 X28.744333 Y12.954000
-G1 X28.532667 Y13.292667
-G1 X28.194000 Y13.504333
-G1 X27.770667 Y13.546667
-G0 Z#100
-(polygon end, distance 45.38)
-(end, total distance 45.38mm = 1.79in)
-M5 M9 M2
diff --git a/tests/golden/hid_gcode5/gcode_oneline.gcode.drill.cnc b/tests/golden/hid_gcode5/gcode_oneline.gcode.drill.cnc
deleted file mode 100644
index 77d8d60..0000000
--- a/tests/golden/hid_gcode5/gcode_oneline.gcode.drill.cnc
+++ /dev/null
@@ -1,12 +0,0 @@
-(Created by G-code exporter)
-(drill file: 1 drills)
-( Tue Mar 9 18:06:42 2010 )
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=10.000000 (safe Z)
-#101=-2.000000 (drill depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G81 X27.940000 Y12.700000 Z#101 R#100
-M5 M9 M2
-(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode5/gcode_oneline.gcode.top.cnc b/tests/golden/hid_gcode5/gcode_oneline.gcode.top.cnc
deleted file mode 100644
index e3bbd7e..0000000
--- a/tests/golden/hid_gcode5/gcode_oneline.gcode.top.cnc
+++ /dev/null
@@ -1,34 +0,0 @@
-(Created by G-code exporter)
-( Tue Mar 9 18:06:40 2010 )
-(600 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=10.000000 (safe Z)
-#101=-0.050000 (cutting depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G0 Z#100
-(polygon 1)
-G0 X22.733000 Y13.546667 (start point)
-G1 Z#101
-G1 X22.521333 Y13.462000
-G1 X22.267333 Y13.292667
-G1 X2.413000 Y13.292667
-G1 X2.159000 Y13.081000
-G1 X1.947333 Y12.827000
-G1 X1.947333 Y12.530667
-G1 X2.159000 Y12.276667
-G1 X2.413000 Y12.065000
-G1 X22.267333 Y12.065000
-G1 X22.606000 Y11.853333
-G1 X23.156333 Y11.853333
-G1 X23.495000 Y12.065000
-G1 X23.706667 Y12.403667
-G1 X23.706667 Y12.954000
-G1 X23.495000 Y13.292667
-G1 X23.156333 Y13.504333
-G1 X22.733000 Y13.546667
-G0 Z#100
-(polygon end, distance 45.38)
-(end, total distance 45.38mm = 1.79in)
-M5 M9 M2
diff --git a/tests/golden/hid_gcode6/gcode_oneline-bottom.gcode b/tests/golden/hid_gcode6/gcode_oneline-bottom.gcode
new file mode 100644
index 0000000..7d33799
--- /dev/null
+++ b/tests/golden/hid_gcode6/gcode_oneline-bottom.gcode
@@ -0,0 +1,43 @@
+(Created by G-code exporter)
+( Tue Mar 9 17:45:05 2010 )
+(600 dpi)
+(Unit: mm)
+(Board size: 50.80x25.40 mm)
+#100=2.000000 (safe Z)
+#101=-0.050000 (cutting depth)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G0 Z#100
+(polygon 1)
+G0 X0.000000 Y25.400000 (start point)
+G1 Z#101
+G1 X0.000000 Y0.000000
+G1 X37.295667 Y0.000000
+G1 X38.057667 Y0.635000
+G1 X39.073667 Y1.524000
+G1 X39.962667 Y2.540000
+G1 X40.597667 Y3.302000
+G1 X41.486667 Y4.656667
+G1 X41.952333 Y5.503333
+G1 X42.418000 Y6.477000
+G1 X42.883667 Y7.704667
+G1 X43.264667 Y9.017000
+G1 X43.518667 Y10.329333
+G1 X43.645667 Y11.514667
+G1 X43.645667 Y13.843000
+G1 X43.518667 Y15.028333
+G1 X43.264667 Y16.340667
+G1 X42.883667 Y17.653000
+G1 X42.418000 Y18.880667
+G1 X41.952333 Y19.854333
+G1 X41.486667 Y20.701000
+G1 X40.597667 Y22.055667
+G1 X39.962667 Y22.817667
+G1 X39.073667 Y23.833667
+G1 X38.057667 Y24.722667
+G1 X37.253333 Y25.400000
+G1 X0.000000 Y25.400000
+G0 Z#100
+(polygon end, distance 129.45)
+(end, total distance 129.45mm = 5.10in)
+M5 M9 M2
diff --git a/tests/golden/hid_gcode6/gcode_oneline-drill.gcode b/tests/golden/hid_gcode6/gcode_oneline-drill.gcode
new file mode 100644
index 0000000..6b44265
--- /dev/null
+++ b/tests/golden/hid_gcode6/gcode_oneline-drill.gcode
@@ -0,0 +1,12 @@
+(Created by G-code exporter)
+(drill file: 1 drills)
+( Tue Mar 9 17:45:05 2010 )
+(Unit: mm)
+(Board size: 50.80x25.40 mm)
+#100=2.000000 (safe Z)
+#101=-2.000000 (drill depth)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G81 X27.940000 Y12.700000 Z#101 R#100
+M5 M9 M2
+(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode6/gcode_oneline-top.gcode b/tests/golden/hid_gcode6/gcode_oneline-top.gcode
new file mode 100644
index 0000000..7dfd6a0
--- /dev/null
+++ b/tests/golden/hid_gcode6/gcode_oneline-top.gcode
@@ -0,0 +1,43 @@
+(Created by G-code exporter)
+( Tue Mar 9 17:39:31 2010 )
+(600 dpi)
+(Unit: mm)
+(Board size: 50.80x25.40 mm)
+#100=2.000000 (safe Z)
+#101=-0.050000 (cutting depth)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G0 Z#100
+(polygon 1)
+G0 X0.000000 Y25.400000 (start point)
+G1 Z#101
+G1 X0.000000 Y0.000000
+G1 X32.258000 Y0.000000
+G1 X33.020000 Y0.635000
+G1 X34.036000 Y1.524000
+G1 X34.925000 Y2.540000
+G1 X35.560000 Y3.302000
+G1 X36.449000 Y4.656667
+G1 X36.914667 Y5.503333
+G1 X37.380333 Y6.477000
+G1 X37.846000 Y7.704667
+G1 X38.227000 Y9.017000
+G1 X38.481000 Y10.329333
+G1 X38.608000 Y11.514667
+G1 X38.608000 Y13.843000
+G1 X38.481000 Y15.028333
+G1 X38.227000 Y16.340667
+G1 X37.846000 Y17.653000
+G1 X37.380333 Y18.880667
+G1 X36.914667 Y19.854333
+G1 X36.449000 Y20.701000
+G1 X35.560000 Y22.055667
+G1 X34.925000 Y22.817667
+G1 X34.036000 Y23.833667
+G1 X33.020000 Y24.722667
+G1 X32.215667 Y25.400000
+G1 X0.000000 Y25.400000
+G0 Z#100
+(polygon end, distance 119.38)
+(end, total distance 119.38mm = 4.70in)
+M5 M9 M2
diff --git a/tests/golden/hid_gcode6/gcode_oneline.gcode.bottom.cnc b/tests/golden/hid_gcode6/gcode_oneline.gcode.bottom.cnc
deleted file mode 100644
index 7d33799..0000000
--- a/tests/golden/hid_gcode6/gcode_oneline.gcode.bottom.cnc
+++ /dev/null
@@ -1,43 +0,0 @@
-(Created by G-code exporter)
-( Tue Mar 9 17:45:05 2010 )
-(600 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=-0.050000 (cutting depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G0 Z#100
-(polygon 1)
-G0 X0.000000 Y25.400000 (start point)
-G1 Z#101
-G1 X0.000000 Y0.000000
-G1 X37.295667 Y0.000000
-G1 X38.057667 Y0.635000
-G1 X39.073667 Y1.524000
-G1 X39.962667 Y2.540000
-G1 X40.597667 Y3.302000
-G1 X41.486667 Y4.656667
-G1 X41.952333 Y5.503333
-G1 X42.418000 Y6.477000
-G1 X42.883667 Y7.704667
-G1 X43.264667 Y9.017000
-G1 X43.518667 Y10.329333
-G1 X43.645667 Y11.514667
-G1 X43.645667 Y13.843000
-G1 X43.518667 Y15.028333
-G1 X43.264667 Y16.340667
-G1 X42.883667 Y17.653000
-G1 X42.418000 Y18.880667
-G1 X41.952333 Y19.854333
-G1 X41.486667 Y20.701000
-G1 X40.597667 Y22.055667
-G1 X39.962667 Y22.817667
-G1 X39.073667 Y23.833667
-G1 X38.057667 Y24.722667
-G1 X37.253333 Y25.400000
-G1 X0.000000 Y25.400000
-G0 Z#100
-(polygon end, distance 129.45)
-(end, total distance 129.45mm = 5.10in)
-M5 M9 M2
diff --git a/tests/golden/hid_gcode6/gcode_oneline.gcode.drill.cnc b/tests/golden/hid_gcode6/gcode_oneline.gcode.drill.cnc
deleted file mode 100644
index 6b44265..0000000
--- a/tests/golden/hid_gcode6/gcode_oneline.gcode.drill.cnc
+++ /dev/null
@@ -1,12 +0,0 @@
-(Created by G-code exporter)
-(drill file: 1 drills)
-( Tue Mar 9 17:45:05 2010 )
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=-2.000000 (drill depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G81 X27.940000 Y12.700000 Z#101 R#100
-M5 M9 M2
-(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode6/gcode_oneline.gcode.top.cnc b/tests/golden/hid_gcode6/gcode_oneline.gcode.top.cnc
deleted file mode 100644
index 7dfd6a0..0000000
--- a/tests/golden/hid_gcode6/gcode_oneline.gcode.top.cnc
+++ /dev/null
@@ -1,43 +0,0 @@
-(Created by G-code exporter)
-( Tue Mar 9 17:39:31 2010 )
-(600 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=-0.050000 (cutting depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G0 Z#100
-(polygon 1)
-G0 X0.000000 Y25.400000 (start point)
-G1 Z#101
-G1 X0.000000 Y0.000000
-G1 X32.258000 Y0.000000
-G1 X33.020000 Y0.635000
-G1 X34.036000 Y1.524000
-G1 X34.925000 Y2.540000
-G1 X35.560000 Y3.302000
-G1 X36.449000 Y4.656667
-G1 X36.914667 Y5.503333
-G1 X37.380333 Y6.477000
-G1 X37.846000 Y7.704667
-G1 X38.227000 Y9.017000
-G1 X38.481000 Y10.329333
-G1 X38.608000 Y11.514667
-G1 X38.608000 Y13.843000
-G1 X38.481000 Y15.028333
-G1 X38.227000 Y16.340667
-G1 X37.846000 Y17.653000
-G1 X37.380333 Y18.880667
-G1 X36.914667 Y19.854333
-G1 X36.449000 Y20.701000
-G1 X35.560000 Y22.055667
-G1 X34.925000 Y22.817667
-G1 X34.036000 Y23.833667
-G1 X33.020000 Y24.722667
-G1 X32.215667 Y25.400000
-G1 X0.000000 Y25.400000
-G0 Z#100
-(polygon end, distance 119.38)
-(end, total distance 119.38mm = 4.70in)
-M5 M9 M2
diff --git a/tests/golden/hid_gcode7/gcode_oneline-bottom.gcode b/tests/golden/hid_gcode7/gcode_oneline-bottom.gcode
new file mode 100644
index 0000000..b92e532
--- /dev/null
+++ b/tests/golden/hid_gcode7/gcode_oneline-bottom.gcode
@@ -0,0 +1,34 @@
+(Created by G-code exporter)
+( Tue Mar 9 17:45:12 2010 )
+(600 dpi)
+(Unit: mm)
+(Board size: 50.80x25.40 mm)
+#100=2.000000 (safe Z)
+#101=-0.050000 (cutting depth)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G0 Z#100
+(polygon 1)
+G0 X27.770667 Y13.546667 (start point)
+G1 Z#101
+G1 X27.559000 Y13.462000
+G1 X27.305000 Y13.292667
+G1 X7.450667 Y13.292667
+G1 X7.196667 Y13.081000
+G1 X6.985000 Y12.827000
+G1 X6.985000 Y12.530667
+G1 X7.196667 Y12.276667
+G1 X7.450667 Y12.065000
+G1 X27.305000 Y12.065000
+G1 X27.643667 Y11.853333
+G1 X28.194000 Y11.853333
+G1 X28.532667 Y12.065000
+G1 X28.744333 Y12.403667
+G1 X28.744333 Y12.954000
+G1 X28.532667 Y13.292667
+G1 X28.194000 Y13.504333
+G1 X27.770667 Y13.546667
+G0 Z#100
+(polygon end, distance 45.38)
+(end, total distance 45.38mm = 1.79in)
+M5 M9 M2
diff --git a/tests/golden/hid_gcode7/gcode_oneline-drill.gcode b/tests/golden/hid_gcode7/gcode_oneline-drill.gcode
new file mode 100644
index 0000000..e8c41bf
--- /dev/null
+++ b/tests/golden/hid_gcode7/gcode_oneline-drill.gcode
@@ -0,0 +1,12 @@
+(Created by G-code exporter)
+(drill file: 1 drills)
+( Tue Mar 9 17:45:12 2010 )
+(Unit: mm)
+(Board size: 50.80x25.40 mm)
+#100=2.000000 (safe Z)
+#101=70.000000 (drill depth)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G81 X27.940000 Y12.700000 Z#101 R#100
+M5 M9 M2
+(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode7/gcode_oneline-top.gcode b/tests/golden/hid_gcode7/gcode_oneline-top.gcode
new file mode 100644
index 0000000..4c64804
--- /dev/null
+++ b/tests/golden/hid_gcode7/gcode_oneline-top.gcode
@@ -0,0 +1,34 @@
+(Created by G-code exporter)
+( Tue Mar 9 17:45:08 2010 )
+(600 dpi)
+(Unit: mm)
+(Board size: 50.80x25.40 mm)
+#100=2.000000 (safe Z)
+#101=-0.050000 (cutting depth)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G0 Z#100
+(polygon 1)
+G0 X22.733000 Y13.546667 (start point)
+G1 Z#101
+G1 X22.521333 Y13.462000
+G1 X22.267333 Y13.292667
+G1 X2.413000 Y13.292667
+G1 X2.159000 Y13.081000
+G1 X1.947333 Y12.827000
+G1 X1.947333 Y12.530667
+G1 X2.159000 Y12.276667
+G1 X2.413000 Y12.065000
+G1 X22.267333 Y12.065000
+G1 X22.606000 Y11.853333
+G1 X23.156333 Y11.853333
+G1 X23.495000 Y12.065000
+G1 X23.706667 Y12.403667
+G1 X23.706667 Y12.954000
+G1 X23.495000 Y13.292667
+G1 X23.156333 Y13.504333
+G1 X22.733000 Y13.546667
+G0 Z#100
+(polygon end, distance 45.38)
+(end, total distance 45.38mm = 1.79in)
+M5 M9 M2
diff --git a/tests/golden/hid_gcode7/gcode_oneline.gcode.bottom.cnc b/tests/golden/hid_gcode7/gcode_oneline.gcode.bottom.cnc
deleted file mode 100644
index b92e532..0000000
--- a/tests/golden/hid_gcode7/gcode_oneline.gcode.bottom.cnc
+++ /dev/null
@@ -1,34 +0,0 @@
-(Created by G-code exporter)
-( Tue Mar 9 17:45:12 2010 )
-(600 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=-0.050000 (cutting depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G0 Z#100
-(polygon 1)
-G0 X27.770667 Y13.546667 (start point)
-G1 Z#101
-G1 X27.559000 Y13.462000
-G1 X27.305000 Y13.292667
-G1 X7.450667 Y13.292667
-G1 X7.196667 Y13.081000
-G1 X6.985000 Y12.827000
-G1 X6.985000 Y12.530667
-G1 X7.196667 Y12.276667
-G1 X7.450667 Y12.065000
-G1 X27.305000 Y12.065000
-G1 X27.643667 Y11.853333
-G1 X28.194000 Y11.853333
-G1 X28.532667 Y12.065000
-G1 X28.744333 Y12.403667
-G1 X28.744333 Y12.954000
-G1 X28.532667 Y13.292667
-G1 X28.194000 Y13.504333
-G1 X27.770667 Y13.546667
-G0 Z#100
-(polygon end, distance 45.38)
-(end, total distance 45.38mm = 1.79in)
-M5 M9 M2
diff --git a/tests/golden/hid_gcode7/gcode_oneline.gcode.drill.cnc b/tests/golden/hid_gcode7/gcode_oneline.gcode.drill.cnc
deleted file mode 100644
index e8c41bf..0000000
--- a/tests/golden/hid_gcode7/gcode_oneline.gcode.drill.cnc
+++ /dev/null
@@ -1,12 +0,0 @@
-(Created by G-code exporter)
-(drill file: 1 drills)
-( Tue Mar 9 17:45:12 2010 )
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=70.000000 (drill depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G81 X27.940000 Y12.700000 Z#101 R#100
-M5 M9 M2
-(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode7/gcode_oneline.gcode.top.cnc b/tests/golden/hid_gcode7/gcode_oneline.gcode.top.cnc
deleted file mode 100644
index 4c64804..0000000
--- a/tests/golden/hid_gcode7/gcode_oneline.gcode.top.cnc
+++ /dev/null
@@ -1,34 +0,0 @@
-(Created by G-code exporter)
-( Tue Mar 9 17:45:08 2010 )
-(600 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=-0.050000 (cutting depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G0 Z#100
-(polygon 1)
-G0 X22.733000 Y13.546667 (start point)
-G1 Z#101
-G1 X22.521333 Y13.462000
-G1 X22.267333 Y13.292667
-G1 X2.413000 Y13.292667
-G1 X2.159000 Y13.081000
-G1 X1.947333 Y12.827000
-G1 X1.947333 Y12.530667
-G1 X2.159000 Y12.276667
-G1 X2.413000 Y12.065000
-G1 X22.267333 Y12.065000
-G1 X22.606000 Y11.853333
-G1 X23.156333 Y11.853333
-G1 X23.495000 Y12.065000
-G1 X23.706667 Y12.403667
-G1 X23.706667 Y12.954000
-G1 X23.495000 Y13.292667
-G1 X23.156333 Y13.504333
-G1 X22.733000 Y13.546667
-G0 Z#100
-(polygon end, distance 45.38)
-(end, total distance 45.38mm = 1.79in)
-M5 M9 M2
diff --git a/tests/golden/hid_gcode8/gcode_oneline-bottom.gcode b/tests/golden/hid_gcode8/gcode_oneline-bottom.gcode
new file mode 100644
index 0000000..286cab5
--- /dev/null
+++ b/tests/golden/hid_gcode8/gcode_oneline-bottom.gcode
@@ -0,0 +1,34 @@
+(Created by G-code exporter)
+( Tue Mar 9 17:45:19 2010 )
+(600 dpi)
+(Unit: mm)
+(Board size: 50.80x25.40 mm)
+#100=2.000000 (safe Z)
+#101=-0.050000 (cutting depth)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G0 Z#100
+(polygon 1)
+G0 X27.770667 Y13.546667 (start point)
+G1 Z#101
+G1 X27.559000 Y13.462000
+G1 X27.305000 Y13.292667
+G1 X7.450667 Y13.292667
+G1 X7.196667 Y13.081000
+G1 X6.985000 Y12.827000
+G1 X6.985000 Y12.530667
+G1 X7.196667 Y12.276667
+G1 X7.450667 Y12.065000
+G1 X27.305000 Y12.065000
+G1 X27.643667 Y11.853333
+G1 X28.194000 Y11.853333
+G1 X28.532667 Y12.065000
+G1 X28.744333 Y12.403667
+G1 X28.744333 Y12.954000
+G1 X28.532667 Y13.292667
+G1 X28.194000 Y13.504333
+G1 X27.770667 Y13.546667
+G0 Z#100
+(polygon end, distance 45.38)
+(end, total distance 45.38mm = 1.79in)
+M5 M9 M2
diff --git a/tests/golden/hid_gcode8/gcode_oneline-drill.gcode b/tests/golden/hid_gcode8/gcode_oneline-drill.gcode
new file mode 100644
index 0000000..77ac526
--- /dev/null
+++ b/tests/golden/hid_gcode8/gcode_oneline-drill.gcode
@@ -0,0 +1,12 @@
+(Created by G-code exporter)
+(drill file: 1 drills)
+( Tue Mar 9 17:45:19 2010 )
+(Unit: mm)
+(Board size: 50.80x25.40 mm)
+#100=2.000000 (safe Z)
+#101=-2.000000 (drill depth)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G81 X27.940000 Y12.700000 Z#101 R#100
+M5 M9 M2
+(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode8/gcode_oneline-top.gcode b/tests/golden/hid_gcode8/gcode_oneline-top.gcode
new file mode 100644
index 0000000..a57aeb7
--- /dev/null
+++ b/tests/golden/hid_gcode8/gcode_oneline-top.gcode
@@ -0,0 +1,34 @@
+(Created by G-code exporter)
+( Tue Mar 9 17:45:16 2010 )
+(600 dpi)
+(Unit: mm)
+(Board size: 50.80x25.40 mm)
+#100=2.000000 (safe Z)
+#101=-0.050000 (cutting depth)
+(---------------------------------)
+G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
+G0 Z#100
+(polygon 1)
+G0 X22.733000 Y13.546667 (start point)
+G1 Z#101
+G1 X22.521333 Y13.462000
+G1 X22.267333 Y13.292667
+G1 X2.413000 Y13.292667
+G1 X2.159000 Y13.081000
+G1 X1.947333 Y12.827000
+G1 X1.947333 Y12.530667
+G1 X2.159000 Y12.276667
+G1 X2.413000 Y12.065000
+G1 X22.267333 Y12.065000
+G1 X22.606000 Y11.853333
+G1 X23.156333 Y11.853333
+G1 X23.495000 Y12.065000
+G1 X23.706667 Y12.403667
+G1 X23.706667 Y12.954000
+G1 X23.495000 Y13.292667
+G1 X23.156333 Y13.504333
+G1 X22.733000 Y13.546667
+G0 Z#100
+(polygon end, distance 45.38)
+(end, total distance 45.38mm = 1.79in)
+M5 M9 M2
diff --git a/tests/golden/hid_gcode8/gcode_oneline.gcode.bottom.cnc b/tests/golden/hid_gcode8/gcode_oneline.gcode.bottom.cnc
deleted file mode 100644
index 286cab5..0000000
--- a/tests/golden/hid_gcode8/gcode_oneline.gcode.bottom.cnc
+++ /dev/null
@@ -1,34 +0,0 @@
-(Created by G-code exporter)
-( Tue Mar 9 17:45:19 2010 )
-(600 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=-0.050000 (cutting depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G0 Z#100
-(polygon 1)
-G0 X27.770667 Y13.546667 (start point)
-G1 Z#101
-G1 X27.559000 Y13.462000
-G1 X27.305000 Y13.292667
-G1 X7.450667 Y13.292667
-G1 X7.196667 Y13.081000
-G1 X6.985000 Y12.827000
-G1 X6.985000 Y12.530667
-G1 X7.196667 Y12.276667
-G1 X7.450667 Y12.065000
-G1 X27.305000 Y12.065000
-G1 X27.643667 Y11.853333
-G1 X28.194000 Y11.853333
-G1 X28.532667 Y12.065000
-G1 X28.744333 Y12.403667
-G1 X28.744333 Y12.954000
-G1 X28.532667 Y13.292667
-G1 X28.194000 Y13.504333
-G1 X27.770667 Y13.546667
-G0 Z#100
-(polygon end, distance 45.38)
-(end, total distance 45.38mm = 1.79in)
-M5 M9 M2
diff --git a/tests/golden/hid_gcode8/gcode_oneline.gcode.drill.cnc b/tests/golden/hid_gcode8/gcode_oneline.gcode.drill.cnc
deleted file mode 100644
index 77ac526..0000000
--- a/tests/golden/hid_gcode8/gcode_oneline.gcode.drill.cnc
+++ /dev/null
@@ -1,12 +0,0 @@
-(Created by G-code exporter)
-(drill file: 1 drills)
-( Tue Mar 9 17:45:19 2010 )
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=-2.000000 (drill depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G81 X27.940000 Y12.700000 Z#101 R#100
-M5 M9 M2
-(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode8/gcode_oneline.gcode.top.cnc b/tests/golden/hid_gcode8/gcode_oneline.gcode.top.cnc
deleted file mode 100644
index a57aeb7..0000000
--- a/tests/golden/hid_gcode8/gcode_oneline.gcode.top.cnc
+++ /dev/null
@@ -1,34 +0,0 @@
-(Created by G-code exporter)
-( Tue Mar 9 17:45:16 2010 )
-(600 dpi)
-(Unit: mm)
-(Board size: 50.80x25.40 mm)
-#100=2.000000 (safe Z)
-#101=-0.050000 (cutting depth)
-(---------------------------------)
-G17 G21 G90 G64 P0.003 M3 S3000 M7 F25
-G0 Z#100
-(polygon 1)
-G0 X22.733000 Y13.546667 (start point)
-G1 Z#101
-G1 X22.521333 Y13.462000
-G1 X22.267333 Y13.292667
-G1 X2.413000 Y13.292667
-G1 X2.159000 Y13.081000
-G1 X1.947333 Y12.827000
-G1 X1.947333 Y12.530667
-G1 X2.159000 Y12.276667
-G1 X2.413000 Y12.065000
-G1 X22.267333 Y12.065000
-G1 X22.606000 Y11.853333
-G1 X23.156333 Y11.853333
-G1 X23.495000 Y12.065000
-G1 X23.706667 Y12.403667
-G1 X23.706667 Y12.954000
-G1 X23.495000 Y13.292667
-G1 X23.156333 Y13.504333
-G1 X22.733000 Y13.546667
-G0 Z#100
-(polygon end, distance 45.38)
-(end, total distance 45.38mm = 1.79in)
-M5 M9 M2
diff --git a/tests/golden/hid_gcode9/gcode_oneline-bottom.gcode b/tests/golden/hid_gcode9/gcode_oneline-bottom.gcode
new file mode 100644
index 0000000..49ebcd5
--- /dev/null
+++ b/tests/golden/hid_gcode9/gcode_oneline-bottom.gcode
@@ -0,0 +1,34 @@
+(Created by G-code exporter)
+( Tue Mar 9 17:45:25 2010 )
+(600 dpi)
+(Unit: inch)
+(Board size: 2.00x1.00 inches)
+#100=0.002000 (safe Z)
+#101=-0.000050 (cutting depth)
+(---------------------------------)
+G17 G20 G90 G64 P0.003 M3 S3000 M7 F1
+G0 Z#100
+(polygon 1)
+G0 X1.093333 Y0.530000 (start point)
+G1 Z#101
+G1 X1.083333 Y0.525000
+G1 X1.076667 Y0.520000
+G1 X0.291667 Y0.518333
+G1 X0.280000 Y0.506667
+G1 X0.280000 Y0.491667
+G1 X0.291667 Y0.480000
+G1 X1.076667 Y0.478333
+G1 X1.088333 Y0.470000
+G1 X1.100000 Y0.468333
+G1 X1.113333 Y0.471667
+G1 X1.123333 Y0.480000
+G1 X1.130000 Y0.493333
+G1 X1.130000 Y0.505000
+G1 X1.123333 Y0.518333
+G1 X1.115000 Y0.525000
+G1 X1.103333 Y0.530000
+G1 X1.093333 Y0.530000
+G0 Z#100
+(polygon end, distance 1.77)
+(end, total distance 44.84mm = 1.77in)
+M5 M9 M2
diff --git a/tests/golden/hid_gcode9/gcode_oneline-drill.gcode b/tests/golden/hid_gcode9/gcode_oneline-drill.gcode
new file mode 100644
index 0000000..c4b730a
--- /dev/null
+++ b/tests/golden/hid_gcode9/gcode_oneline-drill.gcode
@@ -0,0 +1,12 @@
+(Created by G-code exporter)
+(drill file: 1 drills)
+( Tue Mar 9 17:45:25 2010 )
+(Unit: inch)
+(Board size: 2.00x1.00 inches)
+#100=0.002000 (safe Z)
+#101=-0.002000 (drill depth)
+(---------------------------------)
+G17 G20 G90 G64 P0.003 M3 S3000 M7 F1
+G81 X1.100000 Y0.500000 Z#101 R#100
+M5 M9 M2
+(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode9/gcode_oneline-top.gcode b/tests/golden/hid_gcode9/gcode_oneline-top.gcode
new file mode 100644
index 0000000..638cec1
--- /dev/null
+++ b/tests/golden/hid_gcode9/gcode_oneline-top.gcode
@@ -0,0 +1,34 @@
+(Created by G-code exporter)
+( Tue Mar 9 17:45:22 2010 )
+(600 dpi)
+(Unit: inch)
+(Board size: 2.00x1.00 inches)
+#100=0.002000 (safe Z)
+#101=-0.000050 (cutting depth)
+(---------------------------------)
+G17 G20 G90 G64 P0.003 M3 S3000 M7 F1
+G0 Z#100
+(polygon 1)
+G0 X0.895000 Y0.530000 (start point)
+G1 Z#101
+G1 X0.885000 Y0.525000
+G1 X0.878333 Y0.520000
+G1 X0.093333 Y0.518333
+G1 X0.081667 Y0.506667
+G1 X0.081667 Y0.491667
+G1 X0.093333 Y0.480000
+G1 X0.878333 Y0.478333
+G1 X0.890000 Y0.470000
+G1 X0.901667 Y0.468333
+G1 X0.915000 Y0.471667
+G1 X0.925000 Y0.480000
+G1 X0.931667 Y0.493333
+G1 X0.931667 Y0.505000
+G1 X0.925000 Y0.518333
+G1 X0.916667 Y0.525000
+G1 X0.905000 Y0.530000
+G1 X0.895000 Y0.530000
+G0 Z#100
+(polygon end, distance 1.77)
+(end, total distance 44.84mm = 1.77in)
+M5 M9 M2
diff --git a/tests/golden/hid_gcode9/gcode_oneline.gcode.bottom.cnc b/tests/golden/hid_gcode9/gcode_oneline.gcode.bottom.cnc
deleted file mode 100644
index 49ebcd5..0000000
--- a/tests/golden/hid_gcode9/gcode_oneline.gcode.bottom.cnc
+++ /dev/null
@@ -1,34 +0,0 @@
-(Created by G-code exporter)
-( Tue Mar 9 17:45:25 2010 )
-(600 dpi)
-(Unit: inch)
-(Board size: 2.00x1.00 inches)
-#100=0.002000 (safe Z)
-#101=-0.000050 (cutting depth)
-(---------------------------------)
-G17 G20 G90 G64 P0.003 M3 S3000 M7 F1
-G0 Z#100
-(polygon 1)
-G0 X1.093333 Y0.530000 (start point)
-G1 Z#101
-G1 X1.083333 Y0.525000
-G1 X1.076667 Y0.520000
-G1 X0.291667 Y0.518333
-G1 X0.280000 Y0.506667
-G1 X0.280000 Y0.491667
-G1 X0.291667 Y0.480000
-G1 X1.076667 Y0.478333
-G1 X1.088333 Y0.470000
-G1 X1.100000 Y0.468333
-G1 X1.113333 Y0.471667
-G1 X1.123333 Y0.480000
-G1 X1.130000 Y0.493333
-G1 X1.130000 Y0.505000
-G1 X1.123333 Y0.518333
-G1 X1.115000 Y0.525000
-G1 X1.103333 Y0.530000
-G1 X1.093333 Y0.530000
-G0 Z#100
-(polygon end, distance 1.77)
-(end, total distance 44.84mm = 1.77in)
-M5 M9 M2
diff --git a/tests/golden/hid_gcode9/gcode_oneline.gcode.drill.cnc b/tests/golden/hid_gcode9/gcode_oneline.gcode.drill.cnc
deleted file mode 100644
index c4b730a..0000000
--- a/tests/golden/hid_gcode9/gcode_oneline.gcode.drill.cnc
+++ /dev/null
@@ -1,12 +0,0 @@
-(Created by G-code exporter)
-(drill file: 1 drills)
-( Tue Mar 9 17:45:25 2010 )
-(Unit: inch)
-(Board size: 2.00x1.00 inches)
-#100=0.002000 (safe Z)
-#101=-0.002000 (drill depth)
-(---------------------------------)
-G17 G20 G90 G64 P0.003 M3 S3000 M7 F1
-G81 X1.100000 Y0.500000 Z#101 R#100
-M5 M9 M2
-(end, total distance 0.00mm = 0.00in)
diff --git a/tests/golden/hid_gcode9/gcode_oneline.gcode.top.cnc b/tests/golden/hid_gcode9/gcode_oneline.gcode.top.cnc
deleted file mode 100644
index 638cec1..0000000
--- a/tests/golden/hid_gcode9/gcode_oneline.gcode.top.cnc
+++ /dev/null
@@ -1,34 +0,0 @@
-(Created by G-code exporter)
-( Tue Mar 9 17:45:22 2010 )
-(600 dpi)
-(Unit: inch)
-(Board size: 2.00x1.00 inches)
-#100=0.002000 (safe Z)
-#101=-0.000050 (cutting depth)
-(---------------------------------)
-G17 G20 G90 G64 P0.003 M3 S3000 M7 F1
-G0 Z#100
-(polygon 1)
-G0 X0.895000 Y0.530000 (start point)
-G1 Z#101
-G1 X0.885000 Y0.525000
-G1 X0.878333 Y0.520000
-G1 X0.093333 Y0.518333
-G1 X0.081667 Y0.506667
-G1 X0.081667 Y0.491667
-G1 X0.093333 Y0.480000
-G1 X0.878333 Y0.478333
-G1 X0.890000 Y0.470000
-G1 X0.901667 Y0.468333
-G1 X0.915000 Y0.471667
-G1 X0.925000 Y0.480000
-G1 X0.931667 Y0.493333
-G1 X0.931667 Y0.505000
-G1 X0.925000 Y0.518333
-G1 X0.916667 Y0.525000
-G1 X0.905000 Y0.530000
-G1 X0.895000 Y0.530000
-G0 Z#100
-(polygon end, distance 1.77)
-(end, total distance 44.84mm = 1.77in)
-M5 M9 M2
diff --git a/tests/tests.list b/tests/tests.list
index 3433452..422e8e5 100644
--- a/tests/tests.list
+++ b/tests/tests.list
@@ -106,17 +106,17 @@ hid_bom4 | bom_general.pcb | bom | --xy-in-mm | | bom:bom_general.bom xy:bom_ge
# --drill depth <num> Drilling depth.
# --measurement unit <mm|mil|um|inch> Measurement unit
#
-hid_gcode1 | gcode_oneline.pcb | gcode | | | gcode:gcode_oneline.gcode.top.cnc gcode:gcode_oneline.gcode.bottom.cnc gcode:gcode_oneline.gcode.drill.cnc
-hid_gcode2 | gcode_oneline.pcb | gcode | --basename out | | gcode:out.top.cnc gcode:out.bottom.cnc gcode:out.drill.cnc
-hid_gcode3 | gcode_oneline.pcb | gcode | --dpi 1200 | | gcode:gcode_oneline.gcode.top.cnc gcode:gcode_oneline.gcode.bottom.cnc gcode:gcode_oneline.gcode.drill.cnc
-hid_gcode4 | gcode_oneline.pcb | gcode | --mill-depth 5 | | gcode:gcode_oneline.gcode.top.cnc gcode:gcode_oneline.gcode.bottom.cnc gcode:gcode_oneline.gcode.drill.cnc
-hid_gcode5 | gcode_oneline.pcb | gcode | --safe-Z 10 | | gcode:gcode_oneline.gcode.top.cnc gcode:gcode_oneline.gcode.bottom.cnc gcode:gcode_oneline.gcode.drill.cnc
-hid_gcode6 | gcode_oneline.pcb | gcode | --tool-radius 15 | | gcode:gcode_oneline.gcode.top.cnc gcode:gcode_oneline.gcode.bottom.cnc gcode:gcode_oneline.gcode.drill.cnc
-hid_gcode7 | gcode_oneline.pcb | gcode | --drill-depth 70 | | gcode:gcode_oneline.gcode.top.cnc gcode:gcode_oneline.gcode.bottom.cnc gcode:gcode_oneline.gcode.drill.cnc
-hid_gcode8 | gcode_oneline.pcb | gcode | --measurement-unit mm | | gcode:gcode_oneline.gcode.top.cnc gcode:gcode_oneline.gcode.bottom.cnc gcode:gcode_oneline.gcode.drill.cnc
-hid_gcode9 | gcode_oneline.pcb | gcode | --measurement-unit mil | | gcode:gcode_oneline.gcode.top.cnc gcode:gcode_oneline.gcode.bottom.cnc gcode:gcode_oneline.gcode.drill.cnc
-hid_gcode10 | gcode_oneline.pcb | gcode | --measurement-unit um | | gcode:gcode_oneline.gcode.top.cnc gcode:gcode_oneline.gcode.bottom.cnc gcode:gcode_oneline.gcode.drill.cnc
-hid_gcode11 | gcode_oneline.pcb | gcode | --measurement-unit inch | | gcode:gcode_oneline.gcode.top.cnc gcode:gcode_oneline.gcode.bottom.cnc gcode:gcode_oneline.gcode.drill.cnc
+hid_gcode1 | gcode_oneline.pcb | gcode | | | gcode:gcode_oneline-top.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-drill.gcode
+hid_gcode2 | gcode_oneline.pcb | gcode | --basename out.gcode | | gcode:out-top.gcode gcode:out-bottom.gcode gcode:out-drill.gcode
+hid_gcode3 | gcode_oneline.pcb | gcode | --dpi 1200 | | gcode:gcode_oneline-top.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-drill.gcode
+hid_gcode4 | gcode_oneline.pcb | gcode | --mill-depth 5 | | gcode:gcode_oneline-top.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-drill.gcode
+hid_gcode5 | gcode_oneline.pcb | gcode | --safe-Z 10 | | gcode:gcode_oneline-top.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-drill.gcode
+hid_gcode6 | gcode_oneline.pcb | gcode | --tool-radius 15 | | gcode:gcode_oneline-top.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-drill.gcode
+hid_gcode7 | gcode_oneline.pcb | gcode | --drill-depth 70 | | gcode:gcode_oneline-top.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-drill.gcode
+hid_gcode8 | gcode_oneline.pcb | gcode | --measurement-unit mm | | gcode:gcode_oneline-top.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-drill.gcode
+hid_gcode9 | gcode_oneline.pcb | gcode | --measurement-unit mil | | gcode:gcode_oneline-top.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-drill.gcode
+hid_gcode10 | gcode_oneline.pcb | gcode | --measurement-unit um | | gcode:gcode_oneline-top.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-drill.gcode
+hid_gcode11 | gcode_oneline.pcb | gcode | --measurement-unit inch | | gcode:gcode_oneline-top.gcode gcode:gcode_oneline-bottom.gcode gcode:gcode_oneline-drill.gcode
#
######################################################################
# ---------------------------------------------
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs