mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-22 14:13:57 -06:00
Some fixes after preceding merge. Moved mmu_segmented_region_max_width
from PrintConfig to PrintObjectConfig.
This commit is contained in:
parent
980ca195f5
commit
409e1c5cc8
6 changed files with 16 additions and 24 deletions
|
@ -2075,43 +2075,34 @@ bool model_volume_list_changed(const ModelObject &model_object_old, const ModelO
|
|||
});
|
||||
}
|
||||
|
||||
bool model_custom_supports_data_changed(const ModelObject& mo, const ModelObject& mo_new) {
|
||||
bool model_custom_supports_data_changed(const ModelObject& mo, const ModelObject& mo_new)
|
||||
{
|
||||
assert(! model_volume_list_changed(mo, mo_new, ModelVolumeType::MODEL_PART));
|
||||
// FIXME Lukas H.: Because of adding another mesh modifiers when slicing, then assert triggered and possible crash. It requires changing the integration of MMU segmentation.
|
||||
// assert(mo.volumes.size() == mo_new.volumes.size());
|
||||
// for (size_t i=0; i<mo.volumes.size(); ++i) {
|
||||
for (size_t i=0; i<std::min(mo.volumes.size(), mo_new.volumes.size()); ++i) {
|
||||
for (size_t i = 0; i < mo.volumes.size(); ++ i)
|
||||
if (! mo_new.volumes[i]->supported_facets.timestamp_matches(mo.volumes[i]->supported_facets))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool model_custom_seam_data_changed(const ModelObject& mo, const ModelObject& mo_new) {
|
||||
bool model_custom_seam_data_changed(const ModelObject& mo, const ModelObject& mo_new)
|
||||
{
|
||||
assert(! model_volume_list_changed(mo, mo_new, ModelVolumeType::MODEL_PART));
|
||||
// FIXME Lukas H.: Because of adding another mesh modifiers when slicing, then assert triggered and possible crash. It requires changing the integration of MMU segmentation.
|
||||
// assert(mo.volumes.size() == mo_new.volumes.size());
|
||||
// for (size_t i=0; i<mo.volumes.size(); ++i) {
|
||||
for (size_t i=0; i<std::min(mo.volumes.size(), mo_new.volumes.size()); ++i) {
|
||||
for (size_t i = 0; i < mo.volumes.size(); ++ i)
|
||||
if (! mo_new.volumes[i]->seam_facets.timestamp_matches(mo.volumes[i]->seam_facets))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool model_mmu_segmentation_data_changed(const ModelObject& mo, const ModelObject& mo_new) {
|
||||
bool model_mmu_segmentation_data_changed(const ModelObject& mo, const ModelObject& mo_new)
|
||||
{
|
||||
assert(! model_volume_list_changed(mo, mo_new, ModelVolumeType::MODEL_PART));
|
||||
// FIXME Lukas H.: Because of adding another mesh modifiers when slicing, then assert triggered and possible crash. It requires changing the integration of MMU segmentation.
|
||||
// assert(mo.volumes.size() == mo_new.volumes.size());
|
||||
// for (size_t i=0; i<mo.volumes.size(); ++i) {
|
||||
for (size_t i=0; i<std::min(mo.volumes.size(), mo_new.volumes.size()); ++i) {
|
||||
for (size_t i = 0; i < mo.volumes.size(); ++ i)
|
||||
if (! mo_new.volumes[i]->mmu_segmentation_facets.timestamp_matches(mo.volumes[i]->mmu_segmentation_facets))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
extern bool model_has_multi_part_objects(const Model &model)
|
||||
bool model_has_multi_part_objects(const Model &model)
|
||||
{
|
||||
for (const ModelObject *model_object : model.objects)
|
||||
if (model_object->volumes.size() != 1 || ! model_object->volumes.front()->is_model_part())
|
||||
|
@ -2119,7 +2110,7 @@ extern bool model_has_multi_part_objects(const Model &model)
|
|||
return false;
|
||||
}
|
||||
|
||||
extern bool model_has_advanced_features(const Model &model)
|
||||
bool model_has_advanced_features(const Model &model)
|
||||
{
|
||||
auto config_is_advanced = [](const ModelConfig &config) {
|
||||
return ! (config.empty() || (config.size() == 1 && config.cbegin()->first == "extruder"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue