mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-17 03:05:52 +08:00
Add max_weight_on_model parameter
Limiting the weight of subtrees going to the model body
This commit is contained in:
parent
15a1d9a50a
commit
84784259ba
@ -501,6 +501,7 @@ static std::vector<std::string> s_Preset_sla_print_options {
|
|||||||
"support_pillar_diameter",
|
"support_pillar_diameter",
|
||||||
"support_small_pillar_diameter_percent",
|
"support_small_pillar_diameter_percent",
|
||||||
"support_max_bridges_on_pillar",
|
"support_max_bridges_on_pillar",
|
||||||
|
"support_max_weight_on_model",
|
||||||
"support_pillar_connection_mode",
|
"support_pillar_connection_mode",
|
||||||
"support_buildplate_only",
|
"support_buildplate_only",
|
||||||
"support_pillar_widening_factor",
|
"support_pillar_widening_factor",
|
||||||
|
@ -3676,6 +3676,17 @@ void PrintConfigDef::init_sla_params()
|
|||||||
def->mode = comExpert;
|
def->mode = comExpert;
|
||||||
def->set_default_value(new ConfigOptionInt(3));
|
def->set_default_value(new ConfigOptionInt(3));
|
||||||
|
|
||||||
|
def = this->add("support_max_weight_on_model", coFloat);
|
||||||
|
def->label = L("Max weight on model");
|
||||||
|
def->category = L("Supports");
|
||||||
|
def->tooltip = L(
|
||||||
|
"Maximum weight of sub-trees that terminate on the model instead of the print bed. The weight is the sum of the lenghts of all "
|
||||||
|
"branches emanating from the endpoint.");
|
||||||
|
def->sidetext = L("mm");
|
||||||
|
def->min = 0;
|
||||||
|
def->mode = comExpert;
|
||||||
|
def->set_default_value(new ConfigOptionFloat(10.));
|
||||||
|
|
||||||
def = this->add("support_pillar_connection_mode", coEnum);
|
def = this->add("support_pillar_connection_mode", coEnum);
|
||||||
def->label = L("Pillar connection mode");
|
def->label = L("Pillar connection mode");
|
||||||
def->tooltip = L("Controls the bridge type between two neighboring pillars."
|
def->tooltip = L("Controls the bridge type between two neighboring pillars."
|
||||||
|
@ -861,6 +861,8 @@ PRINT_CONFIG_CLASS_DEFINE(
|
|||||||
// Generate only ground facing supports
|
// Generate only ground facing supports
|
||||||
((ConfigOptionBool, support_buildplate_only))
|
((ConfigOptionBool, support_buildplate_only))
|
||||||
|
|
||||||
|
((ConfigOptionFloat, support_max_weight_on_model))
|
||||||
|
|
||||||
// TODO: unimplemented at the moment. This coefficient will have an impact
|
// TODO: unimplemented at the moment. This coefficient will have an impact
|
||||||
// when bridges and pillars are merged. The resulting pillar should be a bit
|
// when bridges and pillars are merged. The resulting pillar should be a bit
|
||||||
// thicker than the ones merging into it. How much thicker? I don't know
|
// thicker than the ones merging into it. How much thicker? I don't know
|
||||||
|
@ -272,6 +272,9 @@ bool BranchingTreeBuilder::add_ground_bridge(const branchingtree::Node &from,
|
|||||||
bool BranchingTreeBuilder::add_mesh_bridge(const branchingtree::Node &from,
|
bool BranchingTreeBuilder::add_mesh_bridge(const branchingtree::Node &from,
|
||||||
const branchingtree::Node &to)
|
const branchingtree::Node &to)
|
||||||
{
|
{
|
||||||
|
if (from.weight > m_sm.cfg.max_weight_on_model_support)
|
||||||
|
return false;
|
||||||
|
|
||||||
sla::Junction fromj = {from.pos.cast<double>(), get_radius(from)};
|
sla::Junction fromj = {from.pos.cast<double>(), get_radius(from)};
|
||||||
|
|
||||||
auto anchor = m_sm.cfg.ground_facing_only ?
|
auto anchor = m_sm.cfg.ground_facing_only ?
|
||||||
|
@ -77,6 +77,8 @@ struct SupportTreeConfig
|
|||||||
|
|
||||||
unsigned max_bridges_on_pillar = 3;
|
unsigned max_bridges_on_pillar = 3;
|
||||||
|
|
||||||
|
double max_weight_on_model_support = 10.f;
|
||||||
|
|
||||||
double head_fullwidth() const {
|
double head_fullwidth() const {
|
||||||
return 2 * head_front_radius_mm + head_width_mm +
|
return 2 * head_front_radius_mm + head_width_mm +
|
||||||
2 * head_back_radius_mm - head_penetration_mm;
|
2 * head_back_radius_mm - head_penetration_mm;
|
||||||
|
@ -66,6 +66,7 @@ sla::SupportTreeConfig make_support_cfg(const SLAPrintObjectConfig& c)
|
|||||||
scfg.safety_distance_mm : c.support_base_safety_distance.getFloat();
|
scfg.safety_distance_mm : c.support_base_safety_distance.getFloat();
|
||||||
|
|
||||||
scfg.max_bridges_on_pillar = unsigned(c.support_max_bridges_on_pillar.getInt());
|
scfg.max_bridges_on_pillar = unsigned(c.support_max_bridges_on_pillar.getInt());
|
||||||
|
scfg.max_weight_on_model_support = c.support_max_weight_on_model.getFloat();
|
||||||
|
|
||||||
return scfg;
|
return scfg;
|
||||||
}
|
}
|
||||||
@ -843,6 +844,7 @@ bool SLAPrintObject::invalidate_state_by_config_options(const std::vector<t_conf
|
|||||||
|| opt_key == "support_pillar_diameter"
|
|| opt_key == "support_pillar_diameter"
|
||||||
|| opt_key == "support_pillar_widening_factor"
|
|| opt_key == "support_pillar_widening_factor"
|
||||||
|| opt_key == "support_small_pillar_diameter_percent"
|
|| opt_key == "support_small_pillar_diameter_percent"
|
||||||
|
|| opt_key == "support_max_weight_on_model"
|
||||||
|| opt_key == "support_max_bridges_on_pillar"
|
|| opt_key == "support_max_bridges_on_pillar"
|
||||||
|| opt_key == "support_pillar_connection_mode"
|
|| opt_key == "support_pillar_connection_mode"
|
||||||
|| opt_key == "support_buildplate_only"
|
|| opt_key == "support_buildplate_only"
|
||||||
|
@ -390,6 +390,7 @@ void ConfigManipulation::toggle_print_sla_options(DynamicPrintConfig* config)
|
|||||||
toggle_field("support_max_bridge_length", supports_en);
|
toggle_field("support_max_bridge_length", supports_en);
|
||||||
toggle_field("support_max_pillar_link_distance", supports_en && is_default_tree);
|
toggle_field("support_max_pillar_link_distance", supports_en && is_default_tree);
|
||||||
toggle_field("support_pillar_widening_factor", supports_en && is_branching_tree);
|
toggle_field("support_pillar_widening_factor", supports_en && is_branching_tree);
|
||||||
|
toggle_field("support_max_weight_on_model", supports_en && is_branching_tree);
|
||||||
toggle_field("support_points_density_relative", supports_en);
|
toggle_field("support_points_density_relative", supports_en);
|
||||||
toggle_field("support_points_minimal_distance", supports_en);
|
toggle_field("support_points_minimal_distance", supports_en);
|
||||||
|
|
||||||
|
@ -4850,6 +4850,7 @@ void TabSLAPrint::build()
|
|||||||
optgroup->append_single_option_line("support_pillar_connection_mode");
|
optgroup->append_single_option_line("support_pillar_connection_mode");
|
||||||
optgroup->append_single_option_line("support_buildplate_only");
|
optgroup->append_single_option_line("support_buildplate_only");
|
||||||
optgroup->append_single_option_line("support_pillar_widening_factor");
|
optgroup->append_single_option_line("support_pillar_widening_factor");
|
||||||
|
optgroup->append_single_option_line("support_max_weight_on_model");
|
||||||
optgroup->append_single_option_line("support_base_diameter");
|
optgroup->append_single_option_line("support_base_diameter");
|
||||||
optgroup->append_single_option_line("support_base_height");
|
optgroup->append_single_option_line("support_base_height");
|
||||||
optgroup->append_single_option_line("support_base_safety_distance");
|
optgroup->append_single_option_line("support_base_safety_distance");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user