mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-09-23 04:13:15 +08:00
FIX: several support bugs
1. interlaced rectilinear interface pattern not working with tree supports 2. infill overlaps with walls when wall count>1 3. support blockers can't block sharp tail detection in normal support jira: STUDIO-5663 4. bottom z distance=0 not working for normal support. jira: STUDIO-5676 github: #3203 Change-Id: I025eff2aaad90ad565661aa656c59c82ff969bbf (cherry picked from commit 5aaf7ead0fd697043f673161e0ede0145ec49f4d)
This commit is contained in:
parent
ec30954782
commit
f3bd5ff870
@ -305,6 +305,7 @@ protected:
|
|||||||
{
|
{
|
||||||
ExPolygon *area;
|
ExPolygon *area;
|
||||||
int type;
|
int type;
|
||||||
|
int interface_id = 0;
|
||||||
coordf_t dist_to_top; // mm dist to top
|
coordf_t dist_to_top; // mm dist to top
|
||||||
bool need_infill = false;
|
bool need_infill = false;
|
||||||
bool need_extra_wall = false;
|
bool need_extra_wall = false;
|
||||||
|
@ -1522,8 +1522,9 @@ static inline ExPolygons detect_overhangs(
|
|||||||
// spanning just the projection between the two slices.
|
// spanning just the projection between the two slices.
|
||||||
// Subtracting them as they are may leave unwanted narrow
|
// Subtracting them as they are may leave unwanted narrow
|
||||||
// residues of diff_polygons that would then be supported.
|
// residues of diff_polygons that would then be supported.
|
||||||
diff_polygons = diff(diff_polygons,
|
auto blocker = expand(union_(annotations.blockers_layers[layer_id]), float(1000. * SCALED_EPSILON));
|
||||||
expand(union_(annotations.blockers_layers[layer_id]), float(1000. * SCALED_EPSILON)));
|
diff_polygons = diff(diff_polygons, blocker);
|
||||||
|
layer.sharp_tails = diff_ex(layer.sharp_tails, blocker);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bridge_no_support) {
|
if (bridge_no_support) {
|
||||||
@ -1728,9 +1729,11 @@ Layer* sync_gap_with_object_layer(const Layer& layer, const coordf_t gap_support
|
|||||||
gap_synced -= last_valid_gap_layer->height;
|
gap_synced -= last_valid_gap_layer->height;
|
||||||
last_valid_gap_layer = last_valid_gap_layer->lower_layer;
|
last_valid_gap_layer = last_valid_gap_layer->lower_layer;
|
||||||
}
|
}
|
||||||
upper_layer = last_valid_gap_layer; // layer just above the last valid gap layer
|
if (gap_support_object > 0) {
|
||||||
if (last_valid_gap_layer->upper_layer)
|
upper_layer = last_valid_gap_layer; // layer just above the last valid gap layer
|
||||||
upper_layer = last_valid_gap_layer->upper_layer;
|
if (last_valid_gap_layer->upper_layer)
|
||||||
|
upper_layer = last_valid_gap_layer->upper_layer;
|
||||||
|
}
|
||||||
return upper_layer;
|
return upper_layer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2432,21 +2435,21 @@ static inline SupportGeneratorLayer* detect_bottom_contacts(
|
|||||||
// Grow top surfaces so that interface and support generation are generated
|
// Grow top surfaces so that interface and support generation are generated
|
||||||
// with some spacing from object - it looks we don't need the actual
|
// with some spacing from object - it looks we don't need the actual
|
||||||
// top shapes so this can be done here
|
// top shapes so this can be done here
|
||||||
|
Layer* upper_layer = layer.upper_layer;
|
||||||
if (object.print()->config().independent_support_layer_height) {
|
if (object.print()->config().independent_support_layer_height) {
|
||||||
// If the layer is extruded with no bridging flow, support just the normal extrusions.
|
// If the layer is extruded with no bridging flow, support just the normal extrusions.
|
||||||
layer_new.height = slicing_params.soluble_interface?
|
layer_new.height = slicing_params.soluble_interface ?
|
||||||
// Align the interface layer with the object's layer height.
|
// Align the interface layer with the object's layer height.
|
||||||
layer.upper_layer->height :
|
upper_layer->height :
|
||||||
// Place a bridge flow interface layer or the normal flow interface layer over the top surface.
|
// Place a bridge flow interface layer or the normal flow interface layer over the top surface.
|
||||||
support_params.support_material_bottom_interface_flow.height();
|
support_params.support_material_bottom_interface_flow.height();
|
||||||
layer_new.print_z = slicing_params.soluble_interface ? layer.upper_layer->print_z :
|
layer_new.print_z = slicing_params.soluble_interface ? upper_layer->print_z :
|
||||||
layer.print_z + layer_new.height + slicing_params.gap_object_support;
|
layer.print_z + layer_new.height + slicing_params.gap_object_support;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Layer* synced_layer = sync_gap_with_object_layer(layer, slicing_params.gap_object_support, false);
|
upper_layer = sync_gap_with_object_layer(layer, slicing_params.gap_object_support, false);
|
||||||
// If the layer is extruded with no bridging flow, support just the normal extrusions.
|
layer_new.height = upper_layer->height;
|
||||||
layer_new.height = synced_layer->height;
|
layer_new.print_z = upper_layer->print_z;
|
||||||
layer_new.print_z = synced_layer->print_z;
|
|
||||||
}
|
}
|
||||||
layer_new.bottom_z = layer.print_z;
|
layer_new.bottom_z = layer.print_z;
|
||||||
layer_new.idx_object_layer_below = layer_id;
|
layer_new.idx_object_layer_below = layer_id;
|
||||||
|
@ -1318,7 +1318,7 @@ static void make_perimeter_and_infill(ExtrusionEntitiesPtr& dst, const Print& pr
|
|||||||
FillParams fill_params;
|
FillParams fill_params;
|
||||||
fill_params.density = support_density;
|
fill_params.density = support_density;
|
||||||
fill_params.dont_adjust = true;
|
fill_params.dont_adjust = true;
|
||||||
ExPolygons to_infill = support_area_new;
|
ExPolygons to_infill = offset_ex(support_area, -float(wall_count) * float(flow.scaled_spacing()), jtSquare);
|
||||||
std::vector<BoundingBox> fill_boxes = fill_expolygons_generate_paths(dst, to_infill, filler_support, fill_params, role, flow);
|
std::vector<BoundingBox> fill_boxes = fill_expolygons_generate_paths(dst, to_infill, filler_support, fill_params, role, flow);
|
||||||
|
|
||||||
// allow wall_count to be zero, which means only draw infill
|
// allow wall_count to be zero, which means only draw infill
|
||||||
@ -1549,7 +1549,8 @@ void TreeSupport::generate_toolpaths()
|
|||||||
fill_params.dont_sort = true;
|
fill_params.dont_sort = true;
|
||||||
}
|
}
|
||||||
if (m_object_config->support_interface_pattern == smipRectilinearInterlaced)
|
if (m_object_config->support_interface_pattern == smipRectilinearInterlaced)
|
||||||
filler_interface->layer_id = round(area_group.dist_to_top / ts_layer->height);
|
filler_interface->layer_id = area_group.interface_id;
|
||||||
|
|
||||||
fill_expolygons_generate_paths(ts_layer->support_fills.entities, polys, filler_interface.get(), fill_params, erSupportMaterialInterface,
|
fill_expolygons_generate_paths(ts_layer->support_fills.entities, polys, filler_interface.get(), fill_params, erSupportMaterialInterface,
|
||||||
m_support_material_interface_flow);
|
m_support_material_interface_flow);
|
||||||
}
|
}
|
||||||
@ -2240,6 +2241,7 @@ void TreeSupport::draw_circles(const std::vector<std::vector<Node*>>& contact_no
|
|||||||
coordf_t max_layers_above_base = 0;
|
coordf_t max_layers_above_base = 0;
|
||||||
coordf_t max_layers_above_roof = 0;
|
coordf_t max_layers_above_roof = 0;
|
||||||
coordf_t max_layers_above_roof1 = 0;
|
coordf_t max_layers_above_roof1 = 0;
|
||||||
|
int interface_id = 0;
|
||||||
bool has_polygon_node = false;
|
bool has_polygon_node = false;
|
||||||
bool has_circle_node = false;
|
bool has_circle_node = false;
|
||||||
bool need_extra_wall = false;
|
bool need_extra_wall = false;
|
||||||
@ -2324,6 +2326,7 @@ void TreeSupport::draw_circles(const std::vector<std::vector<Node*>>& contact_no
|
|||||||
{
|
{
|
||||||
append(roof_areas, area);
|
append(roof_areas, area);
|
||||||
max_layers_above_roof = std::max(max_layers_above_roof, node.dist_mm_to_top);
|
max_layers_above_roof = std::max(max_layers_above_roof, node.dist_mm_to_top);
|
||||||
|
interface_id = node.obj_layer_nr % top_interface_layers;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -2410,7 +2413,10 @@ void TreeSupport::draw_circles(const std::vector<std::vector<Node*>>& contact_no
|
|||||||
area_groups.back().need_infill = has_polygon_node;
|
area_groups.back().need_infill = has_polygon_node;
|
||||||
area_groups.back().need_extra_wall = need_extra_wall;
|
area_groups.back().need_extra_wall = need_extra_wall;
|
||||||
}
|
}
|
||||||
for (auto &area : ts_layer->roof_areas) area_groups.emplace_back(&area, SupportLayer::RoofType, max_layers_above_roof);
|
for (auto& area : ts_layer->roof_areas) {
|
||||||
|
area_groups.emplace_back(&area, SupportLayer::RoofType, max_layers_above_roof);
|
||||||
|
area_groups.back().interface_id = interface_id;
|
||||||
|
}
|
||||||
for (auto &area : ts_layer->floor_areas) area_groups.emplace_back(&area, SupportLayer::FloorType, 10000);
|
for (auto &area : ts_layer->floor_areas) area_groups.emplace_back(&area, SupportLayer::FloorType, 10000);
|
||||||
for (auto &area : ts_layer->roof_1st_layer) area_groups.emplace_back(&area, SupportLayer::Roof1stLayer, max_layers_above_roof1);
|
for (auto &area : ts_layer->roof_1st_layer) area_groups.emplace_back(&area, SupportLayer::Roof1stLayer, max_layers_above_roof1);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user