ENH: fix hole compensation fail with modifier
Signed-off-by: qing.zhang <qing.zhang@bambulab.com> Change-Id: Ifa71772a1ded8fcb9ae2e4de6723c1a41b3cfe6f
This commit is contained in:
parent
5ddb47a8cd
commit
0207b7915e
1 changed files with 7 additions and 2 deletions
|
@ -1147,8 +1147,13 @@ void PrintObject::slice_volumes()
|
|||
std::min(0.f, xy_hole_scaled),
|
||||
trimming);
|
||||
//BBS: trim surfaces
|
||||
for (size_t region_id = 0; region_id < layer->regions().size(); ++region_id)
|
||||
layer->regions()[region_id]->trim_surfaces(to_polygons(trimming));
|
||||
for (size_t region_id = 0; region_id < layer->regions().size(); ++region_id) {
|
||||
// BBS: split trimming result by region
|
||||
Polygons contour_exp;
|
||||
for (Surface surface : layer->regions()[region_id]->slices.surfaces) contour_exp.push_back(surface.expolygon.contour);
|
||||
|
||||
layer->regions()[region_id]->slices.set(intersection_ex(contour_exp, to_polygons(trimming)), stInternal);
|
||||
}
|
||||
}
|
||||
}
|
||||
// Merge all regions' slices to get islands, chain them by a shortest path.
|
||||
|
|
Loading…
Reference in a new issue