mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
Merged pull request "Gyroid improvements" #2730
by @supermerill and @wavexx WIP: The function Fill::connect_infill() is being rewritten to utilize spatial structures wherever possible for lower CPU load and less dynamic memory allocation.
This commit is contained in:
commit
f2dd49a905
8 changed files with 957 additions and 125 deletions
|
@ -77,6 +77,11 @@ public:
|
|||
void triangulate_pp(Points *triangles) const;
|
||||
void triangulate_p2t(Polygons* polygons) const;
|
||||
Lines lines() const;
|
||||
|
||||
// Number of contours (outer contour with holes).
|
||||
size_t num_contours() const { return this->holes.size() + 1; }
|
||||
Polygon& contour_or_hole(size_t idx) { return (idx == 0) ? this->contour : this->holes[idx - 1]; }
|
||||
const Polygon& contour_or_hole(size_t idx) const { return (idx == 0) ? this->contour : this->holes[idx - 1]; }
|
||||
};
|
||||
|
||||
inline bool operator==(const ExPolygon &lhs, const ExPolygon &rhs) { return lhs.contour == rhs.contour && lhs.holes == rhs.holes; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue