Small fix of 41388bd:

Interior mesh can be empty and TriangleMeshSlicer would fail in that case.
Also, recalculating shared vertices after repair should probably be done, TMS relies on it.
This commit is contained in:
Lukas Matena 2020-02-11 15:25:28 +01:00
parent 6d0cf16797
commit 2e62f03ba8

View File

@ -222,8 +222,8 @@ void SLAPrint::Steps::slice_model(SLAPrintObject &po)
auto &slice_grid = po.m_model_height_levels;
slicer.slice(slice_grid, SlicingMode::Regular, closing_r, &po.m_model_slices, thr);
if (po.m_hollowing_data) {
po.m_hollowing_data->interior.repair();
if (po.m_hollowing_data && ! po.m_hollowing_data->interior.empty()) {
po.m_hollowing_data->interior.repair(true);
TriangleMeshSlicer interior_slicer(&po.m_hollowing_data->interior);
std::vector<ExPolygons> interior_slices;
interior_slicer.slice(slice_grid, SlicingMode::Regular, closing_r, &interior_slices, thr);