mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
FIX:When a smaller negative number is entered for the primer_tower_extra_rib_length, the program crashes.
jira: STUDIO-14677 Change-Id: I67477535ce2e88a2bded23959195ba9b95abf75a (cherry picked from commit 21e01c87b678bc4f639293363591142fc9884f2d)
This commit is contained in:
@@ -3771,9 +3771,10 @@ void WipeTower::plan_tower_new()
|
||||
}
|
||||
|
||||
update_all_layer_depth(max_depth);
|
||||
m_rib_length = std::max({m_rib_length, sqrt(m_wipe_tower_depth * m_wipe_tower_depth + m_wipe_tower_width * m_wipe_tower_width)});
|
||||
float diagonal = sqrt(m_wipe_tower_depth * m_wipe_tower_depth + m_wipe_tower_width * m_wipe_tower_width);
|
||||
m_rib_length = std::max({m_rib_length, diagonal});
|
||||
m_rib_length += m_extra_rib_length;
|
||||
m_rib_length = std::max(0.f, m_rib_length);
|
||||
m_rib_length = std::max(diagonal, m_rib_length);
|
||||
m_rib_width = std::min(m_rib_width, std::min(m_wipe_tower_depth, m_wipe_tower_width) / 2.f); // Ensure that the rib wall of the wipetower are attached to the infill.
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user