ENH: add option "remove_small_overhang"

Let the user choose remove or not.

Github issue: #1810
Jira: STUDIO-2992

Change-Id: I9c5e087d171d16d8d7318b36efe825a6cbc29c33
This commit is contained in:
Arthur 2023-05-31 15:05:28 +08:00 committed by Lane.Wei
parent 5ae0adde16
commit 0ce835dcd4
11 changed files with 27 additions and 7 deletions

View file

@ -726,6 +726,7 @@ void TreeSupport::detect_overhangs(bool detect_first_sharp_tail_only)
const coordf_t max_bridge_length = scale_(config.max_bridge_length.value);
const bool bridge_no_support = max_bridge_length > 0;
const bool support_critical_regions_only = config.support_critical_regions_only.value;
const bool config_remove_small_overhangs = config.support_remove_small_overhang.value;
const int enforce_support_layers = config.enforce_support_layers.value;
const double area_thresh_well_supported = SQ(scale_(6));
const double length_thresh_well_supported = scale_(6);
@ -1043,7 +1044,7 @@ void TreeSupport::detect_overhangs(bool detect_first_sharp_tail_only)
auto blockers = m_object->slice_support_blockers();
m_object->project_and_append_custom_facets(false, EnforcerBlockerType::ENFORCER, enforcers);
m_object->project_and_append_custom_facets(false, EnforcerBlockerType::BLOCKER, blockers);
if (is_auto(stype) && g_config_remove_small_overhangs) {
if (is_auto(stype) && config_remove_small_overhangs) {
if (blockers.size() < m_object->layer_count())
blockers.resize(m_object->layer_count());
for (auto& cluster : overhangClusters) {