From b2d6c5c882a92741b5bf144bc4b3159f5d184f1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Aguerre?= Date: Mon, 19 Jun 2017 10:39:55 +0200 Subject: [PATCH 01/11] Share test definition --- doc/salome/examples/CMakeLists.txt | 126 +--------------- .../examples/CTestTestfileInstall.cmake | 121 +-------------- doc/salome/examples/tests.set | 138 ++++++++++++++++++ src/XAO/tests/CMakeLists.txt | 11 +- src/XAO/tests/CTestTestfileInstall.cmake | 25 ++++ 5 files changed, 180 insertions(+), 241 deletions(-) create mode 100644 doc/salome/examples/tests.set create mode 100644 src/XAO/tests/CTestTestfileInstall.cmake diff --git a/doc/salome/examples/CMakeLists.txt b/doc/salome/examples/CMakeLists.txt index 8a6f0cbd0..0e173df44 100644 --- a/doc/salome/examples/CMakeLists.txt +++ b/doc/salome/examples/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2017 CEA/DEN, EDF R&D, OPEN CASCADE # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -17,129 +17,7 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -SET(BAD_TESTS - repairing_operations_ex09.py -) - -SET(GOOD_TESTS - 3dsketcher.py - advanced_geom_objs_ex01.py - advanced_geom_objs_ex02.py - advanced_geom_objs_ex03.py - angle.py - arranging_study_objects.py - basic_geom_objs_ex01.py - basic_geom_objs_ex02.py - basic_geom_objs_ex03.py - basic_geom_objs_ex04.py - basic_geom_objs_ex05.py - basic_geom_objs_ex06.py - basic_geom_objs_ex07.py - basic_geom_objs_ex08.py - basic_geom_objs_ex09.py - basic_geom_objs_ex10.py - basic_operations_ex01.py - basic_operations_ex02.py - basic_operations_ex03.py - basic_operations_ex04.py - basic_properties.py - blocks_operations_ex01.py - blocks_operations_ex02.py - blocks_operations_ex03.py - boolean_operations_ex01.py - boolean_operations_ex02.py - boolean_operations_ex03.py - boolean_operations_ex04.py - bounding_box.py - building_by_blocks_ex01.py - building_by_blocks_ex02.py - center_of_mass.py - check_compound_of_blocks.py - check_self_intersections.py - check_shape.py - complex_objs_ex01.py - complex_objs_ex02.py - complex_objs_ex03.py - complex_objs_ex04.py - complex_objs_ex05.py - complex_objs_ex06.py - complex_objs_ex07.py - complex_objs_ex08.py - complex_objs_ex09.py - complex_objs_ex10.py - complex_objs_ex11.py - fast_intersection.py - free_boundaries.py - free_faces.py - GEOM_box.py - get_non_blocks.py - import_export.py - inertia.py - min_distance.py - normal_face.py - notebook_geom.py - polyline.py - point_coordinates.py - primitives_ex01.py - primitives_ex02.py - primitives_ex03.py - primitives_ex04.py - primitives_ex05.py - primitives_ex06.py - primitives_ex07.py - repairing_operations_ex01.py - repairing_operations_ex02.py - repairing_operations_ex03.py - repairing_operations_ex04.py - repairing_operations_ex05.py - repairing_operations_ex06.py - repairing_operations_ex07.py - repairing_operations_ex08.py - repairing_operations_ex10.py - repairing_operations_ex11.py - repairing_operations_ex12.py - sketcher.py - tolerance.py - topological_geom_objs_ex01.py - topological_geom_objs_ex02.py - topological_geom_objs_ex03.py - topological_geom_objs_ex04.py - topological_geom_objs_ex05.py - topological_geom_objs_ex06.py - transformation_operations_ex01.py - transformation_operations_ex02.py - transformation_operations_ex03.py - transformation_operations_ex04.py - transformation_operations_ex05.py - transformation_operations_ex06.py - transformation_operations_ex07.py - transformation_operations_ex08.py - transformation_operations_ex09.py - transformation_operations_ex10.py - transformation_operations_ex11.py - transformation_operations_ex12.py - transformation_operations_ex13.py - transformation_operations_ex14.py - viewing_geom_objs_ex01.py - viewing_geom_objs_ex02.py - viewing_geom_objs_ex03.py - viewing_geom_objs_ex04.py - whatis.py - working_with_groups_ex01.py - working_with_groups_ex02.py - working_with_groups_ex03.py - working_with_groups_ex04.py - working_with_groups_ex05.py - working_with_groups_ex06.py - GEOM_Field.py -) -IF(CAS_VERSION_STR VERSION_GREATER "6.9.0") - LIST(APPEND GOOD_TESTS - check_self_intersections_fast.py - ) -ENDIF() - -SET(EXAMPLES_TESTS ${BAD_TESTS} ${GOOD_TESTS} testme.py) +INCLUDE(tests.set) SALOME_GENERATE_TESTS_ENVIRONMENT(tests_env) diff --git a/doc/salome/examples/CTestTestfileInstall.cmake b/doc/salome/examples/CTestTestfileInstall.cmake index 52755f01b..1661a1d3b 100644 --- a/doc/salome/examples/CTestTestfileInstall.cmake +++ b/doc/salome/examples/CTestTestfileInstall.cmake @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2016 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2015-2017 CEA/DEN, EDF R&D, OPEN CASCADE # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -21,122 +21,11 @@ SET(SALOME_TEST_DRIVER "$ENV{ABSOLUTE_APPLI_PATH}/bin/salome/appliskel/salome_te SET(COMPONENT_NAME GEOM) SET(TIMEOUT 300) -SET(GOOD_TESTS - 3dsketcher - advanced_geom_objs_ex01 - advanced_geom_objs_ex02 - advanced_geom_objs_ex03 - angle - arranging_study_objects - basic_geom_objs_ex01 - basic_geom_objs_ex02 - basic_geom_objs_ex03 - basic_geom_objs_ex04 - basic_geom_objs_ex05 - basic_geom_objs_ex06 - basic_geom_objs_ex07 - basic_geom_objs_ex08 - basic_geom_objs_ex09 - basic_geom_objs_ex10 - basic_operations_ex01 - basic_operations_ex02 - basic_operations_ex03 - basic_operations_ex04 - basic_properties - blocks_operations_ex01 - blocks_operations_ex02 - blocks_operations_ex03 - boolean_operations_ex01 - boolean_operations_ex02 - boolean_operations_ex03 - boolean_operations_ex04 - bounding_box - building_by_blocks_ex01 - building_by_blocks_ex02 - center_of_mass - check_compound_of_blocks - check_self_intersections - check_shape - complex_objs_ex01 - complex_objs_ex02 - complex_objs_ex03 - complex_objs_ex04 - complex_objs_ex05 - complex_objs_ex06 - complex_objs_ex07 - complex_objs_ex08 - complex_objs_ex09 - complex_objs_ex10 - complex_objs_ex11 - free_boundaries - free_faces - GEOM_box - get_non_blocks - import_export - inertia - min_distance - normal_face - notebook_geom - polyline - point_coordinates - primitives_ex01 - primitives_ex02 - primitives_ex03 - primitives_ex04 - primitives_ex05 - primitives_ex06 - primitives_ex07 - repairing_operations_ex01 - repairing_operations_ex02 - repairing_operations_ex03 - repairing_operations_ex04 - repairing_operations_ex05 - repairing_operations_ex06 - repairing_operations_ex07 - repairing_operations_ex08 - repairing_operations_ex10 - repairing_operations_ex11 - repairing_operations_ex12 - sketcher - tolerance - topological_geom_objs_ex01 - topological_geom_objs_ex02 - topological_geom_objs_ex03 - topological_geom_objs_ex04 - topological_geom_objs_ex05 - topological_geom_objs_ex06 - transformation_operations_ex01 - transformation_operations_ex02 - transformation_operations_ex03 - transformation_operations_ex04 - transformation_operations_ex05 - transformation_operations_ex06 - transformation_operations_ex07 - transformation_operations_ex08 - transformation_operations_ex09 - transformation_operations_ex10 - transformation_operations_ex11 - transformation_operations_ex12 - transformation_operations_ex13 - transformation_operations_ex14 - viewing_geom_objs_ex01 - viewing_geom_objs_ex02 - viewing_geom_objs_ex03 - viewing_geom_objs_ex04 - whatis - working_with_groups_ex01 - working_with_groups_ex02 - working_with_groups_ex03 - working_with_groups_ex04 - working_with_groups_ex05 - working_with_groups_ex06 - GEOM_Field -) -# CAS_VERSION > "6.8.0" -LIST(APPEND GOOD_TESTS fast_intersection) +INCLUDE(tests.set) FOREACH(tfile ${GOOD_TESTS}) - SET(TEST_NAME GEOM_${tfile}) - ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} ${tfile}.py) + GET_FILENAME_COMPONENT(BASE_NAME ${tfile} NAME_WE) + SET(TEST_NAME GEOM_${BASE_NAME}) + ADD_TEST(${TEST_NAME} python ${SALOME_TEST_DRIVER} ${TIMEOUT} ${tfile}) SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES LABELS "${COMPONENT_NAME}") ENDFOREACH() diff --git a/doc/salome/examples/tests.set b/doc/salome/examples/tests.set new file mode 100644 index 000000000..8df7f96d6 --- /dev/null +++ b/doc/salome/examples/tests.set @@ -0,0 +1,138 @@ +# Copyright (C) 2017 CEA/DEN, EDF R&D, OPEN CASCADE +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +SET(BAD_TESTS + repairing_operations_ex09.py +) + +SET(GOOD_TESTS + 3dsketcher.py + advanced_geom_objs_ex01.py + advanced_geom_objs_ex02.py + advanced_geom_objs_ex03.py + angle.py + arranging_study_objects.py + basic_geom_objs_ex01.py + basic_geom_objs_ex02.py + basic_geom_objs_ex03.py + basic_geom_objs_ex04.py + basic_geom_objs_ex05.py + basic_geom_objs_ex06.py + basic_geom_objs_ex07.py + basic_geom_objs_ex08.py + basic_geom_objs_ex09.py + basic_geom_objs_ex10.py + basic_operations_ex01.py + basic_operations_ex02.py + basic_operations_ex03.py + basic_operations_ex04.py + basic_properties.py + blocks_operations_ex01.py + blocks_operations_ex02.py + blocks_operations_ex03.py + boolean_operations_ex01.py + boolean_operations_ex02.py + boolean_operations_ex03.py + boolean_operations_ex04.py + bounding_box.py + building_by_blocks_ex01.py + building_by_blocks_ex02.py + center_of_mass.py + check_compound_of_blocks.py + check_self_intersections.py + check_shape.py + complex_objs_ex01.py + complex_objs_ex02.py + complex_objs_ex03.py + complex_objs_ex04.py + complex_objs_ex05.py + complex_objs_ex06.py + complex_objs_ex07.py + complex_objs_ex08.py + complex_objs_ex09.py + complex_objs_ex10.py + complex_objs_ex11.py + fast_intersection.py + free_boundaries.py + free_faces.py + GEOM_box.py + get_non_blocks.py + import_export.py + inertia.py + min_distance.py + normal_face.py + notebook_geom.py + polyline.py + point_coordinates.py + primitives_ex01.py + primitives_ex02.py + primitives_ex03.py + primitives_ex04.py + primitives_ex05.py + primitives_ex06.py + primitives_ex07.py + repairing_operations_ex01.py + repairing_operations_ex02.py + repairing_operations_ex03.py + repairing_operations_ex04.py + repairing_operations_ex05.py + repairing_operations_ex06.py + repairing_operations_ex07.py + repairing_operations_ex08.py + repairing_operations_ex10.py + repairing_operations_ex11.py + repairing_operations_ex12.py + sketcher.py + tolerance.py + topological_geom_objs_ex01.py + topological_geom_objs_ex02.py + topological_geom_objs_ex03.py + topological_geom_objs_ex04.py + topological_geom_objs_ex05.py + topological_geom_objs_ex06.py + transformation_operations_ex01.py + transformation_operations_ex02.py + transformation_operations_ex03.py + transformation_operations_ex04.py + transformation_operations_ex05.py + transformation_operations_ex06.py + transformation_operations_ex07.py + transformation_operations_ex08.py + transformation_operations_ex09.py + transformation_operations_ex10.py + transformation_operations_ex11.py + transformation_operations_ex12.py + transformation_operations_ex13.py + transformation_operations_ex14.py + viewing_geom_objs_ex01.py + viewing_geom_objs_ex02.py + viewing_geom_objs_ex03.py + viewing_geom_objs_ex04.py + whatis.py + working_with_groups_ex01.py + working_with_groups_ex02.py + working_with_groups_ex03.py + working_with_groups_ex04.py + working_with_groups_ex05.py + working_with_groups_ex06.py + GEOM_Field.py + check_self_intersections_fast.py # OCC > 6.9.0 +) + +SET(EXAMPLES_TESTS ${BAD_TESTS} ${GOOD_TESTS} testme.py) diff --git a/src/XAO/tests/CMakeLists.txt b/src/XAO/tests/CMakeLists.txt index 9a7226a79..a0c5ee67e 100644 --- a/src/XAO/tests/CMakeLists.txt +++ b/src/XAO/tests/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2016 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2012-2017 CEA/DEN, EDF R&D, OPEN CASCADE # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -62,3 +62,12 @@ ADD_TEST(TestXAO TestXAO) SET_TESTS_PROPERTIES(TestXAO PROPERTIES ENVIRONMENT "GEOM_SRC_DIR=${PROJECT_SOURCE_DIR};${tests_env}") INSTALL(TARGETS TestXAO DESTINATION ${SALOME_INSTALL_BINS}) + +# Application tests + +SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test) +INSTALL(FILES TestXAO DESTINATION ${TEST_INSTALL_DIRECTORY}) + +INSTALL(FILES CTestTestfileInstall.cmake + DESTINATION ${TEST_INSTALL_DIRECTORY} + RENAME CTestTestfile.cmake) diff --git a/src/XAO/tests/CTestTestfileInstall.cmake b/src/XAO/tests/CTestTestfileInstall.cmake new file mode 100644 index 000000000..2245e173e --- /dev/null +++ b/src/XAO/tests/CTestTestfileInstall.cmake @@ -0,0 +1,25 @@ +# Copyright (C) 2017 CEA/DEN, EDF R&D, OPEN CASCADE +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +SET(SALOME_TEST_DRIVER "$ENV{ABSOLUTE_APPLI_PATH}/bin/salome/appliskel/salome_test_driver.py") +SET(COMPONENT_NAME GEOM) +SET(TIMEOUT 300) + +ADD_TEST(GEOM_TestXAO python ${SALOME_TEST_DRIVER} ${TIMEOUT} TestXAO) +SET_TESTS_PROPERTIES(GEOM_GEOM_TestXAO PROPERTIES LABELS "${COMPONENT_NAME}") From 2ed0e10e01dc14438cfbc6027b7feffe04950a7b Mon Sep 17 00:00:00 2001 From: Paul RASCLE Date: Mon, 19 Jun 2017 15:09:33 +0200 Subject: [PATCH 02/11] fix commit b2d6c5c882a9 --- src/XAO/tests/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/XAO/tests/CMakeLists.txt b/src/XAO/tests/CMakeLists.txt index a0c5ee67e..5fd9d63ef 100644 --- a/src/XAO/tests/CMakeLists.txt +++ b/src/XAO/tests/CMakeLists.txt @@ -66,7 +66,7 @@ INSTALL(TARGETS TestXAO DESTINATION ${SALOME_INSTALL_BINS}) # Application tests SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test) -INSTALL(FILES TestXAO DESTINATION ${TEST_INSTALL_DIRECTORY}) +INSTALL(TARGETS TestXAO RUNTIME DESTINATION ${TEST_INSTALL_DIRECTORY}) INSTALL(FILES CTestTestfileInstall.cmake DESTINATION ${TEST_INSTALL_DIRECTORY} From 45c02108ce089123c2453ef26c5abfec5007ee07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Aguerre?= Date: Tue, 20 Jun 2017 11:03:42 +0200 Subject: [PATCH 03/11] Install tests.set --- doc/salome/examples/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/salome/examples/CMakeLists.txt b/doc/salome/examples/CMakeLists.txt index 0e173df44..89e9fe23c 100644 --- a/doc/salome/examples/CMakeLists.txt +++ b/doc/salome/examples/CMakeLists.txt @@ -39,3 +39,4 @@ INSTALL(FILES ${GOOD_TESTS} DESTINATION ${TEST_INSTALL_DIRECTORY}) INSTALL(FILES CTestTestfileInstall.cmake DESTINATION ${TEST_INSTALL_DIRECTORY} RENAME CTestTestfile.cmake) +INSTALL(FILES tests.set DESTINATION ${TEST_INSTALL_DIRECTORY}) From a1bc463e52cf459140435e584a9f4faef48b823e Mon Sep 17 00:00:00 2001 From: jfa Date: Fri, 30 Jun 2017 11:06:02 +0300 Subject: [PATCH 04/11] 0023451: EDF - Remove Extra edges --- src/BlockFix/BlockFix_UnionEdges.cxx | 2 +- src/BlockFix/BlockFix_UnionFaces.cxx | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/BlockFix/BlockFix_UnionEdges.cxx b/src/BlockFix/BlockFix_UnionEdges.cxx index f0beb7039..a4d0c0c01 100644 --- a/src/BlockFix/BlockFix_UnionEdges.cxx +++ b/src/BlockFix/BlockFix_UnionEdges.cxx @@ -150,7 +150,7 @@ static Standard_Boolean IsToMerge // Check if they belong to the same faces. Standard_Boolean isSame = Standard_False; Standard_Boolean has1 = theMapEdgeFaces.Contains(theEdge1); - Standard_Boolean has2 = theMapEdgeFaces.Contains(theEdge1); + Standard_Boolean has2 = theMapEdgeFaces.Contains(theEdge2); if (has1 && has2) { const TopTools_ListOfShape &aLst1 = theMapEdgeFaces.FindFromKey(theEdge1); diff --git a/src/BlockFix/BlockFix_UnionFaces.cxx b/src/BlockFix/BlockFix_UnionFaces.cxx index 67ff07f69..02765bfb4 100644 --- a/src/BlockFix/BlockFix_UnionFaces.cxx +++ b/src/BlockFix/BlockFix_UnionFaces.cxx @@ -246,6 +246,9 @@ static Standard_Boolean IsEdgeValidToMerge(const TopoDS_Edge &theEdge, Standard_Boolean isValid = Standard_True; if (BRep_Tool::IsClosed(theEdge, theFace)) { + // Mantis issue 0023451, now code corresponds to the comment to this method + isValid = Standard_False; + // This is a seam edge. Check if there are another seam edges on the face. TopExp_Explorer anExp(theFace, TopAbs_EDGE); @@ -261,7 +264,9 @@ static Standard_Boolean IsEdgeValidToMerge(const TopoDS_Edge &theEdge, TopoDS_Edge anEdge = TopoDS::Edge(aShEdge); if (BRep_Tool::IsClosed(anEdge, theFace)) { - isValid = Standard_False; + // Mantis issue 0023451, now code corresponds to the comment to this method + //isValid = Standard_False; + isValid = Standard_True; break; } } From 4084b64caba5870c2321fbe4a1243a17aa0a2a39 Mon Sep 17 00:00:00 2001 From: vsr Date: Wed, 5 Jul 2017 18:16:55 +0300 Subject: [PATCH 05/11] Fix for bug of RestoreGivenSubShapes() function's dump coming from SALOME Community forum: http://www.salome-platform.org/forum/forum_14/717558679 --- src/GEOM/GEOM_PythonDump.hxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/GEOM/GEOM_PythonDump.hxx b/src/GEOM/GEOM_PythonDump.hxx index 7736c343d..633fd44d0 100644 --- a/src/GEOM/GEOM_PythonDump.hxx +++ b/src/GEOM/GEOM_PythonDump.hxx @@ -61,20 +61,20 @@ namespace GEOM Standard_EXPORT TPythonDump& operator<< (const char* theArg); Standard_EXPORT TPythonDump& operator<< (const TCollection_AsciiString theArg); Standard_EXPORT TPythonDump& operator<< (const TopAbs_ShapeEnum theArg); - Standard_EXPORT TPythonDump& operator<< (const Handle(GEOM_BaseObject)& theObject); + Standard_EXPORT TPythonDump& operator<< (const Handle(::GEOM_BaseObject)& theObject); Standard_EXPORT TPythonDump& operator<< (const Handle(TColStd_HSequenceOfTransient)& objects); - Standard_EXPORT TPythonDump& operator<< (const std::list& theObjects); + Standard_EXPORT TPythonDump& operator<< (const std::list& theObjects); Standard_EXPORT TPythonDump& operator<< (const GEOM_BaseObject* theObject); }; /*! Returns an object from two given, which has the latest entry */ - Standard_EXPORT Handle(GEOM_Object) GetCreatedLast (const Handle(GEOM_Object)& theObj1, - const Handle(GEOM_Object)& theObj2); + Standard_EXPORT Handle(::GEOM_Object) GetCreatedLast (const Handle(::GEOM_Object)& theObj1, + const Handle(::GEOM_Object)& theObj2); /*! Returns an object from \a theObjects, which has the latest entry */ - Standard_EXPORT Handle(GEOM_Object) GetCreatedLast (const Handle(TColStd_HSequenceOfTransient)& theObjects); + Standard_EXPORT Handle(::GEOM_Object) GetCreatedLast (const Handle(TColStd_HSequenceOfTransient)& theObjects); } #endif From f798679a179bce4f5c75d8733c803fe0a6704562 Mon Sep 17 00:00:00 2001 From: asl Date: Mon, 26 Jun 2017 11:49:17 +0300 Subject: [PATCH 06/11] Porting to DEV version of OCCT --- src/GEOMUtils/GEOMUtils.cxx | 4 ++++ src/MeasureGUI/MeasureGUI_DimensionCreateTool.cxx | 4 ++++ src/MeasureGUI/MeasureGUI_DimensionInteractor.cxx | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/src/GEOMUtils/GEOMUtils.cxx b/src/GEOMUtils/GEOMUtils.cxx index 3c4fc7f62..27d89edda 100644 --- a/src/GEOMUtils/GEOMUtils.cxx +++ b/src/GEOMUtils/GEOMUtils.cxx @@ -96,6 +96,10 @@ #include #include +#if OCC_VERSION_LARGE >= 0x07010000 +#include +#endif + #include #include #include // CAREFUL ! position of this file is critic : see Lucien PIGNOLONI / OCC diff --git a/src/MeasureGUI/MeasureGUI_DimensionCreateTool.cxx b/src/MeasureGUI/MeasureGUI_DimensionCreateTool.cxx index f00f86a97..a3587cf0d 100644 --- a/src/MeasureGUI/MeasureGUI_DimensionCreateTool.cxx +++ b/src/MeasureGUI/MeasureGUI_DimensionCreateTool.cxx @@ -76,6 +76,10 @@ #include #include +#if OCC_VERSION_LARGE >= 0x07010000 +#include +#endif + // plane associated with custom data struct PlaneAndSegment diff --git a/src/MeasureGUI/MeasureGUI_DimensionInteractor.cxx b/src/MeasureGUI/MeasureGUI_DimensionInteractor.cxx index 8a7eaf259..fa63bceb9 100644 --- a/src/MeasureGUI/MeasureGUI_DimensionInteractor.cxx +++ b/src/MeasureGUI/MeasureGUI_DimensionInteractor.cxx @@ -56,6 +56,10 @@ #include #include +#if OCC_VERSION_LARGE >= 0x07010000 +#include +#endif + //================================================================================= // function : Constructor // purpose : From 338ca530244e35ce6cce63f1570744f6e12dee97 Mon Sep 17 00:00:00 2001 From: mnt Date: Thu, 6 Jul 2017 16:28:26 +0300 Subject: [PATCH 07/11] RNV: Remove deprecated code. --- src/CurveCreator/CurveCreator_Utils.cxx | 2 +- src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx | 2 +- src/GEOMImpl/GEOMImpl_ProjectionDriver.cxx | 4 ++-- src/MeasureGUI/MeasureGUI_DimensionCreateTool.cxx | 9 ++------- 4 files changed, 6 insertions(+), 11 deletions(-) diff --git a/src/CurveCreator/CurveCreator_Utils.cxx b/src/CurveCreator/CurveCreator_Utils.cxx index 5f53caea4..53f68259f 100644 --- a/src/CurveCreator/CurveCreator_Utils.cxx +++ b/src/CurveCreator/CurveCreator_Utils.cxx @@ -146,7 +146,7 @@ gp_Pnt CurveCreator_Utils::ConvertClickToPoint( int x, int y, Handle(V3d_View) a // we need the projection to the XOY plane // 1. find a point in the plane of the eye and the normal to the plane Standard_Real X, Y, Z; - Quantity_Parameter Vx, Vy, Vz; + Standard_Real Vx, Vy, Vz; aView->ConvertWithProj( x, y, X, Y, Z, Vx, Vy, Vz ); // 2. build a ray from the point by the normal to the XOY plane and intersect it diff --git a/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx b/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx index dd3318aac..170878a03 100644 --- a/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx @@ -2029,7 +2029,7 @@ GEOMImpl_IMeasureOperations::AreCoordsInside(Handle(GEOM_Object) theShape project.NbPoints() > 0 && project.LowerDistance() <= tolerance ) { - Quantity_Parameter u, v; + Standard_Real u, v; project.LowerDistanceParameters(u, v); gp_Pnt2d uv( u, v ); BRepClass_FaceClassifier FC ( face, uv, tolerance ); diff --git a/src/GEOMImpl/GEOMImpl_ProjectionDriver.cxx b/src/GEOMImpl/GEOMImpl_ProjectionDriver.cxx index 57d842242..c9cde5f0f 100644 --- a/src/GEOMImpl/GEOMImpl_ProjectionDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_ProjectionDriver.cxx @@ -160,7 +160,7 @@ Standard_Integer GEOMImpl_ProjectionDriver::Execute(LOGBOOK& log) const Standard_ConstructionError::Raise("No solution found"); } - Quantity_Parameter U, V; + Standard_Real U, V; proj.LowerDistanceParameters(U, V); gp_Pnt2d aProjPnt (U, V); @@ -170,7 +170,7 @@ Standard_Integer GEOMImpl_ProjectionDriver::Execute(LOGBOOK& log) const bool isSol = false; double minDist = RealLast(); for (int i = 1; i <= nbPoints; i++) { - Quantity_Parameter Ui, Vi; + Standard_Real Ui, Vi; proj.Parameters(i, Ui, Vi); aProjPnt = gp_Pnt2d(Ui, Vi); aClsf.Perform(aFace, aProjPnt, tol); diff --git a/src/MeasureGUI/MeasureGUI_DimensionCreateTool.cxx b/src/MeasureGUI/MeasureGUI_DimensionCreateTool.cxx index a3587cf0d..06d3cba25 100644 --- a/src/MeasureGUI/MeasureGUI_DimensionCreateTool.cxx +++ b/src/MeasureGUI/MeasureGUI_DimensionCreateTool.cxx @@ -76,11 +76,6 @@ #include #include -#if OCC_VERSION_LARGE >= 0x07010000 -#include -#endif - - // plane associated with custom data struct PlaneAndSegment { @@ -1151,8 +1146,8 @@ template TPlane MeasureGUI_DimensionCreateTool::SelectPlaneForProjection( const NCollection_Sequence& thePlanes, const Handle(V3d_View)& theView ) const { - Quantity_Parameter U[3]; - Quantity_Parameter N[3]; + Standard_Real U[3]; + Standard_Real N[3]; theView->Up( U[0], U[1], U[2] ); theView->Proj( N[0], N[1], N[2] ); From b2668a7b3701a4e793245e7fd592232abc3b6ef9 Mon Sep 17 00:00:00 2001 From: vsr Date: Mon, 10 Jul 2017 12:15:07 +0300 Subject: [PATCH 08/11] Migration on OCCT > 7.1: properly set TDataStd_ExtStringList attribute --- src/GEOM/GEOM_Function.cxx | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/GEOM/GEOM_Function.cxx b/src/GEOM/GEOM_Function.cxx index e21a6df18..952dbd3e9 100644 --- a/src/GEOM/GEOM_Function.cxx +++ b/src/GEOM/GEOM_Function.cxx @@ -822,12 +822,7 @@ void GEOM_Function::AddSubShapeReference(Handle(GEOM_Function) theSubShape) TDF_Label aSubShapesLabel = _label.FindChild(SUBSHAPES_LABEL); - Handle(TDataStd_ExtStringList) aList; - if (!aSubShapesLabel.FindAttribute(TDataStd_ExtStringList::GetID(), aList)) { - aList = new TDataStd_ExtStringList; - aSubShapesLabel.AddAttribute(aList); - } - + Handle(TDataStd_ExtStringList) aList = TDataStd_ExtStringList::Set( aSubShapesLabel ); TCollection_AsciiString anEntry; TDF_Tool::Entry(theSubShape->GetOwnerEntry(), anEntry); aList->Append(anEntry); @@ -880,11 +875,7 @@ const TDataStd_ListOfExtendedString& GEOM_Function::GetSubShapeReferences() TDF_Label aSubShapesLabel = _label.FindChild(SUBSHAPES_LABEL); - Handle(TDataStd_ExtStringList) aList; - if (!aSubShapesLabel.FindAttribute(TDataStd_ExtStringList::GetID(), aList)) { - aList = new TDataStd_ExtStringList; - aSubShapesLabel.AddAttribute(aList); - } + Handle(TDataStd_ExtStringList) aList = TDataStd_ExtStringList::Set( aSubShapesLabel ); _isDone = true; return aList->List(); From bfef80c4ed565e02c23c033524738d0bb5666679 Mon Sep 17 00:00:00 2001 From: rnv Date: Mon, 10 Jul 2017 12:17:26 +0300 Subject: [PATCH 09/11] Porting to DEV version of OCCT. --- src/GEOMAlgo/GEOMAlgo_RemoverWebs.cxx | 4 ++ src/GEOMAlgo/GEOMAlgo_ShellSolid.cxx | 52 ++++++++++++++++++++ src/GEOMAlgo/GEOMAlgo_SolidSolid.cxx | 5 ++ src/GEOMAlgo/GEOMAlgo_Splitter.cxx | 3 ++ src/GEOMAlgo/GEOMAlgo_VertexSolid.cxx | 4 ++ src/GEOMAlgo/GEOMAlgo_WireSolid.cxx | 4 ++ src/GEOMImpl/GEOMImpl_BooleanDriver.cxx | 30 +++++++++-- src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx | 6 +++ src/GEOMImpl/GEOMImpl_PartitionDriver.cxx | 12 ++++- src/GEOMImpl/GEOMImpl_ShapeDriver.cxx | 4 ++ 10 files changed, 120 insertions(+), 4 deletions(-) diff --git a/src/GEOMAlgo/GEOMAlgo_RemoverWebs.cxx b/src/GEOMAlgo/GEOMAlgo_RemoverWebs.cxx index 0a7ca1e67..a50bdc204 100644 --- a/src/GEOMAlgo/GEOMAlgo_RemoverWebs.cxx +++ b/src/GEOMAlgo/GEOMAlgo_RemoverWebs.cxx @@ -225,7 +225,11 @@ void GEOMAlgo_RemoverWebs::BuildSolid() aSB.SetContext(myContext); aSB.SetShapes(aSFS); aSB.Perform(); +#if OCC_VERSION_LARGE > 0x07010000 + iErr=aSB.HasErrors(); +#else iErr=aSB.ErrorStatus(); +#endif if (iErr) { myErrorStatus=20; // SolidBuilder failed return; diff --git a/src/GEOMAlgo/GEOMAlgo_ShellSolid.cxx b/src/GEOMAlgo/GEOMAlgo_ShellSolid.cxx index db3b69bbb..85e51c440 100644 --- a/src/GEOMAlgo/GEOMAlgo_ShellSolid.cxx +++ b/src/GEOMAlgo/GEOMAlgo_ShellSolid.cxx @@ -101,7 +101,9 @@ GEOMAlgo_ShellSolidBuilder::~GEOMAlgo_ShellSolidBuilder() //======================================================================= void GEOMAlgo_ShellSolidBuilder::PerformInternal(const BOPAlgo_PaveFiller& theFiller) { +#if OCC_VERSION_LARGE <= 0x07010000 myErrorStatus=0; +#endif // myPaveFiller=(BOPAlgo_PaveFiller*)&theFiller; myDS=myPaveFiller->PDS(); @@ -109,57 +111,97 @@ void GEOMAlgo_ShellSolidBuilder::PerformInternal(const BOPAlgo_PaveFiller& theFi // // 1. CheckData CheckData(); +#if OCC_VERSION_LARGE > 0x07010000 + if (HasErrors()) { +#else if (myErrorStatus) { +#endif return; } // // 2. Prepare Prepare(); +#if OCC_VERSION_LARGE > 0x07010000 + if (HasErrors()) { +#else if (myErrorStatus) { +#endif return; } // // 3. Fill Images // 3.1 Vertice FillImagesVertices(); +#if OCC_VERSION_LARGE > 0x07010000 + if (HasErrors()) { +#else if (myErrorStatus) { +#endif return; } // BuildResult(TopAbs_VERTEX); +#if OCC_VERSION_LARGE > 0x07010000 + if (HasErrors()) { +#else if (myErrorStatus) { +#endif return; } // 3.2 Edges FillImagesEdges(); +#if OCC_VERSION_LARGE > 0x07010000 + if (HasErrors()) { +#else if (myErrorStatus) { +#endif return; } // BuildResult(TopAbs_EDGE); +#if OCC_VERSION_LARGE > 0x07010000 + if (HasErrors()) { +#else if (myErrorStatus) { +#endif return; } // // 3.3 Wires FillImagesContainers(TopAbs_WIRE); +#if OCC_VERSION_LARGE > 0x07010000 + if (HasErrors()) { +#else if (myErrorStatus) { +#endif return; } // BuildResult(TopAbs_WIRE); +#if OCC_VERSION_LARGE > 0x07010000 + if (HasErrors()) { +#else if (myErrorStatus) { +#endif return; } // 3.4 Faces FillImagesFaces(); +#if OCC_VERSION_LARGE > 0x07010000 + if (HasErrors()) { +#else if (myErrorStatus) { +#endif return; } // BuildResult(TopAbs_FACE); +#if OCC_VERSION_LARGE > 0x07010000 + if (HasErrors()) { +#else if (myErrorStatus) { +#endif return; } } @@ -186,7 +228,9 @@ GEOMAlgo_ShellSolid::~GEOMAlgo_ShellSolid() //======================================================================= void GEOMAlgo_ShellSolid::Perform() { +#if OCC_VERSION_LARGE <= 0x07010000 myErrorStatus=0; +#endif // try { Standard_Integer aNbArgs, iRank, iErr, iBeg, iEnd, i, aNbSp; @@ -207,7 +251,11 @@ void GEOMAlgo_ShellSolid::Perform() myErrorStatus=10; return; } +#if OCC_VERSION_LARGE > 0x07010000 + if(myDSFiller->HasErrors()) { +#else if(myDSFiller->ErrorStatus()) { +#endif myErrorStatus=11; return; } @@ -251,7 +299,11 @@ void GEOMAlgo_ShellSolid::Perform() GEOMAlgo_ShellSolidBuilder aSSB; // aSSB.PerformWithFiller(*myDSFiller); +#if OCC_VERSION_LARGE > 0x07010000 + iErr=aSSB.HasErrors(); +#else iErr=aSSB.ErrorStatus(); +#endif if (iErr) { myErrorStatus=15; return; diff --git a/src/GEOMAlgo/GEOMAlgo_SolidSolid.cxx b/src/GEOMAlgo/GEOMAlgo_SolidSolid.cxx index 67dea8adf..b39dce44e 100644 --- a/src/GEOMAlgo/GEOMAlgo_SolidSolid.cxx +++ b/src/GEOMAlgo/GEOMAlgo_SolidSolid.cxx @@ -37,6 +37,7 @@ #include #include +#include #include @@ -84,7 +85,11 @@ void GEOMAlgo_SolidSolid::Perform() myErrorStatus=10; return; } +#if OCC_VERSION_LARGE > 0x07010000 + if(myDSFiller->HasErrors()) { +#else if(myDSFiller->ErrorStatus()) { +#endif myErrorStatus=11; return; } diff --git a/src/GEOMAlgo/GEOMAlgo_Splitter.cxx b/src/GEOMAlgo/GEOMAlgo_Splitter.cxx index 0df4a628b..fb5b8099b 100644 --- a/src/GEOMAlgo/GEOMAlgo_Splitter.cxx +++ b/src/GEOMAlgo/GEOMAlgo_Splitter.cxx @@ -41,6 +41,7 @@ #include +#include static void TreatCompound(const TopoDS_Shape& aC, @@ -149,7 +150,9 @@ void GEOMAlgo_Splitter::Clear() //======================================================================= void GEOMAlgo_Splitter::BuildResult(const TopAbs_ShapeEnum theType) { +#if OCC_VERSION_LARGE <= 0x07010000 myErrorStatus=0; +#endif // TopAbs_ShapeEnum aType; BRep_Builder aBB; diff --git a/src/GEOMAlgo/GEOMAlgo_VertexSolid.cxx b/src/GEOMAlgo/GEOMAlgo_VertexSolid.cxx index e8b763617..182df0d41 100644 --- a/src/GEOMAlgo/GEOMAlgo_VertexSolid.cxx +++ b/src/GEOMAlgo/GEOMAlgo_VertexSolid.cxx @@ -90,7 +90,11 @@ void GEOMAlgo_VertexSolid::Perform() myErrorStatus=10; return; } +#if OCC_VERSION_LARGE > 0x07010000 + if(myDSFiller->HasErrors()) { +#else if(myDSFiller->ErrorStatus()) { +#endif myErrorStatus=11; return; } diff --git a/src/GEOMAlgo/GEOMAlgo_WireSolid.cxx b/src/GEOMAlgo/GEOMAlgo_WireSolid.cxx index 0f65ecc50..1b87f5f32 100644 --- a/src/GEOMAlgo/GEOMAlgo_WireSolid.cxx +++ b/src/GEOMAlgo/GEOMAlgo_WireSolid.cxx @@ -80,7 +80,11 @@ void GEOMAlgo_WireSolid::Perform() myErrorStatus=10; return; } +#if OCC_VERSION_LARGE > 0x07010000 + if(myDSFiller->HasErrors()) { +#else if(myDSFiller->ErrorStatus()) { +#endif myErrorStatus=11; return; } diff --git a/src/GEOMImpl/GEOMImpl_BooleanDriver.cxx b/src/GEOMImpl/GEOMImpl_BooleanDriver.cxx index 6c2e34a89..803c2e2ee 100644 --- a/src/GEOMImpl/GEOMImpl_BooleanDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_BooleanDriver.cxx @@ -150,11 +150,19 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute(LOGBOOK& log) const aList2.Append(aShape2); aCSI.SetArguments(aList1); aCSI.Perform(); +#if OCC_VERSION_LARGE > 0x07010000 + if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0) +#else if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0) +#endif StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is self-intersected"); aCSI.SetArguments(aList2); aCSI.Perform(); +#if OCC_VERSION_LARGE > 0x07010000 + if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0) +#else if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0) +#endif StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is self-intersected"); } @@ -205,7 +213,11 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute(LOGBOOK& log) const aList1.Append(aShape); aCSI.SetArguments(aList1); aCSI.Perform(); +#if OCC_VERSION_LARGE > 0x07010000 + if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0) { +#else if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0) { +#endif StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is self-intersected"); } } @@ -229,7 +241,11 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute(LOGBOOK& log) const aList2.Append(aShape2); aCSI.SetArguments(aList2); aCSI.Perform(); - if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0) { +#if OCC_VERSION_LARGE > 0x07010000 + if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0) { +#else + if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0) { +#endif StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is self-intersected"); } } @@ -270,7 +286,11 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute(LOGBOOK& log) const aList1.Append(aShape); aCSI.SetArguments(aList1); aCSI.Perform(); - if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0) { +#if OCC_VERSION_LARGE > 0x07010000 + if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0) { +#else + if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0) { +#endif StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is self-intersected"); } } @@ -300,7 +320,11 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute(LOGBOOK& log) const aList2.Append(aTool); aCSI.SetArguments(aList2); aCSI.Perform(); - if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0) { +#if OCC_VERSION_LARGE > 0x07010000 + if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0) { +#else + if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0) { +#endif StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is self-intersected"); } } diff --git a/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx b/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx index 170878a03..e7500023b 100644 --- a/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx @@ -145,7 +145,9 @@ GEOMImpl_IMeasureOperations::ShapeKind GEOMImpl_IMeasureOperations::KindOfShape GEOMAlgo_ShapeInfoFiller aSF; aSF.SetShape(aShape); aSF.Perform(); + Standard_Integer iErr = aSF.ErrorStatus(); + if (iErr) { SetErrorCode("Error in GEOMAlgo_ShapeInfoFiller"); return SK_NO_SHAPE; @@ -1574,7 +1576,11 @@ bool GEOMImpl_IMeasureOperations::CheckSelfIntersections // 1. Launch the checker aCSI.Perform(); +#if OCC_VERSION_LARGE > 0x07010000 + Standard_Boolean iErr = aCSI.HasErrors(); +#else Standard_Integer iErr = aCSI.ErrorStatus(); +#endif // Standard_Integer aNbS, n1, n2; diff --git a/src/GEOMImpl/GEOMImpl_PartitionDriver.cxx b/src/GEOMImpl/GEOMImpl_PartitionDriver.cxx index 63e7e5284..5628babb7 100644 --- a/src/GEOMImpl/GEOMImpl_PartitionDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_PartitionDriver.cxx @@ -44,6 +44,9 @@ #include #include #include +#if OCC_VERSION_LARGE > 0x07010000 +#include +#endif #include #include #include @@ -106,8 +109,11 @@ static void CheckSelfIntersection(const TopoDS_Shape &theShape) aCSI.SetLevelOfCheck(BOP_SELF_INTERSECTIONS_LEVEL); aCSI.SetArguments(aList); aCSI.Perform(); - +#if OCC_VERSION_LARGE > 0x07010000 + if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0) { +#else if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0) { +#endif StdFail_NotDone::Raise("Partition operation will not be performed, because argument shape is self-intersected"); } } @@ -411,7 +417,11 @@ Standard_Integer GEOMImpl_PartitionDriver::Execute(LOGBOOK& log) const aShape = PS.Shape(); if (aShape.IsNull()) { // Mantis issue 22009 +#if OCC_VERSION_LARGE > 0x07010000 + if (PS.HasError(STANDARD_TYPE(BOPAlgo_AlertTooFewArguments)) && PS.Tools().Extent() == 0 && PS.Arguments().Extent() == 1) +#else if (PS.ErrorStatus() == 100 && PS.Tools().Extent() == 0 && PS.Arguments().Extent() == 1) +#endif aShape = PS.Arguments().First(); else return 0; diff --git a/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx b/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx index b7947fdf7..00ff9dde0 100644 --- a/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx @@ -770,7 +770,11 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(LOGBOOK& log) const aMV.SetArguments(aLS); aMV.SetIntersect(aCI.GetIsIntersect()); aMV.Perform(); +#if OCC_VERSION_LARGE > 0x07010000 + if (aMV.HasErrors()) return 0; +#else if (aMV.ErrorStatus()) return 0; +#endif aShape = aMV.Shape(); } From eb8f9b5bb9a3d24a7360eda83ad37a67c34f831d Mon Sep 17 00:00:00 2001 From: rnv Date: Tue, 11 Jul 2017 12:35:05 +0300 Subject: [PATCH 10/11] Porting to OCCT dev version: update version 0x07010000 -> 0x07010001 --- src/GEOMAlgo/GEOMAlgo_RemoverWebs.cxx | 2 +- src/GEOMAlgo/GEOMAlgo_ShellSolid.cxx | 24 ++++++++++---------- src/GEOMAlgo/GEOMAlgo_SolidSolid.cxx | 2 +- src/GEOMAlgo/GEOMAlgo_VertexSolid.cxx | 2 +- src/GEOMAlgo/GEOMAlgo_WireSolid.cxx | 2 +- src/GEOMImpl/GEOMImpl_BooleanDriver.cxx | 12 +++++----- src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx | 2 +- src/GEOMImpl/GEOMImpl_PartitionDriver.cxx | 6 ++--- src/GEOMImpl/GEOMImpl_ShapeDriver.cxx | 2 +- 9 files changed, 27 insertions(+), 27 deletions(-) diff --git a/src/GEOMAlgo/GEOMAlgo_RemoverWebs.cxx b/src/GEOMAlgo/GEOMAlgo_RemoverWebs.cxx index a50bdc204..05636647b 100644 --- a/src/GEOMAlgo/GEOMAlgo_RemoverWebs.cxx +++ b/src/GEOMAlgo/GEOMAlgo_RemoverWebs.cxx @@ -225,7 +225,7 @@ void GEOMAlgo_RemoverWebs::BuildSolid() aSB.SetContext(myContext); aSB.SetShapes(aSFS); aSB.Perform(); -#if OCC_VERSION_LARGE > 0x07010000 +#if OCC_VERSION_LARGE > 0x07010001 iErr=aSB.HasErrors(); #else iErr=aSB.ErrorStatus(); diff --git a/src/GEOMAlgo/GEOMAlgo_ShellSolid.cxx b/src/GEOMAlgo/GEOMAlgo_ShellSolid.cxx index 85e51c440..cb7f85322 100644 --- a/src/GEOMAlgo/GEOMAlgo_ShellSolid.cxx +++ b/src/GEOMAlgo/GEOMAlgo_ShellSolid.cxx @@ -111,7 +111,7 @@ void GEOMAlgo_ShellSolidBuilder::PerformInternal(const BOPAlgo_PaveFiller& theFi // // 1. CheckData CheckData(); -#if OCC_VERSION_LARGE > 0x07010000 +#if OCC_VERSION_LARGE > 0x07010001 if (HasErrors()) { #else if (myErrorStatus) { @@ -121,7 +121,7 @@ void GEOMAlgo_ShellSolidBuilder::PerformInternal(const BOPAlgo_PaveFiller& theFi // // 2. Prepare Prepare(); -#if OCC_VERSION_LARGE > 0x07010000 +#if OCC_VERSION_LARGE > 0x07010001 if (HasErrors()) { #else if (myErrorStatus) { @@ -132,7 +132,7 @@ void GEOMAlgo_ShellSolidBuilder::PerformInternal(const BOPAlgo_PaveFiller& theFi // 3. Fill Images // 3.1 Vertice FillImagesVertices(); -#if OCC_VERSION_LARGE > 0x07010000 +#if OCC_VERSION_LARGE > 0x07010001 if (HasErrors()) { #else if (myErrorStatus) { @@ -141,7 +141,7 @@ void GEOMAlgo_ShellSolidBuilder::PerformInternal(const BOPAlgo_PaveFiller& theFi } // BuildResult(TopAbs_VERTEX); -#if OCC_VERSION_LARGE > 0x07010000 +#if OCC_VERSION_LARGE > 0x07010001 if (HasErrors()) { #else if (myErrorStatus) { @@ -150,7 +150,7 @@ void GEOMAlgo_ShellSolidBuilder::PerformInternal(const BOPAlgo_PaveFiller& theFi } // 3.2 Edges FillImagesEdges(); -#if OCC_VERSION_LARGE > 0x07010000 +#if OCC_VERSION_LARGE > 0x07010001 if (HasErrors()) { #else if (myErrorStatus) { @@ -159,7 +159,7 @@ void GEOMAlgo_ShellSolidBuilder::PerformInternal(const BOPAlgo_PaveFiller& theFi } // BuildResult(TopAbs_EDGE); -#if OCC_VERSION_LARGE > 0x07010000 +#if OCC_VERSION_LARGE > 0x07010001 if (HasErrors()) { #else if (myErrorStatus) { @@ -169,7 +169,7 @@ void GEOMAlgo_ShellSolidBuilder::PerformInternal(const BOPAlgo_PaveFiller& theFi // // 3.3 Wires FillImagesContainers(TopAbs_WIRE); -#if OCC_VERSION_LARGE > 0x07010000 +#if OCC_VERSION_LARGE > 0x07010001 if (HasErrors()) { #else if (myErrorStatus) { @@ -178,7 +178,7 @@ void GEOMAlgo_ShellSolidBuilder::PerformInternal(const BOPAlgo_PaveFiller& theFi } // BuildResult(TopAbs_WIRE); -#if OCC_VERSION_LARGE > 0x07010000 +#if OCC_VERSION_LARGE > 0x07010001 if (HasErrors()) { #else if (myErrorStatus) { @@ -188,7 +188,7 @@ void GEOMAlgo_ShellSolidBuilder::PerformInternal(const BOPAlgo_PaveFiller& theFi // 3.4 Faces FillImagesFaces(); -#if OCC_VERSION_LARGE > 0x07010000 +#if OCC_VERSION_LARGE > 0x07010001 if (HasErrors()) { #else if (myErrorStatus) { @@ -197,7 +197,7 @@ void GEOMAlgo_ShellSolidBuilder::PerformInternal(const BOPAlgo_PaveFiller& theFi } // BuildResult(TopAbs_FACE); -#if OCC_VERSION_LARGE > 0x07010000 +#if OCC_VERSION_LARGE > 0x07010001 if (HasErrors()) { #else if (myErrorStatus) { @@ -251,7 +251,7 @@ void GEOMAlgo_ShellSolid::Perform() myErrorStatus=10; return; } -#if OCC_VERSION_LARGE > 0x07010000 +#if OCC_VERSION_LARGE > 0x07010001 if(myDSFiller->HasErrors()) { #else if(myDSFiller->ErrorStatus()) { @@ -299,7 +299,7 @@ void GEOMAlgo_ShellSolid::Perform() GEOMAlgo_ShellSolidBuilder aSSB; // aSSB.PerformWithFiller(*myDSFiller); -#if OCC_VERSION_LARGE > 0x07010000 +#if OCC_VERSION_LARGE > 0x07010001 iErr=aSSB.HasErrors(); #else iErr=aSSB.ErrorStatus(); diff --git a/src/GEOMAlgo/GEOMAlgo_SolidSolid.cxx b/src/GEOMAlgo/GEOMAlgo_SolidSolid.cxx index b39dce44e..b7f49b6ab 100644 --- a/src/GEOMAlgo/GEOMAlgo_SolidSolid.cxx +++ b/src/GEOMAlgo/GEOMAlgo_SolidSolid.cxx @@ -85,7 +85,7 @@ void GEOMAlgo_SolidSolid::Perform() myErrorStatus=10; return; } -#if OCC_VERSION_LARGE > 0x07010000 +#if OCC_VERSION_LARGE > 0x07010001 if(myDSFiller->HasErrors()) { #else if(myDSFiller->ErrorStatus()) { diff --git a/src/GEOMAlgo/GEOMAlgo_VertexSolid.cxx b/src/GEOMAlgo/GEOMAlgo_VertexSolid.cxx index 182df0d41..b669f5caf 100644 --- a/src/GEOMAlgo/GEOMAlgo_VertexSolid.cxx +++ b/src/GEOMAlgo/GEOMAlgo_VertexSolid.cxx @@ -90,7 +90,7 @@ void GEOMAlgo_VertexSolid::Perform() myErrorStatus=10; return; } -#if OCC_VERSION_LARGE > 0x07010000 +#if OCC_VERSION_LARGE > 0x07010001 if(myDSFiller->HasErrors()) { #else if(myDSFiller->ErrorStatus()) { diff --git a/src/GEOMAlgo/GEOMAlgo_WireSolid.cxx b/src/GEOMAlgo/GEOMAlgo_WireSolid.cxx index 1b87f5f32..8c44271a7 100644 --- a/src/GEOMAlgo/GEOMAlgo_WireSolid.cxx +++ b/src/GEOMAlgo/GEOMAlgo_WireSolid.cxx @@ -80,7 +80,7 @@ void GEOMAlgo_WireSolid::Perform() myErrorStatus=10; return; } -#if OCC_VERSION_LARGE > 0x07010000 +#if OCC_VERSION_LARGE > 0x07010001 if(myDSFiller->HasErrors()) { #else if(myDSFiller->ErrorStatus()) { diff --git a/src/GEOMImpl/GEOMImpl_BooleanDriver.cxx b/src/GEOMImpl/GEOMImpl_BooleanDriver.cxx index 803c2e2ee..3d03eff3f 100644 --- a/src/GEOMImpl/GEOMImpl_BooleanDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_BooleanDriver.cxx @@ -150,7 +150,7 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute(LOGBOOK& log) const aList2.Append(aShape2); aCSI.SetArguments(aList1); aCSI.Perform(); -#if OCC_VERSION_LARGE > 0x07010000 +#if OCC_VERSION_LARGE > 0x07010001 if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0) #else if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0) @@ -158,7 +158,7 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute(LOGBOOK& log) const StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is self-intersected"); aCSI.SetArguments(aList2); aCSI.Perform(); -#if OCC_VERSION_LARGE > 0x07010000 +#if OCC_VERSION_LARGE > 0x07010001 if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0) #else if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0) @@ -213,7 +213,7 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute(LOGBOOK& log) const aList1.Append(aShape); aCSI.SetArguments(aList1); aCSI.Perform(); -#if OCC_VERSION_LARGE > 0x07010000 +#if OCC_VERSION_LARGE > 0x07010001 if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0) { #else if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0) { @@ -241,7 +241,7 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute(LOGBOOK& log) const aList2.Append(aShape2); aCSI.SetArguments(aList2); aCSI.Perform(); -#if OCC_VERSION_LARGE > 0x07010000 +#if OCC_VERSION_LARGE > 0x07010001 if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0) { #else if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0) { @@ -286,7 +286,7 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute(LOGBOOK& log) const aList1.Append(aShape); aCSI.SetArguments(aList1); aCSI.Perform(); -#if OCC_VERSION_LARGE > 0x07010000 +#if OCC_VERSION_LARGE > 0x07010001 if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0) { #else if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0) { @@ -320,7 +320,7 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute(LOGBOOK& log) const aList2.Append(aTool); aCSI.SetArguments(aList2); aCSI.Perform(); -#if OCC_VERSION_LARGE > 0x07010000 +#if OCC_VERSION_LARGE > 0x07010001 if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0) { #else if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0) { diff --git a/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx b/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx index e7500023b..ad2f75f9f 100644 --- a/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx @@ -1576,7 +1576,7 @@ bool GEOMImpl_IMeasureOperations::CheckSelfIntersections // 1. Launch the checker aCSI.Perform(); -#if OCC_VERSION_LARGE > 0x07010000 +#if OCC_VERSION_LARGE > 0x07010001 Standard_Boolean iErr = aCSI.HasErrors(); #else Standard_Integer iErr = aCSI.ErrorStatus(); diff --git a/src/GEOMImpl/GEOMImpl_PartitionDriver.cxx b/src/GEOMImpl/GEOMImpl_PartitionDriver.cxx index 5628babb7..5a95d6ec4 100644 --- a/src/GEOMImpl/GEOMImpl_PartitionDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_PartitionDriver.cxx @@ -44,7 +44,7 @@ #include #include #include -#if OCC_VERSION_LARGE > 0x07010000 +#if OCC_VERSION_LARGE > 0x07010001 #include #endif #include @@ -109,7 +109,7 @@ static void CheckSelfIntersection(const TopoDS_Shape &theShape) aCSI.SetLevelOfCheck(BOP_SELF_INTERSECTIONS_LEVEL); aCSI.SetArguments(aList); aCSI.Perform(); -#if OCC_VERSION_LARGE > 0x07010000 +#if OCC_VERSION_LARGE > 0x07010001 if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0) { #else if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0) { @@ -417,7 +417,7 @@ Standard_Integer GEOMImpl_PartitionDriver::Execute(LOGBOOK& log) const aShape = PS.Shape(); if (aShape.IsNull()) { // Mantis issue 22009 -#if OCC_VERSION_LARGE > 0x07010000 +#if OCC_VERSION_LARGE > 0x07010001 if (PS.HasError(STANDARD_TYPE(BOPAlgo_AlertTooFewArguments)) && PS.Tools().Extent() == 0 && PS.Arguments().Extent() == 1) #else if (PS.ErrorStatus() == 100 && PS.Tools().Extent() == 0 && PS.Arguments().Extent() == 1) diff --git a/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx b/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx index 00ff9dde0..13544e81b 100644 --- a/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_ShapeDriver.cxx @@ -770,7 +770,7 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(LOGBOOK& log) const aMV.SetArguments(aLS); aMV.SetIntersect(aCI.GetIsIntersect()); aMV.Perform(); -#if OCC_VERSION_LARGE > 0x07010000 +#if OCC_VERSION_LARGE > 0x07010001 if (aMV.HasErrors()) return 0; #else if (aMV.ErrorStatus()) return 0; From 9712b7e66839d6bb84389a1ce64a5532aba7c0ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Aguerre?= Date: Thu, 13 Jul 2017 11:55:16 +0200 Subject: [PATCH 11/11] salome test - Fix bug in GEOM tests list --- CMakeLists.txt | 61 ++++++++++--------- CTestTestfileInstall.cmake | 26 ++++++++ doc/salome/examples/CMakeLists.txt | 2 +- .../examples/CTestTestfileInstall.cmake | 4 -- src/XAO/tests/CMakeLists.txt | 2 +- src/XAO/tests/CTestTestfileInstall.cmake | 6 +- 6 files changed, 62 insertions(+), 39 deletions(-) create mode 100644 CTestTestfileInstall.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 00cd53e15..61412c097 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2013-2016 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2013-2017 CEA/DEN, EDF R&D, OPEN CASCADE # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -24,7 +24,7 @@ PROJECT(SalomeGEOM C CXX) # Ensure a proper linker behavior: CMAKE_POLICY(SET CMP0003 NEW) IF(WIN32) - CMAKE_POLICY(SET CMP0020 OLD) # disable automatic linking to qtmain.lib + CMAKE_POLICY(SET CMP0020 OLD) # disable automatic linking to qtmain.lib ENDIF(WIN32) # Versioning @@ -70,7 +70,7 @@ SET(BUILD_SHARED_LIBS TRUE) # Local macros: LIST(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/adm_local/cmake_files") -# User options +# User options # ============ OPTION(SALOME_BUILD_DOC "Generate SALOME GEOM documentation" ON) OPTION(SALOME_BUILD_TESTS "Build SALOME tests" ON) @@ -104,7 +104,7 @@ FIND_PACKAGE(SalomeOmniORBPy REQUIRED) FIND_PACKAGE(SalomeLibXml2 REQUIRED) FIND_PACKAGE(SalomeHDF5 REQUIRED COMPONENTS C) -# Other KERNEL optionals: +# Other KERNEL optionals: IF(SALOME_BUILD_TESTS) ENABLE_TESTING() FIND_PACKAGE(SalomeCppUnit) @@ -124,7 +124,7 @@ IF(SALOME_BUILD_GUI) LIST(APPEND CMAKE_MODULE_PATH "${GUI_ROOT_DIR}/adm_local/cmake_files") FIND_PACKAGE(SalomeGUI) SALOME_GUI_WITH_CORBA() #check whether GUI builded with CORBA - SALOME_GUI_MODE(SALOME_USE_OCCVIEWER SALOME_USE_VTKVIEWER SALOME_USE_SALOMEOBJECT + SALOME_GUI_MODE(SALOME_USE_OCCVIEWER SALOME_USE_VTKVIEWER SALOME_USE_SALOMEOBJECT OPTIONAL SALOME_USE_PLOT2DVIEWER SALOME_USE_GRAPHICSVIEW SALOME_USE_PYCONSOLE) ADD_DEFINITIONS(${GUI_DEFINITIONS}) INCLUDE_DIRECTORIES(${GUI_INCLUDE_DIRS}) @@ -180,18 +180,18 @@ SET(SALOME_INSTALL_BINS "${SALOME_INSTALL_BINS}" CACHE PATH "Install path: SALOM SET(SALOME_INSTALL_LIBS "${SALOME_INSTALL_LIBS}" CACHE PATH "Install path: SALOME libs") SET(SALOME_INSTALL_IDLS "${SALOME_INSTALL_IDLS}" CACHE PATH "Install path: SALOME IDL files") SET(SALOME_INSTALL_HEADERS "${SALOME_INSTALL_HEADERS}" CACHE PATH "Install path: SALOME headers") -SET(SALOME_INSTALL_SCRIPT_SCRIPTS "${SALOME_INSTALL_SCRIPT_SCRIPTS}" CACHE PATH +SET(SALOME_INSTALL_SCRIPT_SCRIPTS "${SALOME_INSTALL_SCRIPT_SCRIPTS}" CACHE PATH "Install path: SALOME scripts") -SET(SALOME_INSTALL_SCRIPT_DATA "${SALOME_INSTALL_SCRIPT_DATA}" CACHE PATH +SET(SALOME_INSTALL_SCRIPT_DATA "${SALOME_INSTALL_SCRIPT_DATA}" CACHE PATH "Install path: SALOME script data") -SET(SALOME_INSTALL_SCRIPT_PYTHON "${SALOME_INSTALL_SCRIPT_PYTHON}" CACHE PATH +SET(SALOME_INSTALL_SCRIPT_PYTHON "${SALOME_INSTALL_SCRIPT_PYTHON}" CACHE PATH "Install path: SALOME Python scripts") SET(SALOME_INSTALL_PYTHON "${SALOME_INSTALL_PYTHON}" CACHE PATH "Install path: SALOME Python stuff") -SET(SALOME_INSTALL_PYTHON_SHARED "${SALOME_INSTALL_PYTHON_SHARED}" CACHE PATH +SET(SALOME_INSTALL_PYTHON_SHARED "${SALOME_INSTALL_PYTHON_SHARED}" CACHE PATH "Install path: SALOME Python shared modules") SET(SALOME_INSTALL_CMAKE "${SALOME_INSTALL_CMAKE}" CACHE PATH "Install path: SALOME CMake files") -SET(SALOME_INSTALL_CMAKE_LOCAL "${SALOME_INSTALL_CMAKE_LOCAL}" CACHE PATH - "Install path: local SALOME CMake files") +SET(SALOME_INSTALL_CMAKE_LOCAL "${SALOME_INSTALL_CMAKE_LOCAL}" CACHE PATH + "Install path: local SALOME CMake files") SET(SALOME_INSTALL_AMCONFIG_LOCAL "${SALOME_INSTALL_AMCONFIG_LOCAL}" CACHE PATH "Install path: local SALOME config files (obsolete, to be removed)") @@ -199,11 +199,11 @@ SET(SALOME_INSTALL_RES "${SALOME_INSTALL_RES}" CACHE PATH "Install path: SALOME SET(SALOME_INSTALL_DOC "${SALOME_INSTALL_DOC}" CACHE PATH "Install path: SALOME documentation") # Specific to GEOM: -SET(SALOME_GEOM_INSTALL_RES_DATA "${SALOME_INSTALL_RES}/geom" CACHE PATH +SET(SALOME_GEOM_INSTALL_RES_DATA "${SALOME_INSTALL_RES}/geom" CACHE PATH "Install path: SALOME GEOM specific data") -SET(SALOME_GEOM_INSTALL_RES_SCRIPTS "${SALOME_INSTALL_RES}/geom" CACHE PATH +SET(SALOME_GEOM_INSTALL_RES_SCRIPTS "${SALOME_INSTALL_RES}/geom" CACHE PATH "Install path: SALOME GEOM scripts") -SET(SALOME_GEOM_INSTALL_PLUGINS share/salome/plugins/geom CACHE PATH +SET(SALOME_GEOM_INSTALL_PLUGINS share/salome/plugins/geom CACHE PATH "Install path: SALOME GEOM plugins") MARK_AS_ADVANCED(SALOME_INSTALL_BINS SALOME_INSTALL_LIBS SALOME_INSTALL_IDLS SALOME_INSTALL_HEADERS) @@ -217,9 +217,9 @@ MARK_AS_ADVANCED(SALOME_INSTALL_AMCONFIG_LOCAL SALOME_INSTALL_DOC) SALOME_ACCUMULATE_ENVIRONMENT(PYTHONPATH NOCHECK ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_BINS} ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_PYTHON} ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_PYTHON_SHARED}) -SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH NOCHECK ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_LIBS}) +SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH NOCHECK ${CMAKE_INSTALL_PREFIX}/${SALOME_INSTALL_LIBS}) -# Sources +# Sources # ======== ADD_SUBDIRECTORY(idl) @@ -243,15 +243,15 @@ INCLUDE(CMakePackageConfigHelpers) # List of targets in this project we want to make visible to the rest of the world. # They all have to be INSTALL'd with the option "EXPORT ${PROJECT_NAME}TargetGroup" -SET(_${PROJECT_NAME}_exposed_targets +SET(_${PROJECT_NAME}_exposed_targets GEOMArchimede BlockFix GEOMbasic GEOMAlgo GEOMClient GEOMImpl GEOMUtils GEOMEngine GEOM_SupervEngine GEOMSketcher - SalomeIDLGEOM SalomeIDLGEOMSuperv SalomeIDLAdvancedGEOM ShHealOper XAO AdvancedEngine + SalomeIDLGEOM SalomeIDLGEOMSuperv SalomeIDLAdvancedGEOM ShHealOper XAO AdvancedEngine SalomeIDLSTLPlugin SalomeIDLBREPPlugin SalomeIDLSTEPPlugin SalomeIDLIGESPlugin SalomeIDLXAOPlugin - STLPluginEngine BREPPluginEngine STEPPluginEngine IGESPluginEngine XAOPluginEngine + STLPluginEngine BREPPluginEngine STEPPluginEngine IGESPluginEngine XAOPluginEngine ) IF(SALOME_BUILD_GUI) - LIST(APPEND _${PROJECT_NAME}_exposed_targets + LIST(APPEND _${PROJECT_NAME}_exposed_targets AdvancedGUI BasicGUI BlocksGUI BooleanGUI BuildGUI DisplayGUI DlgRef CurveCreator EntityGUI GEOMBase GEOMFiltersSelection GEOM GEOMToolsGUI GenerationGUI GroupGUI Material MeasureGUI GEOMObject OperationGUI PrimitiveGUI RepairGUI TransformationGUI @@ -263,7 +263,7 @@ IF(SALOME_BUILD_GUI) ENDIF(SALOME_BUILD_GUI) IF(SALOME_GEOM_USE_VTK) - LIST(APPEND _${PROJECT_NAME}_exposed_targets + LIST(APPEND _${PROJECT_NAME}_exposed_targets OCC2VTK VTKPluginEngine SalomeIDLVTKPlugin @@ -271,7 +271,7 @@ IF(SALOME_GEOM_USE_VTK) ENDIF(SALOME_GEOM_USE_VTK) IF(SALOME_GEOM_USE_OPENCV) - LIST(APPEND _${PROJECT_NAME}_exposed_targets + LIST(APPEND _${PROJECT_NAME}_exposed_targets GEOMShapeRec ) ENDIF(SALOME_GEOM_USE_OPENCV) @@ -294,7 +294,7 @@ SET(CONF_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/include" "${PROJECT_BINARY_DIR}/inc # Build variables that will be expanded when configuring SalomeConfig.cmake: SALOME_CONFIGURE_PREPARE(OpenCV CAS VTK) - + CONFIGURE_PACKAGE_CONFIG_FILE(${PROJECT_NAME}Config.cmake.in ${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake INSTALL_DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}" @@ -302,19 +302,19 @@ CONFIGURE_PACKAGE_CONFIG_FILE(${PROJECT_NAME}Config.cmake.in KERNEL_ROOT_DIR GUI_ROOT_DIR CAS_ROOT_DIR VTK_ROOT_DIR OPENCV_ROOT_DIR) # - in the install tree (VSR 16/08/2013: TEMPORARILY COMMENT THIS - TO REMOVE?): -# Get the relative path of the include directory so +# Get the relative path of the include directory so # we can register it in the generated configuration files: #SET(CONF_INCLUDE_DIRS "${CMAKE_INSTALL_PREFIX}/${INSTALL_INCLUDE_DIR}") -#CONFIGURE_PACKAGE_CONFIG_FILE(adm_local/cmake_files/${PROJECT_NAME}Config.cmake.in +#CONFIGURE_PACKAGE_CONFIG_FILE(adm_local/cmake_files/${PROJECT_NAME}Config.cmake.in # ${PROJECT_BINARY_DIR}/to_install/${PROJECT_NAME}Config.cmake # INSTALL_DESTINATION "${SALOME_INSTALL_CMAKE}" -# PATH_VARS CONF_INCLUDE_DIRS SALOME_INSTALL_CMAKE CMAKE_INSTALL_PREFIX +# PATH_VARS CONF_INCLUDE_DIRS SALOME_INSTALL_CMAKE CMAKE_INSTALL_PREFIX # KERNEL_ROOT_DIR GUI_ROOT_DIR CAS_ROOT_DIR VTK_ROOT_DIR OPENCV_ROOT_DIR) WRITE_BASIC_PACKAGE_VERSION_FILE(${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake VERSION ${${PROJECT_NAME_UC}_VERSION} COMPATIBILITY AnyNewerVersion) - + # Install the CMake configuration files: INSTALL(FILES "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" @@ -322,5 +322,10 @@ INSTALL(FILES DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}") # Install the export set for use with the install-tree -INSTALL(EXPORT ${PROJECT_NAME}TargetGroup DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}" +INSTALL(EXPORT ${PROJECT_NAME}TargetGroup DESTINATION "${SALOME_INSTALL_CMAKE_LOCAL}" FILE ${PROJECT_NAME}Targets.cmake) + +# Application tests +INSTALL(FILES CTestTestfileInstall.cmake + DESTINATION ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test + RENAME CTestTestfile.cmake) diff --git a/CTestTestfileInstall.cmake b/CTestTestfileInstall.cmake new file mode 100644 index 000000000..f1f002aa5 --- /dev/null +++ b/CTestTestfileInstall.cmake @@ -0,0 +1,26 @@ +# Copyright (C) 2017 CEA/DEN, EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +SET(SALOME_TEST_DRIVER "$ENV{ABSOLUTE_APPLI_PATH}/bin/salome/appliskel/salome_test_driver.py") + +SET(COMPONENT_NAME GEOM) +SET(TIMEOUT 300) + +SUBDIRS(examples) +SUBDIRS(xao) diff --git a/doc/salome/examples/CMakeLists.txt b/doc/salome/examples/CMakeLists.txt index 89e9fe23c..0cf0a7161 100644 --- a/doc/salome/examples/CMakeLists.txt +++ b/doc/salome/examples/CMakeLists.txt @@ -33,7 +33,7 @@ SALOME_INSTALL_SCRIPTS("${EXAMPLES_TESTS}" ${SALOME_INSTALL_DOC}/examples/GEOM) # Application tests -SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test) +SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/examples) INSTALL(FILES ${GOOD_TESTS} DESTINATION ${TEST_INSTALL_DIRECTORY}) INSTALL(FILES CTestTestfileInstall.cmake diff --git a/doc/salome/examples/CTestTestfileInstall.cmake b/doc/salome/examples/CTestTestfileInstall.cmake index 1661a1d3b..9ea1b156f 100644 --- a/doc/salome/examples/CTestTestfileInstall.cmake +++ b/doc/salome/examples/CTestTestfileInstall.cmake @@ -17,10 +17,6 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -SET(SALOME_TEST_DRIVER "$ENV{ABSOLUTE_APPLI_PATH}/bin/salome/appliskel/salome_test_driver.py") -SET(COMPONENT_NAME GEOM) -SET(TIMEOUT 300) - INCLUDE(tests.set) FOREACH(tfile ${GOOD_TESTS}) diff --git a/src/XAO/tests/CMakeLists.txt b/src/XAO/tests/CMakeLists.txt index 5fd9d63ef..30ee76775 100644 --- a/src/XAO/tests/CMakeLists.txt +++ b/src/XAO/tests/CMakeLists.txt @@ -65,7 +65,7 @@ INSTALL(TARGETS TestXAO DESTINATION ${SALOME_INSTALL_BINS}) # Application tests -SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test) +SET(TEST_INSTALL_DIRECTORY ${SALOME_INSTALL_SCRIPT_SCRIPTS}/test/xao) INSTALL(TARGETS TestXAO RUNTIME DESTINATION ${TEST_INSTALL_DIRECTORY}) INSTALL(FILES CTestTestfileInstall.cmake diff --git a/src/XAO/tests/CTestTestfileInstall.cmake b/src/XAO/tests/CTestTestfileInstall.cmake index 2245e173e..1014dbc95 100644 --- a/src/XAO/tests/CTestTestfileInstall.cmake +++ b/src/XAO/tests/CTestTestfileInstall.cmake @@ -17,9 +17,5 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -SET(SALOME_TEST_DRIVER "$ENV{ABSOLUTE_APPLI_PATH}/bin/salome/appliskel/salome_test_driver.py") -SET(COMPONENT_NAME GEOM) -SET(TIMEOUT 300) - ADD_TEST(GEOM_TestXAO python ${SALOME_TEST_DRIVER} ${TIMEOUT} TestXAO) -SET_TESTS_PROPERTIES(GEOM_GEOM_TestXAO PROPERTIES LABELS "${COMPONENT_NAME}") +SET_TESTS_PROPERTIES(GEOM_TestXAO PROPERTIES LABELS "${COMPONENT_NAME}")