mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-25 23:54:00 -06:00
Incomplete work for using Boost.Polygon to compute medial axis
This commit is contained in:
parent
11f065ca5e
commit
bf91f3096a
1650 changed files with 307148 additions and 9 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue