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:
Matthias Nott
2026-02-09 22:19:31 +01:00
parent 97a9c9fb68
commit 90cf80a1f8

View File

@@ -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()));
}