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
bos #20256: [CEA 18523] Porting SMESH to int 64 bits
[modules/smesh.git]
/
src
/
SMESHUtils
/
SMESH_Offset.cxx
diff --git
a/src/SMESHUtils/SMESH_Offset.cxx
b/src/SMESHUtils/SMESH_Offset.cxx
index 4b4924b9a405e2d27287719608f0fe66b4e2fc77..6d30cf6e2b31267dfe45a21561ef3e17578c7550 100644
(file)
--- a/
src/SMESHUtils/SMESH_Offset.cxx
+++ b/
src/SMESHUtils/SMESH_Offset.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-20
19
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-20
21
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
@@
-277,7
+277,7
@@
namespace
static Standard_Integer HashCode(const CutFace& f, const Standard_Integer upper)
{
static Standard_Integer HashCode(const CutFace& f, const Standard_Integer upper)
{
- return ::HashCode(
f.myInitFace->GetID(
), upper );
+ return ::HashCode(
FromSmIdType<int>(f.myInitFace->GetID()
), upper );
}
static Standard_Boolean IsEqual(const CutFace& f1, const CutFace& f2 )
{
}
static Standard_Boolean IsEqual(const CutFace& f1, const CutFace& f2 )
{
@@
-552,7
+552,7
@@
namespace
bool getTranslatedPosition( const SMDS_MeshNode* theNewNode,
const double theOffset,
bool getTranslatedPosition( const SMDS_MeshNode* theNewNode,
const double theOffset,
- const double
theTol
,
+ const double
/*theTol*/
,
const double theSign,
const std::vector< gp_XYZ >& theFaceNormals,
SMDS_Mesh& theSrcMesh,
const double theSign,
const std::vector< gp_XYZ >& theFaceNormals,
SMDS_Mesh& theSrcMesh,
@@
-1933,8
+1933,8
@@
namespace SMESH_MeshAlgos
for ( ; cutFacesIt != myCutFaces.cend(); ++cutFacesIt )
{
const CutFace& cf = *cutFacesIt;
for ( ; cutFacesIt != myCutFaces.cend(); ++cutFacesIt )
{
const CutFace& cf = *cutFacesIt;
-
int
index = cf.myInitFace->GetID(); // index in theNew2OldFaces
- if ((
int
) theNew2OldFaces.size() <= index )
+
smIdType
index = cf.myInitFace->GetID(); // index in theNew2OldFaces
+ if ((
smIdType
) theNew2OldFaces.size() <= index )
theNew2OldFaces.resize( index + 1 );
theNew2OldFaces[ index ] = std::make_pair( cf.myInitFace, index );
}
theNew2OldFaces.resize( index + 1 );
theNew2OldFaces[ index ] = std::make_pair( cf.myInitFace, index );
}
@@
-2004,7
+2004,7
@@
namespace SMESH_MeshAlgos
// erase loops that are cut off by face intersections
cf.CutOffLoops( loopSet, theSign, myNormals, cutOffLinks, cutOffCoplanarLinks );
// erase loops that are cut off by face intersections
cf.CutOffLoops( loopSet, theSign, myNormals, cutOffLinks, cutOffCoplanarLinks );
-
int
index = cf.myInitFace->GetID(); // index in theNew2OldFaces
+
smIdType
index = cf.myInitFace->GetID(); // index in theNew2OldFaces
const SMDS_MeshElement* tria;
for ( size_t iL = 0; iL < loopSet.myNbLoops; ++iL )
const SMDS_MeshElement* tria;
for ( size_t iL = 0; iL < loopSet.myNbLoops; ++iL )
@@
-2022,6
+2022,8
@@
namespace SMESH_MeshAlgos
#ifdef _DEBUG_
std::cerr << "BAD tria" << std::endl;
cf.Dump();
#ifdef _DEBUG_
std::cerr << "BAD tria" << std::endl;
cf.Dump();
+#else
+ if ( i < 0 ) cf.Dump(); // avoid "CutFace::Dump() unused in release mode"
#endif
continue;
}
#endif
continue;
}
@@
-2092,7
+2094,7
@@
namespace SMESH_MeshAlgos
continue;
for ( size_t iF = 0; iF < faces.size(); ++iF )
{
continue;
for ( size_t iF = 0; iF < faces.size(); ++iF )
{
-
int
index = faces[iF]->GetID();
+
smIdType
index = faces[iF]->GetID();
// if ( //faces[iF]->isMarked() || // kept part of cutFace
// !theNew2OldFaces[ index ].first ) // already removed
// continue;
// if ( //faces[iF]->isMarked() || // kept part of cutFace
// !theNew2OldFaces[ index ].first ) // already removed
// continue;
@@
-2124,7
+2126,7
@@
namespace SMESH_MeshAlgos
if ( cf.myInitFace->IsNull() )
continue;
if ( cf.myInitFace->IsNull() )
continue;
-
int
index = cf.myInitFace->GetID(); // index in theNew2OldFaces
+
smIdType
index = cf.myInitFace->GetID(); // index in theNew2OldFaces
if ( !theNew2OldFaces[ index ].first )
continue; // already cut off
if ( !theNew2OldFaces[ index ].first )
continue; // already cut off
@@
-2497,7
+2499,7
@@
namespace
*/
//================================================================================
*/
//================================================================================
- void CutFace::AddPoint( const CutLink& p1, const CutLink& p2, double
tol
) const
+ void CutFace::AddPoint( const CutLink& p1, const CutLink& p2, double
/*tol*/
) const
{
if ( myInitFace->GetNodeIndex( p1.IntNode() ) >= 0 ||
myInitFace->GetNodeIndex( p2.IntNode() ) >= 0 )
{
if ( myInitFace->GetNodeIndex( p1.IntNode() ) >= 0 ||
myInitFace->GetNodeIndex( p2.IntNode() ) >= 0 )
@@
-2756,7
+2758,7
@@
namespace
// add links connecting internal loops with the boundary ones
// find a pair of closest nodes
// add links connecting internal loops with the boundary ones
// find a pair of closest nodes
- const SMDS_MeshNode *closestNode1
, *closestNode2
;
+ const SMDS_MeshNode *closestNode1
= 0, *closestNode2 = 0
;
double minDist = 1e100;
for ( size_t iE = 0; iE < loop.myLinks.size(); ++iE )
{
double minDist = 1e100;
for ( size_t iE = 0; iE < loop.myLinks.size(); ++iE )
{
@@
-2918,7
+2920,7
@@
namespace
const double theSign,
const std::vector< gp_XYZ >& theNormals,
std::vector< EdgePart >& theCutOffLinks,
const double theSign,
const std::vector< gp_XYZ >& theNormals,
std::vector< EdgePart >& theCutOffLinks,
- TLinkMap&
theCutOffCoplanarLinks
) const
+ TLinkMap&
/*theCutOffCoplanarLinks*/
) const
{
EdgePart sideEdge;
boost::container::flat_set< const SMDS_MeshElement* > checkedCoplanar;
{
EdgePart sideEdge;
boost::container::flat_set< const SMDS_MeshElement* > checkedCoplanar;
@@
-3224,7
+3226,7
@@
SMDS_Mesh* SMESH_MeshAlgos::MakeOffset( SMDS_ElemIteratorPtr theFaceIt,
for ( SMDS_ElemIteratorPtr fIt = newNode->GetInverseElementIterator(); fIt->more(); )
{
const SMDS_MeshElement* newFace = fIt->next();
for ( SMDS_ElemIteratorPtr fIt = newNode->GetInverseElementIterator(); fIt->more(); )
{
const SMDS_MeshElement* newFace = fIt->next();
- const
int
faceIndex = newFace->GetID();
+ const
smIdType
faceIndex = newFace->GetID();
const gp_XYZ& oldNorm = normals[ faceIndex ];
const gp_XYZ newXYZ = oldXYZ + oldNorm * theOffset;
if ( multiPos.empty() )
const gp_XYZ& oldNorm = normals[ faceIndex ];
const gp_XYZ newXYZ = oldXYZ + oldNorm * theOffset;
if ( multiPos.empty() )
@@
-3273,7
+3275,7
@@
SMDS_Mesh* SMESH_MeshAlgos::MakeOffset( SMDS_ElemIteratorPtr theFaceIt,
for ( SMDS_ElemIteratorPtr fIt = newNode->GetInverseElementIterator(); fIt->more(); )
{
const SMDS_MeshElement* newFace = fIt->next();
for ( SMDS_ElemIteratorPtr fIt = newNode->GetInverseElementIterator(); fIt->more(); )
{
const SMDS_MeshElement* newFace = fIt->next();
- const
int
faceIndex = newFace->GetID();
+ const
smIdType
faceIndex = newFace->GetID();
const gp_XYZ& oldNorm = normals[ faceIndex ];
if ( !SMESH_MeshAlgos::FaceNormal( newFace, faceNorm, /*normalize=*/false ) ||
//faceNorm * moveVec < 0 )
const gp_XYZ& oldNorm = normals[ faceIndex ];
if ( !SMESH_MeshAlgos::FaceNormal( newFace, faceNorm, /*normalize=*/false ) ||
//faceNorm * moveVec < 0 )