diff --git a/src/libslic3r/ExtrusionEntityCollection.cpp b/src/libslic3r/ExtrusionEntityCollection.cpp index d1d6f91dab1..9008360ebf3 100644 --- a/src/libslic3r/ExtrusionEntityCollection.cpp +++ b/src/libslic3r/ExtrusionEntityCollection.cpp @@ -86,13 +86,13 @@ void ExtrusionEntityCollection::chained_path_from(const Point &start_near) if (this->m_no_sort) { if (this->m_can_reverse) { if (m_entities.size() > 1) { - //can't sort myself, ask first and last thign to sort itself so the first point of each are the best ones + //can't sort myself, ask first and last thing to sort itself so the first point of each are the best ones if (m_entities.front()->is_collection()) { assert(dynamic_cast(m_entities.front()) != nullptr); static_cast(m_entities.front())->chained_path_from(start_near); } else if (m_entities.front()->can_reverse() && m_entities.front()->first_point().distance_to_square(start_near) > - m_entities.front()->first_point().distance_to_square(start_near)) { + m_entities.front()->last_point().distance_to_square(start_near)) { m_entities.front()->reverse(); } if (m_entities.back()->is_collection()) { @@ -100,7 +100,7 @@ void ExtrusionEntityCollection::chained_path_from(const Point &start_near) static_cast(m_entities.back())->chained_path_from(start_near); } else if (m_entities.back()->can_reverse() && m_entities.back()->first_point().distance_to_square(start_near) > - m_entities.back()->first_point().distance_to_square(start_near)) { + m_entities.back()->last_point().distance_to_square(start_near)) { m_entities.back()->reverse(); } //now check if it's better for us to reverse @@ -110,14 +110,14 @@ void ExtrusionEntityCollection::chained_path_from(const Point &start_near) this->reverse(); } } - // now we are in our good order, update the internals + // now we are in our good order, update the internals to the final order Point last_point = start_near; for (ExtrusionEntity *entity : m_entities) { if (entity->is_collection()) { assert(dynamic_cast(entity) != nullptr); static_cast(entity)->chained_path_from(last_point); } else if (entity->can_reverse() && entity->first_point().distance_to_square(last_point) > - entity->first_point().distance_to_square(last_point)) { + entity->last_point().distance_to_square(last_point)) { entity->reverse(); } last_point = entity->last_point(); diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index 2db5d549790..84f8697b534 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -5718,7 +5718,7 @@ void GCode::_extrude_line_cut_corner(std::string& gcode_str, const Line& line, c double GCode::compute_e_per_mm(double path_mm3_per_mm) { // no e if no extrusion axis - if (m_writer.extrusion_axis().empty()) + if (m_writer.extrusion_axis().empty() || path_mm3_per_mm <= 0) return 0; // compute double e_per_mm = path_mm3_per_mm diff --git a/src/slic3r/GUI/DoubleSlider.cpp b/src/slic3r/GUI/DoubleSlider.cpp index 4182f5a09cd..1e588fcf63c 100644 --- a/src/slic3r/GUI/DoubleSlider.cpp +++ b/src/slic3r/GUI/DoubleSlider.cpp @@ -467,8 +467,8 @@ bool Control::ensure_correctly_filled() const //m_layers_areas.clear(); } if (!m_layers_values.empty()) { - ok = m_is_wipe_tower; - assert(m_is_wipe_tower); + //ok = m_is_wipe_tower; + //assert(m_is_wipe_tower); //m_is_wipe_tower = false; }