adaptive elpehant foot compensation, fixing

GH issues #1757 #2085 #2132 #2423 #2502 #2156 #2773 #2828 #2998 #3001
This commit is contained in:
bubnikv 2019-11-01 19:59:09 +01:00
parent f60fbecd3d
commit a72ac57fab
16 changed files with 715 additions and 52 deletions

View file

@ -88,8 +88,12 @@ ExPolygons Layer::merged(float offset_scaled) const
offset_scaled2 = float(- EPSILON);
}
Polygons polygons;
for (LayerRegion *layerm : m_regions)
append(polygons, offset(to_expolygons(layerm->slices.surfaces), offset_scaled));
for (LayerRegion *layerm : m_regions) {
const PrintRegionConfig &config = layerm->region()->config();
// Our users learned to bend Slic3r to produce empty volumes to act as subtracters. Only add the region if it is non-empty.
if (config.bottom_solid_layers > 0 || config.top_solid_layers > 0 || config.fill_density > 0. || config.perimeters > 0)
append(polygons, offset(to_expolygons(layerm->slices.surfaces), offset_scaled));
}
ExPolygons out = union_ex(polygons);
if (offset_scaled2 != 0.f)
out = offset_ex(out, offset_scaled2);