mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-26 20:32:06 +00: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:
@@ -445,10 +445,11 @@ SupportGeneratorLayersPtr generate_raft_base(
|
||||
Polygons &raft = columns_base->polygons;
|
||||
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.
|
||||
if (object.has_brim())
|
||||
trimming = offset(object.layers().front()->lslices, (float)scale_(object.config().brim_object_gap.value), SUPPORT_SURFACES_OFFSET_PARAMETERS);
|
||||
else
|
||||
trimming = offset(object.layers().front()->lslices, (float)scale_(support_params.gap_xy), SUPPORT_SURFACES_OFFSET_PARAMETERS);
|
||||
// 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.
|
||||
//if (object.has_brim())
|
||||
// trimming = offset(object.layers().front()->lslices, (float)scale_(object.config().brim_object_gap.value), 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) {
|
||||
// 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())));
|
||||
|
||||
@@ -69,10 +69,11 @@ struct SupportParameters {
|
||||
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;
|
||||
}
|
||||
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();
|
||||
|
||||
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 ?
|
||||
this->support_material_interface_flow.with_flow_ratio(bridge_flow_ratio) :
|
||||
Flow::bridging_flow(bridge_flow_ratio * this->support_material_interface_flow.nozzle_diameter(), this->support_material_interface_flow.nozzle_diameter());
|
||||
|
||||
@@ -209,7 +210,8 @@ struct SupportParameters {
|
||||
coordf_t support_layer_height_min;
|
||||
// coordf_t support_layer_height_max;
|
||||
|
||||
coordf_t gap_xy;
|
||||
coordf_t gap_xy;
|
||||
coordf_t gap_xy_first_layer;
|
||||
|
||||
float base_angle;
|
||||
float interface_angle;
|
||||
|
||||
@@ -1926,7 +1926,7 @@ void TreeSupport::draw_circles(const std::vector<std::vector<SupportNode*>>& con
|
||||
}
|
||||
else {
|
||||
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;
|
||||
}
|
||||
};
|
||||
@@ -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);
|
||||
|
||||
// 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 = diff_clipped(base_areas, avoid_region);
|
||||
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
|
||||
// Note: We can't replace roof1 directly, as we have recorded its address.
|
||||
// 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);
|
||||
if (!tmp1.empty()) {
|
||||
roof1.contour = std::move(tmp1[0].contour);
|
||||
|
||||
@@ -69,6 +69,7 @@ struct TreeSupportMeshGroupSettings {
|
||||
0;
|
||||
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_1st_layer = scaled<coord_t>(config.support_object_first_layer_gap.value);
|
||||
// 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_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.
|
||||
// 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_1st_layer { scaled<coord_t>(0.7) };
|
||||
// Minimum Support X/Y Distance
|
||||
// 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
|
||||
|
||||
Reference in New Issue
Block a user