diff --git a/drill.cpp b/drill.cpp index ffec7cc8d..b2d74cb9a 100644 --- a/drill.cpp +++ b/drill.cpp @@ -600,11 +600,19 @@ void ExcellonProcessor::export_ngc(const string of_dir, const boost::optionalspeed - << " (RPM spindle speed.)\n" << "G01 F" << target->feed * cfactor - << " (Feedrate)\nM3 (Spindle on clockwise.)\n" - << "G04 P" << target->spinup_time - << "\nG00 Z" << target->zsafe * cfactor << "\n\n"; + of << preamble_ext << preamble + << "S" << left << target->speed << " (RPM spindle speed.)\n\n" + << "G01 F" << target->feed * cfactor << " (Feedrate)\n" + << "G00 Z" << target->zchange * cfactor << " (Retract)\n" + << "T" << (*holes.begin()).first << "\n" + << "M5 (Spindle stop.)\n" + << "G04 P" << target->spindown_time << "\n" + << "(MSG, Change tool bit to drill size " << (bMetricOutput ? (target->tool_diameter * 25.4) : target->tool_diameter) << (bMetricOutput ? "mm" : "inch") << ")\n" + << "M6 (Tool change.)\n" + << "M0 (Temporary machine stop.)\n" + << "M3 (Spindle on clockwise.)\n" + << "G04 P" << target->spinup_time << "\n" + << "G00 Z" << target->zsafe * cfactor << "\n\n"; tiling->header( of ); diff --git a/testing/gerbv_example/milldrilldiatest/expected/milldrill.ngc b/testing/gerbv_example/milldrilldiatest/expected/milldrill.ngc index e9da6d1be..4f03ee280 100644 --- a/testing/gerbv_example/milldrilldiatest/expected/milldrill.ngc +++ b/testing/gerbv_example/milldrilldiatest/expected/milldrill.ngc @@ -8,7 +8,15 @@ 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 diff --git a/testing/gerbv_example/multivibrator-basename/expected/testbase_name_milldrill.ngc b/testing/gerbv_example/multivibrator-basename/expected/testbase_name_milldrill.ngc index df10ca2d8..1f99c27ce 100644 --- a/testing/gerbv_example/multivibrator-basename/expected/testbase_name_milldrill.ngc +++ b/testing/gerbv_example/multivibrator-basename/expected/testbase_name_milldrill.ngc @@ -8,7 +8,15 @@ G20 (Units == INCHES.) G91.1 (Incremental arc distance mode.) G90 (Absolute coordinates.) S10000 (RPM spindle speed.) + G01 F100.00000 (Feedrate) +G00 Z1.00000 (Retract) +T1 +M5 (Spindle stop.) +G04 P1.00000 +(MSG, Change tool bit to drill size 0.03150inch) +M6 (Tool change.) +M0 (Temporary machine stop.) M3 (Spindle on clockwise.) G04 P1.00000 G00 Z0.08000 diff --git a/testing/gerbv_example/multivibrator-clockwise/expected/milldrill.ngc b/testing/gerbv_example/multivibrator-clockwise/expected/milldrill.ngc index c50a5a568..6b42be5bc 100644 --- a/testing/gerbv_example/multivibrator-clockwise/expected/milldrill.ngc +++ b/testing/gerbv_example/multivibrator-clockwise/expected/milldrill.ngc @@ -8,7 +8,15 @@ G20 (Units == INCHES.) G91.1 (Incremental arc distance mode.) G90 (Absolute coordinates.) S10000 (RPM spindle speed.) + G01 F100.00000 (Feedrate) +G00 Z1.00000 (Retract) +T1 +M5 (Spindle stop.) +G04 P1.00000 +(MSG, Change tool bit to drill size 0.07087inch) +M6 (Tool change.) +M0 (Temporary machine stop.) M3 (Spindle on clockwise.) G04 P1.00000 G00 Z0.08000 diff --git a/testing/gerbv_example/multivibrator-contentions/expected/milldrill.ngc b/testing/gerbv_example/multivibrator-contentions/expected/milldrill.ngc index df10ca2d8..1f99c27ce 100644 --- a/testing/gerbv_example/multivibrator-contentions/expected/milldrill.ngc +++ b/testing/gerbv_example/multivibrator-contentions/expected/milldrill.ngc @@ -8,7 +8,15 @@ G20 (Units == INCHES.) G91.1 (Incremental arc distance mode.) G90 (Absolute coordinates.) S10000 (RPM spindle speed.) + G01 F100.00000 (Feedrate) +G00 Z1.00000 (Retract) +T1 +M5 (Spindle stop.) +G04 P1.00000 +(MSG, Change tool bit to drill size 0.03150inch) +M6 (Tool change.) +M0 (Temporary machine stop.) M3 (Spindle on clockwise.) G04 P1.00000 G00 Z0.08000 diff --git a/testing/gerbv_example/multivibrator-extra-passes-big/expected/milldrill.ngc b/testing/gerbv_example/multivibrator-extra-passes-big/expected/milldrill.ngc index df10ca2d8..1f99c27ce 100644 --- a/testing/gerbv_example/multivibrator-extra-passes-big/expected/milldrill.ngc +++ b/testing/gerbv_example/multivibrator-extra-passes-big/expected/milldrill.ngc @@ -8,7 +8,15 @@ G20 (Units == INCHES.) G91.1 (Incremental arc distance mode.) G90 (Absolute coordinates.) S10000 (RPM spindle speed.) + G01 F100.00000 (Feedrate) +G00 Z1.00000 (Retract) +T1 +M5 (Spindle stop.) +G04 P1.00000 +(MSG, Change tool bit to drill size 0.03150inch) +M6 (Tool change.) +M0 (Temporary machine stop.) M3 (Spindle on clockwise.) G04 P1.00000 G00 Z0.08000 diff --git a/testing/gerbv_example/multivibrator-extra-passes-two-isolators-tiles-al/expected/milldrill.ngc b/testing/gerbv_example/multivibrator-extra-passes-two-isolators-tiles-al/expected/milldrill.ngc index 11071afd4..b6e4be03f 100644 --- a/testing/gerbv_example/multivibrator-extra-passes-two-isolators-tiles-al/expected/milldrill.ngc +++ b/testing/gerbv_example/multivibrator-extra-passes-two-isolators-tiles-al/expected/milldrill.ngc @@ -8,7 +8,15 @@ G20 (Units == INCHES.) G91.1 (Incremental arc distance mode.) G90 (Absolute coordinates.) S10000 (RPM spindle speed.) + G01 F100.00000 (Feedrate) +G00 Z1.00000 (Retract) +T1 +M5 (Spindle stop.) +G04 P1.00000 +(MSG, Change tool bit to drill size 0.03150inch) +M6 (Tool change.) +M0 (Temporary machine stop.) M3 (Spindle on clockwise.) G04 P1.00000 G00 Z0.08000 diff --git a/testing/gerbv_example/multivibrator-extra-passes-two-isolators-tiles/expected/milldrill.ngc b/testing/gerbv_example/multivibrator-extra-passes-two-isolators-tiles/expected/milldrill.ngc index 6d8337575..05e04598e 100644 --- a/testing/gerbv_example/multivibrator-extra-passes-two-isolators-tiles/expected/milldrill.ngc +++ b/testing/gerbv_example/multivibrator-extra-passes-two-isolators-tiles/expected/milldrill.ngc @@ -8,7 +8,15 @@ G20 (Units == INCHES.) G91.1 (Incremental arc distance mode.) G90 (Absolute coordinates.) S10000 (RPM spindle speed.) + G01 F100.00000 (Feedrate) +G00 Z1.00000 (Retract) +T1 +M5 (Spindle stop.) +G04 P1.00000 +(MSG, Change tool bit to drill size 0.03150inch) +M6 (Tool change.) +M0 (Temporary machine stop.) M3 (Spindle on clockwise.) G04 P1.00000 G00 Z0.08000 diff --git a/testing/gerbv_example/multivibrator-extra-passes-two-isolators/expected/milldrill.ngc b/testing/gerbv_example/multivibrator-extra-passes-two-isolators/expected/milldrill.ngc index ea0ecf8cd..8d46db09f 100644 --- a/testing/gerbv_example/multivibrator-extra-passes-two-isolators/expected/milldrill.ngc +++ b/testing/gerbv_example/multivibrator-extra-passes-two-isolators/expected/milldrill.ngc @@ -8,7 +8,15 @@ G20 (Units == INCHES.) G91.1 (Incremental arc distance mode.) G90 (Absolute coordinates.) S10000 (RPM spindle speed.) + G01 F100.00000 (Feedrate) +G00 Z1.00000 (Retract) +T1 +M5 (Spindle stop.) +G04 P1.00000 +(MSG, Change tool bit to drill size 0.03150inch) +M6 (Tool change.) +M0 (Temporary machine stop.) M3 (Spindle on clockwise.) G04 P1.00000 G00 Z0.08000 diff --git a/testing/gerbv_example/multivibrator-extra-passes-voronoi/expected/milldrill.ngc b/testing/gerbv_example/multivibrator-extra-passes-voronoi/expected/milldrill.ngc index df10ca2d8..1f99c27ce 100644 --- a/testing/gerbv_example/multivibrator-extra-passes-voronoi/expected/milldrill.ngc +++ b/testing/gerbv_example/multivibrator-extra-passes-voronoi/expected/milldrill.ngc @@ -8,7 +8,15 @@ G20 (Units == INCHES.) G91.1 (Incremental arc distance mode.) G90 (Absolute coordinates.) S10000 (RPM spindle speed.) + G01 F100.00000 (Feedrate) +G00 Z1.00000 (Retract) +T1 +M5 (Spindle stop.) +G04 P1.00000 +(MSG, Change tool bit to drill size 0.03150inch) +M6 (Tool change.) +M0 (Temporary machine stop.) M3 (Spindle on clockwise.) G04 P1.00000 G00 Z0.08000 diff --git a/testing/gerbv_example/multivibrator-extra-passes/expected/milldrill.ngc b/testing/gerbv_example/multivibrator-extra-passes/expected/milldrill.ngc index df10ca2d8..1f99c27ce 100644 --- a/testing/gerbv_example/multivibrator-extra-passes/expected/milldrill.ngc +++ b/testing/gerbv_example/multivibrator-extra-passes/expected/milldrill.ngc @@ -8,7 +8,15 @@ G20 (Units == INCHES.) G91.1 (Incremental arc distance mode.) G90 (Absolute coordinates.) S10000 (RPM spindle speed.) + G01 F100.00000 (Feedrate) +G00 Z1.00000 (Retract) +T1 +M5 (Spindle stop.) +G04 P1.00000 +(MSG, Change tool bit to drill size 0.03150inch) +M6 (Tool change.) +M0 (Temporary machine stop.) M3 (Spindle on clockwise.) G04 P1.00000 G00 Z0.08000 diff --git a/testing/gerbv_example/multivibrator-identical-isolators/expected/milldrill.ngc b/testing/gerbv_example/multivibrator-identical-isolators/expected/milldrill.ngc index df10ca2d8..1f99c27ce 100644 --- a/testing/gerbv_example/multivibrator-identical-isolators/expected/milldrill.ngc +++ b/testing/gerbv_example/multivibrator-identical-isolators/expected/milldrill.ngc @@ -8,7 +8,15 @@ G20 (Units == INCHES.) G91.1 (Incremental arc distance mode.) G90 (Absolute coordinates.) S10000 (RPM spindle speed.) + G01 F100.00000 (Feedrate) +G00 Z1.00000 (Retract) +T1 +M5 (Spindle stop.) +G04 P1.00000 +(MSG, Change tool bit to drill size 0.03150inch) +M6 (Tool change.) +M0 (Temporary machine stop.) M3 (Spindle on clockwise.) G04 P1.00000 G00 Z0.08000 diff --git a/testing/gerbv_example/multivibrator-no-tsp-2opt/expected/milldrill.ngc b/testing/gerbv_example/multivibrator-no-tsp-2opt/expected/milldrill.ngc index fcac47005..1e07a30db 100644 --- a/testing/gerbv_example/multivibrator-no-tsp-2opt/expected/milldrill.ngc +++ b/testing/gerbv_example/multivibrator-no-tsp-2opt/expected/milldrill.ngc @@ -8,7 +8,15 @@ G20 (Units == INCHES.) G91.1 (Incremental arc distance mode.) G90 (Absolute coordinates.) S10000 (RPM spindle speed.) + G01 F100.00000 (Feedrate) +G00 Z1.00000 (Retract) +T1 +M5 (Spindle stop.) +G04 P1.00000 +(MSG, Change tool bit to drill size 0.03150inch) +M6 (Tool change.) +M0 (Temporary machine stop.) M3 (Spindle on clockwise.) G04 P1.00000 G00 Z0.08000 diff --git a/testing/gerbv_example/multivibrator-no-zbridges/expected/milldrill.ngc b/testing/gerbv_example/multivibrator-no-zbridges/expected/milldrill.ngc index 1aff71566..afdd93108 100644 --- a/testing/gerbv_example/multivibrator-no-zbridges/expected/milldrill.ngc +++ b/testing/gerbv_example/multivibrator-no-zbridges/expected/milldrill.ngc @@ -8,7 +8,15 @@ G20 (Units == INCHES.) G91.1 (Incremental arc distance mode.) G90 (Absolute coordinates.) S10000 (RPM spindle speed.) + G01 F100.00000 (Feedrate) +G00 Z1.00000 (Retract) +T1 +M5 (Spindle stop.) +G04 P1.00000 +(MSG, Change tool bit to drill size 0.03150inch) +M6 (Tool change.) +M0 (Temporary machine stop.) M3 (Spindle on clockwise.) G04 P1.00000 G00 Z0.08000 diff --git a/testing/gerbv_example/multivibrator-two-isolators/expected/milldrill.ngc b/testing/gerbv_example/multivibrator-two-isolators/expected/milldrill.ngc index df10ca2d8..1f99c27ce 100644 --- a/testing/gerbv_example/multivibrator-two-isolators/expected/milldrill.ngc +++ b/testing/gerbv_example/multivibrator-two-isolators/expected/milldrill.ngc @@ -8,7 +8,15 @@ G20 (Units == INCHES.) G91.1 (Incremental arc distance mode.) G90 (Absolute coordinates.) S10000 (RPM spindle speed.) + G01 F100.00000 (Feedrate) +G00 Z1.00000 (Retract) +T1 +M5 (Spindle stop.) +G04 P1.00000 +(MSG, Change tool bit to drill size 0.03150inch) +M6 (Tool change.) +M0 (Temporary machine stop.) M3 (Spindle on clockwise.) G04 P1.00000 G00 Z0.08000 diff --git a/testing/gerbv_example/multivibrator/expected/milldrill.ngc b/testing/gerbv_example/multivibrator/expected/milldrill.ngc index df10ca2d8..1f99c27ce 100644 --- a/testing/gerbv_example/multivibrator/expected/milldrill.ngc +++ b/testing/gerbv_example/multivibrator/expected/milldrill.ngc @@ -8,7 +8,15 @@ G20 (Units == INCHES.) G91.1 (Incremental arc distance mode.) G90 (Absolute coordinates.) S10000 (RPM spindle speed.) + G01 F100.00000 (Feedrate) +G00 Z1.00000 (Retract) +T1 +M5 (Spindle stop.) +G04 P1.00000 +(MSG, Change tool bit to drill size 0.03150inch) +M6 (Tool change.) +M0 (Temporary machine stop.) M3 (Spindle on clockwise.) G04 P1.00000 G00 Z0.08000 diff --git a/testing/gerbv_example/multivibrator_no_zero_start/expected/milldrill.ngc b/testing/gerbv_example/multivibrator_no_zero_start/expected/milldrill.ngc index 51ba4f88a..8a7772485 100644 --- a/testing/gerbv_example/multivibrator_no_zero_start/expected/milldrill.ngc +++ b/testing/gerbv_example/multivibrator_no_zero_start/expected/milldrill.ngc @@ -8,7 +8,15 @@ G20 (Units == INCHES.) G91.1 (Incremental arc distance mode.) G90 (Absolute coordinates.) S10000 (RPM spindle speed.) + G01 F100.00000 (Feedrate) +G00 Z1.00000 (Retract) +T1 +M5 (Spindle stop.) +G04 P1.00000 +(MSG, Change tool bit to drill size 0.03150inch) +M6 (Tool change.) +M0 (Temporary machine stop.) M3 (Spindle on clockwise.) G04 P1.00000 G00 Z0.08000 diff --git a/testing/gerbv_example/multivibrator_pre_post_milling_gcode/expected/milldrill.ngc b/testing/gerbv_example/multivibrator_pre_post_milling_gcode/expected/milldrill.ngc index c22c69ba9..66822dc02 100644 --- a/testing/gerbv_example/multivibrator_pre_post_milling_gcode/expected/milldrill.ngc +++ b/testing/gerbv_example/multivibrator_pre_post_milling_gcode/expected/milldrill.ngc @@ -15,7 +15,15 @@ G20 (Units == INCHES.) G91.1 (Incremental arc distance mode.) G90 (Absolute coordinates.) S10000 (RPM spindle speed.) + G01 F100.00000 (Feedrate) +G00 Z1.00000 (Retract) +T1 +M5 (Spindle stop.) +G04 P1.00000 +(MSG, Change tool bit to drill size 0.03150inch) +M6 (Tool change.) +M0 (Temporary machine stop.) M3 (Spindle on clockwise.) G04 P1.00000 G00 Z0.08000 diff --git a/testing/gerbv_example/multivibrator_xy_offset/expected/milldrill.ngc b/testing/gerbv_example/multivibrator_xy_offset/expected/milldrill.ngc index 96c67e265..6fc37dfe8 100644 --- a/testing/gerbv_example/multivibrator_xy_offset/expected/milldrill.ngc +++ b/testing/gerbv_example/multivibrator_xy_offset/expected/milldrill.ngc @@ -8,7 +8,15 @@ G20 (Units == INCHES.) G91.1 (Incremental arc distance mode.) G90 (Absolute coordinates.) S10000 (RPM spindle speed.) + G01 F100.00000 (Feedrate) +G00 Z1.00000 (Retract) +T1 +M5 (Spindle stop.) +G04 P1.00000 +(MSG, Change tool bit to drill size 0.03150inch) +M6 (Tool change.) +M0 (Temporary machine stop.) M3 (Spindle on clockwise.) G04 P1.00000 G00 Z0.08000 diff --git a/testing/gerbv_example/multivibrator_xy_offset_zero_start/expected/milldrill.ngc b/testing/gerbv_example/multivibrator_xy_offset_zero_start/expected/milldrill.ngc index c62074b96..bf96dec2d 100644 --- a/testing/gerbv_example/multivibrator_xy_offset_zero_start/expected/milldrill.ngc +++ b/testing/gerbv_example/multivibrator_xy_offset_zero_start/expected/milldrill.ngc @@ -8,7 +8,15 @@ G20 (Units == INCHES.) G91.1 (Incremental arc distance mode.) G90 (Absolute coordinates.) S10000 (RPM spindle speed.) + G01 F100.00000 (Feedrate) +G00 Z1.00000 (Retract) +T1 +M5 (Spindle stop.) +G04 P1.00000 +(MSG, Change tool bit to drill size 0.03150inch) +M6 (Tool change.) +M0 (Temporary machine stop.) M3 (Spindle on clockwise.) G04 P1.00000 G00 Z0.08000 diff --git a/testing/gerbv_example/slots-milldrill-metric/expected/milldrill.ngc b/testing/gerbv_example/slots-milldrill-metric/expected/milldrill.ngc index f27d9d1c1..3915443ce 100644 --- a/testing/gerbv_example/slots-milldrill-metric/expected/milldrill.ngc +++ b/testing/gerbv_example/slots-milldrill-metric/expected/milldrill.ngc @@ -8,7 +8,15 @@ G21 (Units == Millimeters.) G91.1 (Incremental arc distance mode.) G90 (Absolute coordinates.) S10000 (RPM spindle speed.) + G01 F2540.00000 (Feedrate) +G00 Z25.40000 (Retract) +T1 +M5 (Spindle stop.) +G04 P1.00000 +(MSG, Change tool bit to drill size 2.54000mm) +M6 (Tool change.) +M0 (Temporary machine stop.) M3 (Spindle on clockwise.) G04 P1.00000 G00 Z2.03200 diff --git a/testing/gerbv_example/slots-milldrill/expected/milldrill.ngc b/testing/gerbv_example/slots-milldrill/expected/milldrill.ngc index de89d8b57..d6452962b 100644 --- a/testing/gerbv_example/slots-milldrill/expected/milldrill.ngc +++ b/testing/gerbv_example/slots-milldrill/expected/milldrill.ngc @@ -8,7 +8,15 @@ G20 (Units == INCHES.) G91.1 (Incremental arc distance mode.) G90 (Absolute coordinates.) S10000 (RPM spindle speed.) + G01 F100.00000 (Feedrate) +G00 Z1.00000 (Retract) +T1 +M5 (Spindle stop.) +G04 P1.00000 +(MSG, Change tool bit to drill size 0.10000inch) +M6 (Tool change.) +M0 (Temporary machine stop.) M3 (Spindle on clockwise.) G04 P1.00000 G00 Z0.08000 diff --git a/testing/gerbv_example/slots-with-drill-and-milldrill/expected/milldrill.ngc b/testing/gerbv_example/slots-with-drill-and-milldrill/expected/milldrill.ngc index cafaa7c4c..5d8da1cbd 100644 --- a/testing/gerbv_example/slots-with-drill-and-milldrill/expected/milldrill.ngc +++ b/testing/gerbv_example/slots-with-drill-and-milldrill/expected/milldrill.ngc @@ -8,7 +8,15 @@ G20 (Units == INCHES.) G91.1 (Incremental arc distance mode.) G90 (Absolute coordinates.) S10000 (RPM spindle speed.) + G01 F100.00000 (Feedrate) +G00 Z1.00000 (Retract) +T2 +M5 (Spindle stop.) +G04 P1.00000 +(MSG, Change tool bit to drill size 0.04000inch) +M6 (Tool change.) +M0 (Temporary machine stop.) M3 (Spindle on clockwise.) G04 P1.00000 G00 Z0.08000