]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
new iteration process in TestViewer;
authorisn <isn@opencascade.com>
Fri, 13 Nov 2015 12:30:38 +0000 (15:30 +0300)
committerisn <isn@opencascade.com>
Fri, 13 Nov 2015 12:32:15 +0000 (15:32 +0300)
new pics etc.

19 files changed:
src/HYDROData/HYDROData_LandCoverMap.cxx
src/HYDRO_tests/TestViewer.cxx
src/HYDRO_tests/reference_data/LandCoverMap_Merge_1.png
src/HYDRO_tests/reference_data/LandCoverMap_PrsByTypes.png
src/HYDRO_tests/reference_data/LandCoverMap_Remove_1.png
src/HYDRO_tests/reference_data/LandCover_Triangles.png
src/HYDRO_tests/reference_data/LandCover_Triangles_Split.png
src/HYDRO_tests/reference_data/NLD_water_areas_dcw.png
src/HYDRO_tests/reference_data/clc_dec_150_350.png
src/HYDRO_tests/reference_data/cyprus_natural_all.png
src/HYDRO_tests/reference_data/merge_faces_boxes_12.png
src/HYDRO_tests/reference_data/merge_faces_boxes_13.png
src/HYDRO_tests/reference_data/merge_faces_boxes_22.png
src/HYDRO_tests/reference_data/merge_faces_circles_12.png
src/HYDRO_tests/reference_data/merge_faces_circles_13.png
src/HYDRO_tests/reference_data/merge_faces_circles_14.png
src/HYDRO_tests/reference_data/merge_faces_circles_22.png
src/HYDRO_tests/reference_data/merge_faces_circles_24.png
src/HYDRO_tests/test_HYDROData_LandCoverMap.cxx

