]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
Feature #233: Export of groups.
authormzn <mzn@opencascade.com>
Tue, 17 Dec 2013 12:27:08 +0000 (12:27 +0000)
committermzn <mzn@opencascade.com>
Tue, 17 Dec 2013 12:27:08 +0000 (12:27 +0000)
Add HYDROData_CalculationCase::Export( GEOM::GEOM_Gen_var, SALOMEDS::Study_ptr theStudy ) method stub.

src/HYDROData/HYDROData_CalculationCase.cxx

index 1f74601d777c4d517cab07ade9b0b7c13a91c9a9..04163f3a4e7eaf06242cb7d4ecaefc646b2ef442 100644 (file)
@@ -651,12 +651,24 @@ bool HYDROData_CalculationCase::Export( GEOM::GEOM_Gen_var theGeomEngine,
                                         SALOMEDS::Study_ptr theStudy )
 {
   // Get faces
-  // TODO
+  // TODO to be revised
   TopTools_ListOfShape aFaces;
+  HYDROData_SequenceOfObjects aCaseRegions = GetRegions();
+  HYDROData_SequenceOfObjects::Iterator aRegionIter( aCaseRegions );
+  for ( ; aRegionIter.More(); aRegionIter.Next() ) {
+    Handle(HYDROData_Region) aRegion =
+      Handle(HYDROData_Region)::DownCast( aRegionIter.Value() );
+    if( aRegion.IsNull() ) {
+      continue;
+    }
+
+    TopoDS_Shape aRegionShape = aRegion->GetShape();
+    aFaces.Append( aRegionShape );
+  }
 
   // Get groups
-  // TODO
-  HYDROData_SequenceOfObjects aSplittedGroups;
+  // TODO to be revised
+  HYDROData_SequenceOfObjects aSplittedGroups = GetSplittedGroups();
 
   return Export( theGeomEngine, theStudy, aFaces, aSplittedGroups );
 }