mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-02-10 10:39:26 -07:00
ENH: add stride in get_index_for_extruder
JIRA: no-jira Change-Id: If529296bf6d35edc35aee3ff497184dce70332d1 (cherry picked from commit e770043c4d7a3e96acfb27f306853cc339da7529)
This commit is contained in:
parent
aba8c12d07
commit
018f0c0353
2 changed files with 4 additions and 4 deletions
|
|
@ -7611,7 +7611,7 @@ bool DynamicPrintConfig::support_different_extruders(int& extruder_count)
|
|||
return (variant_set.size() > 1);
|
||||
}
|
||||
|
||||
int DynamicPrintConfig::get_index_for_extruder(int extruder_id, std::string id_name, ExtruderType extruder_type, NozzleVolumeType nozzle_volume_type, std::string variant_name) const
|
||||
int DynamicPrintConfig::get_index_for_extruder(int extruder_id, std::string id_name, ExtruderType extruder_type, NozzleVolumeType nozzle_volume_type, std::string variant_name, unsigned int stride) const
|
||||
{
|
||||
int ret = -1;
|
||||
|
||||
|
|
@ -7628,12 +7628,12 @@ int DynamicPrintConfig::get_index_for_extruder(int extruder_id, std::string id_n
|
|||
if (id_opt) {
|
||||
const int id = id_opt->get_at(index);
|
||||
if (id == extruder_id) {
|
||||
ret = index;
|
||||
ret = index * stride;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
ret = index;
|
||||
ret = index * stride;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -604,7 +604,7 @@ public:
|
|||
//BBS
|
||||
bool is_using_different_extruders();
|
||||
bool support_different_extruders(int& extruder_count);
|
||||
int get_index_for_extruder(int extruder_id, std::string id_name, ExtruderType extruder_type, NozzleVolumeType nozzle_volume_type, std::string variant_name) const;
|
||||
int get_index_for_extruder(int extruder_id, std::string id_name, ExtruderType extruder_type, NozzleVolumeType nozzle_volume_type, std::string variant_name, unsigned int stride = 1) const;
|
||||
void update_values_to_printer_extruders(DynamicPrintConfig& printer_config, std::set<std::string>& key_set, std::string id_name, std::string variant_name, unsigned int stride = 1, unsigned int extruder_id = 0);
|
||||
|
||||
bool is_custom_defined();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue