]> SALOME platform Git repositories - plugins/blsurfplugin.git/commitdiff
Salome HOME
fix for 64bit mode
authorViktor UZLOV <vuzlov@debian10-01.nnov.opencascade.com>
Thu, 25 Feb 2021 09:11:08 +0000 (12:11 +0300)
committerViktor UZLOV <vuzlov@debian10-01.nnov.opencascade.com>
Thu, 25 Feb 2021 09:11:08 +0000 (12:11 +0300)
src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx
src/BLSURFPlugin/BLSURFPlugin_Hypothesis.cxx
src/BLSURFPlugin/BLSURFPlugin_Hypothesis.hxx

index 53ea2672e99484fb75db024095dd8f5e5d51e376..3d082a4f83b23552d240736b510163548ce96b09 100644 (file)
@@ -3524,7 +3524,7 @@ bool BLSURFPlugin_BLSURF::Evaluate(SMESH_Mesh&         aMesh,
     }
     fullNbSeg += nb1d;
     std::vector<smIdType> aVec(SMDSEntity_Last);
-    for(int i=SMDSEntity_Node; i<SMDSEntity_Last; i++) aVec[i]=0;
+    for(smIdType i=SMDSEntity_Node; i<SMDSEntity_Last; i++) aVec[i]=0;
     if( IsQuadratic > 0 ) {
       aVec[SMDSEntity_Node] = 2*nb1d - 1;
       aVec[SMDSEntity_Quad_Edge] = nb1d;
@@ -3596,7 +3596,7 @@ bool BLSURFPlugin_BLSURF::Evaluate(SMESH_Mesh&         aMesh,
   int nbVols  = int(aVolume/tetrVol);
   int nb1d_in = int(( nbVols*6 - fullNbSeg ) / 6 );
   std::vector<smIdType> aVec(SMDSEntity_Last);
-  for(int i=SMDSEntity_Node; i<SMDSEntity_Last; i++) aVec[i]=0;
+  for(smIdType i=SMDSEntity_Node; i<SMDSEntity_Last; i++) aVec[i]=0;
   if( IsQuadratic ) {
     aVec[SMDSEntity_Node] = nb1d_in/3 + 1 + nb1d_in;
     aVec[SMDSEntity_Quad_Tetra] = nbVols;
index 0b99e73eadd3f266ab1352ee9ea094ae2a21dce4..a6070b66ae61685bdc6d95b3312610550f97cbe8 100644 (file)
@@ -1936,7 +1936,7 @@ BLSURFPlugin_Hypothesis::TEnfVertexEntryEnfVertexMap BLSURFPlugin_Hypothesis::Ge
   return hyp ? hyp->_GetAllEnforcedVerticesByEnfVertexEntry() : GetDefaultEnfVertexEntryEnfVertexMap();
 }
 
-std::set<int> BLSURFPlugin_Hypothesis::GetEnfVertexNodeIDs(TEnfGroupName theGroupName)
+std::set<smIdType> BLSURFPlugin_Hypothesis::GetEnfVertexNodeIDs(TEnfGroupName theGroupName)
 {
   TGroupNameNodeIDMap::const_iterator it = _groupNameNodeIDMap.find(theGroupName);
   if (it != _groupNameNodeIDMap.end()) {
@@ -1947,16 +1947,16 @@ std::set<int> BLSURFPlugin_Hypothesis::GetEnfVertexNodeIDs(TEnfGroupName theGrou
   throw std::invalid_argument(msg.str());
 }
 
-void BLSURFPlugin_Hypothesis::AddEnfVertexNodeID(TEnfGroupName theGroupName,int theNodeID)
+void BLSURFPlugin_Hypothesis::AddEnfVertexNodeID(TEnfGroupName theGroupName,smIdType theNodeID)
 {
   _groupNameNodeIDMap[theGroupName].insert(theNodeID);
 }
 
-void BLSURFPlugin_Hypothesis::RemoveEnfVertexNodeID(TEnfGroupName theGroupName,int theNodeID)
+void BLSURFPlugin_Hypothesis::RemoveEnfVertexNodeID(TEnfGroupName theGroupName,smIdType theNodeID)
 {
   TGroupNameNodeIDMap::iterator it = _groupNameNodeIDMap.find(theGroupName);
   if (it != _groupNameNodeIDMap.end()) {
-    std::set<int>::iterator IDit = it->second.find(theNodeID);
+    std::set<smIdType>::iterator IDit = it->second.find(theNodeID);
     if (IDit != it->second.end())
       it->second.erase(IDit);
     std::ostringstream msg;
index e6b73340fb6460c2987ed551eb7f3e56e4d0e1b2..a2c90db20ee279e84231ddada1fa44c51b546908 100644 (file)
@@ -36,6 +36,7 @@
 #include <cstring>
 #include <sstream>
 #include <utilities.h>
+#include <smIdType.hxx>
 #include "BLSURFPlugin_Attractor.hxx"
 
 //  Parameters for work of MG-CADSurf
@@ -372,7 +373,7 @@ public:
   // Map Vertex entry / Enforced vertex
   typedef std::map< TEntry, TEnfVertex* > TEnfVertexEntryEnfVertexMap;
 
-  typedef std::map< TEnfGroupName, std::set<int> > TGroupNameNodeIDMap;
+  typedef std::map< TEnfGroupName, std::set<smIdType> > TGroupNameNodeIDMap;
   /* TODO GROUPS
   // Map Group Name / List of enforced vertices
   typedef std::map< TEnfGroupName , TEnfVertexList > TGroupNameEnfVertexListMap;
@@ -392,9 +393,9 @@ public:
   TEntryList            GetEnfVertexEntryList (const TEntry& theFaceEntry);
   TEnfVertex*           GetEnfVertex(TEnfVertexCoords coords);
   TEnfVertex*           GetEnfVertex(const TEntry& theEnfVertexEntry);
-  void                  AddEnfVertexNodeID(TEnfGroupName theGroupName,int theNodeID);
-  std::set<int>         GetEnfVertexNodeIDs(TEnfGroupName theGroupName);
-  void                  RemoveEnfVertexNodeID(TEnfGroupName theGroupName,int theNodeID);
+  void                  AddEnfVertexNodeID(TEnfGroupName theGroupName,smIdType theNodeID);
+  std::set<smIdType>    GetEnfVertexNodeIDs(TEnfGroupName theGroupName);
+  void                  RemoveEnfVertexNodeID(TEnfGroupName theGroupName,smIdType theNodeID);
   
   bool ClearEnforcedVertex(const TEntry& theFaceEntry, double x = 0.0, double y = 0.0, double z = 0.0, const TEntry& theVertexEntry="");
   bool ClearEnforcedVertices(const TEntry& theFaceEntry);