mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 01:52:11 +00:00
ENH: add small perimeter speed and threshold
The original param is added by Prusa. Thanks orca for adding threshold. 1. Re add small perimeter speed and threhold. github: #2221 Change-Id: I35b269b26f085d80f0edca28650bb21fc04898d7
This commit is contained in:
@@ -3888,18 +3888,20 @@ std::string GCode::extrude_loop(ExtrusionLoop loop, std::string description, dou
|
||||
loop.clip_end(clip_length, &paths);
|
||||
if (paths.empty()) return "";
|
||||
|
||||
// BBS: remove small small_perimeter_speed config, and will absolutely
|
||||
// remove related code if no other issue in the coming release.
|
||||
double small_peri_speed=-1;
|
||||
// apply the small perimeter speed
|
||||
//if (is_perimeter(paths.front().role()) && loop.length() <= SMALL_PERIMETER_LENGTH && speed == -1)
|
||||
// speed = m_config.small_perimeter_speed.get_abs_value(m_config.inner_wall_speed);
|
||||
if (speed==-1 && loop.length() <= SMALL_PERIMETER_LENGTH(m_config.small_perimeter_threshold.value))
|
||||
small_peri_speed = m_config.small_perimeter_speed.get_abs_value(m_config.outer_wall_speed);
|
||||
|
||||
// extrude along the path
|
||||
std::string gcode;
|
||||
bool is_small_peri=false;
|
||||
for (ExtrusionPaths::iterator path = paths.begin(); path != paths.end(); ++path) {
|
||||
// description += ExtrusionLoop::role_to_string(loop.loop_role());
|
||||
// description += ExtrusionEntity::role_to_string(path->role);
|
||||
gcode += this->_extrude(*path, description, speed);
|
||||
//BBS: Small perimeter has been considered in curva and overhang detection in speed generater.
|
||||
is_small_peri=(small_peri_speed>0 && is_perimeter(path->role()) && !is_bridge(path->role()) && path->get_overhang_degree()==0);
|
||||
gcode += this->_extrude(*path, description, is_small_peri?small_peri_speed:speed);
|
||||
}
|
||||
|
||||
//BBS: don't reset acceleration when printing first layer. During first layer, acceleration is always same value.
|
||||
|
||||
Reference in New Issue
Block a user