Skip to content

Commit

Permalink
Use larger overlap if it is sufficient to cover the isolation width
Browse files Browse the repository at this point in the history
  • Loading branch information
eyal0 committed Jun 30, 2020
1 parent 6daf47b commit f6121b4
Show file tree
Hide file tree
Showing 28 changed files with 13,224 additions and 13,000 deletions.
7 changes: 4 additions & 3 deletions surface_vectorial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -652,16 +652,17 @@ vector<pair<linestring_type_fp, bool>> Surface_vectorial::get_single_toolpath(
if (!isolator) {
extra_passes = 0;
} else {
auto computed_extra_passes = std::ceil(
int computed_extra_passes = int(std::ceil(
(isolator->isolation_width - tool_diameter) /
(tool_diameter - overlap_width) - isolator->tolerance); // In case it divides evenly, do fewer passes.
(tool_diameter - overlap_width) - isolator->tolerance)); // In case it divides evenly, do fewer passes.
if (isolator->extra_passes >= computed_extra_passes) {
extra_passes = isolator->extra_passes;
} else {
extra_passes = computed_extra_passes;
// The actual overlap that we'll use is such that the final pass
// will exactly cover the isolation width and no more.
overlap = overlap_width;
overlap = tool_diameter - ((isolator->isolation_width - tool_diameter) /
(extra_passes + isolator->tolerance));
}
}
const bool do_voronoi = isolator ? isolator->voronoi : false;
Expand Down
8 changes: 4 additions & 4 deletions testing/gerbv_example/backtrack/expected/processed_front.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
157 changes: 79 additions & 78 deletions testing/gerbv_example/backtrack/expected/test-F.Cu-front-0.3mm.nc
Original file line number Diff line number Diff line change
Expand Up @@ -21,86 +21,87 @@ 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.50000 ( retract )

G00 X0.00000 Y0.34511 ( rapid move to begin. )
G00 X0.00000 Y0.34605 ( rapid move to begin. )
G01 F25.00000
( Mill infeed pass 1/1 )
G01 Z-0.15000
G04 P0 ( dwell for no time -- G64 should not smooth over this point )
G01 F100.00000
G01 X0.00000 Y0.34511
G01 X0.00000 Y9.81484
G01 X0.03139 Y9.87359
G01 X0.05893 Y9.91479
G01 X0.12001 Y9.99310
G01 X0.19195 Y10.06157
G01 X0.29238 Y10.13455
G01 X0.34293 Y10.16000
G01 X14.89479 Y10.15997
G01 X14.95359 Y10.12855
G01 X14.99479 Y10.10102
G01 X15.07310 Y10.03993
G01 X15.15735 Y9.94875
G01 X15.23088 Y9.83874
G01 X15.23997 Y9.82167
G01 X15.23997 Y0.34079
G01 X15.18102 Y0.24516
G01 X15.11993 Y0.16685
G01 X15.04800 Y0.09837
G01 X14.94757 Y0.02540
G01 X14.89707 Y0.00000
G01 X0.33823 Y0.00000
G01 X0.23731 Y0.06220
G01 X0.12708 Y0.16210
G01 X0.04313 Y0.26439
G01 X0.00000 Y0.34511
G01 X0.13297 Y0.70998
G01 X0.13297 Y9.44999
G01 X0.13513 Y9.49409
G01 X0.15128 Y9.58637
G01 X0.17689 Y9.67080
G01 X0.21847 Y9.74860
G01 X0.28674 Y9.84199
G01 X0.35392 Y9.90343
G01 X0.40808 Y9.94156
G01 X0.51298 Y9.99028
G01 X0.59736 Y10.01588
G01 X0.68511 Y10.02454
G01 X14.52989 Y10.02698
G01 X14.61778 Y10.01834
G01 X14.66637 Y10.00867
G01 X14.75080 Y9.98306
G01 X14.82860 Y9.94148
G01 X14.92199 Y9.87321
G01 X14.98343 Y9.80603
G01 X15.03243 Y9.73267
G01 X15.07101 Y9.65017
G01 X15.09834 Y9.53778
G01 X15.10698 Y9.44999
G01 X15.10698 Y0.70998
G01 X15.09834 Y0.62217
G01 X15.08867 Y0.57358
G01 X15.07343 Y0.51671
G01 X15.05090 Y0.46233
G01 X14.99395 Y0.37015
G01 X14.95321 Y0.31796
G01 X14.88603 Y0.25651
G01 X14.83187 Y0.21839
G01 X14.77274 Y0.18862
G01 X14.66411 Y0.14889
G01 X14.59885 Y0.13757
G01 X14.52999 Y0.13297
G01 X0.70998 Y0.13297
G01 X0.62217 Y0.14160
G01 X0.50978 Y0.16894
G01 X0.42728 Y0.20752
G01 X0.37135 Y0.24293
G01 X0.32121 Y0.28618
G01 X0.28618 Y0.32121
G01 X0.23020 Y0.38941
G01 X0.18862 Y0.46721
G01 X0.14889 Y0.57584
G01 X0.13757 Y0.64110
G01 X0.13297 Y0.70998
G01 X0.00000 Y0.34605
G01 X0.00000 Y9.81390
G01 X0.03175 Y9.87334
G01 X0.05928 Y9.91456
G01 X0.12035 Y9.99279
G01 X0.19223 Y10.06122
G01 X0.29261 Y10.13417
G01 X0.34392 Y10.15997
G01 X14.89385 Y10.15997
G01 X14.95334 Y10.12820
G01 X14.99456 Y10.10067
G01 X15.07279 Y10.03960
G01 X15.15702 Y9.94847
G01 X15.23047 Y9.83851
G01 X15.23997 Y9.82073
G01 X15.24000 Y0.34168
G01 X15.18067 Y0.24539
G01 X15.11960 Y0.16716
G01 X15.04772 Y0.09873
G01 X14.94734 Y0.02578
G01 X14.89608 Y0.00000
G01 X0.33917 Y0.00000
G01 X0.23757 Y0.06256
G01 X0.12738 Y0.16243
G01 X0.04348 Y0.26464
G01 X0.00000 Y0.34605
G01 X0.13320 Y0.70998
G01 X0.13320 Y9.44999
G01 X0.13536 Y9.49406
G01 X0.15151 Y9.58634
G01 X0.17709 Y9.67069
G01 X0.21867 Y9.74847
G01 X0.28689 Y9.84184
G01 X0.35408 Y9.90326
G01 X0.40818 Y9.94136
G01 X0.51308 Y9.99007
G01 X0.59741 Y10.01568
G01 X0.68511 Y10.02431
G01 X14.52989 Y10.02675
G01 X14.61773 Y10.01812
G01 X14.66634 Y10.00844
G01 X14.75069 Y9.98286
G01 X14.82847 Y9.94128
G01 X14.92184 Y9.87306
G01 X14.98326 Y9.80587
G01 X15.03225 Y9.73257
G01 X15.07081 Y9.65012
G01 X15.09812 Y9.53773
G01 X15.10675 Y9.44999
G01 X15.10675 Y0.70998
G01 X15.09812 Y0.62222
G01 X15.08844 Y0.57361
G01 X15.07322 Y0.51679
G01 X15.05072 Y0.46243
G01 X14.99377 Y0.37028
G01 X14.95306 Y0.31811
G01 X14.88587 Y0.25669
G01 X14.83177 Y0.21859
G01 X14.77267 Y0.18882
G01 X14.66405 Y0.14910
G01 X14.59885 Y0.13780
G01 X14.52999 Y0.13320
G01 X0.70998 Y0.13320
G01 X0.66589 Y0.13536
G01 X0.57361 Y0.15151
G01 X0.50983 Y0.16914
G01 X0.44935 Y0.19596
G01 X0.37147 Y0.24310
G01 X0.28633 Y0.32136
G01 X0.23040 Y0.38953
G01 X0.18882 Y0.46728
G01 X0.16988 Y0.51308
G01 X0.14910 Y0.57589
G01 X0.13780 Y0.64110
G01 X0.13320 Y0.70998
G01 X0.35796 Y0.70998
G01 X0.36716 Y0.63053
G01 X0.37755 Y0.59908
Expand Down Expand Up @@ -177,7 +178,7 @@ G01 X6.35815 Y3.19151
G01 X6.51314 Y3.10802
G01 X6.89734 Y2.94297
G01 X7.17702 Y2.85316
G01 X7.17624 Y2.84958
G01 X7.17624 Y2.84960
G01 X7.17702 Y2.85316
G01 X7.41093 Y2.83144
G01 X7.82914 Y2.82994
Expand All @@ -204,12 +205,12 @@ G01 X9.85142 Y5.52384
G01 X9.83417 Y5.57959
G01 X9.68934 Y5.97218
G01 X9.50973 Y6.34266
G01 X9.51337 Y6.34512
G01 X9.51337 Y6.34510
G01 X9.50973 Y6.34266
G01 X9.43605 Y6.43387
G01 X9.14814 Y6.73725
G01 X8.88180 Y6.96841
G01 X8.88423 Y6.97207
G01 X8.88421 Y6.97207
G01 X8.88180 Y6.96841
G01 X8.72681 Y7.05190
G01 X8.34260 Y7.21698
Expand Down

0 comments on commit f6121b4

Please sign in to comment.