forked from pcb2gcode/pcb2gcode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbg_helpers.hpp
31 lines (21 loc) · 1.14 KB
/
bg_helpers.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef BG_HELPERS_HPP
#define BG_HELPERS_HPP
#include "eulerian_paths.hpp"
#include <boost/functional/hash/hash.hpp>
namespace bg_helpers {
// The below implementations of buffer are similar to bg::buffer but
// always convert to floating-point before doing work, if needed, and
// convert back afterward, if needed. Also, they work if expand_by is
// 0, unlike bg::buffer.
multi_polygon_type_fp buffer(multi_polygon_type_fp const & geometry_in, coordinate_type_fp expand_by);
multi_polygon_type_fp buffer_miter(multi_polygon_type_fp const & geometry_in, coordinate_type_fp expand_by);
template<typename CoordinateType>
multi_polygon_type_fp buffer(polygon_type_fp const & geometry_in, CoordinateType expand_by);
template<typename CoordinateType>
multi_polygon_type_fp buffer(multi_linestring_type_fp const & geometry_in, CoordinateType expand_by);
template<typename CoordinateType>
multi_polygon_type_fp buffer(ring_type_fp const & geometry_in, CoordinateType expand_by);
template<typename CoordinateType>
multi_polygon_type_fp buffer_miter(ring_type_fp const & geometry_in, CoordinateType expand_by);
} // namespace bg_helpers
#endif //BG_HELPERS_HPP