FIX: nodes in same pos overlap

jira: STUDIO-11631
Change-Id: I9108b525038ad181c4875a659547b06dd14b240c
This commit is contained in:
jiaxi.chen 2025-04-30 15:25:44 +08:00 committed by lane.wei
parent e5cfc13c17
commit a1f45c9a92

View File

@ -2854,6 +2854,8 @@ void TreeSupport::drop_nodes()
} }
if (node.to_buildplate || parts.empty()) //It's outside, so make it go towards the build plate. if (node.to_buildplate || parts.empty()) //It's outside, so make it go towards the build plate.
{ {
if (nodes_per_part[0][node.position])
p_node->position += Point(1, 1);
nodes_per_part[0][node.position] = p_node; nodes_per_part[0][node.position] = p_node;
continue; continue;
} }
@ -2888,6 +2890,8 @@ void TreeSupport::drop_nodes()
} }
} }
//Put it in the best one. //Put it in the best one.
if (nodes_per_part[closest_part + 1][node.position])
p_node->position += Point(1, 1);
nodes_per_part[closest_part + 1][node.position] = p_node; //Index + 1 because the 0th index is the outside part. nodes_per_part[closest_part + 1][node.position] = p_node; //Index + 1 because the 0th index is the outside part.
} }