From 63a58ce1ad02ea6f2e298bb6bb1ae220c928cb91 Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Thu, 9 Jun 2022 11:06:59 +0200 Subject: [PATCH] Require higher values for widening factor to have the same effect --- src/libslic3r/PrintConfig.cpp | 2 +- src/libslic3r/SLA/BranchingTreeSLA.cpp | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index f9db6cc5f..40a3cb3d5 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -3676,7 +3676,7 @@ void PrintConfigDef::init_sla_params() def->min = 0; def->max = 1; def->mode = comExpert; - def->set_default_value(new ConfigOptionFloat(0.1)); + def->set_default_value(new ConfigOptionFloat(0.15)); def = this->add("support_base_diameter", coFloat); def->label = L("Support base diameter"); diff --git a/src/libslic3r/SLA/BranchingTreeSLA.cpp b/src/libslic3r/SLA/BranchingTreeSLA.cpp index 3f3e99d8e..50c5ad015 100644 --- a/src/libslic3r/SLA/BranchingTreeSLA.cpp +++ b/src/libslic3r/SLA/BranchingTreeSLA.cpp @@ -20,7 +20,7 @@ class BranchingTreeBuilder: public branchingtree::Builder { // Scaling of the input value 'widening_factor:<0, 1>' to produce resonable // widening behaviour - static constexpr double WIDENING_SCALE = 0.2; + static constexpr double WIDENING_SCALE = 0.08; double get_radius(const branchingtree::Node &j) { @@ -206,12 +206,16 @@ void create_branching_tree(SupportTreeBuilder &builder, const SupportableMesh &s execution::for_each( ex_tbb, size_t(0), nondup_idx.size(), - [&sm, &heads, &nondup_idx](size_t i) { - heads[i] = calculate_pinhead_placement(ex_seq, sm, nondup_idx[i]); + [&sm, &heads, &nondup_idx, &builder](size_t i) { + if (!builder.ctl().stopcondition()) + heads[i] = calculate_pinhead_placement(ex_tbb, sm, nondup_idx[i]); }, execution::max_concurrency(ex_tbb) ); + if (builder.ctl().stopcondition()) + return; + for (auto &h : heads) if (h && h->is_valid()) { leafs.emplace_back(h->junction_point().cast(), h->r_back_mm);