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

@@ -4,6 +4,7 @@
#include <myinit.h>
#include <vector>
#include <math.h>
#include <boost/polygon/polygon.hpp>
namespace Slic3r {
@@ -77,4 +78,20 @@ class Pointf3 : public Pointf
}
// start Boost
namespace boost { namespace polygon {
template <>
struct geometry_concept<Point> { typedef point_concept type; };
template <>
struct point_traits<Point> {
typedef coord_t coordinate_type;
static inline coordinate_type get(const Point& point, orientation_2d orient) {
return (orient == HORIZONTAL) ? point.x : point.y;
}
};
} }
// end Boost
#endif