Fix for empty zip when the object is moved after slicing
This commit is contained in:
parent
980c53970b
commit
7b9c8ca06c
2 changed files with 26 additions and 14 deletions
src/libslic3r
|
@ -567,19 +567,7 @@ void SLAPrint::process()
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
using Layer = sla::ExPolygons;
|
auto& levels = m_printer_input;
|
||||||
using LayerCopies = std::vector<SLAPrintObject::Instance>;
|
|
||||||
struct LayerRef {
|
|
||||||
std::reference_wrapper<const Layer> lref;
|
|
||||||
std::reference_wrapper<const LayerCopies> copies;
|
|
||||||
LayerRef(const Layer& lyr, const LayerCopies& cp) :
|
|
||||||
lref(std::cref(lyr)), copies(std::cref(cp)) {}
|
|
||||||
};
|
|
||||||
|
|
||||||
using LevelID = long long;
|
|
||||||
using LayerRefs = std::vector<LayerRef>;
|
|
||||||
// layers according to quantized height levels
|
|
||||||
std::map<LevelID, LayerRefs> levels;
|
|
||||||
|
|
||||||
// We have the layer polygon collection but we need to unite them into
|
// We have the layer polygon collection but we need to unite them into
|
||||||
// an index where the key is the height level in discrete levels (clipper)
|
// an index where the key is the height level in discrete levels (clipper)
|
||||||
|
|
|
@ -200,7 +200,31 @@ private:
|
||||||
|
|
||||||
PrintObjects m_objects;
|
PrintObjects m_objects;
|
||||||
std::vector<bool> m_stepmask;
|
std::vector<bool> m_stepmask;
|
||||||
SLAPrinterPtr m_printer;
|
|
||||||
|
// Definition of the print input map. It consists of the slices indexed
|
||||||
|
// with scaled (clipper) Z coordinates. Also contains the instance
|
||||||
|
// transformations in scaled and filtered version. This is enough for the
|
||||||
|
// rasterizer to be able to draw every layer in the right position
|
||||||
|
using Layer = ExPolygons;
|
||||||
|
using LayerCopies = std::vector<SLAPrintObject::Instance>;
|
||||||
|
struct LayerRef {
|
||||||
|
std::reference_wrapper<const Layer> lref;
|
||||||
|
std::reference_wrapper<const LayerCopies> copies;
|
||||||
|
LayerRef(const Layer& lyr, const LayerCopies& cp) :
|
||||||
|
lref(std::cref(lyr)), copies(std::cref(cp)) {}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Layers according to quantized height levels. This will be consumed by
|
||||||
|
// the printer (rasterizer) in the SLAPrint class.
|
||||||
|
using LevelID = long long;
|
||||||
|
|
||||||
|
// One level may contain multiple slices from multiple objects and their
|
||||||
|
// supports
|
||||||
|
using LayerRefs = std::vector<LayerRef>;
|
||||||
|
std::map<LevelID, LayerRefs> m_printer_input;
|
||||||
|
|
||||||
|
// The printer itself
|
||||||
|
SLAPrinterPtr m_printer;
|
||||||
|
|
||||||
friend SLAPrintObject;
|
friend SLAPrintObject;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue