if we get empty brushes in CSG subtract, don't complain, just don't insert the new brush (as this can happen intentionally when a brush is entirely covered)
This commit is contained in:
parent
277c57b2db
commit
5b8b0dd6b2
|
|
@ -397,13 +397,17 @@ public:
|
||||||
for(brush_vector_t::const_iterator i = out.begin(); i != out.end(); ++i)
|
for(brush_vector_t::const_iterator i = out.begin(); i != out.end(); ++i)
|
||||||
{
|
{
|
||||||
++m_after;
|
++m_after;
|
||||||
NodeSmartReference node((new BrushNode())->node());
|
|
||||||
(*i)->removeEmptyFaces();
|
(*i)->removeEmptyFaces();
|
||||||
ASSERT_MESSAGE(!(*i)->empty(), "brush left with no faces after subtract");
|
if(!(*i)->empty())
|
||||||
|
{
|
||||||
|
NodeSmartReference node((new BrushNode())->node());
|
||||||
Node_getBrush(node)->copy(*(*i));
|
Node_getBrush(node)->copy(*(*i));
|
||||||
delete (*i);
|
delete (*i);
|
||||||
Node_getTraversable(path.parent())->insert(node);
|
Node_getTraversable(path.parent())->insert(node);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
delete (*i);
|
||||||
|
}
|
||||||
Path_deleteTop(path);
|
Path_deleteTop(path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user