mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 04:31:15 -06:00 
			
		
		
		
	ENH: add "ensure_vertical_shell_thickness" back
See the new requirement of the latest update at github issue #317 Signed-off-by: salt.wei <salt.wei@bambulab.com> Change-Id: I68c9922a272b1d426126a531bfdee7a4f7e53620
This commit is contained in:
		
							parent
							
								
									7b437d4f58
								
							
						
					
					
						commit
						35edf03eca
					
				
					 8 changed files with 18 additions and 13 deletions
				
			
		|  | @ -692,7 +692,7 @@ bool Preset::is_custom_defined() | |||
| static std::vector<std::string> s_Preset_print_options { | ||||
|     "layer_height", "initial_layer_print_height", "wall_loops", "slice_closing_radius", "spiral_mode", | ||||
|     "top_shell_layers", "top_shell_thickness", "bottom_shell_layers", "bottom_shell_thickness", | ||||
|     "reduce_crossing_wall", "detect_thin_wall", "detect_overhang_wall", | ||||
|     "ensure_vertical_shell_thickness", "reduce_crossing_wall", "detect_thin_wall", "detect_overhang_wall", | ||||
|     "seam_position", "wall_infill_order", "sparse_infill_density", "sparse_infill_pattern", "top_surface_pattern", "bottom_surface_pattern", | ||||
|     "infill_direction", "bridge_angle", | ||||
|     "minimum_sparse_infill_area", "reduce_infill_retraction", | ||||
|  |  | |||
|  | @ -515,7 +515,6 @@ private: | |||
|     // This was a per-object setting and now we default enable it.
 | ||||
|     static bool clip_multipart_objects; | ||||
|     static bool infill_only_where_needed; | ||||
|     static bool ensure_vertical_shell_thickness; | ||||
| }; | ||||
| 
 | ||||
| struct WipeTowerData | ||||
|  |  | |||
|  | @ -904,6 +904,14 @@ void PrintConfigDef::init_fff_params() | |||
|     def->mode = comAdvanced; | ||||
|     def->set_default_value(new ConfigOptionStrings { " " }); | ||||
| 
 | ||||
|     def = this->add("ensure_vertical_shell_thickness", coBool); | ||||
|     def->label = L("Ensure vertical shell thickness"); | ||||
|     def->category = L("Strength"); | ||||
|     def->tooltip = L("Add solid infill near sloping surfaces to guarantee the vertical shell thickness " | ||||
|         "(top+bottom solid layers)"); | ||||
|     def->mode = comAdvanced; | ||||
|     def->set_default_value(new ConfigOptionBool(true)); | ||||
| 
 | ||||
