mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 19:33:47 +00:00
Fix for arrange crash when geometry has zero length segments
fixes #5749
This commit is contained in:
@@ -220,7 +220,9 @@ inline NfpResult<RawShape> nfpConvexOnly(const RawShape& sh,
|
|||||||
auto next = std::next(first);
|
auto next = std::next(first);
|
||||||
|
|
||||||
while(next != sl::cend(sh)) {
|
while(next != sl::cend(sh)) {
|
||||||
edgelist.emplace_back(*(first), *(next));
|
if (pl::magnsq(*next - *first) > 0)
|
||||||
|
edgelist.emplace_back(*(first), *(next));
|
||||||
|
|
||||||
++first; ++next;
|
++first; ++next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -230,7 +232,9 @@ inline NfpResult<RawShape> nfpConvexOnly(const RawShape& sh,
|
|||||||
auto next = std::next(first);
|
auto next = std::next(first);
|
||||||
|
|
||||||
while(next != sl::cend(other)) {
|
while(next != sl::cend(other)) {
|
||||||
edgelist.emplace_back(*(next), *(first));
|
if (pl::magnsq(*next - *first) > 0)
|
||||||
|
edgelist.emplace_back(*(next), *(first));
|
||||||
|
|
||||||
++first; ++next;
|
++first; ++next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user