mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-14 02:07:54 -06:00
Support firmware retration and retract_restart_extra
This commit is contained in:
parent
13cd930bb4
commit
0f04df2699
9 changed files with 101 additions and 24 deletions
|
@ -58,6 +58,7 @@ double Extruder::retract(double length, double restart_extra)
|
|||
m_share_E -= to_retract;
|
||||
m_absolute_E -= to_retract;
|
||||
m_share_retracted += to_retract;
|
||||
m_restart_extra = restart_extra;
|
||||
}
|
||||
return to_retract;
|
||||
} else {
|
||||
|
@ -79,9 +80,10 @@ double Extruder::unretract()
|
|||
{
|
||||
// BBS
|
||||
if (m_share_extruder) {
|
||||
double dE = m_share_retracted;
|
||||
double dE = m_share_retracted + m_restart_extra;
|
||||
this->extrude(dE);
|
||||
m_share_retracted = 0.;
|
||||
m_restart_extra = 0.;
|
||||
return dE;
|
||||
} else {
|
||||
double dE = m_retracted + m_restart_extra;
|
||||
|
@ -157,6 +159,11 @@ int Extruder::retract_speed() const
|
|||
return int(floor(m_config->retraction_speed.get_at(m_id)+0.5));
|
||||
}
|
||||
|
||||
bool Extruder::use_firmware_retraction() const
|
||||
{
|
||||
return m_config->use_firmware_retraction;
|
||||
}
|
||||
|
||||
int Extruder::deretract_speed() const
|
||||
{
|
||||
int speed = int(floor(m_config->deretraction_speed.get_at(m_id)+0.5));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue