mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-25 15:44:12 -06:00
Yet more refactoring of Print / PrintObject in regard to
C++11 loops, configuration and step invalidation.
This commit is contained in:
parent
0a692cc497
commit
c8b934f8d3
5 changed files with 155 additions and 202 deletions
|
@ -96,10 +96,8 @@ class PrintObject
|
|||
friend class Print;
|
||||
|
||||
public:
|
||||
// map of (vectors of volume ids), indexed by region_id
|
||||
/* (we use map instead of vector so that we don't have to worry about
|
||||
resizing it and the [] operator adds new items automagically) */
|
||||
std::map< size_t,std::vector<int> > region_volumes;
|
||||
// vector of (vectors of volume ids), indexed by region_id
|
||||
std::vector<std::vector<int>> region_volumes;
|
||||
PrintObjectConfig config;
|
||||
t_layer_height_ranges layer_height_ranges;
|
||||
|
||||
|
@ -146,7 +144,11 @@ public:
|
|||
BoundingBox bounding_box() const { return BoundingBox(Point(0,0), this->size); }
|
||||
|
||||
// adds region_id, too, if necessary
|
||||
void add_region_volume(int region_id, int volume_id) { region_volumes[region_id].push_back(volume_id); }
|
||||
void add_region_volume(int region_id, int volume_id) {
|
||||
if (region_id >= region_volumes.size())
|
||||
region_volumes.resize(region_id + 1);
|
||||
region_volumes[region_id].push_back(volume_id);
|
||||
}
|
||||
// This is the *total* layer count (including support layers)
|
||||
// this value is not supposed to be compared with Layer::id
|
||||
// since they have different semantics.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue