mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
FIX: the API return wrong extruder number; remove the assert
jira: [STUDIO-9532] Change-Id: Ia91a1d277e35f17588de417aee68f418eceb0a11 (cherry picked from commit 2034cadb562d2d4f39a84d0e7c72bc02a23a5f3e)
This commit is contained in:
@@ -1679,16 +1679,27 @@ std::vector<int> PartPlate::get_extruders_without_support(bool conside_custom_gc
|
||||
return plate_extruders;
|
||||
}
|
||||
|
||||
/* -1 is invalid, return extruder 0 or 1*/
|
||||
int PartPlate::get_used_nozzle_by_filament_id(int idx) const
|
||||
/* -1 is invalid, return physical extruder idx*/
|
||||
/* logical extruder: 1-left, 2-right*/
|
||||
/* physical extruder: 0-right, 1-left*/
|
||||
int PartPlate::get_physical_extruder_by_filament_id(const DynamicConfig& g_config, int idx) const
|
||||
{
|
||||
const std::vector<int>& filament_map = get_filament_maps();
|
||||
const std::vector<int>& filament_map = get_real_filament_maps(g_config);
|
||||
if (filament_map.size() < idx)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
return filament_map[idx - 1] - 1;
|
||||
int logical_ext_idx = filament_map[idx - 1];
|
||||
switch (logical_ext_idx)
|
||||
{
|
||||
case 1: return 1;
|
||||
case 2: return 0;
|
||||
default: break;
|
||||
}
|
||||
|
||||
assert(0);
|
||||
return -1;
|
||||
}
|
||||
|
||||
std::vector<int> PartPlate::get_used_filaments()
|
||||
|
||||
Reference in New Issue
Block a user