Skip to content

Commit

Permalink
Remove a redundant operator
Browse files Browse the repository at this point in the history
  • Loading branch information
eyal0 committed Jul 1, 2020
1 parent 9d08ee1 commit a6368ea
Show file tree
Hide file tree
Showing 33 changed files with 201 additions and 200 deletions.
15 changes: 13 additions & 2 deletions bg_operators.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,19 @@ bg::model::multi_polygon<polygon_type_t> operator&(const bg::model::multi_polygo
}

template multi_polygon_type_fp operator&(const multi_polygon_type_fp&, const multi_polygon_type_fp&);
template multi_polygon_type_fp operator&(multi_polygon_type_fp const&, polygon_type_fp const&);
template multi_polygon_type_fp operator&(multi_polygon_type_fp const&, box_type_fp const&);

template <>
multi_polygon_type_fp operator&(multi_polygon_type_fp const& lhs, polygon_type_fp const& rhs) {
return lhs & multi_polygon_type_fp{rhs};
}

template <>
multi_polygon_type_fp operator&(multi_polygon_type_fp const& lhs, box_type_fp const& rhs) {
auto box_mp = multi_polygon_type_fp();
bg::convert(rhs, box_mp);
return lhs & box_mp;
}


template <typename point_type_t, typename rhs_t>
multi_polygon_type_fp operator&(const bg::model::polygon<point_type_t>& lhs,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1138,7 +1138,7 @@ G01 X-12.03670 Y0.25263
G01 X-12.05329 Y0.19865
G01 X-12.06480 Y0.12944
G01 X-12.06609 Y0.00000
G01 X-15.19832 Y0.00000
G01 X-15.19832 Y0.00003
G01 X-15.20058 Y0.26652
G01 X-15.21361 Y0.32319
G01 X-15.28666 Y0.50279
Expand Down Expand Up @@ -1437,7 +1437,7 @@ G01 X-20.43626 Y0.25916
G01 X-20.46046 Y0.16901
G01 X-20.46559 Y0.11946
G01 X-20.46643 Y0.00000
G01 X-21.06635 Y0.00000
G01 X-21.06635 Y0.00003
G01 X-21.06635 Y0.06485
G01 X-21.08865 Y0.11946
G01 X-21.13895 Y0.21448
Expand Down Expand Up @@ -1599,7 +1599,7 @@ G01 X-25.28242 Y0.26101
G01 X-25.35580 Y0.11946
G01 X-25.37988 Y0.05512
G01 X-25.39121 Y0.00000
G01 X-26.07213 Y0.00000
G01 X-26.07213 Y0.00003
G01 X-26.08069 Y0.04356
G01 X-26.10457 Y0.11189
G01 X-26.15903 Y0.22289
Expand Down Expand Up @@ -1880,7 +1880,7 @@ G01 X-18.87014 Y0.61999
G01 X-18.88853 Y0.43307
G01 X-18.87733 Y0.36497
G01 X-18.86877 Y0.22019
G01 X-18.86521 Y0.00000
G01 X-18.86521 Y0.00003
G01 X-18.86877 Y0.22019
G01 X-18.87733 Y0.36497
G01 X-18.47591 Y0.36185
Expand Down Expand Up @@ -1981,7 +1981,7 @@ G01 X-23.81280 Y0.44768
G01 X-23.72175 Y0.35606
G01 X-23.73185 Y0.26393
G01 X-23.73208 Y0.00000
G01 X-24.30122 Y0.00000
G01 X-24.30122 Y0.00003
G01 X-24.31578 Y0.05039
G01 X-24.35316 Y0.14206
G01 X-24.40407 Y0.22842
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1445,7 +1445,7 @@ G01 X22.96297 Y0.22697
G01 X22.90475 Y0.11206
G01 X22.88151 Y0.04348
G01 X22.87273 Y0.00000
G01 X24.30122 Y0.00000
G01 X24.30122 Y0.00003
G01 X23.73208 Y0.00000
G01 X23.73185 Y0.26393
G01 X23.72175 Y0.35606
Expand All @@ -1465,7 +1465,7 @@ G01 X24.45128 Y0.28562
G01 X24.40407 Y0.22842
G01 X24.35316 Y0.14206
G01 X24.31578 Y0.05039
G01 X24.30122 Y0.00000
G01 X24.30122 Y0.00003
G01 X26.78120 Y0.00000
G01 X26.75984 Y0.08014
G01 X26.70973 Y0.23373
Expand Down Expand Up @@ -1634,7 +1634,7 @@ G01 X18.09849 Y0.36848
G01 X18.47591 Y0.36185
G01 X18.87733 Y0.36497
G01 X18.86877 Y0.22019
G01 X18.86521 Y0.00000
G01 X18.86521 Y0.00003
G01 X18.86877 Y0.22019
G01 X18.87733 Y0.36497
G01 X18.88853 Y0.43307
Expand Down Expand Up @@ -1800,7 +1800,7 @@ G01 X26.19710 Y0.28865
G01 X26.15903 Y0.22289
G01 X26.10457 Y0.11189
G01 X26.08069 Y0.04356
G01 X26.07213 Y0.00000
G01 X26.07213 Y0.00003
G01 X25.39121 Y0.00000
G01 X25.37988 Y0.05512
G01 X25.35580 Y0.11946
Expand Down Expand Up @@ -1910,7 +1910,7 @@ G01 X20.43626 Y0.25916
G01 X20.46046 Y0.16901
G01 X20.46559 Y0.11946
G01 X20.46643 Y0.00000
G01 X21.06635 Y0.00000
G01 X21.06635 Y0.00003
G01 X21.06635 Y0.06485
G01 X21.08865 Y0.11946
G01 X21.13895 Y0.21448
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ G01 X-43.66699 Y0.73089
G01 X-43.60174 Y0.59388
G01 X-43.57893 Y0.50208
G01 X-43.57373 Y0.45169
G01 X-43.57266 Y-0.25400
G01 X-43.57266 Y-0.25397
G01 X-42.90276 Y-0.25400
G01 X-42.90703 Y0.34564
G01 X-42.90494 Y0.43685
Expand Down Expand Up @@ -799,7 +799,7 @@ G01 X-33.61690 Y0.53947
G01 X-33.62965 Y0.48179
G01 X-33.63935 Y0.36896
G01 X-33.63935 Y-0.25400
G01 X-34.17270 Y-0.25400
G01 X-34.17270 Y-0.25397
G01 X-34.17225 Y0.36921
G01 X-34.16569 Y0.45801
G01 X-34.14903 Y0.53967
Expand Down Expand Up @@ -988,7 +988,7 @@ G01 X-41.85989 Y0.64849
G01 X-41.82511 Y0.56403
G01 X-41.79176 Y0.42883
G01 X-41.77464 Y0.23706
G01 X-41.77332 Y-0.25400
G01 X-41.77332 Y-0.25397
G01 X-41.23639 Y-0.25400
G01 X-41.23705 Y0.05413
G01 X-41.24211 Y0.23988
Expand Down
10 changes: 4 additions & 6 deletions testing/gerbv_example/Rotary-Encoder-Breakout/expected/back.ngc
Original file line number Diff line number Diff line change
Expand Up @@ -1512,8 +1512,6 @@ G01 X-0.17569 Y0.68790
G01 X-0.17569 Y0.70955
G01 X-0.17472 Y0.71055
G01 X-0.18375 Y0.70149
G01 X-0.18349 Y0.69969
G01 X-0.18375 Y0.70149
G01 X-0.17569 Y0.70955
G01 X-0.30458 Y0.70955
G01 X-0.30482 Y0.70931
Expand Down Expand Up @@ -1564,7 +1562,7 @@ G01 X-0.19734 Y0.70775
G01 X-0.19452 Y0.70683
G01 X-0.18916 Y0.70452
G01 X-0.18375 Y0.70149
G01 X-0.18348 Y0.69981
G01 X-0.18349 Y0.69969
G01 X-0.18375 Y0.70149
G01 X-0.17471 Y0.71053
G01 X-0.16978 Y0.71422
Expand Down Expand Up @@ -1730,12 +1728,12 @@ G01 X-0.09194 Y0.61613
G01 X-0.10050 Y0.61876
G01 X-0.10873 Y0.62052
G01 X-0.11105 Y0.62087
G01 X-0.12138 Y0.62185
G01 X-0.12138 Y0.62184
G01 X-0.12961 Y0.62184
G01 X-0.13993 Y0.62087
G01 X-0.13993 Y0.62088
G01 X-0.14225 Y0.62050
G01 X-0.15048 Y0.61876
G01 X-0.15328 Y0.61799
G01 X-0.15329 Y0.61801
G01 X-0.16195 Y0.61516
G01 X-0.16630 Y0.62111
G01 X-0.16486 Y0.62096
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit a6368ea

Please sign in to comment.