mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-14 13:45:59 +08:00
fix gapfill bits on outer edge of curves
medial_axis fusion_corners fix using supermerill/SuperSlicer#1583 project to reproduce
This commit is contained in:
parent
3f796cdf78
commit
f138405bba
@ -644,7 +644,6 @@ MedialAxis::fusion_corners(ThickPolylines &pp)
|
||||
//if (polyline.points.size() != 2) continue; // maybe we should have something to merge X-point to 2-point if it's near enough.
|
||||
if (polyline.endpoints.first) polyline.reverse();
|
||||
else if (!polyline.endpoints.second) continue;
|
||||
if (polyline.width.back() > 0) continue;
|
||||
|
||||
//check my length is small
|
||||
coord_t length = (coord_t)polyline.length();
|
||||
@ -676,6 +675,7 @@ MedialAxis::fusion_corners(ThickPolylines &pp)
|
||||
if (pp[crosspoint[0]].endpoints.second && length > pp[crosspoint[0]].length()) continue;
|
||||
if (pp[crosspoint[1]].endpoints.second && length > pp[crosspoint[1]].length()) continue;
|
||||
|
||||
if (polyline.width.back() > 0) {
|
||||
//FIXME: also pull (a bit less) points that are near to this one.
|
||||
// if true, pull it a bit, depends on my size, the dot?, and the coeff at my 0-end (~14% for a square, almost 0 for a gentle curve)
|
||||
coord_t length_pull = (coord_t)polyline.length();
|
||||
@ -698,6 +698,7 @@ MedialAxis::fusion_corners(ThickPolylines &pp)
|
||||
Point& p2 = pp[crosspoint[1]].points[0];
|
||||
p2.x() = p2.x() + (coord_t)pull_direction.x();
|
||||
p2.y() = p2.y() + (coord_t)pull_direction.y();
|
||||
}
|
||||
|
||||
//delete the now unused polyline
|
||||
pp.erase(pp.begin() + i);
|
||||
|
Loading…
x
Reference in New Issue
Block a user