FIX: auto arranging skip unprintable high items
Jira: STUDIO-5646 Change-Id: I72dc3d8c71a075bab8204f4418e869a7a34c0c8e (cherry picked from commit 0afdf8361493485da2254c426719594fd9a982ed)
This commit is contained in:
parent
d58baba184
commit
e98caffab1
|
@ -499,7 +499,7 @@ void ArrangeJob::prepare()
|
||||||
void ArrangeJob::check_unprintable()
|
void ArrangeJob::check_unprintable()
|
||||||
{
|
{
|
||||||
for (auto it = m_selected.begin(); it != m_selected.end();) {
|
for (auto it = m_selected.begin(); it != m_selected.end();) {
|
||||||
if (it->poly.area() < 0.001)
|
if (it->poly.area() < 0.001 || it->height>params.printable_height)
|
||||||
{
|
{
|
||||||
#if SAVE_ARRANGE_POLY
|
#if SAVE_ARRANGE_POLY
|
||||||
SVG svg("SVG/arrange_unprintable_"+it->name+".svg", get_extents(it->poly));
|
SVG svg("SVG/arrange_unprintable_"+it->name+".svg", get_extents(it->poly));
|
||||||
|
@ -508,12 +508,14 @@ void ArrangeJob::check_unprintable()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
m_unprintable.push_back(*it);
|
m_unprintable.push_back(*it);
|
||||||
|
it = m_selected.erase(it);
|
||||||
|
if (it->poly.area() < 0.001) {
|
||||||
auto msg = (boost::format(
|
auto msg = (boost::format(
|
||||||
_utf8("Object %s has zero size and can't be arranged."))
|
_utf8("Object %s has zero size and can't be arranged."))
|
||||||
% _utf8(it->name)).str();
|
% _utf8(it->name)).str();
|
||||||
m_plater->get_notification_manager()->push_notification(NotificationType::BBLPlateInfo,
|
m_plater->get_notification_manager()->push_notification(NotificationType::BBLPlateInfo,
|
||||||
NotificationManager::NotificationLevel::WarningNotificationLevel, msg);
|
NotificationManager::NotificationLevel::WarningNotificationLevel, msg);
|
||||||
it = m_selected.erase(it);
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
it++;
|
it++;
|
||||||
|
|
Loading…
Reference in New Issue