mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Fixed a crash with a layer range modifier containing no slicing layer.
This commit is contained in:
parent
93a157e26c
commit
6a07b231e1
1 changed files with 14 additions and 13 deletions
|
@ -1659,7 +1659,8 @@ void PrintObject::_slice(const std::vector<coordf_t> &layer_height_profile)
|
||||||
// Trim volumes in a single layer, one by the other, possibly apply upscaling.
|
// Trim volumes in a single layer, one by the other, possibly apply upscaling.
|
||||||
{
|
{
|
||||||
Polygons processed;
|
Polygons processed;
|
||||||
for (SlicedVolume &sliced_volume : sliced_volumes) {
|
for (SlicedVolume &sliced_volume : sliced_volumes)
|
||||||
|
if (! sliced_volume.expolygons_by_layer.empty()) {
|
||||||
ExPolygons slices = std::move(sliced_volume.expolygons_by_layer[layer_id]);
|
ExPolygons slices = std::move(sliced_volume.expolygons_by_layer[layer_id]);
|
||||||
if (upscale)
|
if (upscale)
|
||||||
slices = offset_ex(std::move(slices), delta);
|
slices = offset_ex(std::move(slices), delta);
|
||||||
|
@ -1677,7 +1678,7 @@ void PrintObject::_slice(const std::vector<coordf_t> &layer_height_profile)
|
||||||
ExPolygons expolygons;
|
ExPolygons expolygons;
|
||||||
size_t num_volumes = 0;
|
size_t num_volumes = 0;
|
||||||
for (SlicedVolume &sliced_volume : sliced_volumes)
|
for (SlicedVolume &sliced_volume : sliced_volumes)
|
||||||
if (sliced_volume.region_id == region_id && ! sliced_volume.expolygons_by_layer[layer_id].empty()) {
|
if (sliced_volume.region_id == region_id && ! sliced_volume.expolygons_by_layer.empty() && ! sliced_volume.expolygons_by_layer[layer_id].empty()) {
|
||||||
++ num_volumes;
|
++ num_volumes;
|
||||||
append(expolygons, std::move(sliced_volume.expolygons_by_layer[layer_id]));
|
append(expolygons, std::move(sliced_volume.expolygons_by_layer[layer_id]));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue