Fix of disabling thick bridges adds unnecessary support interfaces #7260
Improved numerical robustness when removing bridging perimeters from overhangs to be supported.
This commit is contained in:
parent
080e80a4d6
commit
121bb260db
@ -1340,7 +1340,10 @@ namespace SupportMaterialInternal {
|
|||||||
// so we take the largest value and also apply safety offset to be ensure no gaps
|
// so we take the largest value and also apply safety offset to be ensure no gaps
|
||||||
// are left in between
|
// are left in between
|
||||||
Flow perimeter_bridge_flow = layerm.bridging_flow(frPerimeter);
|
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)
|
for (Polyline &polyline : overhang_perimeters)
|
||||||
if (polyline.is_straight()) {
|
if (polyline.is_straight()) {
|
||||||
// This is a bridge
|
// This is a bridge
|
||||||
@ -1355,7 +1358,7 @@ namespace SupportMaterialInternal {
|
|||||||
supported[j] = true;
|
supported[j] = true;
|
||||||
if (supported[0] && supported[1])
|
if (supported[0] && supported[1])
|
||||||
// Offset a polyline into a thick line.
|
// 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);
|
bridges = union_(bridges);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user