mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-15 10:47:50 -06:00
Ported from the playground branch. Various documentation and optimization.
This commit is contained in:
parent
a5b7f14dfa
commit
620c6c7378
38 changed files with 586 additions and 92 deletions
|
@ -514,4 +514,20 @@ ExPolygon::dump_perl() const
|
|||
return ret.str();
|
||||
}
|
||||
|
||||
BoundingBox get_extents(const ExPolygon &expolygon)
|
||||
{
|
||||
return get_extents(expolygon.contour);
|
||||
}
|
||||
|
||||
BoundingBox get_extents(const ExPolygons &expolygons)
|
||||
{
|
||||
BoundingBox bbox;
|
||||
if (! expolygons.empty()) {
|
||||
bbox = get_extents(expolygons.front());
|
||||
for (size_t i = 1; i < expolygons.size(); ++ i)
|
||||
bbox.merge(get_extents(expolygons[i]));
|
||||
}
|
||||
return bbox;
|
||||
}
|
||||
|
||||
} // namespace Slic3r
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue