From e37d8777251c5302dc7a0fe67c6416d69ca81397 Mon Sep 17 00:00:00 2001 From: mzn Date: Tue, 17 Dec 2013 12:27:08 +0000 Subject: [PATCH] Feature #233: Export of groups. Add HYDROData_CalculationCase::Export( GEOM::GEOM_Gen_var, SALOMEDS::Study_ptr theStudy ) method stub. --- src/HYDROData/HYDROData_CalculationCase.cxx | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/HYDROData/HYDROData_CalculationCase.cxx b/src/HYDROData/HYDROData_CalculationCase.cxx index 1f74601d..04163f3a 100644 --- a/src/HYDROData/HYDROData_CalculationCase.cxx +++ b/src/HYDROData/HYDROData_CalculationCase.cxx @@ -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 ); } -- 2.39.2