mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 10:02:12 +00:00
fix: Correct Polyline3::split_at point insertion order
The split point was being prepended (append_before) to p1 instead of appended, causing it to be placed at the start of the segment rather than the end. This resulted in rogue extrusion jumps (stringing) across the model during ZAA sloped extrusions. Also adds missing append/append_before calls in the exact-point (index != -1) branch, which previously lost the split point entirely.
This commit is contained in:
@@ -825,10 +825,12 @@ void Polyline3::split_at(Point &point, Polyline3* p1, Polyline3* p2) const {
|
||||
index = this->find_point(p);
|
||||
if (index != -1) {
|
||||
this->split_at_index(index, p1, p2);
|
||||
p1->append(Point3(point, p1->last_point().z()));
|
||||
p2->append_before(Point3(point, p2->first_point().z()));
|
||||
} else {
|
||||
Polyline3 temp;
|
||||
this->split_at_index(line_idx, p1, &temp);
|
||||
p1->append_before(Point3(point, p1->last_point().z()));
|
||||
p1->append(Point3(point, p1->last_point().z()));
|
||||
this->split_at_index(line_idx + 1, &temp, p2);
|
||||
p2->append_before(Point3(point, p2->first_point().z()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user