ENH: slicing: add cache data load/export for slicing

Change-Id: I88b7c79b6f79ec6bed0f829316b67310cac99b44
(cherry picked from commit 67c1d2e8dd459cc4450ce580632f01e25db038ac)
This commit is contained in:
lane.wei 2022-11-22 15:22:47 +08:00 committed by Lane.Wei
parent 2ffa56633c
commit c3abc64b61
13 changed files with 1471 additions and 192 deletions

View file

@ -65,7 +65,7 @@ public:
// ordered collection of extrusion paths to fill surfaces
// (this collection contains only ExtrusionEntityCollection objects)
ExtrusionEntityCollection fills;
Flow flow(FlowRole role) const;
Flow flow(FlowRole role, double layer_height) const;
Flow bridging_flow(FlowRole role, bool thick_bridge = false) const;
@ -110,7 +110,7 @@ private:
const PrintRegion *m_region;
};
class Layer
class Layer
{
public:
// Sequential index of this layer in PrintObject::m_layers, offsetted by the number of raft layers.
@ -132,7 +132,7 @@ public:
mutable ExPolygons cantilevers;
mutable std::map<const ExPolygon*, float> sharp_tails_height;
// Collection of expolygons generated by slicing the possibly multiple meshes of the source geometry
// Collection of expolygons generated by slicing the possibly multiple meshes of the source geometry
// (with possibly differing extruder ID and slicing parameters) and merged.
// For the first layer, if the Elephant foot compensation is applied, this lslice is uncompensated, therefore
// it includes the Elephant foot effect, thus it corresponds to the shape of the printed 1st layer.
@ -149,7 +149,7 @@ public:
LayerRegion* add_region(const PrintRegion *print_region);
const LayerRegionPtrs& regions() const { return m_regions; }
// Test whether whether there are any slices assigned to this layer.
bool empty() const;
bool empty() const;
void make_slices();
// Backup and restore raw sliced regions if needed.
//FIXME Review whether not to simplify the code by keeping the raw_slices all the time.
@ -209,7 +209,7 @@ private:
LayerRegionPtrs m_regions;
};
class SupportLayer : public Layer
class SupportLayer : public Layer
{
public:
// Polygons covered by the supports: base, interface and contact areas.