Salome HOME
global misprinting in the word "splitted" is replaced by "split"
[modules/hydro.git] / src / HYDROData / HYDROData_SplitToZonesTool.cxx
index 01027235bc52aaa5febae9d0b7fc7b5e2bf7e6fe..f91732cd2fcdba0a6ae49707008b8b684b76dee3 100644 (file)
@@ -139,12 +139,14 @@ HYDROData_SplitToZonesTool::SplitDataList
 #endif
   for( int anIndex = 1, aLength = theObjectList.Length(); anIndex <= aLength; anIndex++ )
   {
-    Handle(HYDROData_Object) aGeomObj = 
-      Handle(HYDROData_Object)::DownCast( theObjectList.Value( anIndex ) );
-    if( aGeomObj.IsNull() )
-      continue;
+    Handle(HYDROData_Entity) anObj = theObjectList.Value( anIndex );
+    TopoDS_Shape aShape;
+
+    Handle(HYDROData_Object) aGeomObj = Handle(HYDROData_Object)::DownCast( anObj );
+    if( !aGeomObj.IsNull() ) {
+      aShape = aGeomObj->GetTopShape();
+    }
 
-    TopoDS_Shape aShape = aGeomObj->GetTopShape();
     if ( aShape.IsNull() )
       continue;  
 #ifdef DEB_SPLIT_TO_ZONES
@@ -157,12 +159,12 @@ HYDROData_SplitToZonesTool::SplitDataList
       for ( ; anExp.More(); anExp.Next() ) {
         const TopoDS_Face& aFace = TopoDS::Face( anExp.Current() );
         if ( !aFace.IsNull() ) {
-          SplitData aSplitData( SplitData::Data_Zone, aFace, aGeomObj->GetName() );
+          SplitData aSplitData( SplitData::Data_Zone, aFace, anObj->GetName() );
           anInputSplitDataList.append( aSplitData );
         }
       }
     } else {
-      SplitData aSplitData( SplitData::Data_Zone, aShape, aGeomObj->GetName() );
+      SplitData aSplitData( SplitData::Data_Zone, aShape, anObj->GetName() );
       anInputSplitDataList.append( aSplitData );
     }
   }
@@ -596,3 +598,11 @@ HYDROData_SplitToZonesTool::SplitDataList
   return anOutputSplitDataList;
 }
 
+HYDROData_SplitToZonesTool::SplitDataList
+  HYDROData_SplitToZonesTool::Split( const HYDROData_SequenceOfObjects& theObjectList )
+{
+  HYDROData_SequenceOfObjects aGeomGroups;
+  Handle(HYDROData_PolylineXY) aPolyline;
+
+  return Split( theObjectList, aGeomGroups, aPolyline );
+}
\ No newline at end of file