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
|
@ -1307,6 +1307,8 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato
|
|||
m_last_mm3_per_mm = 0.;
|
||||
#endif // ENABLE_GCODE_VIEWER_DATA_CHECKING
|
||||
|
||||
m_writer.set_is_bbl_machine(is_bbl_printers);
|
||||
|
||||
// How many times will be change_layer() called?
|
||||
// change_layer() in turn increments the progress bar status.
|
||||
m_layer_count = 0;
|
||||
|
|
|
@ -214,12 +214,16 @@ std::string GCodeWriter::set_pressure_advance(double pa) const
|
|||
std::ostringstream gcode;
|
||||
if (pa < 0)
|
||||
return gcode.str();
|
||||
|
||||
if(m_is_bbl_printers){
|
||||
//SoftFever: set L1000 to use linear model
|
||||
gcode << "M900 K" <<std::setprecision(4)<< pa << " L1000 M10 ; 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();
|
||||
}
|
||||
|
||||
|
|
|
@ -92,6 +92,10 @@ public:
|
|||
//BBS:
|
||||
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:
|
||||
// Extruders are sorted by their ID, so that binary search is possible.
|
||||
std::vector<Extruder> m_extruders;
|
||||
|
@ -130,6 +134,9 @@ private:
|
|||
//Radian threshold of slope for lazy lift and spiral lift;
|
||||
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 _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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue