From: Paul RASCLE Date: Mon, 30 May 2016 15:22:33 +0000 (+0200) Subject: HYDRO_tests: sort shapes to keep constant colors... X-Git-Tag: v1.6~110^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d5fa2ac7c86e548f6ff5a98cb551a5f976d3a15d;p=modules%2Fhydro.git HYDRO_tests: sort shapes to keep constant colors... --- diff --git a/src/HYDRO_tests/TestViewer.cxx b/src/HYDRO_tests/TestViewer.cxx index 75fcaeb3..196df1f0 100644 --- a/src/HYDRO_tests/TestViewer.cxx +++ b/src/HYDRO_tests/TestViewer.cxx @@ -45,6 +45,10 @@ #include #include +#include +#include +#include + #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 ) { diff --git a/src/HYDRO_tests/reference_data/CLC06-cut_1_res.png b/src/HYDRO_tests/reference_data/CLC06-cut_1_res.png index a9ea65d5..c378725a 100644 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 diff --git a/src/HYDRO_tests/reference_data/LCM_copied.png b/src/HYDRO_tests/reference_data/LCM_copied.png index 3dc99161..e7e20cc8 100644 Binary files a/src/HYDRO_tests/reference_data/LCM_copied.png and b/src/HYDRO_tests/reference_data/LCM_copied.png differ diff --git a/src/HYDRO_tests/reference_data/LCM_split_2a.png b/src/HYDRO_tests/reference_data/LCM_split_2a.png index f5d3c56c..42ec089d 100644 Binary files a/src/HYDRO_tests/reference_data/LCM_split_2a.png and b/src/HYDRO_tests/reference_data/LCM_split_2a.png differ diff --git a/src/HYDRO_tests/reference_data/LCM_split_2b.png b/src/HYDRO_tests/reference_data/LCM_split_2b.png index f2da5074..8ea9d244 100644 Binary files a/src/HYDRO_tests/reference_data/LCM_split_2b.png and b/src/HYDRO_tests/reference_data/LCM_split_2b.png differ diff --git a/src/HYDRO_tests/reference_data/LandCoverMap_Merge_1.png b/src/HYDRO_tests/reference_data/LandCoverMap_Merge_1.png index b38310a5..b57aada4 100644 Binary files a/src/HYDRO_tests/reference_data/LandCoverMap_Merge_1.png and b/src/HYDRO_tests/reference_data/LandCoverMap_Merge_1.png differ diff --git a/src/HYDRO_tests/reference_data/LandCoverMap_Remove_1.png b/src/HYDRO_tests/reference_data/LandCoverMap_Remove_1.png index 2d5e983c..f411ce4e 100644 Binary files a/src/HYDRO_tests/reference_data/LandCoverMap_Remove_1.png and b/src/HYDRO_tests/reference_data/LandCoverMap_Remove_1.png differ diff --git a/src/HYDRO_tests/reference_data/NLD_water_areas_dcw.png b/src/HYDRO_tests/reference_data/NLD_water_areas_dcw.png index c4a77a05..6ea29b50 100644 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 diff --git a/src/HYDRO_tests/reference_data/clc_dec_150_350.png b/src/HYDRO_tests/reference_data/clc_dec_150_350.png index e8faa625..1a26fe4f 100644 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 diff --git a/src/HYDRO_tests/reference_data/cyprus_natural_all.png b/src/HYDRO_tests/reference_data/cyprus_natural_all.png index a414c0d3..cde89deb 100644 Binary files a/src/HYDRO_tests/reference_data/cyprus_natural_all.png and b/src/HYDRO_tests/reference_data/cyprus_natural_all.png differ diff --git a/src/HYDRO_tests/reference_data/lcm_poly_2_sections.png b/src/HYDRO_tests/reference_data/lcm_poly_2_sections.png index 12fd9ad5..e485e74b 100644 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 diff --git a/src/HYDRO_tests/reference_data/merge_faces_boxes_12.png b/src/HYDRO_tests/reference_data/merge_faces_boxes_12.png index b56949ec..12071bff 100644 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 diff --git a/src/HYDRO_tests/reference_data/merge_faces_boxes_13.png b/src/HYDRO_tests/reference_data/merge_faces_boxes_13.png index 77d6279b..446f2bdc 100644 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 diff --git a/src/HYDRO_tests/reference_data/merge_faces_boxes_22.png b/src/HYDRO_tests/reference_data/merge_faces_boxes_22.png index b56949ec..12071bff 100644 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 diff --git a/src/HYDRO_tests/reference_data/merge_faces_boxes_24.png b/src/HYDRO_tests/reference_data/merge_faces_boxes_24.png index fc219ef7..68e26893 100644 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 diff --git a/src/HYDRO_tests/reference_data/merge_faces_circles_12.png b/src/HYDRO_tests/reference_data/merge_faces_circles_12.png index e4cf42f3..49756c99 100644 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 diff --git a/src/HYDRO_tests/reference_data/merge_faces_circles_13.png b/src/HYDRO_tests/reference_data/merge_faces_circles_13.png index ee3eafde..6140fd6e 100644 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 diff --git a/src/HYDRO_tests/reference_data/merge_faces_circles_14.png b/src/HYDRO_tests/reference_data/merge_faces_circles_14.png index ee3eafde..6140fd6e 100644 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 diff --git a/src/HYDRO_tests/reference_data/merge_faces_circles_21.png b/src/HYDRO_tests/reference_data/merge_faces_circles_21.png index 8e679451..e8f2e49c 100644 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 diff --git a/src/HYDRO_tests/reference_data/merge_faces_circles_22.png b/src/HYDRO_tests/reference_data/merge_faces_circles_22.png index e4cf42f3..49756c99 100644 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 diff --git a/src/HYDRO_tests/reference_data/merge_faces_circles_23.png b/src/HYDRO_tests/reference_data/merge_faces_circles_23.png index 2074a3ea..f0636987 100644 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 diff --git a/src/HYDRO_tests/reference_data/merge_faces_circles_24.png b/src/HYDRO_tests/reference_data/merge_faces_circles_24.png index 2074a3ea..f0636987 100644 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