]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
HYDRO_tests: sort shapes to keep constant colors...
authorPaul RASCLE <paul.rascle@edf.fr>
Mon, 30 May 2016 15:22:33 +0000 (17:22 +0200)
committerPaul RASCLE <paul.rascle@edf.fr>
Mon, 30 May 2016 15:22:33 +0000 (17:22 +0200)
22 files changed:
src/HYDRO_tests/TestViewer.cxx
src/HYDRO_tests/reference_data/CLC06-cut_1_res.png
src/HYDRO_tests/reference_data/LCM_copied.png
src/HYDRO_tests/reference_data/LCM_split_2a.png
src/HYDRO_tests/reference_data/LCM_split_2b.png
src/HYDRO_tests/reference_data/LandCoverMap_Merge_1.png
src/HYDRO_tests/reference_data/LandCoverMap_Remove_1.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/lcm_poly_2_sections.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_boxes_24.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_21.png
src/HYDRO_tests/reference_data/merge_faces_circles_22.png
src/HYDRO_tests/reference_data/merge_faces_circles_23.png
src/HYDRO_tests/reference_data/merge_faces_circles_24.png

index 75fcaeb3d93a77d8e19a49ddd6d7bcd49dd76726..196df1f00f03fccce966f71e650f982229db214b 100644 (file)
 #include <TopExp_Explorer.hxx>
 #include <TopoDS.hxx>
 
+#include <GEOMUtils.hxx>
+#include <TopTools_ListOfShape.hxx>
+#include <TopTools_ListIteratorOfListOfShape.hxx>
+
 #ifdef WIN32
   #pragma warning ( default: 4251 )
 #endif
