From a4e305b4811eb118c70ef6d889d2215834f555f7 Mon Sep 17 00:00:00 2001 From: jfa Date: Wed, 31 Jan 2024 16:07:21 +0000 Subject: [PATCH] Porting to OCCT 7.8.0 --- applications/SALOME-master-native.pyconf | 38 +++++----- applications/SALOME-master-windows.pyconf | 34 ++++----- products/gmsh.pyconf | 16 +++++ products/netgen.pyconf | 19 +++++ .../patches/gmsh-4.10.3-occt780-win.patch | 22 ++++++ products/patches/gmsh-4.10.3-occt780.patch | 22 ++++++ .../patches/netgen5.3_withOCCT780_linux.patch | 70 +++++++++++++++++++ .../patches/netgen5.3_withOCCT780_win.patch | 70 +++++++++++++++++++ 8 files changed, 256 insertions(+), 35 deletions(-) create mode 100644 products/patches/gmsh-4.10.3-occt780-win.patch create mode 100644 products/patches/gmsh-4.10.3-occt780.patch create mode 100644 products/patches/netgen5.3_withOCCT780_linux.patch create mode 100644 products/patches/netgen5.3_withOCCT780_win.patch diff --git a/applications/SALOME-master-native.pyconf b/applications/SALOME-master-native.pyconf index 001a1b3..4a1fe99 100644 --- a/applications/SALOME-master-native.pyconf +++ b/applications/SALOME-master-native.pyconf @@ -4,8 +4,9 @@ APPLICATION : { name : 'SALOME-master-native' - workdir : $LOCAL.workdir + $VARS.sep + $APPLICATION.name + '-' + $VARS.dist - tag : 'master' + #workdir : $LOCAL.workdir + $VARS.sep + $APPLICATION.name + '-' + $VARS.dist + workdir : $LOCAL.workdir + tag : 'jfa/Porting_OCCT_780' dev : 'no' verbose :'no' debug : 'no' @@ -38,7 +39,8 @@ APPLICATION : alabaster : 'native' Babel : 'native' boost : 'native' - CAS : {tag : 'V7_5_3p5', section: 'version_CR753_SALOME_PATCH', base: 'no'} + #CAS : {tag : 'V7_5_3p5', section: 'version_CR753_SALOME_PATCH', base: 'no'} + CAS : {tag : 'CR780-SALOME-PATCH'} catalyst: '2.0' C3PO: 'v2.3' certifi : 'native' @@ -61,7 +63,7 @@ APPLICATION : freetype : 'native' gl2ps : 'native' gdal : 'native' - gmsh : '4.10.3' + gmsh : '4.10.3_with_CAS_7.8' graphviz : 'native' hdf5 : '1.10.3' idna : 'native' @@ -79,7 +81,7 @@ APPLICATION : MeshGems : '2.15-1' metis : 'native' mpi4py: 'native' - netgen : '5.3.1_with_CAS_7.2' + netgen : '5.3.1_with_CAS_7.8' # comment out line above and uncomment the line below to use Netgen 6. #netgen : '6.2.2101' netcdf : 'native' @@ -140,30 +142,30 @@ APPLICATION : # SALOME MODULES : 'CONFIGURATION' 'SALOME' - 'SHAPER' - 'SHAPERSTUDY' + 'SHAPER' : {tag:'cce/jfa_Porting_OCCT_780_MasterRebased'} + 'SHAPERSTUDY' : {tag: 'master'} 'RESTRICTED' 'LIBBATCH' : 'V2_5_0' 'KERNEL' 'MEDCOUPLING' : {tag:'master', base: 'no', section: 'default_MPI', hpc: 'yes'} 'GUI' 'GEOM' - 'SMESH' - 'NETGENPLUGIN' + 'SMESH' : {tag:'cce/jfa_Porting_OCCT_780_MasterRebased'} + 'NETGENPLUGIN': {tag:'cce/jfa_Porting_OCCT_780_MasterRebased'} 'BLSURFPLUGIN' - 'GHS3DPLUGIN' - 'HYBRIDPLUGIN' - 'HexoticPLUGIN' - 'GMSHPLUGIN' - 'HEXABLOCK' - 'HEXABLOCKPLUGIN' - 'HOMARD' + 'GHS3DPLUGIN' : {tag:'master'} + 'HYBRIDPLUGIN' : {tag: 'master'} + 'HexoticPLUGIN' : {tag: 'master'} + 'GMSHPLUGIN' : {tag: 'master'} + 'HEXABLOCK' : {tag: 'master'} + 'HEXABLOCKPLUGIN' : {tag: 'master'} + 'HOMARD' : {tag: 'master'} 'FIELDS' 'PARAVIS': {tag:'master', base: 'no', section: 'default_MPI', hpc: 'yes'} 'JOBMANAGER' 'YACS' 'YACSGEN' - 'DOCUMENTATION' + 'DOCUMENTATION' : {tag: 'master'} 'SAMPLES' 'COMPONENT' 'PYCALCULATOR' @@ -175,7 +177,7 @@ APPLICATION : 'PY2CPP' 'ADAO' 'ADAO_INTERFACE' - 'PARAVISADDONS' + 'PARAVISADDONS' : {tag: 'master'} 'OPENTURNS_SALOME' 'YDEFX' 'pmml' diff --git a/applications/SALOME-master-windows.pyconf b/applications/SALOME-master-windows.pyconf index 64bfd01..75b977e 100644 --- a/applications/SALOME-master-windows.pyconf +++ b/applications/SALOME-master-windows.pyconf @@ -42,7 +42,7 @@ APPLICATION : alabaster : '0.7.16' Babel : '2.7.0' boost : '1.67.0' - CAS : {tag : 'V7_5_3p5', section: 'version_CR753_SALOME_PATCH_win', base: 'no'} + CAS : 'CR780-SALOME-PATCH' certifi : '2019.6.16' cgns : '4.2.0' chardet : '3.0.4' @@ -65,7 +65,7 @@ APPLICATION : FMILibrary : '2.0.3' freeimage : '3.18.0' freetype : '2.9.1' - gmsh : '4.10.3' + gmsh : '4.10.3_with_CAS_7.8' graphviz : '2.44.1' hdf5 : '1.10.3' idna : '2.8' @@ -85,7 +85,7 @@ APPLICATION : MeshGems : '2.15-1' metis : '5.1.0' msvc : '2017' - netgen : '5.3.1_with_CAS_7.2' + netgen : '5.3.1_with_CAS_7.8' # comment out line above and uncomment the line below to use Netgen 6. #netgen : '6.2.2101' nlopt : '2.5.0' @@ -145,19 +145,19 @@ APPLICATION : zlib : '1.2.5' # SALOME MODULES : - 'CONFIGURATION' + 'CONFIGURATION' : 'jfa/Porting_OCCT_780' 'SALOME' - 'SHAPER' + 'SHAPER' : 'jfa/Porting_OCCT_780' 'SHAPERSTUDY' 'RESTRICTED' - 'LIBBATCH' : 'V2_5_0' - 'KERNEL' - 'MEDCOUPLING' - 'GUI' - 'GEOM' : 'bos/41189_py39' - 'SMESH' - 'NETGENPLUGIN' - 'BLSURFPLUGIN' + 'LIBBATCH' : {tag :'V2_5_0'} + 'KERNEL' : 'jfa/Porting_OCCT_780' + 'MEDCOUPLING' : 'master' + 'GUI' : 'jfa/Porting_OCCT_780' + 'GEOM' : 'jfa/Porting_OCCT_780' + 'SMESH' : 'jfa/Porting_OCCT_780' + 'NETGENPLUGIN' : 'jfa/Porting_OCCT_780' + 'BLSURFPLUGIN' : 'jfa/Porting_OCCT_780' 'GHS3DPLUGIN' 'HYBRIDPLUGIN' 'HexoticPLUGIN' @@ -166,13 +166,13 @@ APPLICATION : 'HEXABLOCKPLUGIN' #'HOMARD' 'FIELDS' - 'PARAVIS' + 'PARAVIS' : 'jfa/Porting_OCCT_780' 'JOBMANAGER' 'YACS' 'YACSGEN' 'DOCUMENTATION' 'SALOMEBOOTSTRAP' - 'SAMPLES' + 'SAMPLES' : 'jfa/Porting_OCCT_770' 'COMPONENT' 'PYCALCULATOR' 'CALCULATOR' @@ -186,8 +186,8 @@ APPLICATION : 'OPENTURNS_SALOME' 'YDEFX' 'pmml' - #'TESTBASE' - 'CEATESTBASE' : 'SalomeV9' + 'TESTBASE' : 'jfa/Porting_OCCT_770_1' + #'CEATESTBASE' : 'SalomeV9' } profile : { diff --git a/products/gmsh.pyconf b/products/gmsh.pyconf index 8b18cdc..847bbb9 100644 --- a/products/gmsh.pyconf +++ b/products/gmsh.pyconf @@ -31,6 +31,22 @@ default_win: } } +version_4_10_3_with_CAS_7_8: +{ + archive_info : {archive_name : "gmsh-4.10.3.tar.gz"} + compil_script : "gmsh-4.10.3.sh" + depend : ["CAS","lapack","hdf5","medfile", "cgns"] + patches : ['gmsh-4.10.3-occt780.patch'] +} + +version_4_10_3_with_CAS_7_8_win: +{ + archive_info : {archive_name : "gmsh-4.10.3.tar.gz"} + compil_script : "gmsh-4.10.3.bat" + depend : ["CAS","lapack","hdf5","medfile", "cgns"] + patches : ['gmsh-4.10.3-occt780-win.patch'] +} + version_4_10_3: { compil_script : "gmsh-4.10.3.sh" diff --git a/products/netgen.pyconf b/products/netgen.pyconf index 05e01d1..da1c679 100644 --- a/products/netgen.pyconf +++ b/products/netgen.pyconf @@ -52,6 +52,25 @@ version_6_2_2101_win : } } +version_5_3_1_with_CAS_7_8 : +{ + archive_info : {archive_name : "netgen-5.3.1.tar.gz"} + compil_script : 'netgen_5_3_1' + $VARS.scriptExtension + patches : ["netgen-5.3.1-for-SALOME-OCCT-7.2.0.patch","netgen5.3_withOCCT780_linux.patch"] +} + +version_5_3_1_with_CAS_7_8_win : +{ + archive_info : {archive_name : "netgen-5.3.1.tar.gz"} + compil_script : 'netgen.bat' + patches : ['netgen53ForSalomeOCCT730.patch','netgen53ForWindows.patch','netgen53ForSalomeVisualStudio2017.patch','netgen5.3_withOCCT780_win.patch'] + properties : + { + incremental : "yes" + single_install_dir : "yes" + } +} + version_5_3_1_with_CAS_7_2 : { archive_info : {archive_name : "netgen-5.3.1.tar.gz"} diff --git a/products/patches/gmsh-4.10.3-occt780-win.patch b/products/patches/gmsh-4.10.3-occt780-win.patch new file mode 100644 index 0000000..ea95587 --- /dev/null +++ b/products/patches/gmsh-4.10.3-occt780-win.patch @@ -0,0 +1,22 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8f99dfe..8955a1f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1264,7 +1264,7 @@ if(ENABLE_OCC) + elseif(OCC_INC) + set(OCC_LIBS_REQUIRED + # subset of DataExchange +- TKSTEP TKSTEP209 TKSTEPAttr TKSTEPBase TKIGES TKXSBase ++ TKDESTEP TKDEIGES TKXSBase + # ModelingAlgorithms + TKOffset TKFeat TKFillet TKBool TKMesh TKHLR TKBO TKPrim TKShHealing + TKTopAlgo TKGeomAlgo +@@ -1304,7 +1304,7 @@ if(ENABLE_OCC) + find_package(Freetype) + if(FREETYPE_FOUND) + set(OCC_CAF_LIBS_REQUIRED +- TKXDESTEP TKXDEIGES TKXCAF TKLCAF TKVCAF TKCAF TKV3d TKService TKCDF) ++ TKXCAF TKLCAF TKVCAF TKCAF TKV3d TKService TKCDF) + list(LENGTH OCC_CAF_LIBS_REQUIRED NUM_OCC_CAF_LIBS_REQUIRED) + set(OCC_CAF_LIBS) + foreach(OCC ${OCC_CAF_LIBS_REQUIRED}) diff --git a/products/patches/gmsh-4.10.3-occt780.patch b/products/patches/gmsh-4.10.3-occt780.patch new file mode 100644 index 0000000..ea95587 --- /dev/null +++ b/products/patches/gmsh-4.10.3-occt780.patch @@ -0,0 +1,22 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8f99dfe..8955a1f 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1264,7 +1264,7 @@ if(ENABLE_OCC) + elseif(OCC_INC) + set(OCC_LIBS_REQUIRED + # subset of DataExchange +- TKSTEP TKSTEP209 TKSTEPAttr TKSTEPBase TKIGES TKXSBase ++ TKDESTEP TKDEIGES TKXSBase + # ModelingAlgorithms + TKOffset TKFeat TKFillet TKBool TKMesh TKHLR TKBO TKPrim TKShHealing + TKTopAlgo TKGeomAlgo +@@ -1304,7 +1304,7 @@ if(ENABLE_OCC) + find_package(Freetype) + if(FREETYPE_FOUND) + set(OCC_CAF_LIBS_REQUIRED +- TKXDESTEP TKXDEIGES TKXCAF TKLCAF TKVCAF TKCAF TKV3d TKService TKCDF) ++ TKXCAF TKLCAF TKVCAF TKCAF TKV3d TKService TKCDF) + list(LENGTH OCC_CAF_LIBS_REQUIRED NUM_OCC_CAF_LIBS_REQUIRED) + set(OCC_CAF_LIBS) + foreach(OCC ${OCC_CAF_LIBS_REQUIRED}) diff --git a/products/patches/netgen5.3_withOCCT780_linux.patch b/products/patches/netgen5.3_withOCCT780_linux.patch new file mode 100644 index 0000000..001981e --- /dev/null +++ b/products/patches/netgen5.3_withOCCT780_linux.patch @@ -0,0 +1,70 @@ +diff --git a/configure.ac b/configure.ac +index 6db9de0..1c597c9 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -43,7 +43,7 @@ AC_ARG_WITH([occ], + if test a$occon = atrue ; then + + AC_SUBST([OCCFLAGS], ["-DOCCGEOMETRY -I$occdir/include/opencascade"]) +- AC_SUBST([OCCLIBS], ["-L$occdir/lib -lTKernel -lTKGeomBase -lTKMath -lTKG2d -lTKG3d -lTKXSBase -lTKOffset -lTKFillet -lTKShHealing -lTKMesh -lTKMeshVS -lTKTopAlgo -lTKGeomAlgo -lTKBool -lTKPrim -lTKBO -lTKIGES -lTKBRep -lTKSTEPBase -lTKSTEP -lTKSTL -lTKSTEPAttr -lTKSTEP209 -lTKXDESTEP -lTKXDEIGES -lTKXCAF -lTKLCAF"]) ++ AC_SUBST([OCCLIBS], ["-L$occdir/lib -lTKernel -lTKGeomBase -lTKMath -lTKG2d -lTKG3d -lTKXSBase -lTKOffset -lTKFillet -lTKShHealing -lTKMesh -lTKMeshVS -lTKTopAlgo -lTKGeomAlgo -lTKBool -lTKPrim -lTKBO -lTKBRep -lTKXCAF -lTKLCAF -lTKDEIGES -lTKDESTEP -lTKDESTL"]) + + # -lTKDCAF + +diff --git a/libsrc/occ/occgenmesh.cpp b/libsrc/occ/occgenmesh.cpp +index 5026536..8074ca6 100644 +--- a/libsrc/occ/occgenmesh.cpp ++++ b/libsrc/occ/occgenmesh.cpp +@@ -1242,9 +1242,9 @@ namespace netgen + + for (int k = 1; k <=3; k++) + { +- int n = triangulation->Triangles()(j)(k); +- p[k-1] = triangulation->Nodes()(n).Transformed(loc); +- par[k-1] = triangulation->UVNodes()(n); ++ int n = triangulation->Triangle(j)(k); ++ p[k - 1] = triangulation->Node(n).Transformed(loc); ++ par[k - 1] = triangulation->UVNode(n); + } + + //double maxside = 0; +diff --git a/libsrc/occ/vsocc.cpp b/libsrc/occ/vsocc.cpp +index 4d80600..74a85ae 100644 +--- a/libsrc/occ/vsocc.cpp ++++ b/libsrc/occ/vsocc.cpp +@@ -463,7 +463,7 @@ namespace netgen + glBegin (GL_LINE_STRIP); + for (int j = 1; j <= nbnodes; j++) + { +- gp_Pnt p = (T -> Nodes())(aEdgePoly->Nodes()(j)).Transformed(aEdgeLoc); ++ gp_Pnt p = T -> Node(aEdgePoly->Nodes()(j)).Transformed(aEdgeLoc); + glVertex3f (p.X(), p.Y(), p.Z()); + } + glEnd (); +@@ -510,7 +510,7 @@ namespace netgen + glBegin (GL_LINE_STRIP); + for (int j = 1; j <= nbnodes; j++) + { +- gp_Pnt p = (T -> Nodes())(aEdgePoly->Nodes()(j)).Transformed(aEdgeLoc); ++ gp_Pnt p = T -> Node(aEdgePoly->Nodes()(j)).Transformed(aEdgeLoc); + glVertex3f (p.X(), p.Y(), p.Z()); + } + glEnd (); +@@ -586,14 +586,14 @@ namespace netgen + int ntriangles = triangulation -> NbTriangles(); + for (int j = 1; j <= ntriangles; j++) + { +- Poly_Triangle triangle = (triangulation -> Triangles())(j); ++ Poly_Triangle triangle = triangulation -> Triangle(j); + gp_Pnt p[3]; + for (int k = 1; k <= 3; k++) +- p[k-1] = (triangulation -> Nodes())(triangle(k)).Transformed(loc); ++ p[k-1] = triangulation -> Node(triangle(k)).Transformed(loc); + + for (int k = 1; k <= 3; k++) + { +- uv = (triangulation -> UVNodes())(triangle(k)); ++ uv = triangulation -> UVNode(triangle(k)); + prop.SetParameters (uv.X(), uv.Y()); + + // surf->D0 (uv.X(), uv.Y(), pnt); diff --git a/products/patches/netgen5.3_withOCCT780_win.patch b/products/patches/netgen5.3_withOCCT780_win.patch new file mode 100644 index 0000000..86d094c --- /dev/null +++ b/products/patches/netgen5.3_withOCCT780_win.patch @@ -0,0 +1,70 @@ +diff --git a/configure.ac b/configure.ac +index 6db9de0..1c597c9 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -43,7 +43,7 @@ AC_ARG_WITH([occ], + if test a$occon = atrue ; then + + AC_SUBST([OCCFLAGS], ["-DOCCGEOMETRY -I$occdir/include/opencascade"]) +- AC_SUBST([OCCLIBS], ["-L$occdir/lib -lTKernel -lTKGeomBase -lTKMath -lTKG2d -lTKG3d -lTKXSBase -lTKOffset -lTKFillet -lTKShHealing -lTKMesh -lTKMeshVS -lTKTopAlgo -lTKGeomAlgo -lTKBool -lTKPrim -lTKBO -lTKIGES -lTKBRep -lTKSTEPBase -lTKSTEP -lTKSTL -lTKSTEPAttr -lTKSTEP209 -lTKXDESTEP -lTKXDEIGES -lTKXCAF -lTKLCAF"]) ++ AC_SUBST([OCCLIBS], ["-L$occdir/lib -lTKernel -lTKGeomBase -lTKMath -lTKG2d -lTKG3d -lTKXSBase -lTKOffset -lTKFillet -lTKShHealing -lTKMesh -lTKMeshVS -lTKTopAlgo -lTKGeomAlgo -lTKBool -lTKPrim -lTKBO -lTKBRep -lTKXCAF -lTKLCAF -lTKDEIGES -lTKDESTEP -lTKDESTL"]) + + # -lTKDCAF + +diff --git a/libsrc/occ/occgenmesh.cpp b/libsrc/occ/occgenmesh.cpp +index 1e0127f..d9b4e6f 100644 +--- a/libsrc/occ/occgenmesh.cpp ++++ b/libsrc/occ/occgenmesh.cpp +@@ -1242,9 +1242,9 @@ namespace netgen + + for (int k = 1; k <=3; k++) + { +- int n = triangulation->Triangles()(j)(k); +- p[k-1] = triangulation->Nodes()(n).Transformed(loc); +- par[k-1] = triangulation->UVNodes()(n); ++ int n = triangulation->Triangle(j)(k); ++ p[k - 1] = triangulation->Node(n).Transformed(loc); ++ par[k - 1] = triangulation->UVNode(n); + } + + //double maxside = 0; +diff --git a/libsrc/occ/vsocc.cpp b/libsrc/occ/vsocc.cpp +index 4d80600..0070b56 100644 +--- a/libsrc/occ/vsocc.cpp ++++ b/libsrc/occ/vsocc.cpp +@@ -463,7 +463,7 @@ namespace netgen + glBegin (GL_LINE_STRIP); + for (int j = 1; j <= nbnodes; j++) + { +- gp_Pnt p = (T -> Nodes())(aEdgePoly->Nodes()(j)).Transformed(aEdgeLoc); ++ gp_Pnt p = T->Node(aEdgePoly->Nodes()(j)).Transformed(aEdgeLoc); + glVertex3f (p.X(), p.Y(), p.Z()); + } + glEnd (); +@@ -510,7 +510,7 @@ namespace netgen + glBegin (GL_LINE_STRIP); + for (int j = 1; j <= nbnodes; j++) + { +- gp_Pnt p = (T -> Nodes())(aEdgePoly->Nodes()(j)).Transformed(aEdgeLoc); ++ gp_Pnt p = T->Node(aEdgePoly->Nodes()(j)).Transformed(aEdgeLoc); + glVertex3f (p.X(), p.Y(), p.Z()); + } + glEnd (); +@@ -586,14 +586,14 @@ namespace netgen + int ntriangles = triangulation -> NbTriangles(); + for (int j = 1; j <= ntriangles; j++) + { +- Poly_Triangle triangle = (triangulation -> Triangles())(j); ++ Poly_Triangle triangle = triangulation->Triangles(j); + gp_Pnt p[3]; + for (int k = 1; k <= 3; k++) +- p[k-1] = (triangulation -> Nodes())(triangle(k)).Transformed(loc); ++ p[k-1] = triangulation -> Nodes(triangle(k)).Transformed(loc); + + for (int k = 1; k <= 3; k++) + { +- uv = (triangulation -> UVNodes())(triangle(k)); ++ uv = triangulation -> UVNodes(triangle(k)); + prop.SetParameters (uv.X(), uv.Y()); + + // surf->D0 (uv.X(), uv.Y(), pnt); -- 2.39.2