mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-27 19:01:02 +00:00
Fix skirt and brim handling for duplicated objects (instances) (#14683)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user