Fix: error the contact layers of different categories
jira: none Change-Id: Ife5508427e0c09527489f1ff973d27463650d60a
This commit is contained in:
parent
68897e897c
commit
6a927ebb55
|
@ -4145,8 +4145,7 @@ void WipeTower::generate_new(std::vector<std::vector<WipeTower::ToolChangeResult
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::unordered_set<int> next_solid_blocks_id;
|
||||||
|
|
||||||
// insert finish block
|
// insert finish block
|
||||||
if (wall_idx != -1) {
|
if (wall_idx != -1) {
|
||||||
if (layer.tool_changes.empty()) {
|
if (layer.tool_changes.empty()) {
|
||||||
|
@ -4181,6 +4180,11 @@ void WipeTower::generate_new(std::vector<std::vector<WipeTower::ToolChangeResult
|
||||||
ToolChangeResult finish_block_tcr;
|
ToolChangeResult finish_block_tcr;
|
||||||
if (interface_solid || (block.solid_infill[m_cur_layer_id] && block.filament_adhesiveness_category != m_filament_categories[finish_layer_filament])) {
|
if (interface_solid || (block.solid_infill[m_cur_layer_id] && block.filament_adhesiveness_category != m_filament_categories[finish_layer_filament])) {
|
||||||
interface_solid = interface_solid && !((block.solid_infill[m_cur_layer_id] && block.filament_adhesiveness_category != m_filament_categories[finish_layer_filament]));//noly reduce speed when
|
interface_solid = interface_solid && !((block.solid_infill[m_cur_layer_id] && block.filament_adhesiveness_category != m_filament_categories[finish_layer_filament]));//noly reduce speed when
|
||||||
|
if (!interface_solid) {
|
||||||
|
int tmp_id = std::find_if(m_wipe_tower_blocks.begin(), m_wipe_tower_blocks.end(), [&](const WipeTowerBlock &b) { return &b == █ }) -
|
||||||
|
m_wipe_tower_blocks.begin();
|
||||||
|
next_solid_blocks_id.insert(tmp_id);
|
||||||
|
}
|
||||||
finish_block_tcr = finish_block_solid(block, finish_layer_filament, layer.extruder_fill, interface_solid);
|
finish_block_tcr = finish_block_solid(block, finish_layer_filament, layer.extruder_fill, interface_solid);
|
||||||
block.finish_depth[m_cur_layer_id] = block.start_depth + block.depth;
|
block.finish_depth[m_cur_layer_id] = block.start_depth + block.depth;
|
||||||
}
|
}
|
||||||
|
@ -4216,20 +4220,8 @@ void WipeTower::generate_new(std::vector<std::vector<WipeTower::ToolChangeResult
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// record the contact layers of different categories
|
// record the contact layers of different categories
|
||||||
solid_blocks_id.clear();
|
solid_blocks_id = next_solid_blocks_id;
|
||||||
if (wall_idx != -1) {
|
|
||||||
for (const WipeTowerBlock &block : m_wipe_tower_blocks) {
|
|
||||||
ToolChangeResult finish_block_tcr;
|
|
||||||
if (block.solid_infill[m_cur_layer_id] && block.filament_adhesiveness_category != m_filament_categories[wall_idx]) {
|
|
||||||
int id = std::find_if(m_wipe_tower_blocks.begin(), m_wipe_tower_blocks.end(), [&](const WipeTowerBlock &b) { return &b == █ }) -
|
|
||||||
m_wipe_tower_blocks.begin();
|
|
||||||
solid_blocks_id.insert(id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (layer_result.empty()) {
|
if (layer_result.empty()) {
|
||||||
// there is nothing to merge finish_layer with
|
// there is nothing to merge finish_layer with
|
||||||
layer_result.emplace_back(std::move(finish_layer_tcr));
|
layer_result.emplace_back(std::move(finish_layer_tcr));
|
||||||
|
|
Loading…
Reference in New Issue