@@ -174,19 +178,34 @@ void TestViewer::show( const TopoDS_Shape& theShape, int theMode, bool isFitAll,
 
   int i = 0;
   //show all faces first
+  TopTools_ListOfShape aListOfFaces;
   TopExp_Explorer aFE( theShape, TopAbs_FACE );
-  for( ; aFE.More(); aFE.Next(), i++ ) 
-    show( aFE.Current(), theMode, false, GetColor(i) );
+  for( ; aFE.More(); aFE.Next() )
+    aListOfFaces.Append(aFE.Current());
+  GEOMUtils::SortShapes(aListOfFaces);
+  TopTools_ListIteratorOfListOfShape aLF(aListOfFaces);
+  for( ; aLF.More(); aLF.Next(), i++)
+    show( aLF.Value(), theMode, false, GetColor(i) );
 
   //show all independent wires
+  TopTools_ListOfShape aListOfWires;
   TopExp_Explorer aWE( theShape, TopAbs_WIRE, TopAbs_FACE );
-  for( ; aWE.More(); aWE.Next(), i++ ) 
-    show( aWE.Current(), theMode, false, GetColor(i) );
+  for( ; aWE.More(); aWE.Next() )
+    aListOfWires.Append(aWE.Current());
+  GEOMUtils::SortShapes(aListOfWires);
+  TopTools_ListIteratorOfListOfShape aLW(aListOfWires);
+  for( ; aLW.More(); aLW.Next(), i++)
+    show( aLW.Value(), theMode, false, GetColor(i) );
 
   //show all independent edges
+  TopTools_ListOfShape aListOfEdges;
   TopExp_Explorer anEE( theShape, TopAbs_EDGE, TopAbs_WIRE );
-  for( ; anEE.More(); anEE.Next(), i++ ) 
-    show( anEE.Current(), theMode, false, GetColor(i) );
+  for( ; anEE.More(); anEE.Next())
+    aListOfEdges.Append(anEE.Current());
+  GEOMUtils::SortShapes(aListOfEdges);
+  TopTools_ListIteratorOfListOfShape aLE(aListOfEdges);
+  for( ; aLE.More(); aLE.Next(), i++)
+    show( aLE.Value(), theMode, false, GetColor(i) );
 
   if( isFitAll )
   {
index a9ea65d5ceb55c307f7924680b31d8754411193e..c378725afd9005fff24e4d628dba2875ab20dc91 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/CLC06-cut_1_res.png and b/src/HYDRO_tests/reference_data/CLC06-cut_1_res.png differ
index 3dc991616836c104739d386b133444b827b5486e..e7e20cc88ed8201c60aeea952a99e79314b57e9e 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/LCM_copied.png and b/src/HYDRO_tests/reference_data/LCM_copied.png differ
index f5d3c56ce7f8db480eddc604a7ff7d62f418f220..42ec089ddb641f4922420c05599a2beee821df86 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/LCM_split_2a.png and b/src/HYDRO_tests/reference_data/LCM_split_2a.png differ
index f2da507490fa62ab6f059998572af7dbdbe0a4e1..8ea9d2445760052a1c5f6684314b25462d0f4d88 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/LCM_split_2b.png and b/src/HYDRO_tests/reference_data/LCM_split_2b.png differ
index b38310a5df9831e8f97b0ee665085a7b611e4b47..b57aada4878c3d3c77dd1238def8a114ac6a7604 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 2d5e983ca852d052993e00850c0e0631b2a8a84c..f411ce4e984e06206d7c90b7e2e7cea6d86245e7 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 c4a77a05b301dbc8a8087a282a979ebbbae5c5b5..6ea29b507a303c4ce0bff3571139aa5358888c55 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 e8faa625ba81a4c2df3704fb55078016c4d92806..1a26fe4f80e667e07d701b4c6916c2e498045066 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 a414c0d3c6080899740d9219f2bf4c3d99b8069a..cde89deb072d9b3a0728682089bb89bfcc662345 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 12fd9ad591b208e6fc6c195155657143da548ac3..e485e74beacc2f920cb30ad2d062676e57668cab 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/lcm_poly_2_sections.png and b/src/HYDRO_tests/reference_data/lcm_poly_2_sections.png differ
index b56949ecc7d92191dedfffc1e6d308fc7c6a1c30..12071bff5cd0fa7b8446d268b0dd7bf13d9709a6 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 77d6279b8d49b4e425d5b8746d8462369d1d729d..446f2bdc0bedb0c8b8cf2e8689ae911373d0abb7 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 b56949ecc7d92191dedfffc1e6d308fc7c6a1c30..12071bff5cd0fa7b8446d268b0dd7bf13d9709a6 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 fc219ef70d6cd112fccf21163907d75378347b60..68e26893812890f60193b50cb3244df02276b5ca 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/merge_faces_boxes_24.png and b/src/HYDRO_tests/reference_data/merge_faces_boxes_24.png differ
index e4cf42f3b44a5b9a4027c785d6cd2699c3b9b753..49756c99a84c4e597396c600b8e10d8e3e0c362d 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 ee3eafde09c42a9c91756b9f2a9b995077b5273e..6140fd6ee7052d7e4b779bfdcc3580ace881675c 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 ee3eafde09c42a9c91756b9f2a9b995077b5273e..6140fd6ee7052d7e4b779bfdcc3580ace881675c 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 8e679451d63aa32481b3be66b06fe869d515109a..e8f2e49c9c1f5321c06811b2a227434b3cd1539a 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/merge_faces_circles_21.png and b/src/HYDRO_tests/reference_data/merge_faces_circles_21.png differ
index e4cf42f3b44a5b9a4027c785d6cd2699c3b9b753..49756c99a84c4e597396c600b8e10d8e3e0c362d 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 2074a3ea8369ce7a3d9eb1a10e02743d31a634b2..f0636987edac87efc0439c7f4354e4427c978cbd 100644 (file)
Binary files a/src/HYDRO_tests/reference_data/merge_faces_circles_23.png and b/src/HYDRO_tests/reference_data/merge_faces_circles_23.png differ
index 2074a3ea8369ce7a3d9eb1a10e02743d31a634b2..f0636987edac87efc0439c7f4354e4427c978cbd 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