index acecb291048c49fb751a704701cbe9a6cba5b0d0..ec7dfd9f61937623106a34bb7f784333c0f4dd02 100644 (file)
@@ -856,14 +856,7 @@ void HYDROData_LandCoverMap::StoreLandCovers( const HYDROData_MapOfFaceToStrickl
 
   TopoDS_Shape aResult;
   if( aListOfFaces.Extent() == 1 )
-  {
-    /*TopoDS_Shell aShell;
-    BRep_Builder aShellBuilder;
-    aShellBuilder.MakeShell( aShell );
-    aShell.Closed( Standard_False );
-    aShellBuilder.Add( aShell, aListOfFaces.First() );*/
-    aResult = aListOfFaces.First(); //aShell;
-  }
+    aResult = aListOfFaces.First();
   else if( aListOfFaces.Extent() > 1 )
     aResult = MergeFaces( aListOfFaces, false );
 
index 3ed66129a2aee16840ece1d89b7fd1790695b981..efd8a5862f42cf80e406ecf8e48d8dc4cf5247ff 100644 (file)
@@ -169,15 +169,20 @@ void TestViewer::show( const TopoDS_Shape& theShape, int theMode, bool isFitAll,
     return;
 
   int i = 0;
-  if( theShape.ShapeType()==TopAbs_COMPOUND )
-  {
-    TopExp_Explorer anExplorer( theShape, TopAbs_FACE );
-    for( ; anExplorer.More(); anExplorer.Next() ) 
-      ShowShape (anExplorer.Current(), theMode, i);
-  }
-  else
-    ShowShape(theShape, theMode, i);
+  //show all faces first
+  TopExp_Explorer aFE( theShape, TopAbs_FACE );
+  for( ; aFE.More(); aFE.Next(), i++ ) 
+    show( aFE.Current(), theMode, false, GetColor(i) );
 
+  //show all independent wires
+  TopExp_Explorer aWE( theShape, TopAbs_WIRE, TopAbs_FACE );
+  for( ; aWE.More(); aWE.Next(), i++ ) 
+    show( aWE.Current(), theMode, false, GetColor(i) );
+
+  //show all independent edges
+  TopExp_Explorer anEE( theShape, TopAbs_EDGE, TopAbs_WIRE );
+  for( ; anEE.More(); anEE.Next(), i++ ) 
+    show( anEE.Current(), theMode, false, GetColor(i) );
 
   if( isFitAll )
   {
@@ -186,7 +191,7 @@ void TestViewer::show( const TopoDS_Shape& theShape, int theMode, bool isFitAll,
   }
 }
 
-void TestViewer::ShowShape(const TopoDS_Shape& theShape, int theMode, int& i)
+/*void TestViewer::ShowShape(const TopoDS_Shape& theShape, int theMode, int& i)
 {
   if( theShape.ShapeType()==TopAbs_SHELL )
   {
@@ -205,7 +210,7 @@ void TestViewer::ShowShape(const TopoDS_Shape& theShape, int theMode, int& i)
     show( theShape, theMode, false, GetColor(i) );
     i++;
   }
-}
+}*/
 
 bool AreImagesEqual( const QImage& theImage1, const QImage& theImage2, double theTolerance )
 {
index a860b7f5f81419471e276a4f59bbca8d7fcc6f67..2ad80eb62f91446db36deb092ccd0fbc3b3826ab 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/LandCoverMap_Merge_1.png and b/src/HYDRO_tests/reference_data/LandCoverMap_Merge_1.png differ
index 2d7da92e5365cde7aafbb44f4fa9e677976fdc55..f6b2949533e58d2db40280c9fe4775e25f93732a 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/LandCoverMap_PrsByTypes.png and b/src/HYDRO_tests/reference_data/LandCoverMap_PrsByTypes.png differ
index dce48726dc041ddbabd7586cb1d7f1b0602172fe..9776c2cadc8b002524abe5e8b2b1314fdf9f00e2 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/LandCoverMap_Remove_1.png and b/src/HYDRO_tests/reference_data/LandCoverMap_Remove_1.png differ
index 3927e468152ff727807825466585a59e95ef3717..37530adb6f37b15e7e548e81b8571c92db5fcffe 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/LandCover_Triangles.png and b/src/HYDRO_tests/reference_data/LandCover_Triangles.png differ
index b2d2d87acce0a37a0d184782786629086767cffa..44b54ccea8c585da1d920b0cadac23167a302974 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/LandCover_Triangles_Split.png and b/src/HYDRO_tests/reference_data/LandCover_Triangles_Split.png differ
index 8c12579942dcd75ae5383a5845ecf1c7f066c5a0..f92371517b91bd7f81a5f72f7699f6f36530c2d6 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/NLD_water_areas_dcw.png and b/src/HYDRO_tests/reference_data/NLD_water_areas_dcw.png differ
index 85a68007dbe8a706590671f9e3ed286c61133828..05f535a1410fe1e261ed15fcd834d5991459096c 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/clc_dec_150_350.png and b/src/HYDRO_tests/reference_data/clc_dec_150_350.png differ
index b7cbfd9c86cd947bc6cbf398d864c7a49d3585e2..53ac60b54339b8dd55c7887bd4d7feebfc89cb59 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/cyprus_natural_all.png and b/src/HYDRO_tests/reference_data/cyprus_natural_all.png differ
index ee6ecb05f870581cc94fcc2889fb3ca2cc018bfb..cf8bab03cd8968b9714da4a3fdfcdc96393222f5 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/merge_faces_boxes_12.png and b/src/HYDRO_tests/reference_data/merge_faces_boxes_12.png differ
index 341f77fa34cf651ed95ad9e5b789d7a82cc50798..d7db042d58a1bb24fa43ee9669ab155255041248 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/merge_faces_boxes_13.png and b/src/HYDRO_tests/reference_data/merge_faces_boxes_13.png differ
index ee6ecb05f870581cc94fcc2889fb3ca2cc018bfb..cf8bab03cd8968b9714da4a3fdfcdc96393222f5 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/merge_faces_boxes_22.png and b/src/HYDRO_tests/reference_data/merge_faces_boxes_22.png differ
index 9fcbd304a707560945e0263d600d807e500189b1..2bb3b807c6ed744f8d2858c7f642784c86775071 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/merge_faces_circles_12.png and b/src/HYDRO_tests/reference_data/merge_faces_circles_12.png differ
index e9c116f90fa6cf7fa35d3176c7f6fc2d3b8125a4..19287d9f1cc41e3ad2128acccc7996bad94e7c80 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/merge_faces_circles_13.png and b/src/HYDRO_tests/reference_data/merge_faces_circles_13.png differ
index e9c116f90fa6cf7fa35d3176c7f6fc2d3b8125a4..19287d9f1cc41e3ad2128acccc7996bad94e7c80 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/merge_faces_circles_14.png and b/src/HYDRO_tests/reference_data/merge_faces_circles_14.png differ
index 9fcbd304a707560945e0263d600d807e500189b1..2bb3b807c6ed744f8d2858c7f642784c86775071 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/merge_faces_circles_22.png and b/src/HYDRO_tests/reference_data/merge_faces_circles_22.png differ
index 89fb40502fd84a388af5776db91b264509850d96..e536901abeaf3208606083bd1a230c3d7b920745 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/merge_faces_circles_24.png and b/src/HYDRO_tests/reference_data/merge_faces_circles_24.png differ
index 6a1cddbd3cedc3684ea5b2ba983ebff80e2590aa..0f9ad6ac57940aea8989a4a48f89f37e85bff082 100644 (file)
@@ -256,7 +256,7 @@ void test_HYDROData_LandCoverMap::test_merge_faces_boxes()
     TopoDS_Shape aMergedFace = HYDROData_LandCoverMap::MergeFaces( Faces, true );
     TestViewer::show( aMergedFace, AIS_Shaded, true, "merge_faces_boxes_12" );
     CPPUNIT_ASSERT_IMAGES
-    CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_SHELL);
+    CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_COMPOUND);
   }
   {
     TopTools_ListOfShape Faces;
@@ -266,7 +266,7 @@ void test_HYDROData_LandCoverMap::test_merge_faces_boxes()
     TopoDS_Shape aMergedFace = HYDROData_LandCoverMap::MergeFaces( Faces, true );
     TestViewer::show( aMergedFace, AIS_Shaded, true, "merge_faces_boxes_13" );
     CPPUNIT_ASSERT_IMAGES
-    CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_SHELL);
+    CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_COMPOUND);
   }
   {
     TopTools_ListOfShape Faces;
@@ -298,7 +298,7 @@ void test_HYDROData_LandCoverMap::test_merge_faces_boxes()
     TopoDS_Shape aMergedFace = HYDROData_LandCoverMap::MergeFaces( Faces, false );
     TestViewer::show( aMergedFace, AIS_Shaded, true, "merge_faces_boxes_22" );
     CPPUNIT_ASSERT_IMAGES
-    CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_SHELL);
+    CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_COMPOUND);
   }
   {
     TopTools_ListOfShape Faces;
@@ -308,7 +308,7 @@ void test_HYDROData_LandCoverMap::test_merge_faces_boxes()
     TopoDS_Shape aMergedFace = HYDROData_LandCoverMap::MergeFaces( Faces, false );
     TestViewer::show( aMergedFace, AIS_Shaded, true, "merge_faces_boxes_23" );
     CPPUNIT_ASSERT_IMAGES
-    CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_SHELL);
+    CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_COMPOUND);
   }
   {
     TopTools_ListOfShape Faces;
@@ -353,7 +353,7 @@ void test_HYDROData_LandCoverMap::test_merge_faces_circles()
     TopoDS_Shape aMergedFace = HYDROData_LandCoverMap::MergeFaces( Faces, true );
     TestViewer::show( aMergedFace, AIS_Shaded, true, "merge_faces_circles_12" );
     CPPUNIT_ASSERT_IMAGES
-    CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_SHELL);
+    CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_COMPOUND);
   }
   {
     TopTools_ListOfShape Faces;
@@ -363,7 +363,7 @@ void test_HYDROData_LandCoverMap::test_merge_faces_circles()
     TopoDS_Shape aMergedFace = HYDROData_LandCoverMap::MergeFaces( Faces, true );
     TestViewer::show( aMergedFace, AIS_Shaded, true, "merge_faces_circles_13" );
     CPPUNIT_ASSERT_IMAGES
-    CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_SHELL);
+    CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_COMPOUND);
   }
   {
     TopTools_ListOfShape Faces;
@@ -373,7 +373,7 @@ void test_HYDROData_LandCoverMap::test_merge_faces_circles()
     TopoDS_Shape aMergedFace = HYDROData_LandCoverMap::MergeFaces( Faces, true );
     TestViewer::show( aMergedFace, AIS_Shaded, true, "merge_faces_circles_14" );
     CPPUNIT_ASSERT_IMAGES
-    CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_SHELL);
+    CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_COMPOUND);
   }
   //
 
