Custom supports data change forces invalidation of supports step

This commit is contained in:
Lukas Matena 2020-04-22 11:16:28 +02:00
parent 8d95345ede
commit d74b5cb1da
3 changed files with 25 additions and 10 deletions

View file

@ -1948,6 +1948,16 @@ bool model_volume_list_changed(const ModelObject &model_object_old, const ModelO
return false;
}
bool model_custom_supports_data_changed(const ModelObject& mo, const ModelObject& mo_new) {
assert(! model_volume_list_changed(mo, mo_new, ModelVolumeType::MODEL_PART));
assert(mo.volumes.size() == mo_new.volumes.size());
for (size_t i=0; i<mo.volumes.size(); ++i) {
if (! mo_new.volumes[i]->m_supported_facets.is_same_as(mo.volumes[i]->m_supported_facets))
return true;
}
return false;
};
extern bool model_has_multi_part_objects(const Model &model)
{
for (const ModelObject *model_object : model.objects)