FIX: first layer slice color is not correct

STUDIO-3187

Change-Id: Ic3d3fa6746a339a58494634b576538fcd34d6f80
This commit is contained in:
zhimin.zeng 2023-06-14 18:39:06 +08:00 committed by Lane.Wei
parent 5e4f4f82da
commit 5f04066ac0

View file

@ -1149,8 +1149,7 @@ void PrintObject::slice_volumes()
//BBS: trim surfaces
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);
ExPolygons contour_exp = to_expolygons(std::move(layer->regions()[region_id]->slices.surfaces));
layer->regions()[region_id]->slices.set(intersection_ex(contour_exp, to_polygons(trimming)), stInternal);
}