From 0758e23d2dcb8712db2e096a2c69aa38bd3a21f0 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 | 4 +- products/gmsh.pyconf | 8 +++ products/netgen.pyconf | 18 +++++ products/patches/gmsh-4.10.3-occt780.patch | 22 ++++++ .../patches/netgen5.3_withOCCT780_linux.patch | 70 +++++++++++++++++++ .../patches/netgen5.3_withOCCT780_win.patch | 61 ++++++++++++++++ 6 files changed, 181 insertions(+), 2 deletions(-) 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 c39c73e..cd29a0f 100644 --- a/applications/SALOME-master-native.pyconf +++ b/applications/SALOME-master-native.pyconf @@ -61,7 +61,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 +79,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' diff --git a/products/gmsh.pyconf b/products/gmsh.pyconf index 8b18cdc..9614ac7 100644 --- a/products/gmsh.pyconf +++ b/products/gmsh.pyconf @@ -31,6 +31,14 @@ 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: { compil_script : "gmsh-4.10.3.sh" diff --git a/products/netgen.pyconf b/products/netgen.pyconf index 05e01d1..7d567ac 100644 --- a/products/netgen.pyconf +++ b/products/netgen.pyconf @@ -52,6 +52,24 @@ 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 : +{ + 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.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..ad10387 --- /dev/null +++ b/products/patches/netgen5.3_withOCCT780_win.patch @@ -0,0 +1,61 @@ + libsrc/occ/occgenmesh.cpp | 6 +++--- + libsrc/occ/vsocc.cpp | 10 +++++----- + 2 files changed, 8 insertions(+), 8 deletions(-) + +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