From e471ce1239c7a4f527b3b4a035db2a662d2c7144 Mon Sep 17 00:00:00 2001 From: supermerill Date: Tue, 14 Jan 2020 17:11:06 +0100 Subject: [PATCH] fix thin wall: max was not high enough. --- src/libslic3r/MedialAxis.cpp | 7 ++++--- src/libslic3r/PerimeterGenerator.cpp | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/libslic3r/MedialAxis.cpp b/src/libslic3r/MedialAxis.cpp index 2e68004a9..273f16738 100644 --- a/src/libslic3r/MedialAxis.cpp +++ b/src/libslic3r/MedialAxis.cpp @@ -284,8 +284,8 @@ MedialAxis::validate_edge(const VD::edge_type* edge) // return false; // - //shouldn't occur if perimeter_generator is well made - if (w0 > this->max_width && w1 > this->max_width) + //shouldn't occur if perimeter_generator is well made. *1.05 for a little wiggle room + if (w0 > this->max_width*1.05 && w1 > this->max_width*1.05) return false; this->thickness[edge] = std::make_pair(w0, w1); @@ -926,6 +926,7 @@ MedialAxis::main_fusion(ThickPolylines& pp) if (dot_candidate_branch_test < 0) dot_candidate_branch_test = 0; if (pp[biggest_main_branch_id].width.back()>0) test_dot += 2 * (float)dot_poly_branch; + //std::cout << "compute dot "<< dot_poly_branch_test<<" & "<< dot_candidate_branch_test <<"\n"; } //test if it's useful to merge or not //ie, don't merge 'T' but ok for 'Y', merge only lines of not disproportionate different length (ratio max: 4) (or they are both with 0-width end) @@ -953,7 +954,7 @@ MedialAxis::main_fusion(ThickPolylines& pp) } if (best_candidate != nullptr) { //idf++; - //std::cout << " == fusion " << id <<" : "<< idf << " ==\n"; + //std::cout << " == fusion " << id <<" : "<< idf << " == with "<< i <<" & "< min_width*(ext_perimeter_width + ext_perimeter_spacing2)) { bound.remove_point_too_near((coord_t)SCALED_RESOLUTION); // the maximum thickness of our thin wall area is equal to the minimum thickness of a single loop - Slic3r::MedialAxis ma{ thin[0], ext_perimeter_width + ext_perimeter_spacing2, + Slic3r::MedialAxis ma{ thin[0], (coord_t)((ext_perimeter_width + ext_perimeter_spacing2)*1.1), min_width, coord_t(this->layer_height) }; ma.use_bounds(bound) .use_min_real_width((coord_t)scale_(this->ext_perimeter_flow.nozzle_diameter))