FIX: wall count fixed && overlapping of interface filling path

jira: STUDIO-10419, STUDIO-10420
Change-Id: Ib7274420ceb8149a02e82d896757ce5ace908fb9
This commit is contained in:
jiaxi.chen 2025-02-14 12:21:43 +08:00 committed by lane.wei
parent ef8e81c04a
commit 2e3edc4518
5 changed files with 14 additions and 12 deletions

View File

@ -125,7 +125,7 @@
],
"tree_support_branch_angle": "45",
"tree_support_branch_diameter": "2",
"tree_support_wall_count": "1",
"tree_support_wall_count": "0",
"wall_generator": "classic",
"wall_infill_order": "inner wall/outer wall/infill",
"wall_loops": "2",

View File

@ -13,6 +13,8 @@ void filter_by_extrusion_role_in_place(ExtrusionEntitiesPtr &extrusion_entities,
auto last = extrusion_entities.end();
extrusion_entities.erase(
std::remove_if(first, last, [&role](const ExtrusionEntity* ee) {
if((ee->role() == erSupportTransition && role ==erSupportMaterial))
return false;
return ee->role() != role; }),
last);
}

View File

@ -3849,7 +3849,7 @@ GCode::LayerResult GCode::process_layer(
// Assign an extruder to the base.
ObjectByExtruder &obj = object_by_extruder(by_extruder, has_support ? support_extruder : interface_extruder, &layer_to_print - layers.data(), layers.size());
obj.support = &support_layer.support_fills;
obj.support_extrusion_role = single_extruder ? erMixed : role;
obj.support_extrusion_role = single_extruder ? erMixed : erSupportMaterial;
if (! single_extruder && has_interface) {
ObjectByExtruder &obj_interface = object_by_extruder(by_extruder, interface_extruder, &layer_to_print - layers.data(), layers.size());
obj_interface.support = &support_layer.support_fills;

View File

@ -4061,7 +4061,7 @@ void PrintConfigDef::init_fff_params()
def->min = 0;
def->max = 2;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionInt(1));
def->set_default_value(new ConfigOptionInt(0));
def = this->add("chamber_temperatures", coInts);
def->label = L("Chamber temperature");

View File

@ -1607,15 +1607,15 @@ void TreeSupport::generate_toolpaths()
if (bridge_layer) {
for (size_t region_id = 0; region_id < bridge_layer->regions().size(); ++region_id) {
LayerRegion *layerm = bridge_layer->regions()[region_id];
bool find_bridge = false;
bool bridge_found = false;
for (const auto surface : layerm->fill_surfaces.surfaces) {
if (surface.surface_type == stBottomBridge && overlaps(polys, surface.expolygon)) {
filler_Roof1stLayer->angle = surface.bridge_angle + (m_support_params.num_top_interface_layers - 1) * M_PI_2;
find_bridge - true;
bridge_found = true;
break;
}
}
if (find_bridge) break;
if (bridge_found) break;
}
}
}
@ -1644,7 +1644,7 @@ void TreeSupport::generate_toolpaths()
fill_params.dont_sort = true;
}
if (m_support_params.contact_fill_pattern = ipRectilinear) {
bool find_bridge = false;
bool bridge_found = false;
for (size_t i = 0; i < m_support_params.num_top_interface_layers; i++) {
auto cur_ts_layer = m_object->get_support_layer(layer_id + i);
if (cur_ts_layer == nullptr) break;
@ -1656,16 +1656,16 @@ void TreeSupport::generate_toolpaths()
for (const auto surface : layerm->fill_surfaces.surfaces) {
if (surface.surface_type == stBottomBridge && overlaps(polys, surface.expolygon)) {
filler_interface->angle = surface.bridge_angle + (i + 1) * M_PI_2;
find_bridge = true;
bridge_found = true;
break;
}
}
if (find_bridge) break;
if (bridge_found) break;
}
}
if (find_bridge) break;
if (bridge_found) break;
}
if (!find_bridge)
if (!bridge_found)
filler_interface->layer_id = area_group.interface_id;
else
filler_interface->layer_id = 0;
@ -1697,7 +1697,7 @@ void TreeSupport::generate_toolpaths()
// allow infill-only mode if support is thick enough (so min_wall_count is 0);
// otherwise must draw 1 wall
// Don't need extra walls if we have infill. Extra walls may overlap with the infills.
size_t min_wall_count = offset(poly, -scale_(support_spacing * 1.5)).empty() ? 1 : 0;
size_t min_wall_count = 1;
make_perimeter_and_infill(ts_layer->support_fills.entities, poly, std::max(min_wall_count, wall_count), flow,
erSupportMaterial, filler_support.get(), support_density);
}