From: asozinov Date: Thu, 13 Apr 2023 14:37:08 +0000 (+0100) Subject: Porting netgen 5.3 to OCCT 770 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e585b0da4faf98d4401eff2e82e1f5964e3d9305;p=tools%2Fsat_salome.git Porting netgen 5.3 to OCCT 770 --- diff --git a/products/netgen.pyconf b/products/netgen.pyconf index 05e01d1..a9535f3 100644 --- a/products/netgen.pyconf +++ b/products/netgen.pyconf @@ -24,6 +24,25 @@ default_win: depend : ['CAS','zlib','tcltk'] } +version_6_2_2204 : +{ + build_source : "cmake" + cmake_options : " -DUSE_GUI=OFF -DUSE_PYTHON=OFF -DUSE_MPI=OFF -DUSE_OCC=ON -DUSE_INTERNAL_TCL=OFF -DBUILD_STUB_FILES=OFF -DOCC_INCLUDE_DIR=$CAS_ROOT_DIR/include/opencascade -DOCC_LIBRARY_DIR=$CAS_ROOT_DIR/lib -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_CXX_STANDARD=17 -DUSE_NATIVE_ARCH=OFF " + patches : ['netgen-6.2.2204-for-SALOME.patch', 'netgen-6.2.2204-for-SALOME-OCC_find.patch'] +} + +version_6_2_2204_win : +{ + build_source : "cmake" + cmake_options : " -DUSE_GUI=OFF -DUSE_PYTHON=OFF -DUSE_MPI=OFF -DUSE_OCC=ON -DOCC_INCLUDE_DIR=D:/S/SALOME/W64/CAS/inc -DOCC_LIBRARY_DIR=D:/S/SALOME/W64/CAS/win64/vc14/lib -DUSE_INTERNAL_TCL=OFF -DBUILD_STUB_FILES=OFF -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_CXX_STANDARD=17 -DUSE_NATIVE_ARCH=OFF " + patches : ['netgen-6.2.2204-for-SALOME_windows.patch', 'netgen-6.2.2204-for-SALOME-OCC_find.patch'] + properties : + { + incremental : "yes" + single_install_dir : "yes" + } +} + version_6_2_2101 : { build_source : "cmake" @@ -62,7 +81,7 @@ version_5_3_1_with_CAS_7_2 : version_5_3_1_with_CAS_7_2_win : { compil_script : 'netgen.bat' - patches : ['netgen53ForSalomeOCCT730.patch','netgen53ForWindows.patch','netgen53ForSalomeVisualStudio2017.patch'] + patches : ['netgen53ForSalomeOCCT730.patch','netgen53ForWindows.patch','netgen53ForSalomeVisualStudio2017.patch','netgen5.3_withOCCT770.patch'] properties : { incremental : "yes" @@ -74,7 +93,7 @@ version_5_3_1 : { compil_script : "netgen_5_3_1.sh" archive_info: {archive_name : "netgen-5.3.1.tar.gz"} - patches : [ "netgen53ForSalome.patch"] + patches : [ "netgen53ForSalome.patch",'netgen5.3_withOCCT770.patch'] } version_4_9_13 : diff --git a/products/patches/netgen5.3_withOCCT770.patch b/products/patches/netgen5.3_withOCCT770.patch new file mode 100644 index 0000000..6ca244f --- /dev/null +++ b/products/patches/netgen5.3_withOCCT770.patch @@ -0,0 +1,36 @@ +diff --git "a/libsrc/occ/occgenmesh.cpp" "b/libsrc/occ/occgenmesh.cpp" +index 1e0127f..a385c87 100644 +--- "a/libsrc/occ/occgenmesh.cpp" ++++ "b/libsrc/occ/occgenmesh.cpp" +@@ -4,6 +4,7 @@ + #include + #include + ++#include + + namespace netgen + { +@@ -1240,13 +1241,18 @@ namespace netgen + gp_Pnt p[3]; + gp_Pnt2d par[3]; + +- for (int k = 1; k <=3; k++) ++ 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); ++#if OCC_VERSION_MAJOR >= 7 && OCC_VERSION_MINOR > 5 ++ int n = triangulation->Triangle(j)(k); ++ p[k - 1] = triangulation->Node(n).Transformed(loc); ++ par[k - 1] = triangulation->UVNode(n); ++#else ++ int n = triangulation->Triangles()(j)(k); ++ p[k - 1] = triangulation->Nodes()(n).Transformed(loc); ++ par[k - 1] = triangulation->UVNodes()(n); ++#endif + } +- + //double maxside = 0; + //maxside = max (maxside, p[0].Distance(p[1])); + //maxside = max (maxside, p[0].Distance(p[2]));