From 93b0e81b39a2c0afe6972522eb2bb2bb3a1f0beb Mon Sep 17 00:00:00 2001 From: adv Date: Thu, 9 Jan 2014 10:22:11 +0000 Subject: [PATCH] Adding of list of shapes method added. --- src/HYDROData/HYDROData_ShapesGroup.cxx | 15 +++++++++++++++ src/HYDROData/HYDROData_ShapesGroup.h | 6 ++++++ 2 files changed, 21 insertions(+) diff --git a/src/HYDROData/HYDROData_ShapesGroup.cxx b/src/HYDROData/HYDROData_ShapesGroup.cxx index 7942fdf0..237059c0 100644 --- a/src/HYDROData/HYDROData_ShapesGroup.cxx +++ b/src/HYDROData/HYDROData_ShapesGroup.cxx @@ -6,6 +6,9 @@ #include #include +#include +#include + #include #include @@ -53,6 +56,18 @@ void HYDROData_ShapesGroup::SetShapes( const TopTools_SequenceOfShape& theShapes } } +void HYDROData_ShapesGroup::SetShapes( const TopTools_ListOfShape& theShapes ) +{ + RemoveShapes(); + + TopTools_ListIteratorOfListOfShape anIter( theShapes ); + for ( ; anIter.More(); anIter.Next() ) + { + const TopoDS_Shape& aShape = anIter.Value(); + AddShape( aShape ); + } +} + void HYDROData_ShapesGroup::GetShapes( TopTools_SequenceOfShape& theShapes ) const { theShapes.Clear(); diff --git a/src/HYDROData/HYDROData_ShapesGroup.h b/src/HYDROData/HYDROData_ShapesGroup.h index 798437b2..8d6a1948 100644 --- a/src/HYDROData/HYDROData_ShapesGroup.h +++ b/src/HYDROData/HYDROData_ShapesGroup.h @@ -7,6 +7,7 @@ #include class TopoDS_Shape; +class TopTools_ListOfShape; DEFINE_STANDARD_HANDLE(HYDROData_ShapesGroup, HYDROData_Entity) @@ -56,6 +57,11 @@ public: */ HYDRODATA_EXPORT virtual void SetShapes( const TopTools_SequenceOfShape& theShapes ); + /** + * Sets new list of shapes for the group. + */ + HYDRODATA_EXPORT virtual void SetShapes( const TopTools_ListOfShape& theShapes ); + /** * Returns all shapes of the group. */ -- 2.39.2