Add hollowed interiors to the support data

This commit is contained in:
tamasmeszaros 2019-11-26 14:18:56 +01:00
parent 7011c58faa
commit 281762db45

View file

@ -237,9 +237,19 @@ void SLAPrint::Steps::support_points(SLAPrintObject &po)
// If supports are disabled, we can skip the model scan. // If supports are disabled, we can skip the model scan.
if(!po.m_config.supports_enable.getBool()) return; if(!po.m_config.supports_enable.getBool()) return;
bool is_hollowing = po.m_config.hollowing_enable.getBool() && po.m_hollowing_data;
TriangleMesh hollowed_mesh;
if (is_hollowing) {
hollowed_mesh = po.transformed_mesh();
hollowed_mesh.merge(po.m_hollowing_data->interior);
hollowed_mesh.require_shared_vertices();
}
const TriangleMesh &mesh = is_hollowing ? hollowed_mesh : po.transformed_mesh();
if (!po.m_supportdata) if (!po.m_supportdata)
po.m_supportdata.reset( po.m_supportdata.reset(new SLAPrintObject::SupportData(mesh));
new SLAPrintObject::SupportData(po.transformed_mesh()));
const ModelObject& mo = *po.m_model_object; const ModelObject& mo = *po.m_model_object;