mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-22 06:04:01 -06:00
Rewritten half-edge traversal in a more robust way. Includes first medial axis unit test
This commit is contained in:
parent
eadffe4a9e
commit
b49a652736
4 changed files with 82 additions and 71 deletions
|
@ -21,19 +21,18 @@ class MedialAxis {
|
|||
Points points;
|
||||
Lines lines;
|
||||
void build(Polylines* polylines);
|
||||
void process_edge(const voronoi_diagram<double>::edge_type& edge, Polylines* polylines);
|
||||
void process_edge_neighbors(const voronoi_diagram<double>::edge_type& edge, Polylines* polylines);
|
||||
void process_edge_neighbors(const voronoi_diagram<double>::edge_type& edge, Points* points);
|
||||
bool is_valid_edge(const voronoi_diagram<double>::edge_type& edge) const;
|
||||
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);
|
||||
//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) const;
|
||||
|
||||
private:
|
||||
typedef voronoi_diagram<double> VD;
|
||||
VD vd;
|
||||
BoundingBox bb;
|
||||
std::set<const VD::edge_type*> edge_cache;
|
||||
//BoundingBox bb;
|
||||
std::set<const VD::edge_type*> edges;
|
||||
};
|
||||
|
||||
} }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue