mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-20 13:17:54 -06:00
FDM backend refactoring: Return PrintRegion by reference, not by pointer.
Added PrintRegion hashing.
This commit is contained in:
parent
b8db1922f7
commit
ee15f00574
11 changed files with 71 additions and 62 deletions
|
@ -22,8 +22,8 @@ class LayerRegion
|
|||
public:
|
||||
Layer* layer() { return m_layer; }
|
||||
const Layer* layer() const { return m_layer; }
|
||||
PrintRegion* region() { return m_region; }
|
||||
const PrintRegion* region() const { return m_region; }
|
||||
PrintRegion& region() { return *m_region; }
|
||||
const PrintRegion& region() const { return *m_region; }
|
||||
|
||||
// collection of surfaces generated by slicing the original geometry
|
||||
// divided by type top/bottom/internal
|
||||
|
@ -126,7 +126,7 @@ public:
|
|||
std::vector<BoundingBox> lslices_bboxes;
|
||||
|
||||
size_t region_count() const { return m_regions.size(); }
|
||||
const LayerRegion* get_region(int idx) const { return m_regions.at(idx); }
|
||||
const LayerRegion* get_region(int idx) const { return m_regions[idx]; }
|
||||
LayerRegion* get_region(int idx) { return m_regions[idx]; }
|
||||
LayerRegion* add_region(PrintRegion* print_region);
|
||||
const LayerRegionPtrs& regions() const { return m_regions; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue