-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix "Can't compare with units and without." exception
Enabling milldrill-diameter and min-milldrill-hole-diameter makes the program abort with the following exception: > Exporting milldrill... terminate called after throwing an instance of 'comparison_exception' > what(): Can't compare with units and without. This patch fixes it. Signed-off-by: Nicola Di Lieto <nicola.dilieto@gmail.com>
- Loading branch information
Showing
8 changed files
with
263 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 76 additions & 0 deletions
76
testing/gerbv_example/milldrilldiatest_units/expected/drill.ngc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
( pcb2gcode 2.4.0 ) | ||
( Software-independent Gcode ) | ||
|
||
( This file uses 4 drill bit sizes. ) | ||
( Bit sizes: [0.4mm] [0.6mm] [0.8mm] [1mm] ) | ||
|
||
G94 (Millimeters per minute feed rate.) | ||
G21 (Units == Millimeters.) | ||
G91.1 (Incremental arc distance mode.) | ||
G90 (Absolute coordinates.) | ||
G00 S10000 (RPM spindle speed.) | ||
|
||
G00 Z10.00000 (Retract) | ||
T1 | ||
M5 (Spindle stop.) | ||
G04 P1.00000 | ||
(MSG, Change tool bit to drill size 0.4mm) | ||
M6 (Tool change.) | ||
M0 (Temporary machine stop.) | ||
M3 (Spindle on clockwise.) | ||
G0 Z1.50000 | ||
G04 P1.00000 | ||
|
||
G81 R1.50000 Z-1.75000 F100.00000 X120.00000 Y-90.00000 | ||
X120.00000 Y-92.54000 | ||
G80 | ||
|
||
G00 Z10.00000 (Retract) | ||
T3 | ||
M5 (Spindle stop.) | ||
G04 P1.00000 | ||
(MSG, Change tool bit to drill size 0.6mm) | ||
M6 (Tool change.) | ||
M0 (Temporary machine stop.) | ||
M3 (Spindle on clockwise.) | ||
G0 Z1.50000 | ||
G04 P1.00000 | ||
|
||
G81 R1.50000 Z-1.75000 F100.00000 X120.00000 Y-95.08000 | ||
G80 | ||
|
||
G00 Z10.00000 (Retract) | ||
T4 | ||
M5 (Spindle stop.) | ||
G04 P1.00000 | ||
(MSG, Change tool bit to drill size 0.8mm) | ||
M6 (Tool change.) | ||
M0 (Temporary machine stop.) | ||
M3 (Spindle on clockwise.) | ||
G0 Z1.50000 | ||
G04 P1.00000 | ||
|
||
G81 R1.50000 Z-1.75000 F100.00000 X120.00000 Y-97.62000 | ||
G80 | ||
|
||
G00 Z10.00000 (Retract) | ||
T5 | ||
M5 (Spindle stop.) | ||
G04 P1.00000 | ||
(MSG, Change tool bit to drill size 1mm) | ||
M6 (Tool change.) | ||
M0 (Temporary machine stop.) | ||
M3 (Spindle on clockwise.) | ||
G0 Z1.50000 | ||
G04 P1.00000 | ||
|
||
G81 R1.50000 Z-1.75000 F100.00000 X120.00000 Y-100.16000 | ||
G80 | ||
|
||
G00 Z10.000 ( All done -- retract ) | ||
|
||
M5 (Spindle off.) | ||
G04 P1.000000 | ||
M9 (Coolant off.) | ||
M2 (Program end.) | ||
|
95 changes: 95 additions & 0 deletions
95
testing/gerbv_example/milldrilldiatest_units/expected/milldrill.ngc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
( pcb2gcode 2.4.0 ) | ||
( Software-independent Gcode ) | ||
( This file uses a mill head of 1.00000mm to drill the 5 hole sizes. ) | ||
( Hole sizes: [1.2mm] [1.4mm] [1.6mm] [1.8mm] [2mm] ) | ||
|
||
G94 (Millimeters per minute feed rate.) | ||
G21 (Units == Millimeters.) | ||
G91.1 (Incremental arc distance mode.) | ||
G90 (Absolute coordinates.) | ||
S2000 (RPM spindle speed.) | ||
|
||
G01 F600.00000 (Feedrate) | ||
G00 Z10.00000 (Retract) | ||
T6 | ||
M5 (Spindle stop.) | ||
G04 P1.00000 | ||
(MSG, Change tool bit to drill size 1.00000mm) | ||
M6 (Tool change.) | ||
M0 (Temporary machine stop.) | ||
M3 (Spindle on clockwise.) | ||
G04 P1.00000 | ||
G00 Z1.50000 | ||
|
||
G0 X130.26000 Y-90.00000 | ||
G1 Z0.29167 F300.00000 | ||
G1 F600.00000 | ||
G2 X130.26000 Y-90.00000 Z-0.00000 I-0.10000 J0.00000 | ||
G2 X130.26000 Y-90.00000 Z-0.29167 I-0.10000 J0.00000 | ||
G2 X130.26000 Y-90.00000 Z-0.58333 I-0.10000 J0.00000 | ||
G2 X130.26000 Y-90.00000 Z-0.87500 I-0.10000 J0.00000 | ||
G2 X130.26000 Y-90.00000 Z-1.16667 I-0.10000 J0.00000 | ||
G2 X130.26000 Y-90.00000 Z-1.45833 I-0.10000 J0.00000 | ||
G2 X130.26000 Y-90.00000 Z-1.75000 I-0.10000 J0.00000 | ||
G2 X130.26000 Y-90.00000 I-0.10000 J0.00000 | ||
G1 Z1.50000 F300.00000 | ||
|
||
G0 X130.36000 Y-92.54000 | ||
G1 Z0.29167 F300.00000 | ||
G1 F600.00000 | ||
G2 X130.36000 Y-92.54000 Z-0.00000 I-0.20000 J0.00000 | ||
G2 X130.36000 Y-92.54000 Z-0.29167 I-0.20000 J0.00000 | ||
G2 X130.36000 Y-92.54000 Z-0.58333 I-0.20000 J0.00000 | ||
G2 X130.36000 Y-92.54000 Z-0.87500 I-0.20000 J0.00000 | ||
G2 X130.36000 Y-92.54000 Z-1.16667 I-0.20000 J0.00000 | ||
G2 X130.36000 Y-92.54000 Z-1.45833 I-0.20000 J0.00000 | ||
G2 X130.36000 Y-92.54000 Z-1.75000 I-0.20000 J0.00000 | ||
G2 X130.36000 Y-92.54000 I-0.20000 J0.00000 | ||
G1 Z1.50000 F300.00000 | ||
|
||
G0 X130.46000 Y-95.08000 | ||
G1 Z0.29167 F300.00000 | ||
G1 F600.00000 | ||
G2 X130.46000 Y-95.08000 Z-0.00000 I-0.30000 J0.00000 | ||
G2 X130.46000 Y-95.08000 Z-0.29167 I-0.30000 J0.00000 | ||
G2 X130.46000 Y-95.08000 Z-0.58333 I-0.30000 J0.00000 | ||
G2 X130.46000 Y-95.08000 Z-0.87500 I-0.30000 J0.00000 | ||
G2 X130.46000 Y-95.08000 Z-1.16667 I-0.30000 J0.00000 | ||
G2 X130.46000 Y-95.08000 Z-1.45833 I-0.30000 J0.00000 | ||
G2 X130.46000 Y-95.08000 Z-1.75000 I-0.30000 J0.00000 | ||
G2 X130.46000 Y-95.08000 I-0.30000 J0.00000 | ||
G1 Z1.50000 F300.00000 | ||
|
||
G0 X130.56000 Y-97.62000 | ||
G1 Z0.29167 F300.00000 | ||
G1 F600.00000 | ||
G2 X130.56000 Y-97.62000 Z-0.00000 I-0.40000 J0.00000 | ||
G2 X130.56000 Y-97.62000 Z-0.29167 I-0.40000 J0.00000 | ||
G2 X130.56000 Y-97.62000 Z-0.58333 I-0.40000 J0.00000 | ||
G2 X130.56000 Y-97.62000 Z-0.87500 I-0.40000 J0.00000 | ||
G2 X130.56000 Y-97.62000 Z-1.16667 I-0.40000 J0.00000 | ||
G2 X130.56000 Y-97.62000 Z-1.45833 I-0.40000 J0.00000 | ||
G2 X130.56000 Y-97.62000 Z-1.75000 I-0.40000 J0.00000 | ||
G2 X130.56000 Y-97.62000 I-0.40000 J0.00000 | ||
G1 Z1.50000 F300.00000 | ||
|
||
G0 X130.66000 Y-100.16000 | ||
G1 Z0.29167 F300.00000 | ||
G1 F600.00000 | ||
G2 X130.66000 Y-100.16000 Z-0.00000 I-0.50000 J0.00000 | ||
G2 X130.66000 Y-100.16000 Z-0.29167 I-0.50000 J0.00000 | ||
G2 X130.66000 Y-100.16000 Z-0.58333 I-0.50000 J0.00000 | ||
G2 X130.66000 Y-100.16000 Z-0.87500 I-0.50000 J0.00000 | ||
G2 X130.66000 Y-100.16000 Z-1.16667 I-0.50000 J0.00000 | ||
G2 X130.66000 Y-100.16000 Z-1.45833 I-0.50000 J0.00000 | ||
G2 X130.66000 Y-100.16000 Z-1.75000 I-0.50000 J0.00000 | ||
G2 X130.66000 Y-100.16000 I-0.50000 J0.00000 | ||
G1 Z1.50000 F300.00000 | ||
|
||
G00 Z10.000000 ( All done -- retract ) | ||
|
||
M5 (Spindle off.) | ||
G04 P1.000000 | ||
M9 (Coolant off.) | ||
M2 (Program end.) | ||
|
15 changes: 15 additions & 0 deletions
15
testing/gerbv_example/milldrilldiatest_units/expected/original_drill.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions
15
testing/gerbv_example/milldrilldiatest_units/expected/original_milldrill.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 41 additions & 0 deletions
41
testing/gerbv_example/milldrilldiatest_units/milldrilldiatest.drl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
M48 | ||
;DRILL file {KiCad 4.0.7+dfsg1-1~bpo9+1} date Mon Oct 15 16:46:01 2018 | ||
;FORMAT={-:-/ absolute / metric / decimal} | ||
FMAT,2 | ||
METRIC,TZ | ||
T1C0.200 | ||
T2C0.400 | ||
T3C0.600 | ||
T4C0.800 | ||
T5C1.000 | ||
T6C1.200 | ||
T7C1.400 | ||
T8C1.600 | ||
T9C1.800 | ||
T10C2.000 | ||
% | ||
G90 | ||
G05 | ||
M71 | ||
T1 | ||
X120.Y-90. | ||
T2 | ||
X120.Y-92.54 | ||
T3 | ||
X120.Y-95.08 | ||
T4 | ||
X120.Y-97.62 | ||
T5 | ||
X120.Y-100.16 | ||
T6 | ||
X130.16Y-90. | ||
T7 | ||
X130.16Y-92.54 | ||
T8 | ||
X130.16Y-95.08 | ||
T9 | ||
X130.16Y-97.62 | ||
T10 | ||
X130.16Y-100.16 | ||
T0 | ||
M30 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
drill=milldrilldiatest.drl | ||
|
||
metric=true | ||
metricoutput=true | ||
zchange=10.0000 | ||
zsafe=1.5000 | ||
drill-feed=100 | ||
drill-speed=10000 | ||
zdrill=-1.7500mm | ||
cut-feed=600 | ||
cut-infeed=0.3 | ||
cut-speed=2000 | ||
cutter-diameter=2.0 | ||
zcut=-1.6500 | ||
min-milldrill-hole-diameter=1.2 | ||
milldrill-diameter=1.0mm | ||
drills-available=0.4,0.6,0.8,1.0,1.2 |