mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-09 07:56:24 -06:00
NEW: add support_object_first_layer_gap option
jira: STUDIO-6202 github: #3521 Change-Id: I6f1ce9f5312e9482c0f5bf6ac3215861c501106c (cherry picked from commit 83027d923a6e67fa0013e5d9f627283c68e996de) (cherry picked from commit 29da3bc441a194d5b83ce267fe24ebf3f3811133)
This commit is contained in:
parent
4ee6d636c7
commit
fd3ed419c2
11 changed files with 37 additions and 16 deletions
|
@ -792,7 +792,7 @@ static std::vector<std::string> s_Preset_print_options {
|
||||||
"fuzzy_skin", "fuzzy_skin_thickness", "fuzzy_skin_point_distance", "fuzzy_skin_first_layer", "fuzzy_skin_noise_type", "fuzzy_skin_scale", "fuzzy_skin_octaves", "fuzzy_skin_persistence",
|
"fuzzy_skin", "fuzzy_skin_thickness", "fuzzy_skin_point_distance", "fuzzy_skin_first_layer", "fuzzy_skin_noise_type", "fuzzy_skin_scale", "fuzzy_skin_octaves", "fuzzy_skin_persistence",
|
||||||
"max_volumetric_extrusion_rate_slope", "max_volumetric_extrusion_rate_slope_segment_length","extrusion_rate_smoothing_external_perimeter_only",
|
"max_volumetric_extrusion_rate_slope", "max_volumetric_extrusion_rate_slope_segment_length","extrusion_rate_smoothing_external_perimeter_only",
|
||||||
"inner_wall_speed", "outer_wall_speed", "sparse_infill_speed", "internal_solid_infill_speed",
|
"inner_wall_speed", "outer_wall_speed", "sparse_infill_speed", "internal_solid_infill_speed",
|
||||||
"top_surface_speed", "support_speed", "support_object_xy_distance", "support_interface_speed",
|
"top_surface_speed", "support_speed", "support_object_xy_distance", "support_object_first_layer_gap", "support_interface_speed",
|
||||||
"bridge_speed", "internal_bridge_speed", "gap_infill_speed", "travel_speed", "travel_speed_z", "initial_layer_speed",
|
"bridge_speed", "internal_bridge_speed", "gap_infill_speed", "travel_speed", "travel_speed_z", "initial_layer_speed",
|
||||||
"outer_wall_acceleration", "initial_layer_acceleration", "top_surface_acceleration", "default_acceleration", "skirt_type", "skirt_loops", "skirt_speed","min_skirt_length", "skirt_distance", "skirt_start_angle", "skirt_height", "draft_shield",
|
"outer_wall_acceleration", "initial_layer_acceleration", "top_surface_acceleration", "default_acceleration", "skirt_type", "skirt_loops", "skirt_speed","min_skirt_length", "skirt_distance", "skirt_start_angle", "skirt_height", "draft_shield",
|
||||||
"brim_width", "brim_object_gap", "brim_type", "brim_ears_max_angle", "brim_ears_detection_length", "enable_support", "support_type", "support_threshold_angle", "support_threshold_overlap","enforce_support_layers",
|
"brim_width", "brim_object_gap", "brim_type", "brim_ears_max_angle", "brim_ears_detection_length", "enable_support", "support_type", "support_threshold_angle", "support_threshold_overlap","enforce_support_layers",
|
||||||
|
|
|
@ -4493,6 +4493,17 @@ void PrintConfigDef::init_fff_params()
|
||||||
//Support with too small spacing may touch the object and difficult to remove.
|
//Support with too small spacing may touch the object and difficult to remove.
|
||||||
def->set_default_value(new ConfigOptionFloat(0.35));
|
def->set_default_value(new ConfigOptionFloat(0.35));
|
||||||
|
|
||||||
|
def = this->add("support_object_first_layer_gap", coFloat);
|
||||||
|
def->label = L("Support/object first layer gap");
|
||||||
|
def->category = L("Support");
|
||||||
|
def->tooltip = L("XY separation between an object and its support at the first layer.");
|
||||||
|
def->sidetext = L("mm");
|
||||||
|
def->min = 0;
|
||||||
|
def->max = 10;
|
||||||
|
def->mode = comAdvanced;
|
||||||
|
//Support with too small spacing may touch the object and difficult to remove.
|
||||||
|
def->set_default_value(new ConfigOptionFloat(0.2));
|
||||||
|
|
||||||
def = this->add("support_angle", coFloat);
|
def = this->add("support_angle", coFloat);
|
||||||
def->label = L("Pattern angle");
|
def->label = L("Pattern angle");
|
||||||
def->category = L("Support");
|
def->category = L("Support");
|
||||||
|
|
|
@ -831,6 +831,7 @@ PRINT_CONFIG_CLASS_DEFINE(
|
||||||
((ConfigOptionInt, support_threshold_angle))
|
((ConfigOptionInt, support_threshold_angle))
|
||||||
((ConfigOptionFloatOrPercent, support_threshold_overlap))
|
((ConfigOptionFloatOrPercent, support_threshold_overlap))
|
||||||
((ConfigOptionFloat, support_object_xy_distance))
|
((ConfigOptionFloat, support_object_xy_distance))
|
||||||
|
((ConfigOptionFloat, support_object_first_layer_gap))
|
||||||
((ConfigOptionFloat, xy_hole_compensation))
|
((ConfigOptionFloat, xy_hole_compensation))
|
||||||
((ConfigOptionFloat, xy_contour_compensation))
|
((ConfigOptionFloat, xy_contour_compensation))
|
||||||
((ConfigOptionBool, flush_into_objects))
|
((ConfigOptionBool, flush_into_objects))
|
||||||
|
|
|
@ -1017,6 +1017,7 @@ bool PrintObject::invalidate_state_by_config_options(
|
||||||
|| opt_key == "support_base_pattern"
|
|| opt_key == "support_base_pattern"
|
||||||
|| opt_key == "support_style"
|
|| opt_key == "support_style"
|
||||||
|| opt_key == "support_object_xy_distance"
|
|| opt_key == "support_object_xy_distance"
|
||||||
|
|| opt_key == "support_object_first_layer_gap"
|
||||||
|| opt_key == "support_base_pattern_spacing"
|
|| opt_key == "support_base_pattern_spacing"
|
||||||
|| opt_key == "support_expansion"
|
|| opt_key == "support_expansion"
|
||||||
//|| opt_key == "independent_support_layer_height" // BBS
|
//|| opt_key == "independent_support_layer_height" // BBS
|
||||||
|
|
|
@ -445,10 +445,11 @@ SupportGeneratorLayersPtr generate_raft_base(
|
||||||
Polygons &raft = columns_base->polygons;
|
Polygons &raft = columns_base->polygons;
|
||||||
Polygons trimming;
|
Polygons trimming;
|
||||||
// BBS: if first layer of support is intersected with object island, it must have the same function as brim unless in nobrim mode.
|
// BBS: if first layer of support is intersected with object island, it must have the same function as brim unless in nobrim mode.
|
||||||
if (object.has_brim())
|
// brim_object_gap is changed to 0 by default, it's no longer appropriate to use it to determine the gap of first layer support.
|
||||||
trimming = offset(object.layers().front()->lslices, (float)scale_(object.config().brim_object_gap.value), SUPPORT_SURFACES_OFFSET_PARAMETERS);
|
//if (object.has_brim())
|
||||||
else
|
// trimming = offset(object.layers().front()->lslices, (float)scale_(object.config().brim_object_gap.value), SUPPORT_SURFACES_OFFSET_PARAMETERS);
|
||||||
trimming = offset(object.layers().front()->lslices, (float)scale_(support_params.gap_xy), SUPPORT_SURFACES_OFFSET_PARAMETERS);
|
//else
|
||||||
|
trimming = offset(object.layers().front()->lslices, (float)scale_(support_params.gap_xy_first_layer), SUPPORT_SURFACES_OFFSET_PARAMETERS);
|
||||||
if (inflate_factor_1st_layer > SCALED_EPSILON) {
|
if (inflate_factor_1st_layer > SCALED_EPSILON) {
|
||||||
// Inflate in multiple steps to avoid leaking of the support 1st layer through object walls.
|
// Inflate in multiple steps to avoid leaking of the support 1st layer through object walls.
|
||||||
auto nsteps = std::max(5, int(ceil(inflate_factor_1st_layer / support_params.first_layer_flow.scaled_width())));
|
auto nsteps = std::max(5, int(ceil(inflate_factor_1st_layer / support_params.first_layer_flow.scaled_width())));
|
||||||
|
|
|
@ -69,7 +69,8 @@ struct SupportParameters {
|
||||||
external_perimeter_width = std::max(external_perimeter_width, coordf_t(region.flow(object, frExternalPerimeter, slicing_params.layer_height).width()));
|
external_perimeter_width = std::max(external_perimeter_width, coordf_t(region.flow(object, frExternalPerimeter, slicing_params.layer_height).width()));
|
||||||
bridge_flow_ratio += region.config().bridge_flow;
|
bridge_flow_ratio += region.config().bridge_flow;
|
||||||
}
|
}
|
||||||
this->gap_xy = object_config.support_object_xy_distance;//.get_abs_value(external_perimeter_width);
|
this->gap_xy = object_config.support_object_xy_distance.value;
|
||||||
|
this->gap_xy_first_layer = object_config.support_object_first_layer_gap.value;
|
||||||
bridge_flow_ratio /= object.num_printing_regions();
|
bridge_flow_ratio /= object.num_printing_regions();
|
||||||
|
|
||||||
this->support_material_bottom_interface_flow = slicing_params.soluble_interface || !object_config.thick_bridges ?
|
this->support_material_bottom_interface_flow = slicing_params.soluble_interface || !object_config.thick_bridges ?
|
||||||
|
@ -210,6 +211,7 @@ struct SupportParameters {
|
||||||
// coordf_t support_layer_height_max;
|
// coordf_t support_layer_height_max;
|
||||||
|
|
||||||
coordf_t gap_xy;
|
coordf_t gap_xy;
|
||||||
|
coordf_t gap_xy_first_layer;
|
||||||
|
|
||||||
float base_angle;
|
float base_angle;
|
||||||
float interface_angle;
|
float interface_angle;
|
||||||
|
|
|
@ -1926,7 +1926,7 @@ void TreeSupport::draw_circles(const std::vector<std::vector<SupportNode*>>& con
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (collision_base.empty())
|
if (collision_base.empty())
|
||||||
collision_base = m_ts_data->get_collision((layer_nr == 0 && has_brim) ? config.brim_object_gap : m_ts_data->m_xy_distance, layer_nr);
|
collision_base = m_ts_data->get_collision((layer_nr == 0) ? config.support_object_first_layer_gap : m_ts_data->m_xy_distance, layer_nr);
|
||||||
return collision_base;
|
return collision_base;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -2044,7 +2044,7 @@ void TreeSupport::draw_circles(const std::vector<std::vector<SupportNode*>>& con
|
||||||
roof_1st_layer = intersection_ex(roof_1st_layer, m_machine_border);
|
roof_1st_layer = intersection_ex(roof_1st_layer, m_machine_border);
|
||||||
|
|
||||||
// let supports touch objects when brim is on
|
// let supports touch objects when brim is on
|
||||||
//auto avoid_region = get_collision_polys((layer_nr == 0 && has_brim) ? config.brim_object_gap : m_ts_data->m_xy_distance, layer_nr);
|
//auto avoid_region = get_collision_polys((layer_nr == 0) ? config.support_object_xy_distance : m_ts_data->m_xy_distance, layer_nr);
|
||||||
//base_areas = avoid_object_remove_extra_small_parts(base_areas, avoid_region);
|
//base_areas = avoid_object_remove_extra_small_parts(base_areas, avoid_region);
|
||||||
//base_areas = diff_clipped(base_areas, avoid_region);
|
//base_areas = diff_clipped(base_areas, avoid_region);
|
||||||
ExPolygons roofs; append(roofs, roof_1st_layer); append(roofs, roof_areas);append(roofs, roof_gap_areas);
|
ExPolygons roofs; append(roofs, roof_1st_layer); append(roofs, roof_areas);append(roofs, roof_gap_areas);
|
||||||
|
@ -2295,7 +2295,7 @@ void TreeSupport::draw_circles(const std::vector<std::vector<SupportNode*>>& con
|
||||||
// make sure 1) roof1 and object 2) roof1 and roof, won't intersect
|
// make sure 1) roof1 and object 2) roof1 and roof, won't intersect
|
||||||
// Note: We can't replace roof1 directly, as we have recorded its address.
|
// Note: We can't replace roof1 directly, as we have recorded its address.
|
||||||
// So instead we need to replace its members one by one.
|
// So instead we need to replace its members one by one.
|
||||||
auto tmp1 = diff_ex(roof1, get_collision((layer_nr == 0 && has_brim) ? config.brim_object_gap : m_ts_data->m_xy_distance, layer_nr));
|
auto tmp1 = diff_ex(roof1, get_collision((layer_nr == 0) ? config.support_object_xy_distance : m_ts_data->m_xy_distance, layer_nr));
|
||||||
tmp1 = diff_ex(tmp1, ts_layer->roof_areas);
|
tmp1 = diff_ex(tmp1, ts_layer->roof_areas);
|
||||||
if (!tmp1.empty()) {
|
if (!tmp1.empty()) {
|
||||||
roof1.contour = std::move(tmp1[0].contour);
|
roof1.contour = std::move(tmp1[0].contour);
|
||||||
|
|
|
@ -69,6 +69,7 @@ struct TreeSupportMeshGroupSettings {
|
||||||
0;
|
0;
|
||||||
this->support_material_buildplate_only = config.support_on_build_plate_only;
|
this->support_material_buildplate_only = config.support_on_build_plate_only;
|
||||||
this->support_xy_distance = scaled<coord_t>(config.support_object_xy_distance.value);
|
this->support_xy_distance = scaled<coord_t>(config.support_object_xy_distance.value);
|
||||||
|
this->support_xy_distance_1st_layer = scaled<coord_t>(config.support_object_first_layer_gap.value);
|
||||||
// Separation of interfaces, it is likely smaller than support_xy_distance.
|
// Separation of interfaces, it is likely smaller than support_xy_distance.
|
||||||
this->support_xy_distance_overhang = std::min(this->support_xy_distance, scaled<coord_t>(0.5 * external_perimeter_width));
|
this->support_xy_distance_overhang = std::min(this->support_xy_distance, scaled<coord_t>(0.5 * external_perimeter_width));
|
||||||
this->support_top_distance = scaled<coord_t>(slicing_params.gap_support_object);
|
this->support_top_distance = scaled<coord_t>(slicing_params.gap_support_object);
|
||||||
|
@ -158,6 +159,7 @@ struct TreeSupportMeshGroupSettings {
|
||||||
// Distance of the support structure from the print in the X/Y directions.
|
// Distance of the support structure from the print in the X/Y directions.
|
||||||
// minimum: 0, maximum warning: 1.5 * machine_nozzle_tip_outer_diameter
|
// minimum: 0, maximum warning: 1.5 * machine_nozzle_tip_outer_diameter
|
||||||
coord_t support_xy_distance { scaled<coord_t>(0.7) };
|
coord_t support_xy_distance { scaled<coord_t>(0.7) };
|
||||||
|
coord_t support_xy_distance_1st_layer { scaled<coord_t>(0.7) };
|
||||||
// Minimum Support X/Y Distance
|
// Minimum Support X/Y Distance
|
||||||
// Distance of the support structure from the overhang in the X/Y directions.
|
// Distance of the support structure from the overhang in the X/Y directions.
|
||||||
// minimum_value: 0, minimum warning": support_xy_distance - support_line_width * 2, maximum warning: support_xy_distance
|
// minimum_value: 0, minimum warning": support_xy_distance - support_line_width * 2, maximum warning: support_xy_distance
|
||||||
|
|
|
@ -596,7 +596,7 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co
|
||||||
"support_interface_pattern", "support_interface_top_layers", "support_interface_bottom_layers",
|
"support_interface_pattern", "support_interface_top_layers", "support_interface_bottom_layers",
|
||||||
"bridge_no_support", "max_bridge_length", "support_top_z_distance", "support_bottom_z_distance",
|
"bridge_no_support", "max_bridge_length", "support_top_z_distance", "support_bottom_z_distance",
|
||||||
"support_type", "support_on_build_plate_only", "support_critical_regions_only","support_interface_not_for_body",
|
"support_type", "support_on_build_plate_only", "support_critical_regions_only","support_interface_not_for_body",
|
||||||
"support_object_xy_distance"/*, "independent_support_layer_height"*/})
|
"support_object_xy_distance","support_object_first_layer_gap"/*, "independent_support_layer_height"*/})
|
||||||
toggle_field(el, have_support_material);
|
toggle_field(el, have_support_material);
|
||||||
toggle_field("support_threshold_angle", have_support_material && is_auto(support_type));
|
toggle_field("support_threshold_angle", have_support_material && is_auto(support_type));
|
||||||
toggle_field("support_threshold_overlap", config->opt_int("support_threshold_angle") == 0 && have_support_material && is_auto(support_type));
|
toggle_field("support_threshold_overlap", config->opt_int("support_threshold_angle") == 0 && have_support_material && is_auto(support_type));
|
||||||
|
|
|
@ -93,7 +93,8 @@ std::map<std::string, std::vector<SimpleSettingData>> SettingsFactory::OBJECT_C
|
||||||
{"tree_support_brim_width", "",26}, {"tree_support_branch_angle", "",10},{"tree_support_branch_angle_organic","",10}, {"tree_support_wall_count", "",11},//tree support
|
{"tree_support_brim_width", "",26}, {"tree_support_branch_angle", "",10},{"tree_support_branch_angle_organic","",10}, {"tree_support_wall_count", "",11},//tree support
|
||||||
{"support_top_z_distance", "",13},{"support_bottom_z_distance", "",12},{"support_base_pattern", "",14},{"support_base_pattern_spacing", "",15},
|
{"support_top_z_distance", "",13},{"support_bottom_z_distance", "",12},{"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_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},{"support_remove_small_overhang","",27}
|
{"support_object_xy_distance", "",20}, {"bridge_no_support", "",21},{"max_bridge_length", "",22},{"support_critical_regions_only", "",23},{"support_remove_small_overhang","",27},
|
||||||
|
{"support_object_first_layer_gap","",28}
|
||||||
}},
|
}},
|
||||||
{ L("Speed"), {{"support_speed", "",12}, {"support_interface_speed", "",13}
|
{ L("Speed"), {{"support_speed", "",12}, {"support_interface_speed", "",13}
|
||||||
}}
|
}}
|
||||||
|
@ -155,6 +156,7 @@ std::vector<SimpleSettingData> SettingsFactory::get_visible_options(const std::s
|
||||||
"tree_support_wall_count",
|
"tree_support_wall_count",
|
||||||
//support
|
//support
|
||||||
"support_top_z_distance", "support_base_pattern", "support_base_pattern_spacing", "support_interface_top_layers", "support_interface_bottom_layers", "support_interface_spacing", "support_bottom_interface_spacing", "support_object_xy_distance",
|
"support_top_z_distance", "support_base_pattern", "support_base_pattern_spacing", "support_interface_top_layers", "support_interface_bottom_layers", "support_interface_spacing", "support_bottom_interface_spacing", "support_object_xy_distance",
|
||||||
|
"support_object_first_layer_gap",
|
||||||
//adhesion
|
//adhesion
|
||||||
"brim_type", "brim_width", "brim_object_gap", "raft_layers"
|
"brim_type", "brim_width", "brim_object_gap", "raft_layers"
|
||||||
};*/
|
};*/
|
||||||
|
|
|
@ -2263,6 +2263,7 @@ void TabPrint::build()
|
||||||
//optgroup->append_single_option_line("support_interface_loop_pattern");
|
//optgroup->append_single_option_line("support_interface_loop_pattern");
|
||||||
|
|
||||||
optgroup->append_single_option_line("support_object_xy_distance", "support");
|
optgroup->append_single_option_line("support_object_xy_distance", "support");
|
||||||
|
optgroup->append_single_option_line("support_object_first_layer_gap", "support");
|
||||||
optgroup->append_single_option_line("bridge_no_support", "support#base-pattern");
|
optgroup->append_single_option_line("bridge_no_support", "support#base-pattern");
|
||||||
optgroup->append_single_option_line("max_bridge_length", "support#base-pattern");
|
optgroup->append_single_option_line("max_bridge_length", "support#base-pattern");
|
||||||
optgroup->append_single_option_line("independent_support_layer_height", "support");
|
optgroup->append_single_option_line("independent_support_layer_height", "support");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue