mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-22 06:04:01 -06:00
More work to get Boost.Polygon to compile
This commit is contained in:
parent
bf91f3096a
commit
f9642786d3
8 changed files with 360 additions and 36 deletions
|
@ -1,8 +1,13 @@
|
|||
#ifndef slic3r_Geometry_hpp_
|
||||
#define slic3r_Geometry_hpp_
|
||||
|
||||
#include "BoundingBox.hpp"
|
||||
#include "Polygon.hpp"
|
||||
|
||||
#include "boost/polygon/voronoi.hpp"
|
||||
using boost::polygon::voronoi_builder;
|
||||
using boost::polygon::voronoi_diagram;
|
||||
|
||||
namespace Slic3r { namespace Geometry {
|
||||
|
||||
void convex_hull(Points &points, Polygon* hull);
|
||||
|
@ -10,6 +15,21 @@ void chained_path(Points &points, std::vector<Points::size_type> &retval, Point
|
|||
void chained_path(Points &points, std::vector<Points::size_type> &retval);
|
||||
template<class T> void chained_path_items(Points &points, T &items, T &retval);
|
||||
|
||||
class MedialAxis {
|
||||
public:
|
||||
Points points;
|
||||
Lines lines;
|
||||
void build(Polylines* polylines);
|
||||
void clip_infinite_edge(const voronoi_diagram<double>::edge_type& edge, Points* clipped_edge);
|
||||
void sample_curved_edge(const voronoi_diagram<double>::edge_type& edge, Points* sampled_edge);
|
||||
Point retrieve_point(const voronoi_diagram<double>::cell_type& cell);
|
||||
Line retrieve_segment(const voronoi_diagram<double>::cell_type& cell);
|
||||
|
||||
private:
|
||||
voronoi_diagram<double> vd;
|
||||
BoundingBox bb;
|
||||
};
|
||||
|
||||
} }
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue