]> SALOME platform Git repositories - plugins/netgenplugin.git/commitdiff
Salome HOME
Porting To OCCT 7.7 asozinov/32536_bos
authorasozinov <alexey.sozinov@opencascade.com>
Tue, 4 Apr 2023 13:03:42 +0000 (14:03 +0100)
committerasozinov <alexey.sozinov@opencascade.com>
Tue, 4 Apr 2023 13:03:42 +0000 (14:03 +0100)
src/NETGENPlugin/NETGENPlugin_Mesher.cxx

index c689337ead8fe9791498f2063b5a71adccd928e3..99ee3d6d60765e87366b132cc6849fa12b774f0e 100644 (file)
@@ -53,6 +53,7 @@
 
 #include <utilities.h>
 
+#include <Standard_Version.hxx>
 #include <BRepAdaptor_Surface.hxx>
 #include <BRepBuilderAPI_Copy.hxx>
 #include <BRepLProp_SLProps.hxx>
@@ -874,12 +875,12 @@ void NETGENPlugin_Mesher::SetLocalSizeForChordalError( netgen::OCCGeometry& occg
       {
         Standard_Integer n1,n2,n3;
         triangulation->Triangles()(i).Get( n1,n2,n3 );
-        p [0] = triangulation->Nodes()(n1).Transformed(loc).XYZ();
-        p [1] = triangulation->Nodes()(n2).Transformed(loc).XYZ();
-        p [2] = triangulation->Nodes()(n3).Transformed(loc).XYZ();
-        uv[0] = triangulation->UVNodes()(n1).XY();
-        uv[1] = triangulation->UVNodes()(n2).XY();
-        uv[2] = triangulation->UVNodes()(n3).XY();
+        p [0] = triangulation->Node(n1).Transformed(loc).XYZ();
+        p [1] = triangulation->Node(n2).Transformed(loc).XYZ();
+        p [2] = triangulation->Node(n3).Transformed(loc).XYZ();
+        uv[0] = triangulation->UVNode(n1).XY();
+        uv[1] = triangulation->UVNode(n2).XY();
+        uv[2] = triangulation->UVNode(n3).XY();
         surfProp.SetParameters( uv[0].X(), uv[0].Y() );
         if ( !surfProp.IsCurvatureDefined() )
           break;
@@ -1037,7 +1038,14 @@ double NETGENPlugin_Mesher::GetDefaultMinSize(const TopoDS_Shape& geom,
       BRep_Tool::Triangulation ( TopoDS::Face( fExp.Current() ), loc);
     if ( triangulation.IsNull() ) continue;
     const double fTol = BRep_Tool::Tolerance( TopoDS::Face( fExp.Current() ));
-    const TColgp_Array1OfPnt&   points = triangulation->Nodes();
+#if OCC_VERSION_HEX < 0x070600
+      const TColgp_Array1OfPnt& points = triangulation->Nodes();
+#else
+       auto points = [&triangulation](Standard_Integer index) {
+      return triangulation->Node(index);
+      };
+#endif
+
     const Poly_Array1OfTriangle& trias = triangulation->Triangles();
     for ( int iT = trias.Lower(); iT <= trias.Upper(); ++iT )
     {