mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 12:41:20 -06:00 
			
		
		
		
	NEW: Open "Bottom Z distance" setting for users
Users can set distance between support bottom contacts and object once enable normal/tree support. Jira: STUDIO-1383 TODO:Func seems good though, some details (e.g., bottom_interface detection) need to be optimized furthur. Will keep follow-up. Change-Id: I85815e7aa6cf1a5d0249633cd8ab995873461e8a (cherry picked from commit eab39e89c94d749ebe6266ab745cbb70a068277d)
This commit is contained in:
		
							parent
							
								
									63ea4179e4
								
							
						
					
					
						commit
						2a8fe9ec54
					
				
					 11 changed files with 25 additions and 10 deletions
				
			
		|  | @ -714,7 +714,7 @@ static std::vector<std::string> s_Preset_print_options { | |||
|     "support_angle", "support_interface_top_layers", "support_interface_bottom_layers", | ||||
|     "support_interface_pattern", "support_interface_spacing", "support_interface_loop_pattern", | ||||
|     "support_top_z_distance", "support_on_build_plate_only","support_critical_regions_only", "bridge_no_support", "thick_bridges", "max_bridge_length", "print_sequence", | ||||
|     "filename_format", "wall_filament", | ||||
|     "filename_format", "wall_filament", "support_bottom_z_distance", | ||||
|     "sparse_infill_filament", "solid_infill_filament", "support_filament", "support_interface_filament", | ||||
|     "ooze_prevention", "standby_temperature_delta", "interface_shells", "line_width", "initial_layer_line_width", | ||||
|     "inner_wall_line_width", "outer_wall_line_width", "sparse_infill_line_width", "internal_solid_infill_line_width", | ||||
|  |  | |||
|  | @ -2430,6 +2430,15 @@ void PrintConfigDef::init_fff_params() | |||
|     def->mode = comAdvanced; | ||||
|     def->set_default_value(new ConfigOptionFloat(0.2)); | ||||
| 
 | ||||
|     // BBS:MusangKing
 | ||||
|     def = this->add("support_bottom_z_distance", coFloat); | ||||
|     def->label = L("Bottom Z distance"); | ||||
|     def->category = L("Support"); | ||||
|     def->tooltip = L("The z gap between the bottom support interface and object"); | ||||
|     def->sidetext = L("mm"); | ||||
|     def->mode = comAdvanced; | ||||
|     def->set_default_value(new ConfigOptionFloat(0.2)); | ||||
| 
 | ||||
|     def = this->add("enforce_support_layers", coInt); | ||||
|     //def->label = L("Enforce support for the first");
 | ||||
|     def->category = L("Support"); | ||||
|  | @ -3733,7 +3742,7 @@ void PrintConfigDef::handle_legacy(t_config_option_key &opt_key, std::string &va | |||
|         , "support_sharp_tails","remove_small_overhangs", "support_with_sheath", | ||||
|         "tree_support_branch_diameter_angle", "tree_support_collision_resolution", | ||||
|         "small_perimeter_speed", "max_volumetric_speed", "max_print_speed", | ||||
|         "support_bottom_z_distance", "support_closing_radius", | ||||
|         "support_closing_radius", | ||||
|         "remove_freq_sweep", "remove_bed_leveling", "remove_extrusion_calibration", | ||||
|         "support_transition_line_width", "support_transition_speed", "bed_temperature", "bed_temperature_initial_layer", | ||||
|         "can_switch_nozzle_type", "can_add_auxiliary_fan", "extra_flush_volume", "spaghetti_detector", "adaptive_layer_height" | ||||
|  |  | |||
|  | @ -619,6 +619,7 @@ PRINT_CONFIG_CLASS_DEFINE( | |||
|     ((ConfigOptionBool,                support_on_build_plate_only)) | ||||
|     ((ConfigOptionBool,                support_critical_regions_only)) | ||||
|     ((ConfigOptionFloat,               support_top_z_distance)) | ||||
|     ((ConfigOptionFloat,               support_bottom_z_distance)) | ||||
|     ((ConfigOptionInt,                 enforce_support_layers)) | ||||
|     ((ConfigOptionInt,                 support_filament)) | ||||
|     ((ConfigOptionFloat,               support_line_width)) | ||||
|  |  | |||
|  | @ -707,6 +707,7 @@ bool PrintObject::invalidate_state_by_config_options( | |||
| 		} else if ( | ||||
|                opt_key == "elefant_foot_compensation" | ||||
|             || opt_key == "support_top_z_distance" | ||||
|             || opt_key == "support_bottom_z_distance" | ||||
|             || opt_key == "xy_hole_compensation" | ||||
|             || opt_key == "xy_contour_compensation") { | ||||
|             steps.emplace_back(posSlice); | ||||
|  |  | |||
|  | @ -113,8 +113,7 @@ SlicingParameters SlicingParameters::create_from_config( | |||
|     if (! soluble_interface) { | ||||
|         params.gap_raft_object    = object_config.raft_contact_distance.value; | ||||
|         //BBS
 | ||||
|         //params.gap_object_support = object_config.support_bottom_z_distance.value;
 | ||||
|         params.gap_object_support = object_config.support_top_z_distance.value; | ||||
|         params.gap_object_support = object_config.support_bottom_z_distance.value;  | ||||
|         params.gap_support_object = object_config.support_top_z_distance.value; | ||||
|         if (params.gap_object_support <= 0) | ||||
|             params.gap_object_support = params.gap_support_object; | ||||
|  |  | |||
|  | @ -2150,9 +2150,12 @@ void TreeSupport::draw_circles(const std::vector<std::vector<Node*>>& contact_no | |||
|                 { | ||||
|                     if (layer_nr >= bottom_interface_layers + bottom_gap_layers) | ||||
|                     { | ||||
|                         const Layer* below_layer = m_object->get_layer(layer_nr - bottom_interface_layers); | ||||
|                         ExPolygons bottom_interface = std::move(intersection_ex(base_areas, below_layer->lslices)); | ||||
|                         floor_areas.insert(floor_areas.end(), bottom_interface.begin(), bottom_interface.end()); | ||||
|                         for (size_t i = 0; i <= bottom_gap_layers; i++) | ||||
|                         { | ||||
|                             const Layer* below_layer = m_object->get_layer(layer_nr - bottom_interface_layers - i); | ||||
|                             ExPolygons bottom_interface = std::move(intersection_ex(base_areas, below_layer->lslices)); | ||||
|                             floor_areas.insert(floor_areas.end(), bottom_interface.begin(), bottom_interface.end()); | ||||
|                         } | ||||
|                     } | ||||
|                     if (floor_areas.empty() == false) { | ||||
|                         floor_areas = std::move(diff_ex(floor_areas, avoid_region_interface)); | ||||
|  |  | |||
|  | @ -530,7 +530,7 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co | |||
|     for (auto el : { "support_style", "support_base_pattern", | ||||
|                     "support_base_pattern_spacing", "support_angle", | ||||
|                     "support_interface_pattern", "support_interface_top_layers", "support_interface_bottom_layers", | ||||
|                     "bridge_no_support", "max_bridge_length", "support_top_z_distance", | ||||
|                     "bridge_no_support", "max_bridge_length", "support_top_z_distance", "support_bottom_z_distance", | ||||
|                      //BBS: add more support params to dependent of enable_support
 | ||||
|                     "support_type", "support_on_build_plate_only", "support_critical_regions_only", | ||||
|                     "support_object_xy_distance", "independent_support_layer_height"}) | ||||
|  |  | |||
|  | @ -80,7 +80,7 @@ std::map<std::string, std::vector<SimpleSettingData>>  SettingsFactory::OBJECT_C | |||
|                     {"enable_support", "",4},{"support_type", "",5},{"support_threshold_angle", "",6},{"support_on_build_plate_only", "",7}, | ||||
|                     {"support_filament", "",8},{"support_interface_filament", "",9}, | ||||
|                      {"tree_support_branch_angle", "",10}, {"tree_support_wall_count", "",11},{"tree_support_with_infill", "",12},//tree support
 | ||||
|                             {"support_top_z_distance", "",13},{"support_base_pattern", "",14},{"support_base_pattern_spacing", "",15}, | ||||
|                             {"support_top_z_distance", "",13},{"support_bottom_z_distance", "",24},{"support_base_pattern", "",14},{"support_base_pattern_spacing", "",15}, | ||||
|                             {"support_interface_top_layers", "",16},{"support_interface_bottom_layers", "",17},{"support_interface_spacing", "",18},{"support_bottom_interface_spacing", "",19}, | ||||
|                             {"support_object_xy_distance", "",20}, {"bridge_no_support", "",21},{"max_bridge_length", "",22},{"support_critical_regions_only", "",23} | ||||
|                             }}, | ||||
|  |  | |||
|  | @ -2073,7 +2073,7 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame) | |||
|         "layer_height", "initial_layer_print_height", "min_layer_height", "max_layer_height", | ||||
|         "brim_width", "wall_loops", "wall_filament", "sparse_infill_density", "sparse_infill_filament", "top_shell_layers", | ||||
|         "enable_support", "support_filament", "support_interface_filament", | ||||
|         "support_top_z_distance", "raft_layers" | ||||
|         "support_top_z_distance", "support_bottom_z_distance", "raft_layers" | ||||
|         })) | ||||
|     , sidebar(new Sidebar(q)) | ||||
|     , notification_manager(std::make_unique<NotificationManager>(q)) | ||||
|  |  | |||
|  | @ -1890,6 +1890,7 @@ void TabPrint::build() | |||
|         optgroup->append_single_option_line("tree_support_wall_count"); | ||||
|         optgroup->append_single_option_line("tree_support_with_infill"); | ||||
|         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"); | ||||
|         optgroup->append_single_option_line("support_base_pattern_spacing", "support#base-pattern"); | ||||
|         //optgroup->append_single_option_line("support_angle");
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 MusangKing
						MusangKing