mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 08:47:52 -06:00
Added parameter "support_buildplate_only" for SLA supports.
This commit is contained in:
parent
a35b1a1850
commit
c3e1be7531
7 changed files with 30 additions and 0 deletions
|
@ -2566,6 +2566,14 @@ void PrintConfigDef::init_sla_params()
|
||||||
def->enum_labels.push_back(L("Dynamic"));
|
def->enum_labels.push_back(L("Dynamic"));
|
||||||
def->default_value = new ConfigOptionEnum<SLAPillarConnectionMode>(slapcmDynamic);
|
def->default_value = new ConfigOptionEnum<SLAPillarConnectionMode>(slapcmDynamic);
|
||||||
|
|
||||||
|
def = this->add("support_buildplate_only", coBool);
|
||||||
|
def->label = L("Support on build plate only");
|
||||||
|
def->category = L("Supports");
|
||||||
|
def->tooltip = L("Only create support if it lies on a build plate. Don't create support on a print.");
|
||||||
|
def->cli = "support-buildplate-only!";
|
||||||
|
def->mode = comSimple;
|
||||||
|
def->default_value = new ConfigOptionBool(false);
|
||||||
|
|
||||||
def = this->add("support_pillar_widening_factor", coFloat);
|
def = this->add("support_pillar_widening_factor", coFloat);
|
||||||
def->label = L("Pillar widening factor");
|
def->label = L("Pillar widening factor");
|
||||||
def->category = L("Supports");
|
def->category = L("Supports");
|
||||||
|
|
|
@ -976,6 +976,9 @@ public:
|
||||||
// How the pillars are bridged together
|
// How the pillars are bridged together
|
||||||
ConfigOptionEnum<SLAPillarConnectionMode> support_pillar_connection_mode;
|
ConfigOptionEnum<SLAPillarConnectionMode> support_pillar_connection_mode;
|
||||||
|
|
||||||
|
// Generate only ground facing supports
|
||||||
|
ConfigOptionBool support_buildplate_only;
|
||||||
|
|
||||||
// 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
|
||||||
|
@ -1031,6 +1034,7 @@ protected:
|
||||||
OPT_PTR(support_head_width);
|
OPT_PTR(support_head_width);
|
||||||
OPT_PTR(support_pillar_diameter);
|
OPT_PTR(support_pillar_diameter);
|
||||||
OPT_PTR(support_pillar_connection_mode);
|
OPT_PTR(support_pillar_connection_mode);
|
||||||
|
OPT_PTR(support_buildplate_only);
|
||||||
OPT_PTR(support_pillar_widening_factor);
|
OPT_PTR(support_pillar_widening_factor);
|
||||||
OPT_PTR(support_base_diameter);
|
OPT_PTR(support_base_diameter);
|
||||||
OPT_PTR(support_base_height);
|
OPT_PTR(support_base_height);
|
||||||
|
|
|
@ -1898,6 +1898,17 @@ bool SLASupportTree::generate(const PointSet &points,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if(cfg.ground_facing_only) { // Delete the non-gnd steps if necessary
|
||||||
|
program[ROUTING_NONGROUND] = []() {
|
||||||
|
BOOST_LOG_TRIVIAL(info) << "Skipping non-ground facing supports as "
|
||||||
|
"requested.";
|
||||||
|
};
|
||||||
|
program[HEADLESS] = [](){
|
||||||
|
BOOST_LOG_TRIVIAL(info) << "Skipping headless stick generation as "
|
||||||
|
"requested";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
Steps pc = BEGIN, pc_prev = BEGIN;
|
Steps pc = BEGIN, pc_prev = BEGIN;
|
||||||
|
|
||||||
// Let's define a simple automaton that will run our program.
|
// Let's define a simple automaton that will run our program.
|
||||||
|
|
|
@ -55,6 +55,9 @@ struct SupportConfig {
|
||||||
// How to connect pillars
|
// How to connect pillars
|
||||||
PillarConnectionMode pillar_connection_mode = PillarConnectionMode::dynamic;
|
PillarConnectionMode pillar_connection_mode = PillarConnectionMode::dynamic;
|
||||||
|
|
||||||
|
// Only generate pillars that can be routed to ground
|
||||||
|
bool ground_facing_only = false;
|
||||||
|
|
||||||
// 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
|
||||||
|
|
|
@ -415,6 +415,7 @@ sla::SupportConfig make_support_cfg(const SLAPrintObjectConfig& c) {
|
||||||
case slapcmDynamic:
|
case slapcmDynamic:
|
||||||
scfg.pillar_connection_mode = sla::PillarConnectionMode::dynamic; break;
|
scfg.pillar_connection_mode = sla::PillarConnectionMode::dynamic; break;
|
||||||
}
|
}
|
||||||
|
scfg.ground_facing_only = c.support_buildplate_only.getBool();
|
||||||
scfg.pillar_widening_factor = c.support_pillar_widening_factor.getFloat();
|
scfg.pillar_widening_factor = c.support_pillar_widening_factor.getFloat();
|
||||||
scfg.base_radius_mm = 0.5*c.support_base_diameter.getFloat();
|
scfg.base_radius_mm = 0.5*c.support_base_diameter.getFloat();
|
||||||
scfg.base_height_mm = c.support_base_height.getFloat();
|
scfg.base_height_mm = c.support_base_height.getFloat();
|
||||||
|
@ -1063,6 +1064,7 @@ bool SLAPrintObject::invalidate_state_by_config_options(const std::vector<t_conf
|
||||||
|| opt_key == "support_head_width"
|
|| opt_key == "support_head_width"
|
||||||
|| opt_key == "support_pillar_diameter"
|
|| opt_key == "support_pillar_diameter"
|
||||||
|| opt_key == "support_pillar_connection_mode"
|
|| opt_key == "support_pillar_connection_mode"
|
||||||
|
|| opt_key == "support_buildplate_only"
|
||||||
|| opt_key == "support_base_diameter"
|
|| opt_key == "support_base_diameter"
|
||||||
|| opt_key == "support_base_height"
|
|| opt_key == "support_base_height"
|
||||||
|| opt_key == "support_critical_angle"
|
|| opt_key == "support_critical_angle"
|
||||||
|
|
|
@ -414,6 +414,7 @@ const std::vector<std::string>& Preset::sla_print_options()
|
||||||
"support_head_width",
|
"support_head_width",
|
||||||
"support_pillar_diameter",
|
"support_pillar_diameter",
|
||||||
"support_pillar_connection_mode",
|
"support_pillar_connection_mode",
|
||||||
|
"support_buildplate_only",
|
||||||
"support_pillar_widening_factor",
|
"support_pillar_widening_factor",
|
||||||
"support_base_diameter",
|
"support_base_diameter",
|
||||||
"support_base_height",
|
"support_base_height",
|
||||||
|
|
|
@ -3191,6 +3191,7 @@ void TabSLAPrint::build()
|
||||||
optgroup = page->new_optgroup(_(L("Support pillar")));
|
optgroup = page->new_optgroup(_(L("Support pillar")));
|
||||||
optgroup->append_single_option_line("support_pillar_diameter");
|
optgroup->append_single_option_line("support_pillar_diameter");
|
||||||
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_pillar_widening_factor");
|
optgroup->append_single_option_line("support_pillar_widening_factor");
|
||||||
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");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue