mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-25 07:34:03 -06:00
NEW:step mesh add 'Split compound and compsolid'
Optimize getting STEP node names. Fix load_same_type_files() GITHUB: #5214 Change-Id: I7d1035c122f21e3b08305509489bce415634ae80 (cherry picked from commit 76a401bfca1897994795cb37ffa9cbcbdaca8b6c) (cherry picked from commit a0669137ec7e698320d0bc50ee986cb3f0e85164)
This commit is contained in:
parent
1e75686221
commit
588f42e2e2
8 changed files with 56 additions and 21 deletions
|
@ -4162,6 +4162,7 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
|
|||
if (linear <= 0) linear = 0.003;
|
||||
double angle = string_to_double_decimal_point(wxGetApp().app_config->get("angle_defletion"));
|
||||
if (angle <= 0) angle = 0.5;
|
||||
bool split_compound = wxGetApp().app_config->get_bool("is_split_compound");
|
||||
model = Slic3r::Model:: read_from_step(path.string(), strategy,
|
||||
[this, &dlg, real_filename, &progress_percent, &file_percent, step_percent, INPUT_FILES_RATIO, total_files, i](int load_stage, int current, int total, bool &cancel)
|
||||
{
|
||||
|
@ -4187,22 +4188,24 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
|
|||
}
|
||||
}
|
||||
},
|
||||
[this, &path, &is_user_cancel, &linear, &angle](Slic3r::Step& file, double& linear_value, double& angle_value)-> int {
|
||||
[this, &path, &is_user_cancel, &linear, &angle, &split_compound](Slic3r::Step& file, double& linear_value, double& angle_value, bool& is_split)-> int {
|
||||
if (wxGetApp().app_config->get_bool("enable_step_mesh_setting")) {
|
||||
StepMeshDialog mesh_dlg(nullptr, file, linear, angle);
|
||||
if (mesh_dlg.ShowModal() == wxID_OK) {
|
||||
linear_value = mesh_dlg.get_linear_defletion();
|
||||
angle_value = mesh_dlg.get_angle_defletion();
|
||||
angle_value = mesh_dlg.get_angle_defletion();
|
||||
is_split = mesh_dlg.get_split_compound_value();
|
||||
return 1;
|
||||
}
|
||||
}else {
|
||||
linear_value = linear;
|
||||
angle_value = angle;
|
||||
is_split = split_compound;
|
||||
return 1;
|
||||
}
|
||||
is_user_cancel = true;
|
||||
return -1;
|
||||
}, linear, angle);
|
||||
}, linear, angle, split_compound);
|
||||
}else {
|
||||
model = Slic3r::Model:: read_from_file(
|
||||
path.string(), nullptr, nullptr, strategy, &plate_data, &project_presets, &is_xxx, &file_version, nullptr,
|
||||
|
@ -5966,7 +5969,8 @@ void Plater::priv::reload_from_disk()
|
|||
boost::iends_with(path, ".step")) {
|
||||
double linear = string_to_double_decimal_point(wxGetApp().app_config->get("linear_defletion"));
|
||||
double angle = string_to_double_decimal_point(wxGetApp().app_config->get("angle_defletion"));
|
||||
new_model = Model::read_from_step(path, LoadStrategy::AddDefaultInstances | LoadStrategy::LoadModel, nullptr, nullptr, nullptr, linear, angle);
|
||||
bool is_split = wxGetApp().app_config->get_bool("is_split_compound");
|
||||
new_model = Model::read_from_step(path, LoadStrategy::AddDefaultInstances | LoadStrategy::LoadModel, nullptr, nullptr, nullptr, linear, angle, is_split);
|
||||
}else {
|
||||
new_model = Model::read_from_file(path, nullptr, nullptr, LoadStrategy::AddDefaultInstances | LoadStrategy::LoadModel, &plate_data, &project_presets, nullptr, nullptr, nullptr, nullptr, nullptr, 0, obj_color_fun);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue