Fix of G-code invalidation on "wipe_into_object" "wipe_into_infill"

changes.

WIP: Fix of "levitating objects cannot be sliced".
This commit is contained in:
bubnikv 2018-12-14 17:17:51 +01:00
parent 2be23c8b14
commit 506cbcb4a7
3 changed files with 27 additions and 10 deletions

View file

@ -17,6 +17,16 @@ Layer::~Layer()
m_regions.clear();
}
// Test whether whether there are any slices assigned to this layer.
bool Layer::empty() const
{
for (const LayerRegion *layerm : m_regions)
if (layerm != nullptr && ! layerm->slices.empty())
// Non empty layer.
return false;
return true;
}
LayerRegion* Layer::add_region(PrintRegion* print_region)
{
m_regions.emplace_back(new LayerRegion(this, print_region));