mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-06-18 18:04:40 +00:00
fix build failed bug .
This commit is contained in:
@@ -422,17 +422,12 @@ public:
|
||||
// This function is useful to split values from multiple extrder / filament settings into separate configurations.
|
||||
void set_at(const ConfigOption *rhs, size_t i, size_t j) override
|
||||
{
|
||||
// SM Orca: Debug logging
|
||||
BOOST_LOG_TRIVIAL(error) << "ConfigOptionVector::set_at: START - this->values.size()=" << this->values.size()
|
||||
<< ", i=" << i << ", j=" << j;
|
||||
|
||||
// It is expected that the vector value has at least one value, which is the default, if not overwritten.
|
||||
assert(! this->values.empty());
|
||||
if (this->values.size() <= i) {
|
||||
// Resize this vector, fill in the new vector fields with the copy of the first field.
|
||||
T v = this->values.front();
|
||||
this->values.resize(i + 1, v);
|
||||
BOOST_LOG_TRIVIAL(error) << "ConfigOptionVector::set_at: resized to " << this->values.size();
|
||||
}
|
||||
|
||||
if (rhs->type() == this->type()) {
|
||||
@@ -449,8 +444,7 @@ public:
|
||||
before_ss << this->values[k];
|
||||
}
|
||||
before_ss << "]";
|
||||
BOOST_LOG_TRIVIAL(error) << "ConfigOptionVector::set_at: before this->values=" << before_ss.str();
|
||||
|
||||
|
||||
// Log other vector
|
||||
std::stringstream other_ss;
|
||||
other_ss << "[";
|
||||
@@ -459,8 +453,6 @@ public:
|
||||
other_ss << other->values[k];
|
||||
}
|
||||
other_ss << "]";
|
||||
BOOST_LOG_TRIVIAL(error) << "ConfigOptionVector::set_at: other->values=" << other_ss.str()
|
||||
<< ", other->get_at(" << j << ")=" << other->get_at(j);
|
||||
|
||||
this->values[i] = other->get_at(j);
|
||||
|
||||
@@ -472,12 +464,10 @@ public:
|
||||
after_ss << this->values[k];
|
||||
}
|
||||
after_ss << "]";
|
||||
BOOST_LOG_TRIVIAL(error) << "ConfigOptionVector::set_at: after this->values[" << i << "]=" << this->values[i]
|
||||
<< ", full=" << after_ss.str();
|
||||
|
||||
|
||||
} else if (rhs->type() == this->scalar_type()) {
|
||||
this->values[i] = static_cast<const ConfigOptionSingle<T>*>(rhs)->value;
|
||||
BOOST_LOG_TRIVIAL(error) << "ConfigOptionVector::set_at: assigned scalar value=" << this->values[i];
|
||||
} else
|
||||
throw ConfigurationError("ConfigOptionVector::set_at(): Assigning an incompatible type");
|
||||
}
|
||||
|
||||
@@ -136,11 +136,7 @@ public:
|
||||
// 映射表为空或没有该耗材的映射,使用默认模运算映射
|
||||
physical_extruder_id = filament_idx % m_physical_extruder_count;
|
||||
}
|
||||
// SM Orca: 日志 - 映射查询
|
||||
BOOST_LOG_TRIVIAL(info) << "GCodeWriter::get_physical_extruder: filament_id=" << filament_idx
|
||||
<< " -> physical_extruder_id=" << physical_extruder_id
|
||||
<< " (map_size=" << m_filament_extruder_map.size() << ", physical_count=" << m_physical_extruder_count << ")"
|
||||
<< (it != m_filament_extruder_map.end() ? " [from_map]" : " [default_mod]");
|
||||
|
||||
return physical_extruder_id;
|
||||
}
|
||||
|
||||
|
||||
@@ -907,16 +907,11 @@ public:
|
||||
if (physical_count == 0) {
|
||||
// 防止除零,使用安全的默认值
|
||||
physical_extruder_id = 0;
|
||||
BOOST_LOG_TRIVIAL(warning) << "Print::get_physical_extruder: nozzle_diameter is empty! Using default physical_extruder=0";
|
||||
|
||||
} else {
|
||||
physical_extruder_id = filament_idx % physical_count;
|
||||
}
|
||||
}
|
||||
// SM Orca: 日志 - 映射查询
|
||||
BOOST_LOG_TRIVIAL(info) << "Print::get_physical_extruder: filament_id=" << filament_idx
|
||||
<< " -> physical_extruder_id=" << physical_extruder_id
|
||||
<< " (map_size=" << m_filament_extruder_map.size() << ")"
|
||||
<< (it != m_filament_extruder_map.end() ? " [from_map]" : " [default_mod]");
|
||||
return physical_extruder_id;
|
||||
}
|
||||
// SM Orca: Initialize filament-to-physical-extruder mapping table
|
||||
|
||||
Reference in New Issue
Block a user