FIX: reduce unnecessary small parts of tree supports

1. reduce unnecessary small parts of tree supports
    jira: STUDIO-6506
2. fix the bug that zero height tree support may be generated with synced support layer height.
3. fix the bug that tree nodes' radii may change abruptly
    jira: STUDIO-6326

Change-Id: I38153d136e46bf9d797881cc6ca8803767f46736
(cherry picked from commit 59af0a6c2643169463cf18010ffd75f3aa19b704)
(cherry picked from commit 47440f040cae70f79e430b02d44f6093208ac066)
This commit is contained in:
Arthur 2024-03-14 17:57:32 +08:00 committed by Noisyfox
parent fd3ed419c2
commit da7eea49c9
2 changed files with 86 additions and 102 deletions

View file

@ -81,7 +81,7 @@ struct SupportNode
overhang = parent->overhang;
if (dist_mm_to_top == 0)
dist_mm_to_top = parent->dist_mm_to_top + parent->height;
if (radius == 0)
if (radius == 0 && parent->radius>0)
radius = parent->radius + (dist_mm_to_top - parent->dist_mm_to_top) * diameter_angle_scale_factor;
parent->child = this;
for (auto& neighbor : parent->merged_neighbours) {