Fill Adaptive disconnecting from walls at low density. Disable rotation as infill type does not support it (#11728)

Fix adaptive fill issues
- Disconnecting from walls at low density
- Not supporting rotation

Co-authored-by: Rodrigo Faselli <162915171+RF47@users.noreply.github.com>
This commit is contained in:
Ioannis Giannakas
2025-12-24 12:26:50 +02:00
committed by GitHub
parent 506fde8f86
commit 2a0cfdb356
2 changed files with 18 additions and 4 deletions

View File

@@ -1448,6 +1448,17 @@ static std::vector<CubeProperties> make_cubes_properties(double max_cube_edge_le
if (edge_length > max_cube_edge_length)
break;
}
// Orca: Ensure at least 2 levels so build_octree() will insert triangles.
// Fixes scenario where adaptive fill is disconnected from walls on low densities
if (cubes_properties.size() == 1) {
CubeProperties p = cubes_properties.back();
p.edge_length *= 2.0;
p.height = p.edge_length * sqrt(3);
p.diagonal_length = p.edge_length * sqrt(2);
p.line_z_distance = p.edge_length / sqrt(3);
p.line_xy_distance = p.edge_length / sqrt(6);
cubes_properties.push_back(p);
}
return cubes_properties;
}