Improve fuzzy skin with modifier (#6759)

* Pass all compatible regions to perimeter generator

* Simplify & unify fuzzify detection

* Simplify `to_thick_polyline`

* Group regions by fuzzy skin settings

* Initial code structure of multi-regional fuzzy skin

* Determine fuzzy type by all compatible regions

* Add fuzzy region debug

* Implement the line split algorithm

* Do splitted fuzzy in classic mode

* Disable debug macros

* Fix infinit loop issue when segment points are out of order

* Fix path connection

* Implement splitted fuzzy in Arachne mode
This commit is contained in:
Noisyfox 2024-09-23 00:41:17 +08:00 committed by GitHub
parent 3d3633f110
commit 9d3d242453
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 707 additions and 92 deletions

View file

@ -194,27 +194,8 @@ struct ExtrusionLine
double area() const;
};
static inline Slic3r::ThickPolyline to_thick_polyline(const Arachne::ExtrusionLine &line_junctions)
{
assert(line_junctions.size() >= 2);
Slic3r::ThickPolyline out;
out.points.emplace_back(line_junctions.front().p);
out.width.emplace_back(line_junctions.front().w);
out.points.emplace_back(line_junctions[1].p);
out.width.emplace_back(line_junctions[1].w);
auto it_prev = line_junctions.begin() + 1;
for (auto it = line_junctions.begin() + 2; it != line_junctions.end(); ++it) {
out.points.emplace_back(it->p);
out.width.emplace_back(it_prev->w);
out.width.emplace_back(it->w);
it_prev = it;
}
return out;
}
static inline Slic3r::ThickPolyline to_thick_polyline(const ClipperLib_Z::Path &path)
template<class PathType>
static inline Slic3r::ThickPolyline to_thick_polyline(const PathType &path)
{
assert(path.size() >= 2);
Slic3r::ThickPolyline out;