mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 15:07:31 -06:00
Rename smsOrganic
to smsTreeOrganic
This commit is contained in:
parent
1c498664a5
commit
cc9f29c463
9 changed files with 12 additions and 12 deletions
|
@ -1166,7 +1166,7 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
|
||||||
// Custom layering is not allowed for tree supports as of now.
|
// Custom layering is not allowed for tree supports as of now.
|
||||||
for (size_t print_object_idx = 0; print_object_idx < m_objects.size(); ++ print_object_idx)
|
for (size_t print_object_idx = 0; print_object_idx < m_objects.size(); ++ print_object_idx)
|
||||||
if (const PrintObject &print_object = *m_objects[print_object_idx];
|
if (const PrintObject &print_object = *m_objects[print_object_idx];
|
||||||
print_object.has_support_material() && is_tree(print_object.config().support_type.value) && (print_object.config().support_style.value == smsOrganic ||
|
print_object.has_support_material() && is_tree(print_object.config().support_type.value) && (print_object.config().support_style.value == smsTreeOrganic ||
|
||||||
// Orca: use organic as default
|
// Orca: use organic as default
|
||||||
print_object.config().support_style.value == smsDefault) &&
|
print_object.config().support_style.value == smsDefault) &&
|
||||||
print_object.model_object()->has_custom_layering()) {
|
print_object.model_object()->has_custom_layering()) {
|
||||||
|
@ -1339,7 +1339,7 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons*
|
||||||
|
|
||||||
// Prusa: Fixing crashes with invalid tip diameter or branch diameter
|
// Prusa: Fixing crashes with invalid tip diameter or branch diameter
|
||||||
// https://github.com/prusa3d/PrusaSlicer/commit/96b3ae85013ac363cd1c3e98ec6b7938aeacf46d
|
// https://github.com/prusa3d/PrusaSlicer/commit/96b3ae85013ac363cd1c3e98ec6b7938aeacf46d
|
||||||
if (is_tree(object->config().support_type.value) && (object->config().support_style == smsOrganic ||
|
if (is_tree(object->config().support_type.value) && (object->config().support_style == smsTreeOrganic ||
|
||||||
// Orca: use organic as default
|
// Orca: use organic as default
|
||||||
object->config().support_style == smsDefault)) {
|
object->config().support_style == smsDefault)) {
|
||||||
float extrusion_width = std::min(
|
float extrusion_width = std::min(
|
||||||
|
|
|
@ -230,7 +230,7 @@ static t_config_enum_values s_keys_map_SupportMaterialStyle {
|
||||||
{ "tree_slim", smsTreeSlim },
|
{ "tree_slim", smsTreeSlim },
|
||||||
{ "tree_strong", smsTreeStrong },
|
{ "tree_strong", smsTreeStrong },
|
||||||
{ "tree_hybrid", smsTreeHybrid },
|
{ "tree_hybrid", smsTreeHybrid },
|
||||||
{ "organic", smsOrganic }
|
{ "organic", smsTreeOrganic }
|
||||||
};
|
};
|
||||||
CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(SupportMaterialStyle)
|
CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(SupportMaterialStyle)
|
||||||
|
|
||||||
|
|
|
@ -132,7 +132,7 @@ enum SupportMaterialPattern {
|
||||||
};
|
};
|
||||||
|
|
||||||
enum SupportMaterialStyle {
|
enum SupportMaterialStyle {
|
||||||
smsDefault, smsGrid, smsSnug, smsTreeSlim, smsTreeStrong, smsTreeHybrid, smsOrganic,
|
smsDefault, smsGrid, smsSnug, smsTreeSlim, smsTreeStrong, smsTreeHybrid, smsTreeOrganic,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum LongRectrationLevel
|
enum LongRectrationLevel
|
||||||
|
|
|
@ -1808,7 +1808,7 @@ void generate_support_toolpaths(
|
||||||
filler->link_max_length = coord_t(scale_(filler->spacing * link_max_length_factor / density));
|
filler->link_max_length = coord_t(scale_(filler->spacing * link_max_length_factor / density));
|
||||||
sheath = true;
|
sheath = true;
|
||||||
no_sort = true;
|
no_sort = true;
|
||||||
} else if (support_params.support_style == SupportMaterialStyle::smsOrganic) {
|
} else if (support_params.support_style == SupportMaterialStyle::smsTreeOrganic) {
|
||||||
tree_supports_generate_paths(base_layer.extrusions, base_layer.polygons_to_extrude(), flow, support_params);
|
tree_supports_generate_paths(base_layer.extrusions, base_layer.polygons_to_extrude(), flow, support_params);
|
||||||
done = true;
|
done = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -678,7 +678,7 @@ public:
|
||||||
m_support_material_closing_radius(params.support_closing_radius)
|
m_support_material_closing_radius(params.support_closing_radius)
|
||||||
{
|
{
|
||||||
if (m_style == smsDefault) m_style = smsGrid;
|
if (m_style == smsDefault) m_style = smsGrid;
|
||||||
if (std::set<SupportMaterialStyle>{smsTreeSlim, smsTreeStrong, smsTreeHybrid, smsOrganic}.count(m_style))
|
if (std::set<SupportMaterialStyle>{smsTreeSlim, smsTreeStrong, smsTreeHybrid, smsTreeOrganic}.count(m_style))
|
||||||
m_style = smsGrid;
|
m_style = smsGrid;
|
||||||
switch (m_style) {
|
switch (m_style) {
|
||||||
case smsGrid:
|
case smsGrid:
|
||||||
|
@ -774,7 +774,7 @@ public:
|
||||||
case smsTreeSlim:
|
case smsTreeSlim:
|
||||||
case smsTreeStrong:
|
case smsTreeStrong:
|
||||||
case smsTreeHybrid:
|
case smsTreeHybrid:
|
||||||
case smsOrganic:
|
case smsTreeOrganic:
|
||||||
assert(false);
|
assert(false);
|
||||||
//[[fallthrough]];
|
//[[fallthrough]];
|
||||||
return Polygons();
|
return Polygons();
|
||||||
|
|
|
@ -161,7 +161,7 @@ struct SupportParameters {
|
||||||
if (support_style == smsDefault) {
|
if (support_style == smsDefault) {
|
||||||
if (is_tree(object_config.support_type)) {
|
if (is_tree(object_config.support_type)) {
|
||||||
// Orca: use organic as default
|
// Orca: use organic as default
|
||||||
support_style = smsOrganic;
|
support_style = smsTreeOrganic;
|
||||||
} else {
|
} else {
|
||||||
support_style = smsGrid;
|
support_style = smsGrid;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1631,7 +1631,7 @@ void TreeSupport::generate_toolpaths()
|
||||||
|
|
||||||
void TreeSupport::generate()
|
void TreeSupport::generate()
|
||||||
{
|
{
|
||||||
if (m_support_params.support_style == smsOrganic) {
|
if (m_support_params.support_style == smsTreeOrganic) {
|
||||||
generate_tree_support_3D(*m_object, this, this->throw_on_cancel);
|
generate_tree_support_3D(*m_object, this, this->throw_on_cancel);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -426,7 +426,7 @@ void ConfigManipulation::update_print_fff_config(DynamicPrintConfig* config, con
|
||||||
auto support_type = config->opt_enum<SupportType>("support_type");
|
auto support_type = config->opt_enum<SupportType>("support_type");
|
||||||
auto support_style = config->opt_enum<SupportMaterialStyle>("support_style");
|
auto support_style = config->opt_enum<SupportMaterialStyle>("support_style");
|
||||||
std::set<int> enum_set_normal = { smsDefault, smsGrid, smsSnug };
|
std::set<int> enum_set_normal = { smsDefault, smsGrid, smsSnug };
|
||||||
std::set<int> enum_set_tree = { smsDefault, smsTreeSlim, smsTreeStrong, smsTreeHybrid, smsOrganic };
|
std::set<int> enum_set_tree = { smsDefault, smsTreeSlim, smsTreeStrong, smsTreeHybrid, smsTreeOrganic };
|
||||||
auto & set = is_tree(support_type) ? enum_set_tree : enum_set_normal;
|
auto & set = is_tree(support_type) ? enum_set_tree : enum_set_normal;
|
||||||
if (set.find(support_style) == set.end()) {
|
if (set.find(support_style) == set.end()) {
|
||||||
DynamicPrintConfig new_conf = *config;
|
DynamicPrintConfig new_conf = *config;
|
||||||
|
@ -603,7 +603,7 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co
|
||||||
//toggle_field("support_closing_radius", have_support_material && support_style == smsSnug);
|
//toggle_field("support_closing_radius", have_support_material && support_style == smsSnug);
|
||||||
|
|
||||||
bool support_is_tree = config->opt_bool("enable_support") && is_tree(support_type);
|
bool support_is_tree = config->opt_bool("enable_support") && is_tree(support_type);
|
||||||
bool support_is_normal_tree = support_is_tree && support_style != smsOrganic &&
|
bool support_is_normal_tree = support_is_tree && support_style != smsTreeOrganic &&
|
||||||
// Orca: use organic as default
|
// Orca: use organic as default
|
||||||
support_style != smsDefault;
|
support_style != smsDefault;
|
||||||
bool support_is_organic = support_is_tree && !support_is_normal_tree;
|
bool support_is_organic = support_is_tree && !support_is_normal_tree;
|
||||||
|
|
|
@ -2441,7 +2441,7 @@ void TabPrint::toggle_options()
|
||||||
if (auto choice = dynamic_cast<Choice*>(field)) {
|
if (auto choice = dynamic_cast<Choice*>(field)) {
|
||||||
auto def = print_config_def.get("support_style");
|
auto def = print_config_def.get("support_style");
|
||||||
std::vector<int> enum_set_normal = {smsDefault, smsGrid, smsSnug };
|
std::vector<int> enum_set_normal = {smsDefault, smsGrid, smsSnug };
|
||||||
std::vector<int> enum_set_tree = { smsDefault, smsTreeSlim, smsTreeStrong, smsTreeHybrid, smsOrganic };
|
std::vector<int> enum_set_tree = { smsDefault, smsTreeSlim, smsTreeStrong, smsTreeHybrid, smsTreeOrganic };
|
||||||
auto & set = is_tree(support_type) ? enum_set_tree : enum_set_normal;
|
auto & set = is_tree(support_type) ? enum_set_tree : enum_set_normal;
|
||||||
auto & opt = const_cast<ConfigOptionDef &>(field->m_opt);
|
auto & opt = const_cast<ConfigOptionDef &>(field->m_opt);
|
||||||
auto cb = dynamic_cast<ComboBox *>(choice->window);
|
auto cb = dynamic_cast<ComboBox *>(choice->window);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue