FIX: wrong filament map in layer filament
1.Should calculate cost if filament used in that layer is 1,because we should consider the last filament used in previous layer jira:NONE Signed-off-by: xun.zhang <xun.zhang@bambulab.com> Change-Id: I5838af77f1d73bfa07c65bd6ee12ae352dc3b571
This commit is contained in:
parent
1d4ce2bad5
commit
0756b51eb2
|
@ -192,11 +192,19 @@ std::vector<unsigned int> get_extruders_order(const std::vector<std::vector<floa
|
||||||
bool use_forcast = false,
|
bool use_forcast = false,
|
||||||
float* cost = nullptr)
|
float* cost = nullptr)
|
||||||
{
|
{
|
||||||
if (curr_layer_extruders.size() <= 1) {
|
if (curr_layer_extruders.empty()) {
|
||||||
if (cost)
|
if (cost)
|
||||||
*cost = 0;
|
*cost = 0;
|
||||||
return curr_layer_extruders;
|
return curr_layer_extruders;
|
||||||
}
|
}
|
||||||
|
if (curr_layer_extruders.size() == 1) {
|
||||||
|
if (cost) {
|
||||||
|
*cost = 0;
|
||||||
|
if (start_extruder_id)
|
||||||
|
*cost = wipe_volumes[*start_extruder_id][curr_layer_extruders[0]];
|
||||||
|
}
|
||||||
|
return curr_layer_extruders;
|
||||||
|
}
|
||||||
|
|
||||||
if (use_forcast)
|
if (use_forcast)
|
||||||
return solve_extruder_order_with_forcast(wipe_volumes, curr_layer_extruders, next_layer_extruders, start_extruder_id, cost);
|
return solve_extruder_order_with_forcast(wipe_volumes, curr_layer_extruders, next_layer_extruders, start_extruder_id, cost);
|
||||||
|
|
Loading…
Reference in New Issue