Revert "Use number_of_parts for is_splittable"

It is too dangerous to rely on the admesh flag without inspecting the
admesh code line by line and a through test.

This reverts commit cd3cec3e45.
This commit is contained in:
bubnikv 2019-04-01 12:27:45 +02:00
parent cd3cec3e45
commit d728f4be5e
4 changed files with 25 additions and 1 deletions
src/libslic3r

View file

@ -1467,7 +1467,11 @@ int ModelVolume::extruder_id() const
bool ModelVolume::is_splittable() const
{
return mesh.stl.stats.number_of_parts > 1;
// the call mesh.is_splittable() is expensive, so cache the value to calculate it only once
if (m_is_splittable == -1)
m_is_splittable = (int)mesh.is_splittable();
return m_is_splittable == 1;
}
void ModelVolume::center_geometry()