Incomplete work for using Boost.Polygon to compute medial axis

This commit is contained in:
Alessandro Ranellucci 2014-01-09 17:26:39 +01:00
parent 11f065ca5e
commit bf91f3096a
1650 changed files with 307148 additions and 9 deletions

View file

@ -3,6 +3,7 @@
#include <myinit.h>
#include "Point.hpp"
#include <boost/polygon/polygon.hpp>
namespace Slic3r {
@ -41,4 +42,21 @@ typedef std::vector<Line> Lines;
}
// start Boost
namespace boost { namespace polygon {
template <>
struct geometry_concept<Line> { typedef segment_concept type; };
template <>
struct segment_traits<Line> {
typedef coord_t coordinate_type;
typedef Point point_type;
static inline point_type get(const Line& line, direction_1d dir) {
return dir.to_int() ? line.b : line.a;
}
};
} }
// end Boost
#endif