diff options
author | Vojtech Bubnik <bubnikv@gmail.com> | 2021-12-10 20:26:54 +0300 |
---|---|---|
committer | Vojtech Bubnik <bubnikv@gmail.com> | 2021-12-10 20:27:10 +0300 |
commit | 121bb260db5c73c0f65922e1818372006c1f83da (patch) | |
tree | e8b8b6e68e1ffe0c46b4acf5e8572d95ec0646b5 | |
parent | 080e80a4d6ee1ac6bced01d262e39bcddef2c2ea (diff) |
Fix of disabling thick bridges adds unnecessary support interfaces #7260
Improved numerical robustness when removing bridging perimeters from
overhangs to be supported.
-rw-r--r-- | src/libslic3r/SupportMaterial.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libslic3r/SupportMaterial.cpp b/src/libslic3r/SupportMaterial.cpp index 8a04b6439..1f3ecfa12 100644 --- a/src/libslic3r/SupportMaterial.cpp +++ b/src/libslic3r/SupportMaterial.cpp @@ -1340,7 +1340,10 @@ namespace SupportMaterialInternal { // so we take the largest value and also apply safety offset to be ensure no gaps // are left in between Flow perimeter_bridge_flow = layerm.bridging_flow(frPerimeter); - float w = float(std::max(perimeter_bridge_flow.scaled_width(), perimeter_bridge_flow.scaled_spacing())); + //FIXME one may want to use a maximum of bridging flow width and normal flow width, as the perimeters are calculated using the normal flow + // and then turned to bridging flow, thus their centerlines are derived from non-bridging flow and expanding them by a bridging flow + // may not expand them to the edge of their respective islands. + const float w = float(0.5 * std::max(perimeter_bridge_flow.scaled_width(), perimeter_bridge_flow.scaled_spacing())) + scaled<float>(0.001); for (Polyline &polyline : overhang_perimeters) if (polyline.is_straight()) { // This is a bridge @@ -1355,7 +1358,7 @@ namespace SupportMaterialInternal { supported[j] = true; if (supported[0] && supported[1]) // Offset a polyline into a thick line. - polygons_append(bridges, offset(polyline, 0.5f * w + 10.f)); + polygons_append(bridges, offset(polyline, w)); } bridges = union_(bridges); } |