Another fix for crashing support generation.

This commit is contained in:
tamasmeszaros 2018-12-12 15:51:39 +01:00
parent dfc92fb5cf
commit 623b2cec5c
2 changed files with 6 additions and 3 deletions

View File

@ -447,8 +447,11 @@ void base_plate(const TriangleMesh &mesh, ExPolygons &output, float h,
ExPolygons tmp; tmp.reserve(count); ExPolygons tmp; tmp.reserve(count);
for(auto& o : out) for(auto& e : o) tmp.emplace_back(std::move(e)); for(auto& o : out) for(auto& e : o) tmp.emplace_back(std::move(e));
output = unify(tmp); ExPolygons utmp = unify(tmp);
for(auto& o : output) o = o.simplify(0.1/SCALING_FACTOR).front(); for(auto& o : utmp) {
auto&& smp = o.simplify(0.1/SCALING_FACTOR);
output.insert(output.end(), smp.begin(), smp.end());
}
} }
void create_base_pool(const ExPolygons &ground_layer, TriangleMesh& out, void create_base_pool(const ExPolygons &ground_layer, TriangleMesh& out,

View File

@ -469,7 +469,7 @@ void SLAPrint::process()
for(float h = minZ + ilh; h < maxZ; h += flh) for(float h = minZ + ilh; h < maxZ; h += flh)
if(h >= gnd) heights.emplace_back(h); if(h >= gnd) heights.emplace_back(h);
auto& layers = po.m_model_slices; auto& layers = po.m_model_slices; layers.clear();
slicer.slice(heights, &layers, [this](){ throw_if_canceled(); }); slicer.slice(heights, &layers, [this](){ throw_if_canceled(); });
}; };