mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-03 20:13:59 -06:00
ENH: merge tree support layers to support layers
Will greately reduce repeated codes. Change-Id: I506a97a907b5b393fe41e13ae53e2f7c9247c4c5
This commit is contained in:
parent
b6ef31f7b9
commit
646b259972
11 changed files with 123 additions and 624 deletions
|
@ -865,42 +865,22 @@ void GLGizmoFdmSupports::run_thread()
|
|||
goto _finished;
|
||||
}
|
||||
|
||||
if (m_is_tree_support)
|
||||
if (!m_print_instance.print_object->support_layers().size())
|
||||
{
|
||||
if (!m_print_instance.print_object->tree_support_layers().size())
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ",no tree support layer found, update status to 100%\n";
|
||||
print->set_status(100, L("Support Generated"));
|
||||
goto _finished;
|
||||
}
|
||||
for (const TreeSupportLayer *support_layer : m_print_instance.print_object->tree_support_layers())
|
||||
{
|
||||
for (const ExtrusionEntity *extrusion_entity : support_layer->support_fills.entities)
|
||||
{
|
||||
_3DScene::extrusionentity_to_verts(extrusion_entity, float(support_layer->print_z), m_print_instance.shift, *m_support_volume);
|
||||
}
|
||||
}
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ", finished extrusionentity_to_verts, update status to 100%";
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ",no support layer found, update status to 100%\n";
|
||||
print->set_status(100, L("Support Generated"));
|
||||
goto _finished;
|
||||
}
|
||||
else
|
||||
for (const SupportLayer *support_layer : m_print_instance.print_object->support_layers())
|
||||
{
|
||||
if (!m_print_instance.print_object->support_layers().size())
|
||||
for (const ExtrusionEntity *extrusion_entity : support_layer->support_fills.entities)
|
||||
{
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ",no support layer found, update status to 100%\n";
|
||||
print->set_status(100, L("Support Generated"));
|
||||
goto _finished;
|
||||
_3DScene::extrusionentity_to_verts(extrusion_entity, float(support_layer->print_z), m_print_instance.shift, *m_support_volume);
|
||||
}
|
||||
for (const SupportLayer *support_layer : m_print_instance.print_object->support_layers())
|
||||
{
|
||||
for (const ExtrusionEntity *extrusion_entity : support_layer->support_fills.entities)
|
||||
{
|
||||
_3DScene::extrusionentity_to_verts(extrusion_entity, float(support_layer->print_z), m_print_instance.shift, *m_support_volume);
|
||||
}
|
||||
}
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ", finished extrusionentity_to_verts, update status to 100%";
|
||||
print->set_status(100, L("Support Generated"));
|
||||
}
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ", finished extrusionentity_to_verts, update status to 100%";
|
||||
print->set_status(100, L("Support Generated"));
|
||||
|
||||
record_timestamp();
|
||||
}
|
||||
catch (...) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue