diff --git a/structures.cpp b/structures.cpp index 695a21c..ebc4a99 100644 --- a/structures.cpp +++ b/structures.cpp @@ -67,6 +67,12 @@ void Layers::add(Material m){ materials.push_back(m); } +void Layers::add(const Layers& l){ + for(auto m: l.get_materials()){ + add(m); + } +} + double Layers::thickness() const { double sum = 0; for(auto &m : materials){ diff --git a/structures.h b/structures.h index 1daeb40..057fb7c 100644 --- a/structures.h +++ b/structures.h @@ -274,6 +274,12 @@ namespace catima{ */ void add(Material m); + /** + * append Layers + * @para, l Layers + */ + void add(const Layers& l); + /** * @return number of stored Materials */