ENH: skip_objects: optimize the label_id logic in ModelInstance

Change-Id: Id20fe9b084426036d6cf4f54859655579bec7197
(cherry picked from commit ebb5343eef6aea9e54d11f3d6b98cf11ff941aa5)
This commit is contained in:
lane.wei 2023-06-28 14:42:15 +08:00 committed by Lane.Wei
parent 8620e3ff85
commit d385384907
7 changed files with 41 additions and 21 deletions

View file

@ -1227,9 +1227,18 @@ public:
ModelInstanceEPrintVolumeState print_volume_state;
// Whether or not this instance is printable
bool printable;
bool use_loaded_id_for_label {false};
int arrange_order = 0; // BBS
size_t loaded_id = 0; // BBS
size_t get_labeled_id() const
{
if (use_loaded_id_for_label && (loaded_id > 0))
return loaded_id;
else
return id().id;
}
ModelObject* get_object() const { return this->object; }
const Geometry::Transformation& get_transformation() const { return m_transformation; }