Files
OrcaSlicer-bambulab/xs/src/Geometry.hpp
T

36 lines
1.1 KiB
C++
Raw Normal View History

2013-11-22 22:38:30 +01:00
#ifndef slic3r_Geometry_hpp_
#define slic3r_Geometry_hpp_
2014-01-09 19:56:12 +01:00
#include "BoundingBox.hpp"
2013-11-22 22:38:30 +01:00
#include "Polygon.hpp"
2014-01-09 19:56:12 +01:00
#include "boost/polygon/voronoi.hpp"
using boost::polygon::voronoi_builder;
using boost::polygon::voronoi_diagram;
namespace Slic3r { namespace Geometry {
2013-11-22 22:38:30 +01:00
void convex_hull(Points &points, Polygon* hull);
2013-11-23 21:39:05 +01:00
void chained_path(Points &points, std::vector<Points::size_type> &retval, Point start_near);
void chained_path(Points &points, std::vector<Points::size_type> &retval);
2013-11-23 23:21:59 +01:00
template<class T> void chained_path_items(Points &points, T &items, T &retval);
2013-11-22 22:38:30 +01:00
2014-01-09 19:56:12 +01:00
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;
};
} }
2013-11-22 22:38:30 +01:00
#endif