Skip to content

Commit

Permalink
Follow-up 1b451cd: Fixed #11415 - Connectors disappear when slicing =…
Browse files Browse the repository at this point in the history
…> only when using multiple cut planes AND excluding parts

Note: With this issue was related crash on perform a cut (SPE-1938),
because a variable with ended lifetime was used
  • Loading branch information
YuSanka committed Oct 5, 2023
1 parent 8e0c21d commit 510d596
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions src/libslic3r/CutUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,12 @@ const ModelObjectPtrs& Cut::perform_by_contour(std::vector<Part> parts, int dowe

// Just add Upper and Lower objects to cut_object_ptrs
post_process(upper, lower, cut_object_ptrs);

// Now merge all model parts together:
merge_solid_parts_inside_object(cut_object_ptrs);

// replace initial objects in model with cut object
finalize(cut_object_ptrs);
}
else if (volumes.size() > cut_parts_cnt) {
// Means that object is cut with connectors
Expand All @@ -490,17 +496,18 @@ const ModelObjectPtrs& Cut::perform_by_contour(std::vector<Part> parts, int dowe
// Add Upper and Lower objects to cut_object_ptrs
post_process(upper, lower, cut_object_ptrs);

// Add Dowel-connectors as separate objects to cut_object_ptrs
// Now merge all model parts together:
merge_solid_parts_inside_object(cut_object_ptrs);

// replace initial objects in model with cut object
finalize(cut_object_ptrs);

// Add Dowel-connectors as separate objects to model
if (cut_connectors_obj.size() >= 3)
for (size_t id = 2; id < cut_connectors_obj.size(); id++)
cut_object_ptrs.push_back(cut_connectors_obj[id]);
m_model.add_object(*cut_connectors_obj[id]);
}

// Now merge all model parts together:
merge_solid_parts_inside_object(cut_object_ptrs);

finalize(cut_object_ptrs);

return m_model.objects;
}

Expand Down

0 comments on commit 510d596

Please sign in to comment.