FIX: the extruder diameter check fault
jira: [none] Change-Id: Ib5719996b0b660bb68ab20c7c38cc6b2ce3a9286
This commit is contained in:
parent
cb1138f66f
commit
0bbc185b71
|
@ -246,8 +246,8 @@
|
||||||
"92"
|
"92"
|
||||||
],
|
],
|
||||||
"physical_extruder_map" : [
|
"physical_extruder_map" : [
|
||||||
"0",
|
"1",
|
||||||
"1"
|
"0"
|
||||||
],
|
],
|
||||||
"printable_area": [
|
"printable_area": [
|
||||||
"0x0",
|
"0x0",
|
||||||
|
|
|
@ -1260,6 +1260,12 @@ std::vector<int> PartPlate::get_extruders_without_support(bool conside_custom_gc
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -1 is invalid, return physical extruder idx*/
|
/* -1 is invalid, return physical extruder idx*/
|
||||||
|
|
||||||
|
/* machine has 1 extruder*/
|
||||||
|
/* logical extruder: 1-unique*/
|
||||||
|
/* physical extruder: 0-unique*/
|
||||||
|
|
||||||
|
/* machine have 2 extruders*/
|
||||||
/* logical extruder: 1-left, 2-right*/
|
/* logical extruder: 1-left, 2-right*/
|
||||||
/* physical extruder: 0-right, 1-left*/
|
/* physical extruder: 0-right, 1-left*/
|
||||||
int PartPlate::get_physical_extruder_by_filament_id(const DynamicConfig& g_config, int idx) const
|
int PartPlate::get_physical_extruder_by_filament_id(const DynamicConfig& g_config, int idx) const
|
||||||
|
@ -1270,16 +1276,14 @@ int PartPlate::get_physical_extruder_by_filament_id(const DynamicConfig& g_confi
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int logical_ext_idx = filament_map[idx - 1];
|
const auto the_map = g_config.option<ConfigOptionInts>("physical_extruder_map");
|
||||||
switch (logical_ext_idx)
|
if (!the_map)
|
||||||
{
|
{
|
||||||
case 1: return 1;
|
return -1;
|
||||||
case 2: return 0;
|
|
||||||
default: break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(0);
|
int zero_base_logical_idx = filament_map[idx - 1] - 1;
|
||||||
return -1;
|
return the_map->values[zero_base_logical_idx];
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<int> PartPlate::get_used_filaments()
|
std::vector<int> PartPlate::get_used_filaments()
|
||||||
|
|
|
@ -1993,7 +1993,7 @@ bool SelectMachineDialog::is_same_nozzle_diameters(float& tag_nozzle_diameter) c
|
||||||
auto used_filament_idxs = cur_plate->get_used_filaments();/*the index is started from 1*/
|
auto used_filament_idxs = cur_plate->get_used_filaments();/*the index is started from 1*/
|
||||||
for (int used_filament_idx : used_filament_idxs)
|
for (int used_filament_idx : used_filament_idxs)
|
||||||
{
|
{
|
||||||
int used_nozzle_idx = cur_plate->get_physical_extruder_by_filament_id(preset_bundle->project_config, used_filament_idx);
|
int used_nozzle_idx = cur_plate->get_physical_extruder_by_filament_id(preset_bundle->full_config(), used_filament_idx);
|
||||||
if (used_nozzle_idx == -1)
|
if (used_nozzle_idx == -1)
|
||||||
{
|
{
|
||||||
assert(0);
|
assert(0);
|
||||||
|
|
Loading…
Reference in New Issue