Filter out tiny areas, Fix issue where partial surfaces were cleared and empty when over solid infill

This commit is contained in:
PavelMikus 2023-02-15 13:32:19 +01:00
parent 5e83ecf387
commit 9054aa74b3

View File

@ -1695,7 +1695,7 @@ void PrintObject::bridge_over_infill()
intersection(bridged_area, intersection(bridged_area,
lower_layers_sparse_infill); // cut off parts which are not over sparse infill - material overflow lower_layers_sparse_infill); // cut off parts which are not over sparse infill - material overflow
if (bridged_area.empty()) { if (shrink(bridged_area, 3.0 * flow.scaled_width()).empty()) {
continue; continue;
} }
@ -1980,6 +1980,9 @@ void PrintObject::bridge_over_infill()
for (Surface &surface : region->m_fill_surfaces.surfaces) { for (Surface &surface : region->m_fill_surfaces.surfaces) {
if (s.original_surface == &surface) { if (s.original_surface == &surface) {
Surface tmp(surface, {}); Surface tmp(surface, {});
for (const ExPolygon &expoly : diff_ex(surface.expolygon, s.new_polys)) {
new_surfaces.emplace_back(tmp, expoly);
}
tmp.surface_type = stInternalBridge; tmp.surface_type = stInternalBridge;
tmp.bridge_angle = s.bridge_angle; tmp.bridge_angle = s.bridge_angle;
for (const ExPolygon &expoly : union_ex(s.new_polys)) { for (const ExPolygon &expoly : union_ex(s.new_polys)) {