diff --git a/integration_tests.py b/integration_tests.py index b15ef5d4d..5d486c50d 100755 --- a/integration_tests.py +++ b/integration_tests.py @@ -82,6 +82,7 @@ "shaped_pcb", "sharp_corner", "sharp_corner_2", + "sharp_corner_2_offset", "sharp_corner_big_isolation_width", "silk", "silk-lines", diff --git a/testing/gerbv_example/sharp_corner_2_offset/expected/back.ngc b/testing/gerbv_example/sharp_corner_2_offset/expected/back.ngc new file mode 100644 index 000000000..fb79061f0 --- /dev/null +++ b/testing/gerbv_example/sharp_corner_2_offset/expected/back.ngc @@ -0,0 +1,305 @@ +( pcb2gcode 2.1.0 ) +( Software-independent Gcode ) + +G94 ( Inches per minute feed rate. ) +G20 ( Units == INCHES. ) + +G90 ( Absolute coordinates. ) +G00 S12000 ( RPM spindle speed. ) +G64 P0.00040 ( set maximum deviation from commanded toolpath ) +G01 F360.00000 ( Feedrate. ) + + +G00 Z1.00000 (Retract to tool change height) +T0 +M5 (Spindle stop.) +G04 P1.00000 (Wait for spindle to stop) +(MSG, Change tool bit to mill diameter 0.03937in) +M6 (Tool change.) +M0 (Temporary machine stop.) +M3 ( Spindle on clockwise. ) +G04 P1.00000 (Wait for spindle to get up to speed) +G04 P0 ( dwell for no time -- G64 should not smooth over this point ) +G00 Z0.08000 ( retract ) + +G00 X-5.40571 Y-4.20000 ( rapid move to begin. ) +G01 F180.00000 +( Mill infeed pass 1/1 ) +G01 Z-0.04000 +G04 P0 ( dwell for no time -- G64 should not smooth over this point ) +G01 F360.00000 +G01 X-5.40571 Y-4.20000 +G01 X-5.40646 Y-4.19232 +G01 X-5.40684 Y-4.19043 +G01 X-5.40908 Y-4.18305 +G01 X-5.41272 Y-4.17624 +G01 X-5.41609 Y-4.17154 +G01 X-5.41868 Y-4.16868 +G01 X-5.91868 Y-3.66868 +G01 X-5.92154 Y-3.66609 +G01 X-5.92624 Y-3.66272 +G01 X-5.93305 Y-3.65908 +G01 X-5.94043 Y-3.65684 +G01 X-5.94232 Y-3.65646 +G01 X-5.94807 Y-3.65576 +G01 X-5.95482 Y-3.65599 +G01 X-5.96053 Y-3.65698 +G01 X-5.96603 Y-3.65880 +G01 X-5.96780 Y-3.65953 +G01 X-5.97297 Y-3.66214 +G01 X-5.97771 Y-3.66547 +G01 X-5.98265 Y-3.67008 +G01 X-5.98621 Y-3.67465 +G01 X-5.98728 Y-3.67624 +G01 X-5.99014 Y-3.68128 +G01 X-5.99250 Y-3.68761 +G01 X-5.99377 Y-3.69326 +G01 X-5.99420 Y-3.69904 +G01 X-5.99420 Y-3.70096 +G01 X-5.99377 Y-3.70674 +G01 X-5.99250 Y-3.71239 +G01 X-5.99014 Y-3.71872 +G01 X-5.98728 Y-3.72376 +G01 X-5.98391 Y-3.72845 +G01 X-5.98132 Y-3.73132 +G01 X-5.55693 Y-4.15571 +G01 X-5.52761 Y-4.16786 +G01 X-5.55693 Y-4.15571 +G01 X-6.89307 Y-4.15571 +G01 X-6.92238 Y-4.16786 +G01 X-6.89307 Y-4.15571 +G01 X-6.46868 Y-3.73132 +G01 X-6.46547 Y-3.72771 +G01 X-6.46214 Y-3.72297 +G01 X-6.45953 Y-3.71780 +G01 X-6.45880 Y-3.71603 +G01 X-6.45656 Y-3.70864 +G01 X-6.45580 Y-3.70096 +G01 X-6.45580 Y-3.69904 +G01 X-6.45623 Y-3.69326 +G01 X-6.45778 Y-3.68669 +G01 X-6.46073 Y-3.67956 +G01 X-6.46429 Y-3.67381 +G01 X-6.46807 Y-3.66943 +G01 X-6.47330 Y-3.66467 +G01 X-6.47758 Y-3.66181 +G01 X-6.48397 Y-3.65880 +G01 X-6.48947 Y-3.65698 +G01 X-6.49518 Y-3.65599 +G01 X-6.50193 Y-3.65576 +G01 X-6.50768 Y-3.65646 +G01 X-6.50956 Y-3.65684 +G01 X-6.51695 Y-3.65908 +G01 X-6.52376 Y-3.66272 +G01 X-6.52846 Y-3.66609 +G01 X-6.53132 Y-3.66868 +G01 X-7.03132 Y-4.16868 +G01 X-7.03391 Y-4.17154 +G01 X-7.03728 Y-4.17624 +G01 X-7.04092 Y-4.18305 +G01 X-7.04316 Y-4.19043 +G01 X-7.04353 Y-4.19232 +G01 X-7.04429 Y-4.20000 +G01 X-7.04353 Y-4.20768 +G01 X-7.04316 Y-4.20956 +G01 X-7.04092 Y-4.21695 +G01 X-7.03728 Y-4.22376 +G01 X-7.03308 Y-4.22944 +G01 X-7.02944 Y-4.23308 +G01 X-7.02535 Y-4.23621 +G01 X-7.02376 Y-4.23728 +G01 X-7.01695 Y-4.24092 +G01 X-7.00956 Y-4.24316 +G01 X-7.00768 Y-4.24353 +G01 X-7.00000 Y-4.24429 +G01 X-5.45000 Y-4.24429 +G01 X-5.44232 Y-4.24353 +G01 X-5.44043 Y-4.24316 +G01 X-5.43305 Y-4.24092 +G01 X-5.42624 Y-4.23728 +G01 X-5.42056 Y-4.23308 +G01 X-5.41692 Y-4.22944 +G01 X-5.41272 Y-4.22376 +G01 X-5.40908 Y-4.21695 +G01 X-5.40684 Y-4.20956 +G01 X-5.40646 Y-4.20768 +G01 X-5.40571 Y-4.20000 +G01 X-5.42539 Y-4.20000 +G01 X-5.42577 Y-4.20384 +G01 X-5.42615 Y-4.20572 +G01 X-5.42727 Y-4.20942 +G01 X-5.42908 Y-4.21282 +G01 X-5.43015 Y-4.21442 +G01 X-5.43172 Y-4.21646 +G01 X-5.43354 Y-4.21828 +G01 X-5.43718 Y-4.22091 +G01 X-5.44058 Y-4.22273 +G01 X-5.44428 Y-4.22385 +G01 X-5.44616 Y-4.22423 +G01 X-5.45000 Y-4.22461 +G01 X-7.00000 Y-4.22461 +G01 X-7.00384 Y-4.22423 +G01 X-7.00572 Y-4.22385 +G01 X-7.00942 Y-4.22273 +G01 X-7.01282 Y-4.22091 +G01 X-7.01646 Y-4.21828 +G01 X-7.01828 Y-4.21646 +G01 X-7.01985 Y-4.21442 +G01 X-7.02091 Y-4.21282 +G01 X-7.02273 Y-4.20942 +G01 X-7.02385 Y-4.20572 +G01 X-7.02423 Y-4.20384 +G01 X-7.02461 Y-4.20000 +G01 X-7.02423 Y-4.19616 +G01 X-7.02385 Y-4.19428 +G01 X-7.02273 Y-4.19058 +G01 X-7.02091 Y-4.18718 +G01 X-7.01870 Y-4.18403 +G01 X-7.01740 Y-4.18260 +G01 X-6.51740 Y-3.68260 +G01 X-6.51442 Y-3.68015 +G01 X-6.51282 Y-3.67909 +G01 X-6.50942 Y-3.67727 +G01 X-6.50572 Y-3.67615 +G01 X-6.50096 Y-3.67542 +G01 X-6.49807 Y-3.67549 +G01 X-6.49426 Y-3.67608 +G01 X-6.49151 Y-3.67699 +G01 X-6.48742 Y-3.67886 +G01 X-6.48528 Y-3.68029 +G01 X-6.48199 Y-3.68335 +G01 X-6.48010 Y-3.68554 +G01 X-6.47809 Y-3.68884 +G01 X-6.47661 Y-3.69240 +G01 X-6.47570 Y-3.69615 +G01 X-6.47549 Y-3.70096 +G01 X-6.47587 Y-3.70480 +G01 X-6.47699 Y-3.70849 +G01 X-6.47772 Y-3.71027 +G01 X-6.47902 Y-3.71285 +G01 X-6.48130 Y-3.71597 +G01 X-6.94060 Y-4.17539 +G01 X-5.50940 Y-4.17539 +G01 X-5.96870 Y-3.71597 +G01 X-5.97091 Y-3.71282 +G01 X-5.97234 Y-3.71030 +G01 X-5.97338 Y-3.70760 +G01 X-5.97430 Y-3.70385 +G01 X-5.97451 Y-3.70096 +G01 X-5.97430 Y-3.69615 +G01 X-5.97338 Y-3.69240 +G01 X-5.97234 Y-3.68970 +G01 X-5.97091 Y-3.68718 +G01 X-5.96807 Y-3.68330 +G01 X-5.96522 Y-3.68069 +G01 X-5.96285 Y-3.67902 +G01 X-5.95849 Y-3.67699 +G01 X-5.95574 Y-3.67608 +G01 X-5.95193 Y-3.67549 +G01 X-5.94903 Y-3.67542 +G01 X-5.94428 Y-3.67615 +G01 X-5.94058 Y-3.67727 +G01 X-5.93718 Y-3.67909 +G01 X-5.93558 Y-3.68015 +G01 X-5.93260 Y-3.68260 +G01 X-5.43260 Y-4.18260 +G01 X-5.43130 Y-4.18403 +G01 X-5.42908 Y-4.18718 +G01 X-5.42727 Y-4.19058 +G01 X-5.42615 Y-4.19428 +G01 X-5.42577 Y-4.19616 +G01 X-5.42539 Y-4.20000 + +G04 P0 ( dwell for no time -- G64 should not smooth over this point ) +G00 Z1.000000 ( retract ) + +M5 ( Spindle off. ) +G04 P1.000000 + +G00 Z1.00000 (Retract to tool change height) +T1 +M5 (Spindle stop.) +G04 P1.00000 (Wait for spindle to stop) +(MSG, Change tool bit to mill diameter 0.00394in) +M6 (Tool change.) +M0 (Temporary machine stop.) +M3 ( Spindle on clockwise. ) +G04 P1.00000 (Wait for spindle to get up to speed) +G04 P0 ( dwell for no time -- G64 should not smooth over this point ) +G00 Z0.08000 ( retract ) + +G00 X-6.95733 Y-4.18232 ( rapid move to begin. ) +G01 F180.00000 +( Mill infeed pass 1/1 ) +G01 Z-0.04000 +G04 P0 ( dwell for no time -- G64 should not smooth over this point ) +G01 F360.00000 +G01 X-6.95733 Y-4.18232 +G01 X-6.95779 Y-4.18251 +G01 X-6.95733 Y-4.18232 +G01 X-6.95682 Y-4.18327 +G01 X-6.95960 Y-4.18327 +G01 X-6.96254 Y-4.18448 +G01 X-6.95960 Y-4.18327 +G01 X-6.95764 Y-4.18130 +G01 X-6.95829 Y-4.17917 +G01 X-6.96436 Y-4.18523 +G01 X-6.96729 Y-4.18645 +G01 X-6.96436 Y-4.18523 +G01 X-6.95577 Y-4.18523 +G01 X-6.95422 Y-4.18720 +G01 X-6.96911 Y-4.18720 +G01 X-6.97204 Y-4.18842 +G01 X-6.96911 Y-4.18720 +G01 X-6.95858 Y-4.17668 +G01 X-6.95856 Y-4.17387 +G01 X-6.97386 Y-4.18917 +G01 X-6.97680 Y-4.19039 +G01 X-6.97386 Y-4.18917 +G01 X-6.95221 Y-4.18917 +G01 X-6.94936 Y-4.19114 +G01 X-6.97861 Y-4.19114 +G01 X-6.98155 Y-4.19236 +G01 X-6.97861 Y-4.19114 +G01 X-6.95794 Y-4.17047 +G01 X-6.95574 Y-4.16548 +G01 X-6.98337 Y-4.19311 +G01 X-5.46663 Y-4.19311 +G01 X-5.49426 Y-4.16548 +G01 X-5.49206 Y-4.17047 +G01 X-5.47138 Y-4.19114 +G01 X-5.46845 Y-4.19236 +G01 X-5.47138 Y-4.19114 +G01 X-5.50064 Y-4.19114 +G01 X-5.49779 Y-4.18917 +G01 X-5.47614 Y-4.18917 +G01 X-5.47320 Y-4.19039 +G01 X-5.47614 Y-4.18917 +G01 X-5.49144 Y-4.17387 +G01 X-5.49142 Y-4.17668 +G01 X-5.48089 Y-4.18720 +G01 X-5.47796 Y-4.18842 +G01 X-5.48089 Y-4.18720 +G01 X-5.49578 Y-4.18720 +G01 X-5.49423 Y-4.18523 +G01 X-5.48564 Y-4.18523 +G01 X-5.48271 Y-4.18645 +G01 X-5.48564 Y-4.18523 +G01 X-5.49171 Y-4.17917 +G01 X-5.49236 Y-4.18130 +G01 X-5.49040 Y-4.18327 +G01 X-5.48746 Y-4.18448 +G01 X-5.49040 Y-4.18327 +G01 X-5.49318 Y-4.18327 +G01 X-5.49267 Y-4.18232 +G01 X-5.49221 Y-4.18251 +G01 X-5.49267 Y-4.18232 + +G04 P0 ( dwell for no time -- G64 should not smooth over this point ) +G00 Z1.000000 ( retract ) + +M5 ( Spindle off. ) +G04 P1.000000 +M9 ( Coolant off. ) +M2 ( Program end. ) + diff --git a/testing/gerbv_example/sharp_corner_2_offset/expected/outp0_original_back.svg b/testing/gerbv_example/sharp_corner_2_offset/expected/outp0_original_back.svg new file mode 100644 index 000000000..a526a85eb --- /dev/null +++ b/testing/gerbv_example/sharp_corner_2_offset/expected/outp0_original_back.svg @@ -0,0 +1,11 @@ + + + + + + diff --git a/testing/gerbv_example/sharp_corner_2_offset/expected/processed_back_0.svg b/testing/gerbv_example/sharp_corner_2_offset/expected/processed_back_0.svg new file mode 100644 index 000000000..d1269b74d --- /dev/null +++ b/testing/gerbv_example/sharp_corner_2_offset/expected/processed_back_0.svg @@ -0,0 +1,14 @@ + + + + + + + + + diff --git a/testing/gerbv_example/sharp_corner_2_offset/expected/processed_back_1.svg b/testing/gerbv_example/sharp_corner_2_offset/expected/processed_back_1.svg new file mode 100644 index 000000000..ff8623520 --- /dev/null +++ b/testing/gerbv_example/sharp_corner_2_offset/expected/processed_back_1.svg @@ -0,0 +1,14 @@ + + + + + + + + + diff --git a/testing/gerbv_example/sharp_corner_2_offset/expected/traced_back_0.svg b/testing/gerbv_example/sharp_corner_2_offset/expected/traced_back_0.svg new file mode 100644 index 000000000..409b15263 --- /dev/null +++ b/testing/gerbv_example/sharp_corner_2_offset/expected/traced_back_0.svg @@ -0,0 +1,12 @@ + + + + + + + diff --git a/testing/gerbv_example/sharp_corner_2_offset/expected/traced_back_1.svg b/testing/gerbv_example/sharp_corner_2_offset/expected/traced_back_1.svg new file mode 100644 index 000000000..97fa2ba89 --- /dev/null +++ b/testing/gerbv_example/sharp_corner_2_offset/expected/traced_back_1.svg @@ -0,0 +1,12 @@ + + + + + + + diff --git a/testing/gerbv_example/sharp_corner_2_offset/millproject b/testing/gerbv_example/sharp_corner_2_offset/millproject new file mode 100644 index 000000000..7ff12d114 --- /dev/null +++ b/testing/gerbv_example/sharp_corner_2_offset/millproject @@ -0,0 +1,28 @@ +back=sharp_corner_2-B.Cu.gbr + +mill-diameters=1mm,0.1mm +isolation-width=1.5mm +vectorial=true +mill-feed=360 in/min +mill-speed=200rotations/second +voronoi=false +zwork=-0.04inch +drill-feed=30 +drill-side=auto +drill-speed=12000 +milldrill=true +onedrill=true +zdrill=-1.6mm +cut-feed=100 +cut-infeed=0.19mm +cut-side=auto +cut-speed=10000 +cutter-diameter=1.5mm +milldrill-diameter=0.8mm +zbridges=-0.6000 +zcut=-0.13mm +fill-outline=true +zsafe=0.08 +zchange=1.0 +mill-feed-direction=climb +tsp-2opt=false diff --git a/testing/gerbv_example/sharp_corner_2_offset/sharp_corner_2-B.Cu.gbr b/testing/gerbv_example/sharp_corner_2_offset/sharp_corner_2-B.Cu.gbr new file mode 100644 index 000000000..39d2c71d1 --- /dev/null +++ b/testing/gerbv_example/sharp_corner_2_offset/sharp_corner_2-B.Cu.gbr @@ -0,0 +1,27 @@ +G04 #@! TF.GenerationSoftware,KiCad,Pcbnew,5.0.1+dfsg1-3* +G04 #@! TF.CreationDate,2019-02-04T08:11:50-05:00* +G04 #@! TF.ProjectId,sharp_corner,73686172705F636F726E65722E6B6963,rev?* +G04 #@! TF.SameCoordinates,Original* +G04 #@! TF.FileFunction,Copper,L2,Bot,Signal* +G04 #@! TF.FilePolarity,Positive* +%FSLAX46Y46*% +G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)* +G04 Created by KiCad (PCBNEW 5.0.1+dfsg1-3) date Mon 04 Feb 2019 08:11:50 AM EST* +%MOMM*% +%LPD*% +G01* +G04 APERTURE LIST* +G04 #@! TA.AperFunction,Conductor* +%ADD10C,0.250000*% +G04 #@! TD* +G04 APERTURE END LIST* +D10* +G04 #@! TO.N,* +X138430000Y-106680000D02* +X151130000Y-93980000D01* +X138430000Y-106680000D02* +X177800000Y-106680000D01* +X177800000Y-106680000D02* +X165100000Y-93980000D01* +G04 #@! TD* +M02*