FIX: fix the get_abs_value() slice error

jira: none
Change-Id: I347db986514c3780e1c0176f37724ca50f0ed278
This commit is contained in:
zhimin.zeng 2024-12-16 11:51:05 +08:00 committed by lane.wei
parent 203fdf4cb3
commit 9205ddd296
2 changed files with 3 additions and 2 deletions

View File

@ -711,7 +711,8 @@ double ConfigBase::get_abs_value(const t_config_option_key &opt_key) const
return opt_def->ratio_over.empty() ? 0. :
static_cast<const ConfigOptionFloatOrPercent*>(raw_opt)->get_abs_value(this->get_abs_value(opt_def->ratio_over));
}
throw ConfigurationError("ConfigBase::get_abs_value(): Not a valid option type for get_abs_value()");
std::string err_info = "ConfigBase::get_abs_value(): Not a valid option type for get_abs_value(), parameter : " + opt_key;
throw ConfigurationError(err_info);
}
// Return an absolute value of a possibly relative config variable.

View File

@ -4937,7 +4937,7 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
speed = new_speed == 0.0 ? speed : new_speed;
}
} else if (path.role() == erOverhangPerimeter && path.overhang_degree == 5) {
speed = m_config.get_abs_value("overhang_totally_speed");
speed = m_config.overhang_totally_speed.get_at(cur_extruder_index());
} else if (path.role() == erOverhangPerimeter || path.role() == erBridgeInfill || path.role() == erSupportTransition) {
speed = m_config.bridge_speed.get_at(cur_extruder_index());
} else if (path.role() == erInternalInfill) {