Fix artifact classic wall generator painted fuzzy skin (#12632)

fix artifact classic fuzzy

Co-authored-by: Ian Bassi <12130714+ianalexis@users.noreply.github.com>
This commit is contained in:
Rodrigo Faselli
2026-03-06 00:27:46 -03:00
committed by GitHub
parent 624a55ec98
commit 01a2193ad9

View File

@@ -301,11 +301,21 @@ Polygon apply_fuzzy_skin(const Polygon& polygon, const PerimeterGenerator& perim
fuzzified.points.clear();
const auto fuzzy_current_segment = [&segment, &fuzzified, &r, slice_z]() {
fuzzified.points.push_back(segment.front());
const auto back = segment.back();
// Orca: non fuzzy points to isolate fuzzy region
const auto front = segment.front();
const auto back = segment.back();
fuzzy_polyline(segment, false, slice_z, r.first);
//Orca: only add non fuzzy point if it's not in the polygon closing point.
if (!fuzzified.points.empty()
&& fuzzified.points.back() != front) {
fuzzified.points.push_back(front);
}
fuzzified.points.insert(fuzzified.points.end(), segment.begin(), segment.end());
fuzzified.points.push_back(back);
//Orca: only add non fuzzy point if it's not in the polygon closing point.
if (!fuzzified.points.empty() && fuzzified.points.back() != front) {
fuzzified.points.push_back(back);
}
segment.clear();
};
@@ -328,7 +338,12 @@ Polygon apply_fuzzy_skin(const Polygon& polygon, const PerimeterGenerator& perim
}
}
}
// Orca: ensure the loop is closed after fuzzification
if (!fuzzified.points.empty() && fuzzified.points.front() != fuzzified.points.back()) {
fuzzified.points.back() = fuzzified.points.front();
}
return fuzzified;
}