mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 11:23:42 +00:00
Solved issue with virtual bed management.
libnest2d: Fix for unclosed polygons after merge.
This commit is contained in:
@@ -259,10 +259,12 @@ inline TMultiShape<PolygonImpl> clipper_execute(
|
||||
poly.Contour.swap(pptr->Contour);
|
||||
|
||||
assert(!pptr->IsHole());
|
||||
|
||||
if(pptr->IsOpen()) {
|
||||
|
||||
if(!poly.Contour.empty() ) {
|
||||
auto front_p = poly.Contour.front();
|
||||
poly.Contour.emplace_back(front_p);
|
||||
auto &back_p = poly.Contour.back();
|
||||
if(front_p.X != back_p.X || front_p.Y != back_p.X)
|
||||
poly.Contour.emplace_back(front_p);
|
||||
}
|
||||
|
||||
for(auto h : pptr->Childs) { processHole(h, poly); }
|
||||
@@ -274,10 +276,12 @@ inline TMultiShape<PolygonImpl> clipper_execute(
|
||||
poly.Holes.emplace_back(std::move(pptr->Contour));
|
||||
|
||||
assert(pptr->IsHole());
|
||||
|
||||
if(pptr->IsOpen()) {
|
||||
auto front_p = poly.Holes.back().front();
|
||||
poly.Holes.back().emplace_back(front_p);
|
||||
|
||||
if(!poly.Contour.empty() ) {
|
||||
auto front_p = poly.Contour.front();
|
||||
auto &back_p = poly.Contour.back();
|
||||
if(front_p.X != back_p.X || front_p.Y != back_p.X)
|
||||
poly.Contour.emplace_back(front_p);
|
||||
}
|
||||
|
||||
for(auto c : pptr->Childs) processPoly(c);
|
||||
|
||||
Reference in New Issue
Block a user