Allow user to turn adaptive layer height for tree support.
Signed-off-by: SoftFever <softfeverever@gmail.com> #257
This commit is contained in:
parent
6ed219fb65
commit
a6cd32fe72
11 changed files with 32 additions and 15 deletions
|
@ -3868,6 +3868,7 @@ msgstr "Vous feriez mieux de mettre à jour votre logiciel.\n"
|
|||
msgid "Newer 3mf version"
|
||||
msgstr "Nouvelle version 3mf"
|
||||
|
||||
#, fuzzy, c-format, boost-format
|
||||
msgid ""
|
||||
"The 3mf's version %s is newer than %s's version %s, Suggest to upgrade your "
|
||||
"software."
|
||||
|
@ -6455,6 +6456,7 @@ msgstr ""
|
|||
msgid "Cooling overhang threshold"
|
||||
msgstr "Seuil de dépassement de refroidissement"
|
||||
|
||||
#, fuzzy, c-format
|
||||
msgid ""
|
||||
"Force cooling fan to be specific speed when overhang degree of printed part "
|
||||
"exceeds this value. Expressed as percentage which indicides how much width "
|
||||
|
@ -7212,6 +7214,7 @@ msgstr "Le max_accel_to_decel de Klipper sera ajusté automatiquement."
|
|||
msgid "accel_to_decel"
|
||||
msgstr "accel_to_decel"
|
||||
|
||||
#, fuzzy, c-format, boost-format
|
||||
msgid "Klipper's max_accel_to_decel will be adjusted to this % of acceleration"
|
||||
msgstr "Le max_accel_to_decel de Klipper sera ajusté à ce % d'accélération."
|
||||
|
||||
|
|
|
@ -6499,6 +6499,7 @@ msgstr "耗材丝直径被用于计算G-code文件中的挤出量。因此很重
|
|||
msgid "Shrinkage"
|
||||
msgstr "耗材收缩率"
|
||||
|
||||
#, fuzzy, c-format, boost-format
|
||||
msgid ""
|
||||
"Enter the shrinkage percentage that the filament will get after cooling "
|
||||
"(94% if you measure 94mm instead of 100mm). The part will be scaled in xy to "
|
||||
|
@ -6506,8 +6507,9 @@ msgid ""
|
|||
"Be sure to allow enough space between objects, as this compensation is done "
|
||||
"after the checks."
|
||||
msgstr ""
|
||||
"冷却后耗材会收缩的百分比(如果测量的长度是94mm而不是100mm,则为是收缩率为94%)\n补偿将按比例缩放xy轴"
|
||||
"该补偿仅考虑墙壁所使用的耗材\n"
|
||||
"冷却后耗材会收缩的百分比(如果测量的长度是94mm而不是100mm,则为是收缩率为"
|
||||
"94%)\n"
|
||||
"补偿将按比例缩放xy轴该补偿仅考虑墙壁所使用的耗材\n"
|
||||
"请确保物体之间有足够的间距,因为补偿是在边界检查之后进行"
|
||||
|
||||
msgid "Density"
|
||||
|
@ -8470,6 +8472,9 @@ msgstr ""
|
|||
"提高强度\n"
|
||||
"你知道吗?你可以使用更多的墙层数和更高的疏散填充密度来提高模型的强度。"
|
||||
|
||||
msgid "Adaptive layer height"
|
||||
msgstr "自适应层高"
|
||||
|
||||
#~ msgid "Internal Version"
|
||||
#~ msgstr "内部版本"
|
||||
|
||||
|
@ -8835,9 +8840,6 @@ msgstr ""
|
|||
#~ msgid "Initialize failed (Not supported without remote video tunnel)!"
|
||||
#~ msgstr "初始化失败(不支持远程视频连接)"
|
||||
|
||||
#~ msgid "Adaptive layer height"
|
||||
#~ msgstr "自适应层高"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "Enabling this option means the height of every layer except the first "
|
||||
#~ "will be automatically calculated during slicing according to the slope of "
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -753,7 +753,8 @@ static std::vector<std::string> s_Preset_print_options {
|
|||
"default_jerk", "outer_wall_jerk", "inner_wall_jerk", "infill_jerk", "top_surface_jerk", "initial_layer_jerk","travel_jerk",
|
||||
"top_solid_infill_flow_ratio","bottom_solid_infill_flow_ratio","only_one_wall_first_layer", "print_flow_ratio", "seam_gap",
|
||||
"role_based_wipe_speed", "wipe_speed", "accel_to_decel_enable", "accel_to_decel_factor", "wipe_on_loops",
|
||||
"bridge_density", "precise_outer_wall", "overhang_speed_classic", "bridge_acceleration", "sparse_infill_acceleration", "internal_solid_infill_acceleration"
|
||||
"bridge_density", "precise_outer_wall", "overhang_speed_classic", "bridge_acceleration",
|
||||
"sparse_infill_acceleration", "internal_solid_infill_acceleration", "tree_support_adaptive_layer_height"
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -2994,6 +2994,12 @@ void PrintConfigDef::init_fff_params()
|
|||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionFloat(5.));
|
||||
|
||||
def = this->add("tree_support_adaptive_layer_height", coBool);
|
||||
def->label = L("Adaptive layer height");
|
||||
def->category = L("Quality");
|
||||
def->tooltip = L("Enabling this option means the height of tree support layer except the first will be automatically calculated ");
|
||||
def->set_default_value(new ConfigOptionBool(1));
|
||||
|
||||
def = this->add("tree_support_branch_diameter", coFloat);
|
||||
def->label = L("Tree support branch diameter");
|
||||
def->category = L("Support");
|
||||
|
|
|
@ -679,6 +679,7 @@ PRINT_CONFIG_CLASS_DEFINE(
|
|||
((ConfigOptionFloat, tree_support_branch_diameter))
|
||||
((ConfigOptionFloat, tree_support_branch_angle))
|
||||
((ConfigOptionInt, tree_support_wall_count))
|
||||
((ConfigOptionBool, tree_support_adaptive_layer_height))
|
||||
((ConfigOptionBool, detect_narrow_internal_solid_infill))
|
||||
// ((ConfigOptionBool, adaptive_layer_height))
|
||||
((ConfigOptionFloat, support_bottom_interface_spacing))
|
||||
|
|
|
@ -756,6 +756,7 @@ bool PrintObject::invalidate_state_by_config_options(
|
|||
|| opt_key == "bridge_no_support"
|
||||
|| opt_key == "max_bridge_length"
|
||||
|| opt_key == "initial_layer_line_width"
|
||||
|| opt_key == "tree_support_adaptive_layer_height"
|
||||
|| opt_key == "tree_support_branch_distance"
|
||||
|| opt_key == "tree_support_branch_diameter"
|
||||
|| opt_key == "tree_support_branch_angle"
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
|
||||
#define _L(s) Slic3r::I18N::translate(s)
|
||||
|
||||
#define USE_PLAN_LAYER_HEIGHTS 1
|
||||
#define HEIGHT_TO_SWITCH_INFILL_DIRECTION 30 // change infill direction every 20mm
|
||||
|
||||
#ifndef M_PI
|
||||
|
@ -1917,10 +1916,10 @@ void TreeSupport::generate_support_areas()
|
|||
|
||||
smooth_nodes(contact_nodes);
|
||||
|
||||
#if !USE_PLAN_LAYER_HEIGHTS
|
||||
// Adjust support layer heights
|
||||
adjust_layer_heights(contact_nodes);
|
||||
#endif
|
||||
if (!m_object->config().tree_support_adaptive_layer_height)
|
||||
// Adjust support layer heights
|
||||
adjust_layer_heights(contact_nodes);
|
||||
|
||||
|
||||
//Generate support areas.
|
||||
profiler.stage_start(STAGE_DRAW_CIRCLES);
|
||||
|
@ -3209,7 +3208,7 @@ std::vector<std::pair<coordf_t, coordf_t>> TreeSupport::plan_layer_heights(std::
|
|||
std::vector<std::pair<coordf_t, coordf_t>> layer_heights(contact_nodes.size(), std::pair<coordf_t, coordf_t>(0.0, 0.0));
|
||||
std::vector<int> bounds;
|
||||
|
||||
if (!USE_PLAN_LAYER_HEIGHTS || layer_height == max_layer_height || !print_config.independent_support_layer_height) {
|
||||
if (!config.tree_support_adaptive_layer_height || layer_height == max_layer_height || !print_config.independent_support_layer_height) {
|
||||
for (int layer_nr = 0; layer_nr < contact_nodes.size(); layer_nr++) {
|
||||
layer_heights[layer_nr].first = m_object->get_layer(layer_nr)->print_z;
|
||||
layer_heights[layer_nr].second = m_object->get_layer(layer_nr)->height;
|
||||
|
|
|
@ -485,7 +485,8 @@ void ConfigManipulation::update_print_fff_config(DynamicPrintConfig* config, con
|
|||
void ConfigManipulation::apply_null_fff_config(DynamicPrintConfig *config, std::vector<std::string> const &keys, std::map<ObjectBase *, ModelConfig *> const &configs)
|
||||
{
|
||||
for (auto &k : keys) {
|
||||
if (/*k == "adaptive_layer_height" || */k == "independent_support_layer_height" || k == "enable_support" || k == "detect_thin_wall")
|
||||
if (/*k == "adaptive_layer_height" || */ k == "independent_support_layer_height" || k == "enable_support" ||
|
||||
k == "detect_thin_wall" || k == "tree_support_adaptive_layer_height")
|
||||
config->set_key_value(k, new ConfigOptionBool(true));
|
||||
else if (k == "wall_loops")
|
||||
config->set_key_value(k, new ConfigOptionInt(0));
|
||||
|
@ -587,11 +588,13 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co
|
|||
//toggle_field("support_closing_radius", have_support_material && support_style == smsSnug);
|
||||
|
||||
bool support_is_tree = config->opt_bool("enable_support") && is_tree(support_type);
|
||||
for (auto el : {"tree_support_branch_angle", "tree_support_wall_count", "tree_support_branch_distance", "tree_support_branch_diameter"})
|
||||
for (auto el : {"tree_support_branch_angle", "tree_support_wall_count", "tree_support_branch_distance",
|
||||
"tree_support_branch_diameter", "tree_support_adaptive_layer_height"})
|
||||
toggle_field(el, support_is_tree);
|
||||
|
||||
// hide tree support settings when normal is selected
|
||||
for (auto el : {"tree_support_branch_angle", "tree_support_wall_count", "tree_support_branch_distance", "tree_support_branch_diameter", "max_bridge_length"})
|
||||
for (auto el : {"tree_support_branch_angle", "tree_support_wall_count", "tree_support_branch_distance",
|
||||
"tree_support_branch_diameter", "max_bridge_length", "tree_support_adaptive_layer_height"})
|
||||
toggle_line(el, support_is_tree);
|
||||
|
||||
// tree support use max_bridge_length instead of bridge_no_support
|
||||
|
|
|
@ -1992,6 +1992,7 @@ void TabPrint::build()
|
|||
optgroup->append_single_option_line("tree_support_branch_diameter", "support#tree-support-only-options");
|
||||
optgroup->append_single_option_line("tree_support_branch_angle", "support#tree-support-only-options");
|
||||
optgroup->append_single_option_line("tree_support_wall_count");
|
||||
optgroup->append_single_option_line("tree_support_adaptive_layer_height");
|
||||
optgroup->append_single_option_line("support_top_z_distance", "support#top-z-distance");
|
||||
optgroup->append_single_option_line("support_bottom_z_distance", "support#bottom-z-distance");
|
||||
optgroup->append_single_option_line("support_base_pattern", "support#base-pattern");
|
||||
|
|
Loading…
Reference in a new issue