mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 00:37:51 -06:00
Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_canvas_manager
This commit is contained in:
commit
d11548cbf9
9 changed files with 35 additions and 12 deletions
|
@ -2654,6 +2654,16 @@ void PrintConfigDef::init_sla_params()
|
||||||
def->mode = comSimple;
|
def->mode = comSimple;
|
||||||
def->set_default_value(new ConfigOptionFloat(1.0));
|
def->set_default_value(new ConfigOptionFloat(1.0));
|
||||||
|
|
||||||
|
def = this->add("support_max_bridges_on_pillar", coInt);
|
||||||
|
def->label = L("Max bridges on a pillar");
|
||||||
|
def->tooltip = L(
|
||||||
|
"Maximum number of bridges that can be placed on a pillar. Bridges "
|
||||||
|
"hold support point pinheads and connect to pillars as small branches.");
|
||||||
|
def->min = 0;
|
||||||
|
def->max = 50;
|
||||||
|
def->mode = comExpert;
|
||||||
|
def->set_default_value(new ConfigOptionInt(3));
|
||||||
|
|
||||||
def = this->add("support_pillar_connection_mode", coEnum);
|
def = this->add("support_pillar_connection_mode", coEnum);
|
||||||
def->label = L("Support pillar connection mode");
|
def->label = L("Support 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."
|
||||||
|
|
|
@ -981,6 +981,9 @@ public:
|
||||||
// Radius in mm of the support pillars.
|
// Radius in mm of the support pillars.
|
||||||
ConfigOptionFloat support_pillar_diameter /*= 0.8*/;
|
ConfigOptionFloat support_pillar_diameter /*= 0.8*/;
|
||||||
|
|
||||||
|
// How much bridge (supporting another pinhead) can be placed on a pillar.
|
||||||
|
ConfigOptionInt support_max_bridges_on_pillar;
|
||||||
|
|
||||||
// How the pillars are bridged together
|
// How the pillars are bridged together
|
||||||
ConfigOptionEnum<SLAPillarConnectionMode> support_pillar_connection_mode;
|
ConfigOptionEnum<SLAPillarConnectionMode> support_pillar_connection_mode;
|
||||||
|
|
||||||
|
@ -1101,6 +1104,7 @@ protected:
|
||||||
OPT_PTR(support_head_penetration);
|
OPT_PTR(support_head_penetration);
|
||||||
OPT_PTR(support_head_width);
|
OPT_PTR(support_head_width);
|
||||||
OPT_PTR(support_pillar_diameter);
|
OPT_PTR(support_pillar_diameter);
|
||||||
|
OPT_PTR(support_max_bridges_on_pillar);
|
||||||
OPT_PTR(support_pillar_connection_mode);
|
OPT_PTR(support_pillar_connection_mode);
|
||||||
OPT_PTR(support_buildplate_only);
|
OPT_PTR(support_buildplate_only);
|
||||||
OPT_PTR(support_pillar_widening_factor);
|
OPT_PTR(support_pillar_widening_factor);
|
||||||
|
|
|
@ -41,7 +41,6 @@ const double SupportConfig::max_dual_pillar_height_mm = 35.0;
|
||||||
const double SupportConfig::optimizer_rel_score_diff = 1e-6;
|
const double SupportConfig::optimizer_rel_score_diff = 1e-6;
|
||||||
const unsigned SupportConfig::optimizer_max_iterations = 1000;
|
const unsigned SupportConfig::optimizer_max_iterations = 1000;
|
||||||
const unsigned SupportConfig::pillar_cascade_neighbors = 3;
|
const unsigned SupportConfig::pillar_cascade_neighbors = 3;
|
||||||
const unsigned SupportConfig::max_bridges_on_pillar = 3;
|
|
||||||
|
|
||||||
void SupportTree::retrieve_full_mesh(TriangleMesh &outmesh) const {
|
void SupportTree::retrieve_full_mesh(TriangleMesh &outmesh) const {
|
||||||
outmesh.merge(retrieve_mesh(MeshType::Support));
|
outmesh.merge(retrieve_mesh(MeshType::Support));
|
||||||
|
|
|
@ -83,6 +83,8 @@ struct SupportConfig
|
||||||
// body. This is only useful when elevation is set to zero.
|
// body. This is only useful when elevation is set to zero.
|
||||||
double pillar_base_safety_distance_mm = 0.5;
|
double pillar_base_safety_distance_mm = 0.5;
|
||||||
|
|
||||||
|
unsigned max_bridges_on_pillar = 3;
|
||||||
|
|
||||||
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;
|
||||||
|
@ -103,7 +105,7 @@ struct SupportConfig
|
||||||
static const double optimizer_rel_score_diff;
|
static const double optimizer_rel_score_diff;
|
||||||
static const unsigned optimizer_max_iterations;
|
static const unsigned optimizer_max_iterations;
|
||||||
static const unsigned pillar_cascade_neighbors;
|
static const unsigned pillar_cascade_neighbors;
|
||||||
static const unsigned max_bridges_on_pillar;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class MeshType { Support, Pad };
|
enum class MeshType { Support, Pad };
|
||||||
|
|
|
@ -65,6 +65,8 @@ sla::SupportConfig make_support_cfg(const SLAPrintObjectConfig& c)
|
||||||
c.support_base_safety_distance.getFloat() < EPSILON ?
|
c.support_base_safety_distance.getFloat() < EPSILON ?
|
||||||
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());
|
||||||
|
|
||||||
return scfg;
|
return scfg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -946,6 +948,7 @@ bool SLAPrintObject::invalidate_state_by_config_options(const std::vector<t_conf
|
||||||
|| opt_key == "support_head_penetration"
|
|| opt_key == "support_head_penetration"
|
||||||
|| opt_key == "support_head_width"
|
|| opt_key == "support_head_width"
|
||||||
|| opt_key == "support_pillar_diameter"
|
|| opt_key == "support_pillar_diameter"
|
||||||
|
|| 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"
|
||||||
|| opt_key == "support_base_diameter"
|
|| opt_key == "support_base_diameter"
|
||||||
|
|
|
@ -347,6 +347,7 @@ void ConfigManipulation::toggle_print_sla_options(DynamicPrintConfig* config)
|
||||||
toggle_field("support_head_penetration", supports_en);
|
toggle_field("support_head_penetration", supports_en);
|
||||||
toggle_field("support_head_width", supports_en);
|
toggle_field("support_head_width", supports_en);
|
||||||
toggle_field("support_pillar_diameter", supports_en);
|
toggle_field("support_pillar_diameter", supports_en);
|
||||||
|
toggle_field("support_max_bridges_on_pillar", supports_en);
|
||||||
toggle_field("support_pillar_connection_mode", supports_en);
|
toggle_field("support_pillar_connection_mode", supports_en);
|
||||||
toggle_field("support_buildplate_only", supports_en);
|
toggle_field("support_buildplate_only", supports_en);
|
||||||
toggle_field("support_base_diameter", supports_en);
|
toggle_field("support_base_diameter", supports_en);
|
||||||
|
|
|
@ -424,9 +424,9 @@ void MainFrame::init_menubar()
|
||||||
m_plater->load_project(filename);
|
m_plater->load_project(filename);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wxMessageDialog msg(this, _(L("The selected project is no more available")), _(L("Error")));
|
wxMessageDialog msg(this, _(L("The selected project is no longer available.\nDo you want to remove it from the recent projects list ?")), _(L("Error")), wxYES_NO | wxYES_DEFAULT);
|
||||||
msg.ShowModal();
|
if (msg.ShowModal() == wxID_YES)
|
||||||
|
{
|
||||||
m_recent_projects.RemoveFileFromHistory(file_id);
|
m_recent_projects.RemoveFileFromHistory(file_id);
|
||||||
std::vector<std::string> recent_projects;
|
std::vector<std::string> recent_projects;
|
||||||
size_t count = m_recent_projects.GetCount();
|
size_t count = m_recent_projects.GetCount();
|
||||||
|
@ -437,6 +437,7 @@ void MainFrame::init_menubar()
|
||||||
wxGetApp().app_config->set_recent_projects(recent_projects);
|
wxGetApp().app_config->set_recent_projects(recent_projects);
|
||||||
wxGetApp().app_config->save();
|
wxGetApp().app_config->save();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}, wxID_FILE1, wxID_FILE9);
|
}, wxID_FILE1, wxID_FILE9);
|
||||||
|
|
||||||
std::vector<std::string> recent_projects = wxGetApp().app_config->get_recent_projects();
|
std::vector<std::string> recent_projects = wxGetApp().app_config->get_recent_projects();
|
||||||
|
|
|
@ -480,6 +480,7 @@ const std::vector<std::string>& Preset::sla_print_options()
|
||||||
"support_head_penetration",
|
"support_head_penetration",
|
||||||
"support_head_width",
|
"support_head_width",
|
||||||
"support_pillar_diameter",
|
"support_pillar_diameter",
|
||||||
|
"support_max_bridges_on_pillar",
|
||||||
"support_pillar_connection_mode",
|
"support_pillar_connection_mode",
|
||||||
"support_buildplate_only",
|
"support_buildplate_only",
|
||||||
"support_pillar_widening_factor",
|
"support_pillar_widening_factor",
|
||||||
|
|
|
@ -3612,6 +3612,8 @@ 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_max_bridges_on_pillar");
|
||||||
|
|
||||||
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");
|
||||||
// TODO: This parameter is not used at the moment.
|
// TODO: This parameter is not used at the moment.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue