mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-09 07:56:24 -06:00
explicitly specify linear PA mode for Bambu printers
This commit is contained in:
parent
e551fe57b7
commit
a22a382e1d
3 changed files with 20 additions and 7 deletions
|
@ -1306,6 +1306,8 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
|
||||||
#if ENABLE_GCODE_VIEWER_DATA_CHECKING
|
#if ENABLE_GCODE_VIEWER_DATA_CHECKING
|
||||||
m_last_mm3_per_mm = 0.;
|
m_last_mm3_per_mm = 0.;
|
||||||
#endif // ENABLE_GCODE_VIEWER_DATA_CHECKING
|
#endif // ENABLE_GCODE_VIEWER_DATA_CHECKING
|
||||||
|
|
||||||
|
m_writer.set_is_bbl_machine(is_bbl_printers);
|
||||||
|
|
||||||
// How many times will be change_layer() called?
|
// How many times will be change_layer() called?
|
||||||
// change_layer() in turn increments the progress bar status.
|
// change_layer() in turn increments the progress bar status.
|
||||||
|
|
|
@ -214,12 +214,16 @@ std::string GCodeWriter::set_pressure_advance(double pa) const
|
||||||
std::ostringstream gcode;
|
std::ostringstream gcode;
|
||||||
if (pa < 0)
|
if (pa < 0)
|
||||||
return gcode.str();
|
return gcode.str();
|
||||||
|
if(m_is_bbl_printers){
|
||||||
if (FLAVOR_IS(gcfKlipper))
|
//SoftFever: set L1000 to use linear model
|
||||||
gcode << "SET_PRESSURE_ADVANCE ADVANCE=" << std::setprecision(4) << pa << "; Override pressure advance value\n";
|
gcode << "M900 K" <<std::setprecision(4)<< pa << " L1000 M10 ; Override pressure advance value\n";
|
||||||
else
|
}
|
||||||
gcode << "M900 K" <<std::setprecision(4)<< pa << "; Override pressure advance value\n";
|
else{
|
||||||
|
if (FLAVOR_IS(gcfKlipper))
|
||||||
|
gcode << "SET_PRESSURE_ADVANCE ADVANCE=" << std::setprecision(4) << pa << "; Override pressure advance value\n";
|
||||||
|
else
|
||||||
|
gcode << "M900 K" <<std::setprecision(4)<< pa << "; Override pressure advance value\n";
|
||||||
|
}
|
||||||
return gcode.str();
|
return gcode.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -91,6 +91,10 @@ public:
|
||||||
bool is_current_position_clear() const { return m_is_current_pos_clear; };
|
bool is_current_position_clear() const { return m_is_current_pos_clear; };
|
||||||
//BBS:
|
//BBS:
|
||||||
static const bool full_gcode_comment;
|
static const bool full_gcode_comment;
|
||||||
|
|
||||||
|
//SoftFever
|
||||||
|
void set_is_bbl_machine(bool bval) {m_is_bbl_printers = bval;}
|
||||||
|
const bool is_bbl_printers() const {return m_is_bbl_printers;}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Extruders are sorted by their ID, so that binary search is possible.
|
// Extruders are sorted by their ID, so that binary search is possible.
|
||||||
|
@ -129,7 +133,10 @@ private:
|
||||||
|
|
||||||
//Radian threshold of slope for lazy lift and spiral lift;
|
//Radian threshold of slope for lazy lift and spiral lift;
|
||||||
static const double slope_threshold;
|
static const double slope_threshold;
|
||||||
|
|
||||||
|
//SoftFever
|
||||||
|
bool m_is_bbl_printers = false;
|
||||||
|
|
||||||
std::string _travel_to_z(double z, const std::string &comment);
|
std::string _travel_to_z(double z, const std::string &comment);
|
||||||
std::string _spiral_travel_to_z(double z, const Vec2d &ij_offset, const std::string &comment);
|
std::string _spiral_travel_to_z(double z, const Vec2d &ij_offset, const std::string &comment);
|
||||||
std::string _retract(double length, double restart_extra, const std::string &comment);
|
std::string _retract(double length, double restart_extra, const std::string &comment);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue