mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
WIP: Synchronization of SLA background processing.
This commit is contained in:
parent
a21f1783a9
commit
314f7dc674
8 changed files with 501 additions and 114 deletions
|
@ -23,6 +23,7 @@ class ModelMaterial;
|
|||
class ModelObject;
|
||||
class ModelVolume;
|
||||
class Print;
|
||||
class SLAPrint;
|
||||
|
||||
typedef std::string t_model_material_id;
|
||||
typedef std::string t_model_material_attribute;
|
||||
|
@ -252,6 +253,7 @@ public:
|
|||
|
||||
protected:
|
||||
friend class Print;
|
||||
friend class SLAPrint;
|
||||
// Called by Print::apply() to set the model pointer after making a copy.
|
||||
void set_model(Model *model) { m_model = model; }
|
||||
|
||||
|
@ -368,6 +370,7 @@ public:
|
|||
|
||||
protected:
|
||||
friend class Print;
|
||||
friend class SLAPrint;
|
||||
friend class ModelObject;
|
||||
|
||||
explicit ModelVolume(const ModelVolume &rhs) = default;
|
||||
|
@ -535,6 +538,7 @@ public:
|
|||
|
||||
protected:
|
||||
friend class Print;
|
||||
friend class SLAPrint;
|
||||
friend class ModelObject;
|
||||
|
||||
explicit ModelInstance(const ModelInstance &rhs) = default;
|
||||
|
@ -652,6 +656,18 @@ private:
|
|||
#undef MODELBASE_DERIVED_COPY_MOVE_CLONE
|
||||
#undef MODELBASE_DERIVED_PRIVATE_COPY_MOVE
|
||||
|
||||
// Test whether the two models contain the same number of ModelObjects with the same set of IDs
|
||||
// ordered in the same order. In that case it is not necessary to kill the background processing.
|
||||
extern bool model_object_list_equal(const Model &model_old, const Model &model_new);
|
||||
|
||||
// Test whether the new model is just an extension of the old model (new objects were added
|
||||
// to the end of the original list. In that case it is not necessary to kill the background processing.
|
||||
extern bool model_object_list_extended(const Model &model_old, const Model &model_new);
|
||||
|
||||
// Test whether the new ModelObject contains a different set of volumes (or sorted in a different order)
|
||||
// than the old ModelObject.
|
||||
extern bool model_volume_list_changed(const ModelObject &model_object_old, const ModelObject &model_object_new, const ModelVolume::Type type);
|
||||
|
||||
#ifdef _DEBUG
|
||||
// Verify whether the IDs of Model / ModelObject / ModelVolume / ModelInstance / ModelMaterial are valid and unique.
|
||||
void check_model_ids_validity(const Model &model);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue