mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-04-06 00:32:05 +02:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user