mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-13 21:45:54 +08:00
Push up the native iterators from Surfaces:: to SurfaceCollection, as it's just a souped-up Surface vector.
Enables things like for (auto x : collection) { } instead of for (auto x : collection.surfaces) { } and enables information hiding later.
This commit is contained in:
parent
2d06cad830
commit
6f84732a70
@ -70,6 +70,13 @@ public:
|
||||
void append(ExPolygons &&src, const Surface &surfaceTempl) { surfaces_append(this->surfaces, std::move(src), surfaceTempl); }
|
||||
void append(Surfaces &&src) { surfaces_append(this->surfaces, std::move(src)); }
|
||||
|
||||
Surfaces::iterator begin() { return this->surfaces.begin();}
|
||||
Surfaces::iterator end() { return this->surfaces.end();}
|
||||
Surfaces::const_iterator cbegin() const { return this->surfaces.cbegin();}
|
||||
Surfaces::const_iterator cend() const { return this->surfaces.cend();}
|
||||
Surfaces::const_iterator begin() const { return this->surfaces.cbegin();}
|
||||
Surfaces::const_iterator end() const { return this->surfaces.cend();}
|
||||
|
||||
// For debugging purposes:
|
||||
void export_to_svg(const char *path, bool show_labels);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user