mirror of
https://github.com/QIDITECH/QIDIStudio.git
synced 2026-02-07 04:11:50 +03:00
update src\libslic3r
This commit is contained in:
@@ -299,6 +299,8 @@ Model Model::read_from_file(const std::string&
|
||||
} else if (obj_info.face_colors.size() > 0 && obj_info.has_uv_png == false) { // mtl file
|
||||
if (objFn) { // 1.result is ok and pop up a dialog
|
||||
in_out.input_colors = std::move(obj_info.face_colors);
|
||||
in_out.mtl_colors = std::move(obj_info.mtl_colors);
|
||||
in_out.first_time_using_makerlab = obj_info.first_time_using_makerlab;
|
||||
in_out.is_single_color = obj_info.is_single_mtl;
|
||||
in_out.deal_vertex_color = false;
|
||||
objFn(in_out);
|
||||
@@ -986,7 +988,7 @@ std::string Model::get_backup_path()
|
||||
}
|
||||
boost::filesystem::path temp_path(backup_path);
|
||||
std::string temp_path_safe = PathSanitizer::sanitize(temp_path);
|
||||
try {
|
||||
try {
|
||||
if (!boost::filesystem::exists(temp_path))
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(info) << "create /3D/Objects in " << temp_path_safe;
|
||||
@@ -2675,7 +2677,7 @@ ModelObjectPtrs ModelObject::merge_volumes(std::vector<int>& vol_indeces)
|
||||
ModelVolume* vol = upper->add_volume(mesh);
|
||||
for (int i = 0; i < volumes.size();i++) {
|
||||
if (std::find(vol_indeces.begin(), vol_indeces.end(), i) != vol_indeces.end()) {
|
||||
vol->name = volumes[i]->name + "_merged";
|
||||
vol->name = "Merged Parts";
|
||||
vol->config.assign_config(volumes[i]->config);
|
||||
}
|
||||
else
|
||||
@@ -3110,6 +3112,27 @@ std::vector<int> ModelVolume::get_extruders() const
|
||||
if (volume_extruder_id > 0)
|
||||
volume_extruders.push_back(volume_extruder_id);
|
||||
|
||||
// push back filaments for features
|
||||
if (this->config.option("wall_filament") && this->config.option("wall_filament")->getInt() > 0) volume_extruders.push_back(this->config.option("wall_filament")->getInt());
|
||||
// wall_filament of this volume not set, try use object options
|
||||
else if (this->config.option("wall_filament") == nullptr && this->get_object()->config.option("wall_filament") &&
|
||||
this->get_object()->config.option("wall_filament")->getInt() > 0)
|
||||
volume_extruders.push_back(this->get_object()->config.option("wall_filament")->getInt());
|
||||
//due to we cannot access the global config inside modelvolume,
|
||||
// we have to limit the global preset of filament for features
|
||||
|
||||
if (this->config.option("solid_infill_filament") && this->config.option("solid_infill_filament")->getInt() > 0)
|
||||
volume_extruders.push_back(this->config.option("solid_infill_filament")->getInt());
|
||||
else if (this->config.option("solid_infill_filament") == nullptr && this->get_object()->config.option("solid_infill_filament") &&
|
||||
this->get_object()->config.option("solid_infill_filament")->getInt() > 0)
|
||||
volume_extruders.push_back(this->get_object()->config.option("solid_infill_filament")->getInt());
|
||||
|
||||
if (this->config.option("sparse_infill_filament") && this->config.option("sparse_infill_filament")->getInt() > 0)
|
||||
volume_extruders.push_back(this->config.option("sparse_infill_filament")->getInt());
|
||||
else if (this->config.option("sparse_infill_filament") == nullptr && this->get_object()->config.option("sparse_infill_filament") &&
|
||||
this->get_object()->config.option("sparse_infill_filament")->getInt() > 0)
|
||||
volume_extruders.push_back(this->get_object()->config.option("sparse_infill_filament")->getInt());
|
||||
|
||||
return volume_extruders;
|
||||
}
|
||||
|
||||
@@ -3507,6 +3530,24 @@ void ModelVolume::set_text_configuration(const TextConfiguration text_configurat
|
||||
m_text_info.text_configuration = text_configuration;
|
||||
}
|
||||
|
||||
void ModelVolume::check_boldness_skew_min_max(float min_boldness, float max_boldness, float min_skew, float max_skew)
|
||||
{
|
||||
float temp_custom_boldness = m_text_info.text_configuration.style.prop.boldness.value_or(0.f);
|
||||
if (temp_custom_boldness > max_boldness) {
|
||||
m_text_info.text_configuration.style.prop.boldness = 0.f;
|
||||
} else if (temp_custom_boldness < min_boldness) {
|
||||
m_text_info.text_configuration.style.prop.boldness = 0.f;
|
||||
}
|
||||
|
||||
float temp_custom_skew = m_text_info.text_configuration.style.prop.skew.value_or(0.f);
|
||||
if (temp_custom_skew > max_skew) {
|
||||
m_text_info.text_configuration.style.prop.skew = 0.f;
|
||||
}
|
||||
else if(temp_custom_skew < min_skew) {
|
||||
m_text_info.text_configuration.style.prop.skew = 0.f;
|
||||
}
|
||||
}
|
||||
|
||||
const Transform3d &ModelVolume::get_matrix(bool dont_translate, bool dont_rotate, bool dont_scale, bool dont_mirror) const
|
||||
{
|
||||
return m_transformation.get_matrix(dont_translate, dont_rotate, dont_scale, dont_mirror);
|
||||
|
||||
Reference in New Issue
Block a user