mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-22 06:04:01 -06:00
Use new libnest backend for MinAreaBoundingBox wrapper
This commit is contained in:
parent
949b0e63e8
commit
a15c16d40d
4 changed files with 32 additions and 72 deletions
|
@ -12,11 +12,9 @@
|
|||
#include "ClipperUtils.hpp"
|
||||
#include "Tesselate.hpp"
|
||||
#include "ExPolygonCollection.hpp"
|
||||
#include "MinAreaBoundingBox.hpp"
|
||||
#include "libslic3r.h"
|
||||
|
||||
#include "libnest2d/backends/libslic3r/geometries.hpp"
|
||||
#include "libnest2d/utils/rotcalipers.hpp"
|
||||
|
||||
#include <iostream>
|
||||
#include <random>
|
||||
|
||||
|
@ -554,7 +552,7 @@ void SupportPointGenerator::uniformly_cover(const ExPolygons& islands, Structure
|
|||
|
||||
if (flags & icfIsNew) {
|
||||
auto chull = ExPolygonCollection{islands}.convex_hull();
|
||||
auto rotbox = libnest2d::minAreaBoundingBox(chull);
|
||||
auto rotbox = MinAreaBoundigBox{chull, MinAreaBoundigBox::pcConvex};
|
||||
Vec2d bbdim = {unscaled(rotbox.width()), unscaled(rotbox.height())};
|
||||
|
||||
if (bbdim.x() > bbdim.y()) std::swap(bbdim.x(), bbdim.y());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue