Hotfix for crash when empty pad and support mesh is generated.
This commit is contained in:
parent
aa7f98b020
commit
a49caea6cc
1 changed files with 3 additions and 3 deletions
|
@ -713,7 +713,7 @@ struct Pad {
|
|||
}
|
||||
|
||||
tmesh.translate(0, 0, float(zlevel));
|
||||
tmesh.require_shared_vertices();
|
||||
if (!tmesh.empty()) tmesh.require_shared_vertices();
|
||||
}
|
||||
|
||||
bool empty() const { return tmesh.facets_count() == 0; }
|
||||
|
@ -2626,10 +2626,10 @@ std::vector<ExPolygons> SLASupportTree::slice(
|
|||
}
|
||||
|
||||
size_t len = grid.size();
|
||||
for (const Slices slv : slices) { len = std::min(len, slv.size()); }
|
||||
for (const Slices &slv : slices) { len = std::min(len, slv.size()); }
|
||||
|
||||
// Either the support or the pad or both has to be non empty
|
||||
assert(!slices.empty());
|
||||
if (slices.empty()) return {};
|
||||
|
||||
Slices &mrg = slices.front();
|
||||
|
||||
|
|
Loading…
Reference in a new issue