inline ExPolygons to_expolygons(const SurfacesPtr &src) { ExPolygons expolygons; expolygons.reserve(src.size()); for (SurfacesPtr::const_iterator it = src.begin(); it != src.end(); ++it) expolygons.push_back((*it)->expolygon); return expolygons; }
inline ExPolygons to_expolygons(Surfaces &&src) { ExPolygons expolygons; expolygons.reserve(src.size()); for (Surfaces::const_iterator it = src.begin(); it != src.end(); ++it) expolygons.emplace_back(ExPolygon(std::move(it->expolygon))); src.clear(); return expolygons; }
SurfaceCollection::operator ExPolygons() const { ExPolygons expp; expp.reserve(this->surfaces.size()); for (Surfaces::const_iterator surface = this->surfaces.begin(); surface != this->surfaces.end(); ++surface) { expp.push_back(surface->expolygon); } return expp; }