mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-14 02:07:54 -06:00
Refactor all_objects_are_short
This commit is contained in:
parent
83346aaffa
commit
0b6a1d3636
7 changed files with 9 additions and 12 deletions
|
@ -5223,13 +5223,12 @@ void GLCanvas3D::update_sequential_clearance()
|
|||
// the results are then cached for following displacements
|
||||
if (m_sequential_print_clearance_first_displacement) {
|
||||
m_sequential_print_clearance.m_hull_2d_cache.clear();
|
||||
bool all_objects_are_short = std::all_of(fff_print()->objects().begin(), fff_print()->objects().end(), \
|
||||
[&](PrintObject* obj) { return obj->height() < scale_(fff_print()->config().nozzle_height.value - MARGIN_HEIGHT); });
|
||||
auto [object_skirt_offset, _] = fff_print()->object_skirt_offset();
|
||||
float shrink_factor;
|
||||
if (all_objects_are_short)
|
||||
shrink_factor = scale_(0.5 * MAX_OUTER_NOZZLE_DIAMETER - 0.1);
|
||||
if (fff_print()->is_all_objects_are_short())
|
||||
shrink_factor = scale_(std::max(0.5f * MAX_OUTER_NOZZLE_DIAMETER, object_skirt_offset) - 0.1);
|
||||
else
|
||||
shrink_factor = static_cast<float>(scale_(0.5 * fff_print()->config().extruder_clearance_radius.value - EPSILON));
|
||||
shrink_factor = static_cast<float>(scale_(0.5 * fff_print()->config().extruder_clearance_radius.value - 0.1));
|
||||
|
||||
double mitter_limit = scale_(0.1);
|
||||
m_sequential_print_clearance.m_hull_2d_cache.reserve(m_model->objects.size());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue