mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 10:32:20 +00:00
ENH: speed up one wall top generate
Signed-off-by: qing.zhang <qing.zhang@bambulab.com> Change-Id: I141565bea3ca4d3fbcc9569b175af5d4f5cdd40e
This commit is contained in:
@@ -147,6 +147,18 @@ void clip_clipper_polygon_with_subject_bbox(const Polygon &src, const BoundingBo
|
||||
out.erase(std::remove_if(out.begin(), out.end(), [](const Polygon &polygon) { return polygon.empty(); }), out.end());
|
||||
return out;
|
||||
}
|
||||
[[nodiscard]] Polygons clip_clipper_polygons_with_subject_bbox(const ExPolygons &src, const BoundingBox &bbox)
|
||||
{
|
||||
Polygons out;
|
||||
out.reserve(number_polygons(src));
|
||||
for (const ExPolygon &p : src) {
|
||||
Polygons temp = clip_clipper_polygons_with_subject_bbox(p, bbox);
|
||||
out.insert(out.end(), temp.begin(), temp.end());
|
||||
}
|
||||
|
||||
out.erase(std::remove_if(out.begin(), out.end(), [](const Polygon &polygon) {return polygon.empty(); }), out.end());
|
||||
return out;
|
||||
}
|
||||
}
|
||||
|
||||
static ExPolygons PolyTreeToExPolygons(ClipperLib::PolyTree &&polytree)
|
||||
|
||||
Reference in New Issue
Block a user