|     auto def_top_fill_pattern = def = this->add("top_surface_pattern", coEnum); | ||||
|     def->label = L("Top surface pattern"); | ||||
|     def->category = L("Strength"); | ||||
|  |  | |||
|  | @ -661,6 +661,7 @@ PRINT_CONFIG_CLASS_DEFINE( | |||
|     ((ConfigOptionFloat,                bridge_angle)) | ||||
|     ((ConfigOptionFloat,                bridge_flow)) | ||||
|     ((ConfigOptionFloat,                bridge_speed)) | ||||
|     ((ConfigOptionBool,                 ensure_vertical_shell_thickness)) | ||||
|     ((ConfigOptionEnum<InfillPattern>,  top_surface_pattern)) | ||||
|     ((ConfigOptionEnum<InfillPattern>,  bottom_surface_pattern)) | ||||
|     ((ConfigOptionFloat,                outer_wall_line_width)) | ||||
|  |  | |||
|  | @ -770,6 +770,7 @@ bool PrintObject::invalidate_state_by_config_options( | |||
|             || opt_key == "sparse_infill_filament" | ||||
|             || opt_key == "solid_infill_filament" | ||||
|             || opt_key == "sparse_infill_line_width" | ||||
|             || opt_key == "ensure_vertical_shell_thickness" | ||||
|             || opt_key == "bridge_angle") { | ||||
|             steps.emplace_back(posPrepareInfill); | ||||
|         } else if ( | ||||
|  | @ -1224,9 +1225,7 @@ void PrintObject::discover_vertical_shells() | |||
|         bool has_extra_layers = false; | ||||
|         for (size_t region_id = 0; region_id < this->num_printing_regions(); ++region_id) { | ||||
|             const PrintRegionConfig &config = this->printing_region(region_id).config(); | ||||
|             //BBS
 | ||||
|             //if (config.ensure_vertical_shell_thickness.value && has_extra_layers_fn(config)) {
 | ||||
|             if (PrintObject::ensure_vertical_shell_thickness && has_extra_layers_fn(config)) { | ||||
|             if (config.ensure_vertical_shell_thickness.value && has_extra_layers_fn(config)) { | ||||
|                 has_extra_layers = true; | ||||
|                 break; | ||||
|             } | ||||
|  | @ -1306,9 +1305,7 @@ void PrintObject::discover_vertical_shells() | |||
|         PROFILE_BLOCK(discover_vertical_shells_region); | ||||
| 
 | ||||
|         const PrintRegion ®ion = this->printing_region(region_id); | ||||
|         //BBS
 | ||||
|         //if (! region.config().ensure_vertical_shell_thickness.value)
 | ||||
|         if (! PrintObject::ensure_vertical_shell_thickness) | ||||
|         if (! region.config().ensure_vertical_shell_thickness.value) | ||||
|             // This region will be handled by discover_horizontal_shells().
 | ||||
|             continue; | ||||
|         if (! has_extra_layers_fn(region.config())) | ||||
|  | @ -2049,9 +2046,7 @@ void PrintObject::discover_horizontal_shells() | |||
| #endif | ||||
| 
 | ||||
|             // If ensure_vertical_shell_thickness, then the rest has already been performed by discover_vertical_shells().
 | ||||
|             //BBS
 | ||||
|             //if (region_config.ensure_vertical_shell_thickness.value)
 | ||||
|             if (PrintObject::ensure_vertical_shell_thickness) | ||||
|             if (region_config.ensure_vertical_shell_thickness.value) | ||||
|                 continue; | ||||
| 
 | ||||
|             coordf_t print_z  = layer->print_z; | ||||
|  |  | |||
|  | @ -18,7 +18,6 @@ namespace Slic3r { | |||
| 
 | ||||
| bool PrintObject::clip_multipart_objects = true; | ||||
| bool PrintObject::infill_only_where_needed = false; | ||||
| bool PrintObject::ensure_vertical_shell_thickness = true; | ||||
| 
 | ||||
| LayerPtrs new_layers( | ||||
|     PrintObject                 *print_object, | ||||
|  |  | |||
|  | @ -275,6 +275,7 @@ void ConfigManipulation::update_print_fff_config(DynamicPrintConfig* config, con | |||
|            sparse_infill_density == 0 && | ||||
|            ! config->opt_bool("enable_support") && | ||||
|            config->opt_int("enforce_support_layers") == 0 && | ||||
|            config->opt_bool("ensure_vertical_shell_thickness") && | ||||
|            ! config->opt_bool("detect_thin_wall"))) | ||||
|     { | ||||
|         wxString msg_text = _(L("Spiral mode only works when wall loops is 1, \n" | ||||
|  | @ -295,6 +296,7 @@ void ConfigManipulation::update_print_fff_config(DynamicPrintConfig* config, con | |||
|             new_conf.set_key_value("sparse_infill_density", new ConfigOptionPercent(0)); | ||||
|             new_conf.set_key_value("enable_support", new ConfigOptionBool(false)); | ||||
|             new_conf.set_key_value("enforce_support_layers", new ConfigOptionInt(0)); | ||||
|             new_conf.set_key_value("ensure_vertical_shell_thickness", new ConfigOptionBool(true)); | ||||
|             new_conf.set_key_value("detect_thin_wall", new ConfigOptionBool(false)); | ||||
|             sparse_infill_density = 0; | ||||
|             support = false; | ||||
|  | @ -469,7 +471,7 @@ void ConfigManipulation::apply_null_fff_config(DynamicPrintConfig *config, std:: | |||
| void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, const bool is_global_config) | ||||
| { | ||||
|     bool have_perimeters = config->opt_int("wall_loops") > 0; | ||||
|     for (auto el : { "detect_thin_wall", "detect_overhang_wall", | ||||
|     for (auto el : { "ensure_vertical_shell_thickness", "detect_thin_wall", "detect_overhang_wall", | ||||
|                     "seam_position", "wall_infill_order", "outer_wall_line_width", | ||||
|                     "inner_wall_speed", "outer_wall_speed" }) | ||||
|         toggle_field(el, have_perimeters); | ||||
|  |  | |||
|  | @ -1809,6 +1809,7 @@ void TabPrint::build() | |||
|         optgroup->append_single_option_line("minimum_sparse_infill_area"); | ||||
|         optgroup->append_single_option_line("infill_combination"); | ||||
|         optgroup->append_single_option_line("detect_narrow_internal_solid_infill"); | ||||
|         optgroup->append_single_option_line("ensure_vertical_shell_thickness"); | ||||
| 
 | ||||
|     page = add_options_page(L("Speed"), "empty"); | ||||
|         optgroup = page->new_optgroup(L("Initial layer speed"), L"param_speed_first", 15); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 salt.wei
						salt.wei