gcode tests fail
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pcb |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Hi,
Running the pcb testsuite, some of the gcode tests fail:
<output>
Test: hid_gcode1
../../.
PASSED
-------
Test: hid_gcode2
../../.
PASSED
-------
Test: hid_gcode3
../../.
--- /tmp/pcb_
+++ /tmp/pcb_
@@ -35,6 +35,6 @@
G1 X28.765500 Y12.488333
G1 X28.765500 Y12.890500
-G1 X28.638500 Y13.165667
-G1 X28.448000 Y13.377333
+G1 X28.617333 Y13.208000
+G1 X28.405667 Y13.398500
G1 X28.130500 Y13.525500
G1 X27.813000 Y13.546667
--- /tmp/pcb_
+++ /tmp/pcb_
@@ -35,6 +35,6 @@
G1 X23.706667 Y12.488333
G1 X23.706667 Y12.890500
-G1 X23.579667 Y13.165667
-G1 X23.389167 Y13.377333
+G1 X23.558500 Y13.208000
+G1 X23.346833 Y13.398500
G1 X23.071667 Y13.525500
G1 X22.754167 Y13.546667
FAIL
-------
Test: hid_gcode4
../../.
--- /tmp/pcb_
+++ /tmp/pcb_
@@ -5,5 +5,5 @@
(Tool diameter: 0.200000 mm)
#100=2.000000 (safe Z)
-#101=0.000000 (cutting depth)
+#101=0.500000 (cutting depth)
#102=25.000000 (plunge feedrate)
#103=50.000000 (feedrate)
--- /tmp/pcb_
+++ /tmp/pcb_
@@ -5,5 +5,5 @@
(Tool diameter: 0.200000 mm)
#100=2.000000 (safe Z)
-#101=0.000000 (cutting depth)
+#101=0.500000 (cutting depth)
#102=25.000000 (plunge feedrate)
#103=50.000000 (feedrate)
FAIL
-------
Test: hid_gcode5
../../.
PASSED
-------
Test: hid_gcode6
../../.
--- /tmp/pcb_
+++ /tmp/pcb_
@@ -3,5 +3,5 @@
(Board size: 50.80 x 25.40 mm)
(Accuracy 600 dpi)
-(Tool diameter: 0.000000 mm)
+(Tool diameter: 0.400000 mm)
#100=2.000000 (safe Z)
#101=-0.050000 (cutting depth)
@@ -13,30 +13,29 @@
G0 Z#100
(polygon 1)
-G0 X27.770667 Y13.462000 (start point)
+G0 X27.728333 Y13.631333 (start point)
G1 Z#101 F#102
F#103
-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
+G1 X27.347333 Y13.419667
+G1 X7.493000 Y13.419667
+G1 X7.112000 Y13.250333
+G1 X6.900333 Y12.911667
+G1 X6.900333 Y12.446000
+G1 X7.112000 Y12.107333
+G1 X7.493000 Y11.938000
+G1 X27.305000 Y11.938000
+G1 X27.770667 Y11.726333
+G1 X28.194000 Y11.768667
+G1 X28.575000 Y12.022667
+G1 X28.829000 Y12.403667
+G1 X28.829000 Y12.954000
+G1 X28.575000 Y13.335000
+G1 X28.194000 Y13.589000
+G1 X27.728333 Y13.631333
G0 Z#100
-(polygon end, distance 44.84)
+(polygon end, distance 45.99)
(predrilling)
F#102
G81 X27.940000 Y12.700000 Z#101 R#100
(1 predrills)
-(milling distance 44.84mm = 1.77in)
+(milling distance 45.99mm = 1.81in)
M5 M9 M2
--- /tmp/pcb_
+++ /tmp/pcb_
@@ -3,5 +3,5 @@
(Board size: 50.80 x 25.40 mm)
(Accuracy 600 dpi)
-(Tool diameter: 0.000000 mm)
+(Tool diameter: 0.400000 mm)
#100=2.000000 (safe Z)
#101=-0.050000 (cutting depth)
@@ -13,26 +13,25 @@
G0 Z#100
(polygon 1)
-G0 X22.733000 Y13.462000 (start point)
+G0 X22.690667 Y13.631333 (start point)
G1 Z#101 F#102
F#103
-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
+G1 X22.309667 Y13.419667
+G1 X2.455333 Y13.419667
+G1 X2.074333 Y13.250333
+G1 X1.862667 Y12.911667
+G1 X1.862667 Y12.446000
+G1 X2.074333 Y12.107333
+G1 X2.455333 Y11.938000
+G1 X22.267333 Y11.938000
+G1 X22.733000 Y11.726333
+G1 X23.156333 Y11.768667
+G1 X23.537333 Y12.022667
+G1 X23.791333 Y12.403667
+G1 X23.791333 Y12.954000
+G1 X23.537333 Y13.335000
+G1 X23.156333 Y13.589000
+G1 X22.690667 Y13.631333
G0 Z#100
-(polygon end, distance 44.84)
-(milling distance 44.84mm = 1.77in)
+(polygon end, distance 45.99)
+(milling distance 45.99mm = 1.81in)
M5 M9 M2
FAIL
-------
Test: hid_gcode7
../../.
PASSED
-------
Test: hid_gcode8
../../.
PASSED
-------
Test: hid_gcode9
../../.
PASSED
-------
Test: hid_gcode10
../../.
PASSED
-------
Test: hid_gcode11
../../.
PASSED
</output>
I notice that:
- it looks like the date/time stamp is not normalised in a proper way,
- round-offs are occurring,
- tool diameter dimensions differ beyond round-off tolerances.
Running at git-HEAD commit:
5722ae0a55832f5
gocde HID: refresh all the G-code exporter tests.
Distro: Fedora-13 (patches and updates are up-to-date).
Kind regards,
Bert Timmerman.
description: | updated |
description: | updated |
Changed in pcb: | |
importance: | Undecided → Low |
Changed in geda-project: | |
importance: | Undecided → High |
status: | New → Fix Released |
no longer affects: | pcb |
affects: | geda-project → pcb |
Changed in pcb: | |
status: | Fix Released → Fix Committed |
importance: | High → Medium |
milestone: | none → next-bug-release |
Changed in pcb: | |
status: | Fix Committed → Fix Released |
Hello, Bert.
I've found that there are two different bugs here. The hid_gcode4
and hid_gcode6 are affected by a locale issue while the hid_gcode3
issue is a separate bug.
I've attached a diff file which could shed a light on what's
going wrong (I was unable to find any way how to use gdb to
explore the gcode code).
You can apply the test diff using: values. diff /../src/ pcbtest. sh -x gcode --iso-mill-depth 0.5 ./inputs/ gcode_oneline. pcb
git apply show_cutdepth_
Then to test what's happening you have to have non-C locale (I use
ru_RU.UTF-8). The command
make && cd tests && ./run_tests.sh hid_gcode4
outputs
...
../..
cut_depth after gcode init=-0,050000
cut_depth aftter getting export options: 0.000000
cut_depth before export: 0.000000
PASSED
...
Note the comma separator in the first case.
The next command using the C locale /../src/ pcbtest. sh -x gcode --iso-mill-depth 0.5 ./inputs/ gcode_oneline. pcb tests.7976/ gcode_oneline- bottom. gcode-ref 2014-02-04 15:09:37.000000000 +0400 tests.7976/ gcode_oneline- bottom. gcode-out 2014-02-04 15:09:37.000000000 +0400 tests.7976/ gcode_oneline- top.gcode- ref 2014-02-04 15:09:37.000000000 +0400 tests.7976/ gcode_oneline- top.gcode- out 2014-02-04 15:09:37.000000000 +0400
make && cd tests && LANG=C ./run_tests.sh hid_gcode4
outputs:
../..
cut_depth after gcode init=-0.050000
cut_depth aftter getting export options: 0.500000
cut_depth before export: 0.500000
--- /tmp/pcb_
+++ /tmp/pcb_
@@ -5,5 +5,5 @@
(Tool diameter: 0.200000 mm)
#100=2.000000 (safe Z)
-#101=0.000000 (cutting depth)
+#101=0.500000 (cutting depth)
#102=25.000000 (plunge feedrate)
#103=50.000000 (feedrate)
--- /tmp/pcb_
+++ /tmp/pcb_
@@ -5,5 +5,5 @@
(Tool diameter: 0.200000 mm)
#100=2.000000 (safe Z)
-#101=0.000000 (cutting depth)
+#101=0.500000 (cutting depth)
#102=25.000000 (plunge feedrate)
#103=50.000000 (feedrate)
FAIL
You can see that the second test fails while the command output is
indeed correct as the options '--iso-mill-depth 0.5' is used.
The output for hid_gcode4 is all but the same while the output for
hid_gcode6 should be manually verified (though differences are not
very large).