mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-10-11 14:22:54 +02:00
Fix for arrange crash when geometry has zero length segments
fixes #5749
This commit is contained in:
1 parent
1e69e6def1
commit
64ec319017
1 file changed
+6
-2
@@ -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