mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-08-06 09:37:55 +00:00
Merge remote-tracking branch 'origin/main' into feature/h2c_support_clean
# Conflicts: # src/libslic3r/PrintApply.cpp # src/libslic3r/PrintConfig.cpp # src/libslic3r/PrintConfig.hpp # tests/libslic3r/test_config.cpp
This commit is contained in:
@@ -10110,7 +10110,7 @@ int DynamicPrintConfig::update_values_from_multi_to_multi_2(const std::vector<st
|
||||
bool has_value = false;
|
||||
double target_value = std::numeric_limits<double>::max();
|
||||
for(auto idx : indices){
|
||||
if(opt && !opt->is_nil(idx)){
|
||||
if(opt && idx < opt->values.size() && !opt->is_nil(idx)){
|
||||
has_value = true;
|
||||
target_value = std::min(target_value, src_values[idx]);
|
||||
}
|
||||
@@ -11068,6 +11068,28 @@ void compute_filament_override_value(const std::string& opt_key, const ConfigOpt
|
||||
}
|
||||
|
||||
|
||||
void update_static_print_config_from_dynamic(ConfigBase& config, const DynamicPrintConfig& dest_config, std::vector<int> variant_index, std::set<std::string>& key_set1, int stride)
|
||||
{
|
||||
if (variant_index.size() > 0) {
|
||||
const t_config_option_keys &keys = dest_config.keys();
|
||||
for (auto& opt : keys) {
|
||||
ConfigOption *opt_src = config.option(opt);
|
||||
const ConfigOption *opt_dest = dest_config.option(opt);
|
||||
if (opt_src && opt_dest && (*opt_src != *opt_dest)) {
|
||||
if (opt_dest->is_scalar() || (key_set1.find(opt) == key_set1.end()))
|
||||
opt_src->set(opt_dest);
|
||||
else {
|
||||
ConfigOptionVectorBase* opt_vec_src = static_cast<ConfigOptionVectorBase*>(opt_src);
|
||||
const ConfigOptionVectorBase* opt_vec_dest = static_cast<const ConfigOptionVectorBase*>(opt_dest);
|
||||
opt_vec_src->set_to_index(opt_vec_dest, variant_index, stride);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
config.apply(dest_config, true);
|
||||
}
|
||||
|
||||
//BBS: pass map to recording all invalid valies
|
||||
//FIXME localize this function.
|
||||
std::map<std::string, std::string> validate(const FullPrintConfig &cfg, bool under_cli)
|
||||
|
||||
Reference in New Issue
Block a user