@@ -394,7 +394,7 @@ void test_HYDROData_LandCoverMap::test_merge_faces_circles()
     TopoDS_Shape aMergedFace = HYDROData_LandCoverMap::MergeFaces( Faces, false );
     TestViewer::show( aMergedFace, AIS_Shaded, true, "merge_faces_circles_22" );
     CPPUNIT_ASSERT_IMAGES
-    CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_SHELL);
+    CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_COMPOUND);
   }
   {
     TopTools_ListOfShape Faces;
@@ -404,7 +404,7 @@ void test_HYDROData_LandCoverMap::test_merge_faces_circles()
     TopoDS_Shape aMergedFace = HYDROData_LandCoverMap::MergeFaces( Faces, false );
     TestViewer::show( aMergedFace, AIS_Shaded, true, "merge_faces_circles_23" );
     CPPUNIT_ASSERT_IMAGES
-    CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_SHELL);
+    CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_COMPOUND);
   }
   {
     TopTools_ListOfShape Faces;
@@ -414,7 +414,7 @@ void test_HYDROData_LandCoverMap::test_merge_faces_circles()
     TopoDS_Shape aMergedFace = HYDROData_LandCoverMap::MergeFaces( Faces, false );
     TestViewer::show( aMergedFace, AIS_Shaded, true, "merge_faces_circles_24" );
     CPPUNIT_ASSERT_IMAGES
-    CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_SHELL);
+    CPPUNIT_ASSERT(aMergedFace.ShapeType() == TopAbs_COMPOUND);
   }
 }