Salome HOME
Porting to OCCT 7.4 dev
authormnt <mnt@opencascade.com>
Tue, 19 Feb 2019 11:49:24 +0000 (14:49 +0300)
committervsr <vsr@opencascade.com>
Fri, 22 Feb 2019 13:12:08 +0000 (16:12 +0300)
src/SMESHUtils/SMESH_Delaunay.cxx
src/SMESHUtils/SMESH_Delaunay.hxx

index c62c2c01bc4d7e8cef6051d7fd903a5d982e6288..8ae5f1761a41089737828165354d6c0d61d8311c 100644 (file)
@@ -32,6 +32,8 @@
 #include <BRepAdaptor_Surface.hxx>
 #include <BRepMesh_Delaun.hxx>
 
 #include <BRepAdaptor_Surface.hxx>
 #include <BRepMesh_Delaun.hxx>
 
+#include <Basics_OCCTVersion.hxx>
+
 //================================================================================
 /*!
  * \brief Construct a Delaunay triangulation of given boundary nodes
 //================================================================================
 /*!
  * \brief Construct a Delaunay triangulation of given boundary nodes
@@ -82,7 +84,11 @@ SMESH_Delaunay::SMESH_Delaunay(const std::vector< const UVPtStructVec* > & bound
   _bndNodes.resize( nbP );
 
   // fill boundary points
   _bndNodes.resize( nbP );
 
   // fill boundary points
+#if OCC_VERSION_LARGE <= 0x07030000
   BRepMesh::Array1OfVertexOfDelaun bndVert( 1, 1 + nbP );
   BRepMesh::Array1OfVertexOfDelaun bndVert( 1, 1 + nbP );
+#else
+  IMeshData::Array1OfVertexOfDelaun bndVert( 1, 1 + nbP );
+#endif
   BRepMesh_Vertex v( 0, 0, BRepMesh_Frontier );
   for ( size_t iW = 0; iW < boundaryNodes.size(); ++iW )
   {
   BRepMesh_Vertex v( 0, 0, BRepMesh_Frontier );
   for ( size_t iW = 0; iW < boundaryNodes.size(); ++iW )
   {
@@ -218,7 +224,11 @@ const BRepMesh_Triangle* SMESH_Delaunay::FindTriangle( const gp_XY&
     gp_XY seg = uv - gc;
 
     tria->Edges( linkIDs, ori );
     gp_XY seg = uv - gc;
 
     tria->Edges( linkIDs, ori );
+#if OCC_VERSION_LARGE <= 0x07030000
     int triaID = _triaDS->IndexOf( *tria );
     int triaID = _triaDS->IndexOf( *tria );
+#else
+    int triaID = tria - & ( _triaDS->GetElement( 0 ));
+#endif
     tria = 0;
 
     for ( int i = 0; i < 3; ++i )
     tria = 0;
 
     for ( int i = 0; i < 3; ++i )
@@ -262,8 +272,13 @@ const BRepMesh_Triangle* SMESH_Delaunay::GetTriangleNear( int iBndNode )
 {
   int nodeIDs[3];
   int nbNbNodes = _bndNodes.size();
 {
   int nodeIDs[3];
   int nbNbNodes = _bndNodes.size();
+#if OCC_VERSION_LARGE <= 0x07030000
   const BRepMesh::ListOfInteger & linkIds = _triaDS->LinksConnectedTo( iBndNode + 1 );
   BRepMesh::ListOfInteger::const_iterator iLink = linkIds.cbegin();
   const BRepMesh::ListOfInteger & linkIds = _triaDS->LinksConnectedTo( iBndNode + 1 );
   BRepMesh::ListOfInteger::const_iterator iLink = linkIds.cbegin();
+#else
+  const IMeshData::ListOfInteger & linkIds = _triaDS->LinksConnectedTo( iBndNode + 1 );
+  IMeshData::ListOfInteger::const_iterator iLink = linkIds.cbegin();
+#endif
   for ( ; iLink != linkIds.cend(); ++iLink )
   {
     const BRepMesh_PairOfIndex & triaIds = _triaDS->ElementsConnectedTo( *iLink );
   for ( ; iLink != linkIds.cend(); ++iLink )
   {
     const BRepMesh_PairOfIndex & triaIds = _triaDS->ElementsConnectedTo( *iLink );
index 660b3dbba7757f31faf121d06c5ee4a7323da34e..acaa535e99a877564fa6b1b42c0f0e49e1b70683 100644 (file)
@@ -29,6 +29,7 @@
 
 #include "SMESH_TypeDefs.hxx"
 
 
 #include "SMESH_TypeDefs.hxx"
 
+#include <TopoDS_Face.hxx>
 #include <BRepMesh_DataStructureOfDelaun.hxx>
 
 /*!
 #include <BRepMesh_DataStructureOfDelaun.hxx>
 
 /*!