From 9e1b856e99d09e21cf31a1c9a9b65d67e89703eb Mon Sep 17 00:00:00 2001 From: "jiaxi.chen" Date: Mon, 18 Nov 2024 10:29:22 +0800 Subject: [PATCH] FIX: protect when support_style doesnt match type jira: STUDIO-8800 Change-Id: I7d42f95ba43b4b3a47a83ae59afaaf9bc94baa5d (cherry picked from commit d4bc450af6d2381bd5eb891c1395ebd50ca1c322) --- src/libslic3r/Support/SupportParameters.hpp | 6 ++++++ src/libslic3r/Support/TreeSupport.cpp | 2 ++ 2 files changed, 8 insertions(+) diff --git a/src/libslic3r/Support/SupportParameters.hpp b/src/libslic3r/Support/SupportParameters.hpp index 304f3a23af..da21895b34 100644 --- a/src/libslic3r/Support/SupportParameters.hpp +++ b/src/libslic3r/Support/SupportParameters.hpp @@ -163,6 +163,12 @@ struct SupportParameters { std::numeric_limits::max(); support_style = object_config.support_style; + if (support_style != smsDefault) { + if ((support_style == smsSnug || support_style == smsGrid) && is_tree(object_config.support_type)) support_style = smsDefault; + if ((support_style == smsTreeSlim || support_style == smsTreeStrong || support_style == smsTreeHybrid || support_style == smsTreeOrganic) && + !is_tree(object_config.support_type)) + support_style = smsDefault; + } if (support_style == smsDefault) { if (is_tree(object_config.support_type)) { // Orca: use organic as default diff --git a/src/libslic3r/Support/TreeSupport.cpp b/src/libslic3r/Support/TreeSupport.cpp index 737334367c..7bb9364133 100644 --- a/src/libslic3r/Support/TreeSupport.cpp +++ b/src/libslic3r/Support/TreeSupport.cpp @@ -1650,6 +1650,8 @@ void TreeSupport::move_bounds_to_contact_nodes(std::vectorsupport_type.value)) return; + if (m_support_params.support_style == smsTreeOrganic) { generate_tree_support_3D(*m_object, this, this->throw_on_cancel); return;