Background processing: The milestone state machine was extended

with canceled / invalidated states.
Print / PrintObject infrastructure was extended with a cleanup()
callback, which may check for the new State::Canceled / State::Invalid
states of a particular milestone and turn it to State::Fresh
while releasing data of that particular milestone which is no more valid.

Also fixed a bug in 31fbfa56de
where the PrintObject shared data invalidation condition was flipped.
This commit is contained in:
Vojtech Bubnik 2023-01-12 18:04:59 +01:00
parent dac1e60153
commit 661463645b
6 changed files with 119 additions and 47 deletions

View file

@ -358,11 +358,15 @@ private:
// If ! m_slicing_params.valid, recalculate.
void update_slicing_parameters();
// Called on main thread with stopped or paused background processing to let PrintObject release data for its milestones that were invalidated or canceled.
void cleanup();
static PrintObjectConfig object_config_from_model_object(const PrintObjectConfig &default_object_config, const ModelObject &object, size_t num_extruders);
private:
void make_perimeters();
void prepare_infill();
void clear_fills();
void infill();
void ironing();
void generate_support_spots();