mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-18 19:12:17 +00:00
FIX: get wrong value in retract params
1.Should get value by filament id instead of extruder id 2.Fix many other issues caused by incorrect usage jira:NONE Signed-off-by: xun.zhang <xun.zhang@bambulab.com> Change-Id: I3278d7de0f8976a97c9e5ccef80bba4a58553f5a (cherry picked from commit 30c51dd1171fc16ba778308745fab2eb246aedd0) (cherry picked from commit e9027478f8948352d99d33519994b044ca18a65a)
This commit is contained in:
@@ -168,22 +168,22 @@ double Extruder::filament_flow_ratio() const
|
||||
// Return a "retract_before_wipe" percentage as a factor clamped to <0, 1>
|
||||
double Extruder::retract_before_wipe() const
|
||||
{
|
||||
return std::min(1., std::max(0., m_config->retract_before_wipe.get_at(extruder_id()) * 0.01));
|
||||
return std::min(1., std::max(0., m_config->retract_before_wipe.get_at(m_id) * 0.01));
|
||||
}
|
||||
|
||||
double Extruder::retraction_length() const
|
||||
{
|
||||
return m_config->retraction_length.get_at(extruder_id());
|
||||
return m_config->retraction_length.get_at(m_id);
|
||||
}
|
||||
|
||||
double Extruder::retract_lift() const
|
||||
{
|
||||
return m_config->z_hop.get_at(extruder_id());
|
||||
return m_config->z_hop.get_at(m_id);
|
||||
}
|
||||
|
||||
int Extruder::retract_speed() const
|
||||
{
|
||||
return int(floor(m_config->retraction_speed.get_at(extruder_id())+0.5));
|
||||
return int(floor(m_config->retraction_speed.get_at(m_id)+0.5));
|
||||
}
|
||||
|
||||
bool Extruder::use_firmware_retraction() const
|
||||
@@ -193,23 +193,23 @@ bool Extruder::use_firmware_retraction() const
|
||||
|
||||
int Extruder::deretract_speed() const
|
||||
{
|
||||
int speed = int(floor(m_config->deretraction_speed.get_at(extruder_id())+0.5));
|
||||
int speed = int(floor(m_config->deretraction_speed.get_at(m_id)+0.5));
|
||||
return (speed > 0) ? speed : this->retract_speed();
|
||||
}
|
||||
|
||||
double Extruder::retract_restart_extra() const
|
||||
{
|
||||
return m_config->retract_restart_extra.get_at(extruder_id());
|
||||
return m_config->retract_restart_extra.get_at(m_id);
|
||||
}
|
||||
|
||||
double Extruder::retract_length_toolchange() const
|
||||
{
|
||||
return m_config->retract_length_toolchange.get_at(extruder_id());
|
||||
return m_config->retract_length_toolchange.get_at(m_id);
|
||||
}
|
||||
|
||||
double Extruder::retract_restart_extra_toolchange() const
|
||||
{
|
||||
return m_config->retract_restart_extra_toolchange.get_at(extruder_id());
|
||||
return m_config->retract_restart_extra_toolchange.get_at(m_id);
|
||||
}
|
||||
|
||||
double Extruder::travel_slope() const
|
||||
|
||||
Reference in New Issue
Block a user