mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-16 11:17:51 -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
|
@ -1,3 +1,4 @@
|
|||
#include "BoundingBox.hpp"
|
||||
#include "Surface.hpp"
|
||||
|
||||
namespace Slic3r {
|
||||
|
@ -54,4 +55,31 @@ Surface::is_bridge() const
|
|||
|| this->surface_type == stInternalBridge;
|
||||
}
|
||||
|
||||
BoundingBox get_extents(const Surface &surface)
|
||||
{
|
||||
return get_extents(surface.expolygon.contour);
|
||||
}
|
||||
|
||||
BoundingBox get_extents(const Surfaces &surfaces)
|
||||
{
|
||||
BoundingBox bbox;
|
||||
if (! surfaces.empty()) {
|
||||
bbox = get_extents(surfaces.front());
|
||||
for (size_t i = 1; i < surfaces.size(); ++ i)
|
||||
bbox.merge(get_extents(surfaces[i]));
|
||||
}
|
||||
return bbox;
|
||||
}
|
||||
|
||||
BoundingBox get_extents(const SurfacesPtr &surfaces)
|
||||
{
|
||||
BoundingBox bbox;
|
||||
if (! surfaces.empty()) {
|
||||
bbox = get_extents(*surfaces.front());
|
||||
for (size_t i = 1; i < surfaces.size(); ++ i)
|
||||
bbox.merge(get_extents(*surfaces[i]));
|
||||
}
|
||||
return bbox;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue