Fix of SPE-607
Part changed to Support enforcer is not sliced with one another part
This commit is contained in:
parent
7e8d9c154d
commit
6411ab5b63
2 changed files with 12 additions and 9 deletions
|
@ -1052,10 +1052,12 @@ Print::ApplyStatus Print::apply(const Model &model, const DynamicPrintConfig &co
|
|||
goto print_object_end;
|
||||
} else {
|
||||
this_region_config = region_config_from_model_volume(m_default_region_config, volume, num_extruders);
|
||||
for (size_t i = 0; i < region_id; ++ i)
|
||||
if (m_regions[i]->config().equals(this_region_config))
|
||||
// Regions were merged. Reset this print_object.
|
||||
goto print_object_end;
|
||||
for (size_t i = 0; i < region_id; ++i) {
|
||||
const PrintRegion ®ion_other = *m_regions[i];
|
||||
if (region_other.m_refcnt != 0 && region_other.config().equals(this_region_config))
|
||||
// Regions were merged. Reset this print_object.
|
||||
goto print_object_end;
|
||||
}
|
||||
this_region_config_set = true;
|
||||
}
|
||||
}
|
||||
|
@ -1102,9 +1104,10 @@ Print::ApplyStatus Print::apply(const Model &model, const DynamicPrintConfig &co
|
|||
// Find an existing print region with the same config.
|
||||
int idx_empty_slot = -1;
|
||||
for (int i = 0; i < (int)m_regions.size(); ++ i) {
|
||||
if (m_regions[i]->m_refcnt == 0)
|
||||
idx_empty_slot = i;
|
||||
else if (config.equals(m_regions[i]->config())) {
|
||||
if (m_regions[i]->m_refcnt == 0) {
|
||||
if (idx_empty_slot == -1)
|
||||
idx_empty_slot = i;
|
||||
} else if (config.equals(m_regions[i]->config())) {
|
||||
region_id = i;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -107,8 +107,8 @@ public:
|
|||
// adds region_id, too, if necessary
|
||||
void add_region_volume(unsigned int region_id, int volume_id) {
|
||||
if (region_id >= region_volumes.size())
|
||||
region_volumes.resize(region_id + 1);
|
||||
region_volumes[region_id].push_back(volume_id);
|
||||
region_volumes.assign(region_id + 1, std::vector<int>());
|
||||
region_volumes[region_id].emplace_back(volume_id);
|
||||
}
|
||||
// This is the *total* layer count (including support layers)
|
||||
// this value is not supposed to be compared with Layer::id
|
||||
|
|
Loading…
Reference in a new issue