From 088c62246b8c637bf9fa9b2db58d07a206867d67 Mon Sep 17 00:00:00 2001 From: supermerill Date: Tue, 14 Jan 2020 18:49:21 +0100 Subject: [PATCH] make brige_angle as override instead of default value for the algorithm. #142 --- src/libslic3r/LayerRegion.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/libslic3r/LayerRegion.cpp b/src/libslic3r/LayerRegion.cpp index b4cb37f39..62d375741 100644 --- a/src/libslic3r/LayerRegion.cpp +++ b/src/libslic3r/LayerRegion.cpp @@ -301,16 +301,18 @@ void LayerRegion::process_external_surfaces(const Layer *lower_layer, const Poly printf("Processing bridge at layer " PRINTF_ZU ":\n", this->layer()->id()); #endif double custom_angle = Geometry::deg2rad(this->region()->config().bridge_angle.value); - if (bd.detect_angle(custom_angle)) { + if (custom_angle > 0) { + // Bridge was not detected (likely it is only supported at one side). Still it is a surface filled in + // using a bridging flow, therefore it makes sense to respect the custom bridging direction. + bridges[idx_last].bridge_angle = custom_angle; + }else if (bd.detect_angle(custom_angle)) { bridges[idx_last].bridge_angle = bd.angle; if (this->layer()->object()->config().support_material) { polygons_append(this->bridged, intersection(bd.coverage(), to_polygons(initial))); append(this->unsupported_bridge_edges, bd.unsupported_edges()); } - } else if (custom_angle > 0) { - // Bridge was not detected (likely it is only supported at one side). Still it is a surface filled in - // using a bridging flow, therefore it makes sense to respect the custom bridging direction. - bridges[idx_last].bridge_angle = custom_angle; + } else { + bridges[idx_last].bridge_angle = 0; } // without safety offset, artifacts are generated (GH #2494) surfaces_append(bottom, union_ex(grown, true), bridges[idx_last]);