Fix skirt and brim handling for duplicated objects (instances) (#14683)

This commit is contained in:
Kiss Lorand
2026-07-18 19:57:56 -03:00
committed by GitHub
parent 3926475bb7
commit d6ca71be95
11 changed files with 267 additions and 273 deletions
+13
View File
@@ -3,6 +3,7 @@
#include <cereal/access.hpp>
#include <cereal/types/base_class.hpp>
#include <cstddef>
namespace Slic3r {
@@ -41,6 +42,18 @@ private:
template<class Archive> void serialize(Archive &ar) { ar(id); }
};
struct ObjectInstanceID {
ObjectID object_id;
size_t instance_id { size_t(-1) };
bool operator==(const ObjectInstanceID& rhs) const { return object_id == rhs.object_id && instance_id == rhs.instance_id; }
bool operator!=(const ObjectInstanceID& rhs) const { return !(*this == rhs); }
bool operator<(const ObjectInstanceID& rhs) const
{
return object_id < rhs.object_id || (object_id == rhs.object_id && instance_id < rhs.instance_id);
}
};
// Base for Model, ModelObject, ModelVolume, ModelInstance or ModelMaterial to provide a unique ID
// to synchronize the front end (UI) with the back end (BackgroundSlicingProcess / Print / PrintObject).
// Also base for Print, PrintObject, SLAPrint, SLAPrintObject to provide a unique ID for matching Model / ModelObject