mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 19:33:47 +00: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();
|
fuzzified.points.clear();
|
||||||
|
|
||||||
const auto fuzzy_current_segment = [&segment, &fuzzified, &r, slice_z]() {
|
const auto fuzzy_current_segment = [&segment, &fuzzified, &r, slice_z]() {
|
||||||
fuzzified.points.push_back(segment.front());
|
// Orca: non fuzzy points to isolate fuzzy region
|
||||||
const auto back = segment.back();
|
const auto front = segment.front();
|
||||||
|
const auto back = segment.back();
|
||||||
|
|
||||||
fuzzy_polyline(segment, false, slice_z, r.first);
|
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.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();
|
segment.clear();
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -329,6 +339,11 @@ 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;
|
return fuzzified;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user