Yet another fix for https://github.com/prusa3d/Slic3r/issues/607.
Use EPSILON to match two layers by their floating point Z height.
This commit is contained in:
parent
673e98bc83
commit
91e847cb76
@ -265,8 +265,8 @@ void ToolOrdering::fill_wipe_tower_partitions(const PrintConfig &config, coordf_
|
||||
// Insert one additional wipe tower layer between lh.print_z and lt_object.print_z.
|
||||
LayerTools lt_new(0.5f * (lt.print_z + lt_object.print_z));
|
||||
// Find the 1st layer above lt_new.
|
||||
for (j = i + 1; j < m_layer_tools.size() && m_layer_tools[j].print_z < lt_new.print_z; ++ j);
|
||||
if (m_layer_tools[j].print_z == lt_new.print_z) {
|
||||
for (j = i + 1; j < m_layer_tools.size() && m_layer_tools[j].print_z < lt_new.print_z - EPSILON; ++ j);
|
||||
if (std::abs(m_layer_tools[j].print_z - lt_new.print_z) < EPSILON) {
|
||||
m_layer_tools[j].has_wipe_tower = true;
|
||||
} else {
|
||||
LayerTools <_extra = *m_layer_tools.insert(m_layer_tools.begin() + j, lt_new);
|
||||
|
Loading…
Reference in New Issue
Block a user