Fixed detection of start/end of contiguous extrusion paths

This commit is contained in:
enricoturri1966 2023-11-06 12:14:07 +01:00 committed by Lukas Matena
parent bd985e80f6
commit 1eeeb2db4f

View File

@ -577,7 +577,7 @@ void ViewerImpl::load(const Slic3r::GCodeProcessorResult& gcode_result, const st
}
if (type_to_option(curr_type) == EOptionType::COUNT) {
if (m_vertices.empty() || prev.type != curr.type) {
if (m_vertices.empty() || prev.type != curr.type || prev.extrusion_role != curr.extrusion_role) {
// to be able to properly detect the start/end of a path we add a 'phantom' vertex equal to the current one with
// the exception of the position
const PathVertex vertex = { toVec3f(prev.position), height, width, curr.feedrate, curr.fan_speed,