Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix compilation errors (OCCT-7.4.0)
[modules/smesh.git]
/
src
/
StdMeshers
/
StdMeshers_Cartesian_3D.cxx
diff --git
a/src/StdMeshers/StdMeshers_Cartesian_3D.cxx
b/src/StdMeshers/StdMeshers_Cartesian_3D.cxx
index 0b92acc5f2692f6221f48fad0fbe7c1a10e13c62..85a984c309ac5078ab5aa9c4ab15aadada50d6e2 100644
(file)
--- a/
src/StdMeshers/StdMeshers_Cartesian_3D.cxx
+++ b/
src/StdMeshers/StdMeshers_Cartesian_3D.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-201
6
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-201
9
CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-36,7
+36,6
@@
#include <utilities.h>
#include <Utils_ExceptHandlers.hxx>
#include <utilities.h>
#include <Utils_ExceptHandlers.hxx>
-#include <Basics_OCCTVersion.hxx>
#include <GEOMUtils.hxx>
#include <GEOMUtils.hxx>
@@
-92,6
+91,15
@@
//#undef WITH_TBB
#ifdef WITH_TBB
//#undef WITH_TBB
#ifdef WITH_TBB
+
+#ifdef WIN32
+// See https://docs.microsoft.com/en-gb/cpp/porting/modifying-winver-and-win32-winnt?view=vs-2019
+// Windows 10 = 0x0A00
+#define WINVER 0x0A00
+#define _WIN32_WINNT 0x0A00
+
+#endif
+
#include <tbb/parallel_for.h>
//#include <tbb/enumerable_thread_specific.h>
#endif
#include <tbb/parallel_for.h>
//#include <tbb/enumerable_thread_specific.h>
#endif
@@
-108,8
+116,8
@@
using namespace std;
*/
//=============================================================================
*/
//=============================================================================
-StdMeshers_Cartesian_3D::StdMeshers_Cartesian_3D(int hypId,
int studyId,
SMESH_Gen * gen)
- :SMESH_3D_Algo(hypId,
studyId,
gen)
+StdMeshers_Cartesian_3D::StdMeshers_Cartesian_3D(int hypId, SMESH_Gen * gen)
+ :SMESH_3D_Algo(hypId, gen)
{
_name = "Cartesian_3D";
_shapeType = (1 << TopAbs_SOLID); // 1 bit /shape type
{
_name = "Cartesian_3D";
_shapeType = (1 << TopAbs_SOLID); // 1 bit /shape type
@@
-1371,11
+1379,7
@@
namespace
}
if ( surf->IsKind( STANDARD_TYPE(Geom_BSplineSurface )) ||
surf->IsKind( STANDARD_TYPE(Geom_BezierSurface )))
}
if ( surf->IsKind( STANDARD_TYPE(Geom_BSplineSurface )) ||
surf->IsKind( STANDARD_TYPE(Geom_BezierSurface )))
-#if OCC_VERSION_MAJOR < 7
- if ( !noSafeTShapes.insert((const Standard_Transient*) _face.TShape() ).second )
-#else
if ( !noSafeTShapes.insert( _face.TShape().get() ).second )
if ( !noSafeTShapes.insert( _face.TShape().get() ).second )
-#endif
isSafe = false;
double f, l;
isSafe = false;
double f, l;
@@
-1415,11
+1419,7
@@
namespace
edgeIsSafe = false;
}
}
edgeIsSafe = false;
}
}
-#if OCC_VERSION_MAJOR < 7
- if ( !edgeIsSafe && !noSafeTShapes.insert((const Standard_Transient*) e.TShape() ).second )
-#else
if ( !edgeIsSafe && !noSafeTShapes.insert( e.TShape().get() ).second )
if ( !edgeIsSafe && !noSafeTShapes.insert( e.TShape().get() ).second )
-#endif
isSafe = false;
}
return isSafe;
isSafe = false;
}
return isSafe;
@@
-2469,7
+2469,7
@@
namespace
ip._faceIDs = e2fIt->second;
ip._shapeID = edgeID;
ip._faceIDs = e2fIt->second;
ip._shapeID = edgeID;
- // discretize the E
GD
E
+ // discretize the E
DG
E
GCPnts_UniformDeflection discret( curve, deflection, true );
if ( !discret.IsDone() || discret.NbPoints() < 2 )
continue;
GCPnts_UniformDeflection discret( curve, deflection, true );
if ( !discret.IsDone() || discret.NbPoints() < 2 )
continue;
@@
-2622,34
+2622,34
@@
namespace
{
enum { X = 1, Y = 2, Z = 4 }; // == 001, 010, 100
int nbFacets = 0;
{
enum { X = 1, Y = 2, Z = 4 }; // == 001, 010, 100
int nbFacets = 0;
- int vertex = 0, e
gd
eMask = 0;
+ int vertex = 0, e
dg
eMask = 0;
if ( Abs( _grid->_coords[0][ _i ] - ip->_uvw[0] ) < _grid->_tol ) {
facets[ nbFacets++ ] = SMESH_Block::ID_F0yz;
if ( Abs( _grid->_coords[0][ _i ] - ip->_uvw[0] ) < _grid->_tol ) {
facets[ nbFacets++ ] = SMESH_Block::ID_F0yz;
- e
gd
eMask |= X;
+ e
dg
eMask |= X;
}
else if ( Abs( _grid->_coords[0][ _i+1 ] - ip->_uvw[0] ) < _grid->_tol ) {
facets[ nbFacets++ ] = SMESH_Block::ID_F1yz;
vertex |= X;
}
else if ( Abs( _grid->_coords[0][ _i+1 ] - ip->_uvw[0] ) < _grid->_tol ) {
facets[ nbFacets++ ] = SMESH_Block::ID_F1yz;
vertex |= X;
- e
gd
eMask |= X;
+ e
dg
eMask |= X;
}
if ( Abs( _grid->_coords[1][ _j ] - ip->_uvw[1] ) < _grid->_tol ) {
facets[ nbFacets++ ] = SMESH_Block::ID_Fx0z;
}
if ( Abs( _grid->_coords[1][ _j ] - ip->_uvw[1] ) < _grid->_tol ) {
facets[ nbFacets++ ] = SMESH_Block::ID_Fx0z;
- e
gd
eMask |= Y;
+ e
dg
eMask |= Y;
}
else if ( Abs( _grid->_coords[1][ _j+1 ] - ip->_uvw[1] ) < _grid->_tol ) {
facets[ nbFacets++ ] = SMESH_Block::ID_Fx1z;
vertex |= Y;
}
else if ( Abs( _grid->_coords[1][ _j+1 ] - ip->_uvw[1] ) < _grid->_tol ) {
facets[ nbFacets++ ] = SMESH_Block::ID_Fx1z;
vertex |= Y;
- e
gd
eMask |= Y;
+ e
dg
eMask |= Y;
}
if ( Abs( _grid->_coords[2][ _k ] - ip->_uvw[2] ) < _grid->_tol ) {
facets[ nbFacets++ ] = SMESH_Block::ID_Fxy0;
}
if ( Abs( _grid->_coords[2][ _k ] - ip->_uvw[2] ) < _grid->_tol ) {
facets[ nbFacets++ ] = SMESH_Block::ID_Fxy0;
- e
gd
eMask |= Z;
+ e
dg
eMask |= Z;
}
else if ( Abs( _grid->_coords[2][ _k+1 ] - ip->_uvw[2] ) < _grid->_tol ) {
facets[ nbFacets++ ] = SMESH_Block::ID_Fxy1;
vertex |= Z;
}
else if ( Abs( _grid->_coords[2][ _k+1 ] - ip->_uvw[2] ) < _grid->_tol ) {
facets[ nbFacets++ ] = SMESH_Block::ID_Fxy1;
vertex |= Z;
- e
gd
eMask |= Z;
+ e
dg
eMask |= Z;
}
switch ( nbFacets )
}
switch ( nbFacets )
@@
-2665,7
+2665,7
@@
namespace
{ SMESH_Block::ID_Ex00, 0, SMESH_Block::ID_Ex10, 0,
SMESH_Block::ID_Ex01, 0, SMESH_Block::ID_Ex11 }
};
{ SMESH_Block::ID_Ex00, 0, SMESH_Block::ID_Ex10, 0,
SMESH_Block::ID_Ex01, 0, SMESH_Block::ID_Ex11 }
};
- switch ( e
gd
eMask ) {
+ switch ( e
dg
eMask ) {
case X | Y: sub = edge[ 0 ][ vertex ]; break;
case X | Z: sub = edge[ 1 ][ vertex ]; break;
default: sub = edge[ 2 ][ vertex ];
case X | Y: sub = edge[ 0 ][ vertex ]; break;
case X | Z: sub = edge[ 1 ][ vertex ]; break;
default: sub = edge[ 2 ][ vertex ];
@@
-3397,7
+3397,7
@@
namespace
}
//================================================================================
/*!
}
//================================================================================
/*!
- * \brief Classify a point by grid par
e
meters
+ * \brief Classify a point by grid par
a
meters
*/
bool Hexahedron::isOutParam(const double uvw[3]) const
{
*/
bool Hexahedron::isOutParam(const double uvw[3]) const
{
@@
-3597,7
+3597,7
@@
bool StdMeshers_Cartesian_3D::Compute(SMESH_Mesh & theMesh,
facesItersectors[i].Intersect();
#endif
facesItersectors[i].Intersect();
#endif
- // put inter
e
section points onto the GridLine's; this is done after intersection
+ // put intersection points onto the GridLine's; this is done after intersection
// to avoid contention of facesItersectors for writing into the same GridLine
// in case of parallel work of facesItersectors
for ( size_t i = 0; i < facesItersectors.size(); ++i )
// to avoid contention of facesItersectors for writing into the same GridLine
// in case of parallel work of facesItersectors
for ( size_t i = 0; i < facesItersectors.size(); ++i )
@@
-3628,7
+3628,7
@@
bool StdMeshers_Cartesian_3D::Compute(SMESH_Mesh & theMesh,
for ( ; solidExp.More() && volIt->more(); solidExp.Next() )
{
const SMDS_MeshElement* vol = volIt->next();
for ( ; solidExp.More() && volIt->more(); solidExp.Next() )
{
const SMDS_MeshElement* vol = volIt->next();
- sm1->RemoveElement( vol
, /*isElemDeleted=*/false
);
+ sm1->RemoveElement( vol );
meshDS->SetMeshElementOnShape( vol, solidExp.Current() );
}
}
meshDS->SetMeshElementOnShape( vol, solidExp.Current() );
}
}