mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-25 15:44:12 -06:00
Solved issue with virtual bed management.
libnest2d: Fix for unclosed polygons after merge.
This commit is contained in:
parent
44801f4429
commit
2728f41123
5 changed files with 64 additions and 67 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue