mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-15 04:57:34 +00:00
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:
@@ -40,6 +40,10 @@ struct ExtrusionJunction
|
||||
ExtrusionJunction(const Point p, const coord_t w, const coord_t perimeter_index);
|
||||
|
||||
bool operator==(const ExtrusionJunction& other) const;
|
||||
|
||||
coord_t x() const { return p.x(); }
|
||||
coord_t y() const { return p.y(); }
|
||||
coord_t z() const { return w; }
|
||||
};
|
||||
|
||||
inline Point operator-(const ExtrusionJunction& a, const ExtrusionJunction& b)
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user