mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-09-17 00:03:17 +08:00
fix weird interior brim when inside an hole (inside island)
supermerill/SuperSlicer#1526
This commit is contained in:
parent
18504bff9c
commit
092f7771c1
@ -2620,15 +2620,20 @@ void Print::_make_brim_interior(const Flow &flow, const PrintObjectPtrs &objects
|
|||||||
for (size_t i = 0; i < num_loops; ++i) {
|
for (size_t i = 0; i < num_loops; ++i) {
|
||||||
this->throw_if_canceled();
|
this->throw_if_canceled();
|
||||||
loops.emplace_back();
|
loops.emplace_back();
|
||||||
islands_to_loops = offset(islands_to_loops, double(-flow.scaled_spacing()), jtSquare);
|
Polygons islands_to_loops_offseted;
|
||||||
for (Polygon& poly : islands_to_loops) {
|
for (Polygon& poly : islands_to_loops) {
|
||||||
|
Polygons temp = offset(poly, double(-flow.scaled_spacing()), jtSquare);
|
||||||
|
for (Polygon& poly : temp) {
|
||||||
poly.points.push_back(poly.points.front());
|
poly.points.push_back(poly.points.front());
|
||||||
Points p = MultiPoint::_douglas_peucker(poly.points, SCALED_RESOLUTION);
|
Points p = MultiPoint::_douglas_peucker(poly.points, SCALED_RESOLUTION);
|
||||||
p.pop_back();
|
p.pop_back();
|
||||||
poly.points = std::move(p);
|
poly.points = std::move(p);
|
||||||
}
|
}
|
||||||
for (Polygon& poly : offset(islands_to_loops, 0.5f * double(flow.scaled_spacing())))
|
for (Polygon& poly : offset(temp, 0.5f * double(flow.scaled_spacing())))
|
||||||
loops[i].emplace_back(poly);
|
loops[i].emplace_back(poly);
|
||||||
|
islands_to_loops_offseted.insert(islands_to_loops_offseted.end(), temp.begin(), temp.end());
|
||||||
|
}
|
||||||
|
islands_to_loops = islands_to_loops_offseted;
|
||||||
}
|
}
|
||||||
//loops = union_pt_chained_outside_in(loops, false);
|
//loops = union_pt_chained_outside_in(loops, false);
|
||||||
std::reverse(loops.begin(), loops.end());
|
std::reverse(loops.begin(), loops.end());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user