mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-15 11:55:58 +08:00
Fix indexing of heads after duplicate removal
This commit is contained in:
parent
792779f2de
commit
7705ecd5aa
@ -205,8 +205,8 @@ void create_branching_tree(SupportTreeBuilder &builder, const SupportableMesh &s
|
|||||||
|
|
||||||
execution::for_each(
|
execution::for_each(
|
||||||
ex_tbb, size_t(0), nondup_idx.size(),
|
ex_tbb, size_t(0), nondup_idx.size(),
|
||||||
[&sm, &heads](size_t i) {
|
[&sm, &heads, &nondup_idx](size_t i) {
|
||||||
heads[i] = calculate_pinhead_placement(ex_seq, sm, i);
|
heads[i] = calculate_pinhead_placement(ex_seq, sm, nondup_idx[i]);
|
||||||
},
|
},
|
||||||
execution::max_concurrency(ex_tbb)
|
execution::max_concurrency(ex_tbb)
|
||||||
);
|
);
|
||||||
@ -214,6 +214,7 @@ void create_branching_tree(SupportTreeBuilder &builder, const SupportableMesh &s
|
|||||||
for (auto &h : heads)
|
for (auto &h : heads)
|
||||||
if (h && h->is_valid()) {
|
if (h && h->is_valid()) {
|
||||||
leafs.emplace_back(h->junction_point().cast<float>(), h->r_back_mm);
|
leafs.emplace_back(h->junction_point().cast<float>(), h->r_back_mm);
|
||||||
|
h->id = leafs.size() - 1;
|
||||||
builder.add_head(h->id, *h);
|
builder.add_head(h->id, *h);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user