mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-03 20:13:59 -06:00
Merge remote-tracking branch 'remotes/origin/master' into vb_locales
This commit is contained in:
commit
5b6b3e865d
8 changed files with 32 additions and 27 deletions
|
@ -1130,13 +1130,13 @@ void GLVolumeCollection::export_toolpaths_to_obj(const char* filename) const
|
|||
fprintf(fp, "\n# vertices volume %d\n", volumes_count);
|
||||
for (const Vector& v : dst_vertices)
|
||||
{
|
||||
fprintf(fp, "v %f %f %f\n", unscale<float>(v.vector[0]), unscale<float>(v.vector[1]), unscale<float>(v.vector[2]));
|
||||
fprintf(fp, "v %g %g %g\n", unscale<float>(v.vector[0]), unscale<float>(v.vector[1]), unscale<float>(v.vector[2]));
|
||||
}
|
||||
|
||||
fprintf(fp, "\n# normals volume %d\n", volumes_count);
|
||||
for (const Vector& n : dst_normals)
|
||||
{
|
||||
fprintf(fp, "vn %f %f %f\n", unscale<float>(n.vector[0]), unscale<float>(n.vector[1]), unscale<float>(n.vector[2]));
|
||||
fprintf(fp, "vn %g %g %g\n", unscale<float>(n.vector[0]), unscale<float>(n.vector[1]), unscale<float>(n.vector[2]));
|
||||
}
|
||||
|
||||
Color color;
|
||||
|
|
|
@ -351,10 +351,10 @@ void ConfigManipulation::toggle_print_sla_options(DynamicPrintConfig* config)
|
|||
toggle_field("pad_max_merge_distance", pad_en);
|
||||
// toggle_field("pad_edge_radius", supports_en);
|
||||
toggle_field("pad_wall_slope", pad_en);
|
||||
toggle_field("pad_zero_elevation", pad_en);
|
||||
toggle_field("pad_around_object", pad_en);
|
||||
|
||||
bool has_suppad = pad_en && supports_en;
|
||||
bool zero_elev = config->opt_bool("pad_zero_elevation") && has_suppad;
|
||||
bool zero_elev = config->opt_bool("pad_around_object") && has_suppad;
|
||||
|
||||
toggle_field("support_object_elevation", supports_en && !zero_elev);
|
||||
toggle_field("pad_object_gap", zero_elev);
|
||||
|
|
|
@ -563,9 +563,9 @@ FreqChangedParams::FreqChangedParams(wxWindow* parent) :
|
|||
new_conf.set_key_value("pad_enable", new ConfigOptionBool(pad_enable));
|
||||
|
||||
if (selection == _("Below object"))
|
||||
new_conf.set_key_value("pad_zero_elevation", new ConfigOptionBool(false));
|
||||
new_conf.set_key_value("pad_around_object", new ConfigOptionBool(false));
|
||||
else if (selection == _("Around object"))
|
||||
new_conf.set_key_value("pad_zero_elevation", new ConfigOptionBool(true));
|
||||
new_conf.set_key_value("pad_around_object", new ConfigOptionBool(true));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -480,7 +480,7 @@ const std::vector<std::string>& Preset::sla_print_options()
|
|||
// "pad_edge_radius",
|
||||
"pad_wall_slope",
|
||||
"pad_object_gap",
|
||||
"pad_zero_elevation",
|
||||
"pad_around_object",
|
||||
"pad_object_connector_stride",
|
||||
"pad_object_connector_width",
|
||||
"pad_object_connector_penetration",
|
||||
|
|
|
@ -840,7 +840,7 @@ static wxString support_combo_value_for_config(const DynamicPrintConfig &config,
|
|||
|
||||
static wxString pad_combo_value_for_config(const DynamicPrintConfig &config)
|
||||
{
|
||||
return config.opt_bool("pad_enable") ? (config.opt_bool("pad_zero_elevation") ? _("Around object") : _("Below object")) : _("None");
|
||||
return config.opt_bool("pad_enable") ? (config.opt_bool("pad_around_object") ? _("Around object") : _("Below object")) : _("None");
|
||||
}
|
||||
|
||||
void Tab::on_value_change(const std::string& opt_key, const boost::any& value)
|
||||
|
@ -856,13 +856,20 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value)
|
|||
boost::any val = og_freq_chng_params->get_config_value(*m_config, opt_key);
|
||||
og_freq_chng_params->set_value(opt_key, val);
|
||||
}
|
||||
|
||||
if (opt_key == "pad_around_object") {
|
||||
for (PageShp &pg : m_pages) {
|
||||
Field * fld = pg->get_field(opt_key);
|
||||
if (fld) fld->set_value(value, false);
|
||||
}
|
||||
}
|
||||
|
||||
if (is_fff ?
|
||||
(opt_key == "support_material" || opt_key == "support_material_auto" || opt_key == "support_material_buildplate_only") :
|
||||
(opt_key == "supports_enable" || opt_key == "support_buildplate_only"))
|
||||
og_freq_chng_params->set_value("support", support_combo_value_for_config(*m_config, is_fff));
|
||||
|
||||
if (! is_fff && (opt_key == "pad_enable" || opt_key == "pad_zero_elevation"))
|
||||
if (! is_fff && (opt_key == "pad_enable" || opt_key == "pad_around_object"))
|
||||
og_freq_chng_params->set_value("pad", pad_combo_value_for_config(*m_config));
|
||||
|
||||
if (opt_key == "brim_width")
|
||||
|
@ -3742,6 +3749,9 @@ void TabSLAPrint::build()
|
|||
optgroup->append_single_option_line("support_base_diameter");
|
||||
optgroup->append_single_option_line("support_base_height");
|
||||
optgroup->append_single_option_line("support_base_safety_distance");
|
||||
|
||||
// Mirrored parameter from Pad page for toggling elevation on the same page
|
||||
optgroup->append_single_option_line("pad_around_object");
|
||||
optgroup->append_single_option_line("support_object_elevation");
|
||||
|
||||
optgroup = page->new_optgroup(_(L("Connection of the support sticks and junctions")));
|
||||
|
@ -3763,7 +3773,7 @@ void TabSLAPrint::build()
|
|||
// optgroup->append_single_option_line("pad_edge_radius");
|
||||
optgroup->append_single_option_line("pad_wall_slope");
|
||||
|
||||
optgroup->append_single_option_line("pad_zero_elevation");
|
||||
optgroup->append_single_option_line("pad_around_object");
|
||||
optgroup->append_single_option_line("pad_object_gap");
|
||||
optgroup->append_single_option_line("pad_object_connector_stride");
|
||||
optgroup->append_single_option_line("pad_object_connector_width");
|
||||
|
@ -3839,7 +3849,7 @@ void TabSLAPrint::update()
|
|||
get_field("pad_max_merge_distance")->toggle(pad_en);
|
||||
// get_field("pad_edge_radius")->toggle(supports_en);
|
||||
get_field("pad_wall_slope")->toggle(pad_en);
|
||||
get_field("pad_zero_elevation")->toggle(pad_en);
|
||||
get_field("pad_around_object")->toggle(pad_en);
|
||||
|
||||
double head_penetration = m_config->opt_float("support_head_penetration");
|
||||
double head_width = m_config->opt_float("support_head_width");
|
||||
|
@ -3882,7 +3892,7 @@ void TabSLAPrint::update()
|
|||
}
|
||||
|
||||
bool has_suppad = pad_en && supports_en;
|
||||
bool zero_elev = m_config->opt_bool("pad_zero_elevation") && has_suppad;
|
||||
bool zero_elev = m_config->opt_bool("pad_around_object") && has_suppad;
|
||||
|
||||
get_field("support_object_elevation")->toggle(supports_en && !zero_elev);
|
||||
get_field("pad_object_gap")->toggle(zero_elev);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue