Skip to content

Commit

Permalink
Add missing members ESL filter and setters to CoolingBuffer
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSlashEffect committed Jul 27, 2024
1 parent fda9e57 commit b449e6e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/libslic3r/GCode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1726,6 +1726,7 @@ void GCode::_do_export(Print& print_mod, GCodeOutputStream &file, ThumbnailsGene

m_cooling_buffer = make_unique<CoolingBuffer>(*this);
m_cooling_buffer->set_current_extruder(initial_extruder_id);
m_cooling_buffer->set_exclude_print_speed_filter(m_exclude_print_speeds);

// Emit machine envelope limits for the Marlin firmware.
this->print_machine_envelope(file, print);
Expand Down
2 changes: 1 addition & 1 deletion src/libslic3r/GCode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ class GCode : ExtrusionVisitorConst {
std::unique_ptr<GCodeFindReplace> m_find_replace;
std::unique_ptr<PressureEqualizer> m_pressure_equalizer;
std::unique_ptr<WipeTowerIntegration> m_wipe_tower;
std::unique_ptr<ExcludePrintSpeeds> m_exclude_print_speeds;
std::shared_ptr<ExcludePrintSpeeds> m_exclude_print_speeds;

// Heights (print_z) at which the skirt has already been extruded.
std::vector<coordf_t> m_skirt_done;
Expand Down
7 changes: 7 additions & 0 deletions src/libslic3r/GCode/CoolingBuffer.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef slic3r_CoolingBuffer_hpp_
#define slic3r_CoolingBuffer_hpp_

#include "ExcludePrintSpeeds.hpp"
#include "../libslic3r.h"
#include <map>
#include <string>
Expand All @@ -25,6 +26,10 @@ class CoolingBuffer {
CoolingBuffer(GCode &gcodegen);
void reset(const Vec3d &position);
void set_current_extruder(unsigned int extruder_id) { m_current_extruder = extruder_id; }
void set_exclude_print_speed_filter(std::shared_ptr<ExcludePrintSpeeds> _exclude_print_speeds_filter)
{
exclude_print_speeds_filter = std::move(_exclude_print_speeds_filter);
}
/// process the layer: check the time and apply fan / speed change
/// append_time_only: if the layer is only support, then you can put this at true to not process the layer but just append its time to the next one.
std::string process_layer(std::string &&gcode, size_t layer_id, bool flush, bool append_time_only = false);
Expand Down Expand Up @@ -60,6 +65,8 @@ class CoolingBuffer {
std::map<size_t, float> saved_layer_time_support;
std::map<size_t, float> saved_layer_time_object;

std::shared_ptr<ExcludePrintSpeeds> exclude_print_speeds_filter;


// Old logic: proportional.
bool m_cooling_logic_proportional = false;
Expand Down

0 comments on commit b449e6e

Please sign in to comment.