mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-22 14:13:57 -06:00
WIP: MMU segmentation without top and bottom layers
This commit is contained in:
parent
e3c33844d5
commit
f49ceb1e0f
6 changed files with 1322 additions and 11 deletions
|
@ -2081,8 +2081,10 @@ 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) {
|
||||
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) {
|
||||
// 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) {
|
||||
if (! mo_new.volumes[i]->supported_facets.timestamp_matches(mo.volumes[i]->supported_facets))
|
||||
return true;
|
||||
}
|
||||
|
@ -2091,8 +2093,10 @@ bool model_custom_supports_data_changed(const ModelObject& mo, const ModelObject
|
|||
|
||||
bool model_custom_seam_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) {
|
||||
// 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) {
|
||||
if (! mo_new.volumes[i]->seam_facets.timestamp_matches(mo.volumes[i]->seam_facets))
|
||||
return true;
|
||||
}
|
||||
|
@ -2101,8 +2105,10 @@ bool model_custom_seam_data_changed(const ModelObject& mo, const ModelObject& mo
|
|||
|
||||
bool model_mmu_segmentation_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_new.volumes.size(); ++i) {
|
||||
// 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) {
|
||||
if (! mo_new.volumes[i]->mmu_segmentation_facets.timestamp_matches(mo.volumes[i]->mmu_segmentation_facets))
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue