3d honeycomb bug fix (with infill combination) improve bridge direction (#12062)

* fill 3d honeycomb bugfix

* fix bridges

Co-Authored-By: tome9111991 <57866234+tome9111991@users.noreply.github.com>

* Fix typo

* cleaning

* Remove bridging angle adjustment for ip3DHoneycomb

* Adjust layer height scaling for infill consistency

* PR comments

---------

Co-authored-by: tome9111991 <57866234+tome9111991@users.noreply.github.com>
This commit is contained in:
Rodrigo Faselli
2026-01-27 19:12:18 -03:00
committed by GitHub
parent eb56cf1ce1
commit f27605eac1
2 changed files with 13 additions and 8 deletions

View File

@@ -224,7 +224,9 @@ void Fill3DHoneycomb::_fill_surface_single(
// This means that the resultant infill won't be an ideal truncated octahedron,
// but it should look better than the equivalent quantised version
coordf_t layerHeight = scale_(thickness_layers);
//Orca: uses a fixed layer height to avoid inconsistent bridges and variable layer height artifacts.
//coordf_t layerHeight = scale_(thickness_layers);
coordf_t layerHeight = scale_(1.0);
// ceiling to an integer value of layers per Z
// (with a little nudge in case it's close to perfect)
coordf_t layersPerModule = floor((gridSize * 2) / (zScale * layerHeight) + 0.05);
@@ -300,4 +302,4 @@ void Fill3DHoneycomb::_fill_surface_single(
}
}
} // namespace Slic3r
} // namespace Slic3r

View File

@@ -2615,13 +2615,16 @@ void PrintObject::bridge_over_infill()
auto determine_bridging_angle = [](const Polygons &bridged_area, const Lines &anchors, InfillPattern dominant_pattern, double infill_direction) {
AABBTreeLines::LinesDistancer<Line> lines_tree(anchors);
// Orca: since 3D Honeycomb was "fixed" by forcing coordf_t layerHeight = scale_(1.0), this is no longer needed.
// CorssHatch also does not need fixed angle.
//
// Check it the infill that require a fixed infill angle.
switch (dominant_pattern) {
case ip3DHoneycomb:
case ipCrossHatch:
return (infill_direction + 45.0) * 2.0 * M_PI / 360.;
default: break;
}
//switch (dominant_pattern) {
//case ip3DHoneycomb:
//case ipCrossHatch:
// return (infill_direction + 45.0) * 2.0 * M_PI / 360.;
//default: break;
//}
std::map<double, int> counted_directions;
for (const Polygon &p : bridged_area) {