FIX: crash when using line infill pattern

jira: STUDIO-12312
Change-Id: I26ff4d4ab577abb7a9928abc95d382735eba4f38
This commit is contained in:
zhimin.zeng 2025-05-21 09:32:14 +08:00 committed by lane.wei
parent 94677761c9
commit 69300aa7e1

View File

@ -1911,7 +1911,7 @@ static inline void improve_ordering_by_two_exchanges_with_segment_flipping(Polyl
out.reserve(polylines.size());
for (const FlipEdge &edge : edges) {
Polyline &pl = polylines[edge.source_index];
out.emplace_back(std::move(pl));
out.emplace_back(pl);
if (edge.p2 == pl.first_point().cast<double>()) {
// Polyline is flipped.
out.back().reverse();