Tsmith35 per BS PR4631 (#6709)

ENH: support spiral lift with timelapse gcode
The existing implementation did only read the new Z position from the injected timelapse_gcode and flagged the position as unsafe because of this.

This change reads X, Y and Z pos from the timelapgse_gcode and will keep the position state correct to enable safety checks required for using spiral Z hop.

Because of this, spiral Z hop can be used everyhwere now. The same pattern is also applied for layer_change/toolhead gcode injection.

The set_current_position_clear method is unused but will be kept in implementation for future scenarios.

Co-authored-by: Simon ziehmon@users.noreply.github.com
This commit is contained in:
Tom 2024-09-14 10:52:04 -05:00 committed by GitHub
parent 603e3e76b0
commit c8216accfd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 237 additions and 93 deletions

View file

@ -303,7 +303,7 @@ class Print;
static bool contains_reserved_tags(const std::string& gcode, unsigned int max_count, std::vector<std::string>& found_tag);
static int get_gcode_last_filament(const std::string &gcode_str);
static bool get_last_z_from_gcode(const std::string& gcode_str, double& z);
static bool get_last_pos_from_gcode(const std::string& gcode_str, int axis, double& pos);
static const float Wipe_Width;
static const float Wipe_Height;
@ -984,5 +984,3 @@ class Print;
} /* namespace Slic3r */
#endif /* slic3r_GCodeProcessor_hpp_ */