]> SALOME platform Git repositories - tools/sat_salome.git/commitdiff
Salome HOME
update patch
authorasozinov <alexey.sozinov@opencascade.com>
Thu, 13 Apr 2023 18:45:56 +0000 (19:45 +0100)
committerasozinov <alexey.sozinov@opencascade.com>
Thu, 13 Apr 2023 20:33:13 +0000 (21:33 +0100)
products/netgen.pyconf
products/patches/netgen5.3_withOCCT770.patch [deleted file]
products/patches/netgen5.3_withOCCT770_linux.patch [new file with mode: 0644]
products/patches/netgen5.3_withOCCT770_win.patch [new file with mode: 0644]

index 5bc6c59989b396d62be8ba89eabf046c4d8636bd..4b2856f119dbee60060c0988bbf7e1bb3ec9a31f 100644 (file)
@@ -56,13 +56,13 @@ version_5_3_1_with_CAS_7_2 :
 {
     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"]
+    patches : ["netgen-5.3.1-for-SALOME-OCCT-7.2.0.patch","netgen5.3_withOCCT770_linux.patch"]
 }
 
 version_5_3_1_with_CAS_7_2_win :
 {
    compil_script :  'netgen.bat'
-   patches :  ['netgen53ForSalomeOCCT730.patch','netgen53ForWindows.patch','netgen53ForSalomeVisualStudio2017.patch','netgen5.3_withOCCT770.patch']
+   patches :  ['netgen53ForSalomeOCCT730.patch','netgen53ForWindows.patch','netgen53ForSalomeVisualStudio2017.patch','netgen5.3_withOCCT770_win.patch']
    properties :
    {
      incremental : "yes"
@@ -74,7 +74,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",'netgen5.3_withOCCT770.patch']
+    patches : [ "netgen53ForSalome.patch"]
 }
 
 version_4_9_13 :
diff --git a/products/patches/netgen5.3_withOCCT770.patch b/products/patches/netgen5.3_withOCCT770.patch
deleted file mode 100644 (file)
index 6ca244f..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-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 <occgeom.hpp>
- #include <meshing.hpp>
-+#include <Standard_Version.hxx>
- 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]));
diff --git a/products/patches/netgen5.3_withOCCT770_linux.patch b/products/patches/netgen5.3_withOCCT770_linux.patch
new file mode 100644 (file)
index 0000000..2ab39f5
--- /dev/null
@@ -0,0 +1,57 @@
+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_withOCCT770_win.patch b/products/patches/netgen5.3_withOCCT770_win.patch
new file mode 100644 (file)
index 0000000..690373e
--- /dev/null
@@ -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 = 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 = 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);