Salome HOME
fix after review. Add SMESH::smIdType. Some error in SMESH_I
authorViktor UZLOV <vuzlov@debian10-01.nnov.opencascade.com>
Thu, 4 Feb 2021 09:39:13 +0000 (12:39 +0300)
committerViktor UZLOV <vuzlov@debian10-01.nnov.opencascade.com>
Thu, 4 Feb 2021 09:39:13 +0000 (12:39 +0300)
29 files changed:
CMakeLists.txt
idl/CMakeLists.txt
src/SMDS/SMDS_Downward.cxx
src/SMDS/SMDS_ElementFactory.cxx
src/SMDS/SMDS_ElementFactory.hxx
src/SMDS/SMDS_Mesh.cxx
src/SMDS/SMDS_Mesh.hxx
src/SMDS/SMDS_MeshElement.hxx
src/SMDS/SMDS_MeshNode.cxx
src/SMDS/SMDS_UnstructuredGrid.cxx
src/SMDS/SMDS_VolumeTool.cxx
src/SMDS/SMDS_VolumeTool.hxx
src/SMESHDS/SMESHDS_Mesh.cxx
src/SMESHDS/SMESHDS_SubMesh.cxx
src/SMESHDS/SMESHDS_SubMesh.hxx
src/SMESH_I/SMESH_Filter_i.hxx
src/SMESH_I/SMESH_Gen_i.cxx
src/SMESH_I/SMESH_Gen_i.hxx
src/SMESH_I/SMESH_Gen_i_1.cxx
src/SMESH_I/SMESH_Group_i.cxx
src/SMESH_I/SMESH_Group_i.hxx
src/SMESH_I/SMESH_Hypothesis_i.cxx
src/SMESH_I/SMESH_Hypothesis_i.hxx
src/SMESH_I/SMESH_MeshEditor_i.cxx
src/SMESH_I/SMESH_MeshEditor_i.hxx
src/SMESH_I/SMESH_Mesh_i.cxx
src/SMESH_I/SMESH_Mesh_i.hxx
src/SMESH_I/SMESH_subMesh_i.cxx
src/SMESH_I/SMESH_subMesh_i.hxx

index 28d1bac3adf4e383ea8ef16837cba63076d152fd..182ad4d9f638341206bdd44326c0a76b34b1ff7a 100644 (file)
@@ -80,6 +80,12 @@ IF(SALOME_SMESH_DYNLOAD_LOCAL)
   ADD_DEFINITIONS(-DDYNLOAD_LOCAL)
 ENDIF(SALOME_SMESH_DYNLOAD_LOCAL)
 
+IF(SALOME_USE_64BIT_IDS)
+   SET(SMESH_ID_TYPE "long long")
+ELSE()
+   SET(SMESH_ID_TYPE "long")
+ENDIF()
+
 IF(SMESH_USE_MESHGEMS_HYPOSET)
   SET(SMESH_USE_MESHGEMS_HYPOSET_VAR "true")
 ELSE(SMESH_USE_MESHGEMS_HYPOSET)
index 24d23c8b3333d7c1425d3bd81d750f753bad8cb6..7b41089088a0d9f59bc6a24f8c8c4fb01f3907a8 100644 (file)
@@ -26,12 +26,6 @@ INCLUDE_DIRECTORIES(
   ${PROJECT_BINARY_DIR}/idl
 )
 
-IF(SALOME_USE_64_BITS_IDS)
-   SET(SMESH_ID_TYPE "long long")
-ELSE()
-   SET(SMESH_ID_TYPE "long")
-ENDIF()
-
 SALOME_CONFIGURE_FILE(SMESH_smIdType.idl.in SMESH_smIdType.idl)
 
 SET(SalomeIDLSMESH_IDLSOURCES
index a788a9e5174f995a97fc3756cafbcfcd0bc7bfcd..124655a34a5983a7fb800be5eecf6d17c94cb82f 100644 (file)
@@ -27,6 +27,7 @@
 
 #include <vtkCellType.h>
 #include <vtkCellLinks.h>
+#include <smIdType.hxx>
 
 #include <map>
 
@@ -232,7 +233,7 @@ void SMDS_Down1D::compactStorage()
   _cellIds.resize(_nbDownCells * _maxId);
   _vtkCellIds.resize(_maxId);
 
-  int sizeUpCells = 0;
+  smIdType sizeUpCells = 0;
   for (int i = 0; i < _maxId; i++)
     sizeUpCells += _upCellIdsVector[i].size();
   _upCellIds.resize(sizeUpCells, -1);
@@ -258,8 +259,8 @@ void SMDS_Down1D::compactStorage()
 void SMDS_Down1D::addUpCell(int cellId, int upCellId, unsigned char aType)
 {
   //ASSERT((cellId >=0) && (cellId < _maxId));
-  int nbFaces = _upCellIdsVector[cellId].size();
-  for (int i = 0; i < nbFaces; i++)
+  smIdType nbFaces = _upCellIdsVector[cellId].size();
+  for (smIdType i = 0; i < nbFaces; i++)
     {
       if ((_upCellIdsVector[cellId][i] == upCellId) && (_upCellTypesVector[cellId][i] == aType))
         {
index 526ecbbb9bee6bba6ecbc23f1739cecd72e75b32..04c8ed0995b37658e0a401d6666d514f3775b5d6 100644 (file)
@@ -112,7 +112,7 @@ smIdType SMDS_ElementFactory::GetFreeID()
 {
   if ( myChunksWithUnused.empty() )
   {
-    int id0 = myChunks.size() * theChunkSize + 1;
+    smIdType id0 = myChunks.size() * theChunkSize + 1;
     myChunks.push_back( new SMDS_ElementChunk( this, id0 ));
   }
   SMDS_ElementChunk * chunk = (*myChunksWithUnused.begin());
@@ -128,12 +128,12 @@ smIdType SMDS_ElementFactory::GetFreeID()
 
 smIdType SMDS_ElementFactory::GetMaxID()
 {
-  int id = 0;
+  smIdType id = 0;
   TIndexRanges usedRanges;
-  for ( int i = myChunks.size() - 1; i >= 0; --i )
+  for ( smIdType i = myChunks.size() - 1; i >= 0; --i )
     if ( myChunks[i].GetUsedRanges().GetIndices( true, usedRanges ))
     {
-      int index = usedRanges.back().second-1;
+      smIdType index = usedRanges.back().second-1;
       id = myChunks[i].Get1stID() + index;
       break;
     }
@@ -171,11 +171,11 @@ smIdType SMDS_ElementFactory::GetMinID()
 
 SMDS_MeshElement* SMDS_ElementFactory::NewElement( const smIdType id )
 {
-  int iChunk = ( id - 1 ) / theChunkSize;
-  int index  = ( id - 1 ) % theChunkSize;
+  smIdType iChunk = ( id - 1 ) / theChunkSize;
+  smIdType index  = ( id - 1 ) % theChunkSize;
   while ((int) myChunks.size() <= iChunk )
   {
-    int id0 = myChunks.size() * theChunkSize + 1;
+    smIdType id0 = myChunks.size() * theChunkSize + 1;
     myChunks.push_back( new SMDS_ElementChunk( this, id0 ));
   }
   SMDS_MeshElement* e = myChunks[iChunk].Element( index );
@@ -204,8 +204,8 @@ const SMDS_MeshElement* SMDS_ElementFactory::FindElement( const smIdType id ) co
 {
   if ( id > 0 )
   {
-    int iChunk = ( id - 1 ) / theChunkSize;
-    int index  = ( id - 1 ) % theChunkSize;
+    smIdType iChunk = ( id - 1 ) / theChunkSize;
+    smIdType index  = ( id - 1 ) % theChunkSize;
     if ( iChunk < (int) myChunks.size() )
     {
       const SMDS_MeshElement* e = myChunks[iChunk].Element( index );
@@ -219,11 +219,11 @@ const SMDS_MeshElement* SMDS_ElementFactory::FindElement( const smIdType id ) co
 /*!
  * \brief Return an SMDS ID by a Vtk one
  *  \param [inout] vtkID - Vtk ID
- *  \return int - SMDS ID
+ *  \return smIdType - SMDS ID
  */
 //================================================================================
 
-int SMDS_ElementFactory::FromVtkToSmds( vtkIdType vtkID )
+smIdType SMDS_ElementFactory::FromVtkToSmds( vtkIdType vtkID )
 {
   if ( vtkID >= 0 && vtkID < (vtkIdType)mySmdsIDs.size() )
     return mySmdsIDs[vtkID] + 1;
@@ -285,7 +285,7 @@ void SMDS_ElementFactory::Compact( std::vector<smIdType>& theVtkIDsNewToOld )
 {
   smIdType  newNbCells = NbUsedElements();
   smIdType   maxCellID = GetMaxID();
-  int newNbChunks = newNbCells / theChunkSize + bool ( newNbCells % theChunkSize );
+  smIdType newNbChunks = newNbCells / theChunkSize + bool ( newNbCells % theChunkSize );
 
   theVtkIDsNewToOld.resize( newNbCells );
 
@@ -314,7 +314,7 @@ void SMDS_ElementFactory::Compact( std::vector<smIdType>& theVtkIDsNewToOld )
         const SMDS_MeshElement* newElem = FindElement( newVtkID );
         if ( !newElem )
           newElem = NewElement( newVtkID );
-        if ( int shapeID = oldElem->GetShapeID() )
+        if ( smIdType shapeID = oldElem->GetShapeID() )
           const_cast< SMDS_MeshElement* >( newElem )->setShapeID( shapeID );
         if ( oldID > newNbCells )
           Free( oldElem );
@@ -408,13 +408,13 @@ void SMDS_NodeFactory::Compact( std::vector<smIdType>& theVtkIDsOldToNew )
         const SMDS_MeshElement* newNode = FindElement( newID+1 );
         if ( !newNode )
           newNode = NewElement( newID+1 );
-        int  shapeID = oldNode->GetShapeID();
+        smIdType  shapeID = oldNode->GetShapeID();
         int shapeDim = GetShapeDim( shapeID );
-        int   iChunk = newID / theChunkSize;
+        smIdType   iChunk = newID / theChunkSize;
         myChunks[ iChunk ].SetShapeID( newNode, shapeID );
         if ( shapeDim == 2 || shapeDim == 1 )
         {
-          int iChunkOld = oldID / theChunkSize;
+          smIdType iChunkOld = oldID / theChunkSize;
           TParam* oldPos = myChunks[ iChunkOld ].GetPositionPtr( oldNode );
           TParam* newPos = myChunks[ iChunk    ].GetPositionPtr( newNode, /*allocate=*/true );
           if ( oldPos )
@@ -514,7 +514,7 @@ void SMDS_NodeFactory::SetShapeDim( int shapeID, int dim )
  */
 //================================================================================
 
-SMDS_ElementChunk::SMDS_ElementChunk( SMDS_ElementFactory* factory, int id0 ):
+SMDS_ElementChunk::SMDS_ElementChunk( SMDS_ElementFactory* factory, smIdType id0 ):
   myFactory( factory ),
   my1stID( id0 )//,
   //mySubIDSet( 0 )
@@ -623,7 +623,7 @@ void SMDS_ElementChunk::SetVTKID( const SMDS_MeshElement* e, const vtkIdType vtk
       size_t i = myFactory->myVtkIDs.size();
       myFactory->myVtkIDs.resize( e->GetID() + 100 );
       for ( ; i < myFactory->myVtkIDs.size(); ++i )
-        myFactory->myVtkIDs[i] = i;
+        myFactory->myVtkIDs[i] = FromIdType<int>(i);
     }
     myFactory->myVtkIDs[ e->GetID() - 1 ] = vtkID;
 
@@ -647,7 +647,7 @@ void SMDS_ElementChunk::SetVTKID( const SMDS_MeshElement* e, const vtkIdType vtk
 int SMDS_ElementChunk::GetVtkID( const SMDS_MeshElement* e ) const
 {
   size_t dfltVtkID = e->GetID() - 1;
-  return ( dfltVtkID < myFactory->myVtkIDs.size() ) ? myFactory->myVtkIDs[ dfltVtkID ] : dfltVtkID;
+  return ( dfltVtkID < myFactory->myVtkIDs.size() ) ? FromIdType<int>(myFactory->myVtkIDs[ dfltVtkID ]) : FromIdType<int>(dfltVtkID);
 }
 
 //================================================================================
index 1a07fd5dca4e01136e9867d5ca4cfb71e5c6ea06..f87b27cd98f1f9f7882ce5628b0e1d3c1e5b2780 100644 (file)
@@ -69,7 +69,7 @@ protected:
   TChunkVector             myChunks;           // array of chunks of elements
   TChunkPtrSet             myChunksWithUnused; // sorted chunks having unused elements
   std::vector< vtkIdType > myVtkIDs;           // myVtkIDs[ smdsID-1 ] == vtkID
-  std::vector< int >       mySmdsIDs;          // mySmdsIDs[ vtkID ] == smdsID - 1
+  std::vector< smIdType >  mySmdsIDs;          // mySmdsIDs[ vtkID ] == smdsID - 1
   int                      myNbUsedElements;   // counter of elements
 
   friend class SMDS_ElementChunk;
@@ -121,7 +121,7 @@ public:
   void Free( const SMDS_MeshElement* );
 
   //! Return an SMDS ID by a Vtk one
-  int FromVtkToSmds( vtkIdType vtkID );
+  smIdType FromVtkToSmds( vtkIdType vtkID );
 
   //! De-allocate all elements
   virtual void Clear();
@@ -279,7 +279,7 @@ struct _RangeSet
       rNext = mySet.upper_bound( theIndex );
       r     = rNext - 1;
     }
-    int          rSize = Size( r ); // range size
+    smIdType     rSize = Size( r ); // range size
     attr_t      rValue = r->myValue;
     if ( rValue == theValue )
       return rValue; // it happens while compacting
@@ -372,7 +372,7 @@ class SMDS_ElementChunk
 {
   SMDS_ElementFactory* myFactory;     // holder of this chunk
   SMDS_MeshElement*    myElements;    // array of elements
-  int                  my1stID;       // ID of myElements[0]
+  smIdType             my1stID;       // ID of myElements[0]
   TBitSet              myMarkedSet;   // mark some elements
   TUsedRangeSet        myUsedRanges;  // ranges of used/unused elements
   TSubIDRangeSet       mySubIDRanges; // ranges of elements on the same sub-shape
@@ -383,7 +383,7 @@ class SMDS_ElementChunk
 
 public:
 
-  SMDS_ElementChunk( SMDS_ElementFactory* factory = 0, int id0 = 0 );
+  SMDS_ElementChunk( SMDS_ElementFactory* factory = 0, smIdType id0 = 0 );
   ~SMDS_ElementChunk();
 
   //! Return an element by an index [0,ChunkSize()]
@@ -405,10 +405,10 @@ public:
   static bool IsUsed( const _UsedRange& r ) { return r.myValue; }
 
   //! Return index of an element in the chunk
-  int Index( const SMDS_MeshElement* e ) const { return e - myElements; }
+  smIdType Index( const SMDS_MeshElement* e ) const { return e - myElements; }
 
   //! Return ID of the 1st element in the chunk
-  int Get1stID() const { return my1stID; }
+  smIdType Get1stID() const { return my1stID; }
 
   //! Return pointer to on-shape-parameters of a node
   TParam* GetPositionPtr( const SMDS_MeshElement* node, bool allocate=false );
@@ -565,7 +565,7 @@ SMDS_ElementFactory::GetShapeIterator( int                     shapeID,
                                        size_t                  nbElemsToReturn,
                                        const SMDS_MeshElement* sm1stElem )
 {
-  int iChunk = sm1stElem ? (( sm1stElem->GetID() - 1 ) / ChunkSize()) : 0;
+  smIdType iChunk = sm1stElem ? (( sm1stElem->GetID() - 1 ) / ChunkSize()) : 0;
   typedef _ChunkIterator< ElemIterator, TSubIDRangeSet > TChuckIterator;
   return boost::make_shared< TChuckIterator >( myChunks,
                                                & SMDS_ElementChunk::GetSubIDRangesMinMax,
index c512d710951648912abcc98816dc5ec30158e195..c872504333d62216fd98c9e852f2ed7f227d365b 100644 (file)
@@ -1359,7 +1359,7 @@ const SMDS_MeshFace* SMDS_Mesh::FindFace(const SMDS_MeshNode *node1,
 //purpose  :
 //=======================================================================
 
-const SMDS_MeshElement* SMDS_Mesh::FindElement(int IDelem) const
+const SMDS_MeshElement* SMDS_Mesh::FindElement(smIdType IDelem) const
 {
   return myCellFactory->FindElement( IDelem );
 }
@@ -3007,7 +3007,7 @@ void SMDS_Mesh::CompactMesh()
   return;
 }
 
-int SMDS_Mesh::FromVtkToSmds( int vtkid ) const
+smIdType SMDS_Mesh::FromVtkToSmds( vtkIdType vtkid ) const
 {
   return myCellFactory->FromVtkToSmds( vtkid );
 }
index 616a0b2b63062536590fb6498695f5303da10228..172153052ee5bbc3d986e9f10ccf0ca25d2b2b65 100644 (file)
@@ -633,9 +633,9 @@ public:
   }
 
   const SMDS_MeshNode *FindNode(smIdType idnode) const;
-  const SMDS_MeshNode *FindNodeVtk(int idnode) const;
-  const SMDS_MeshElement *FindElementVtk(int IDelem) const;
-  virtual const SMDS_MeshElement * FindElement(int IDelem) const;
+  const SMDS_MeshNode *FindNodeVtk(vtkIdType idnode) const;
+  const SMDS_MeshElement *FindElementVtk(vtkIdType IDelem) const;
+  virtual const SMDS_MeshElement * FindElement(smIdType IDelem) const;
   static const SMDS_Mesh0DElement* Find0DElement(const SMDS_MeshNode * n);
   static const SMDS_BallElement* FindBall(const SMDS_MeshNode * n);
   static const SMDS_MeshEdge* FindEdge(const SMDS_MeshNode * n1,
@@ -701,7 +701,7 @@ public:
   virtual ~SMDS_Mesh();
 
   double getMaxDim();
-  int FromVtkToSmds(int vtkid) const;
+  smIdType FromVtkToSmds(vtkIdType  vtkid) const;
 
   void dumpGrid(std::string ficdump="dumpGrid");
   static int chunkSize;
index de545ea1c5b548a026a9d8121f515f8de0484f0c..26911cf13d28caa3d76a0cb8fc5fa2bc75393cac 100644 (file)
@@ -130,7 +130,7 @@ public:
 
   virtual smIdType GetID() const;
   virtual int GetVtkID()   const;
-  virtual int getshapeId() const { return GetShapeID(); }
+  virtual smIdType getshapeId() const { return GetShapeID(); }
   virtual smIdType GetShapeID() const;
 
   // mark this element; to be used in algos
index e2182cd735771cfe24e9500f4af676c3ed61439a..3488d0e7483435b6a905f190e759ac951c6ba8c2 100644 (file)
@@ -36,6 +36,7 @@
 #include <utilities.h>
 #include <Utils_SALOME_Exception.hxx>
 #include <cassert>
+#include <smIdType.hxx>
 
 #include <boost/make_shared.hpp>
 
@@ -123,7 +124,7 @@ namespace
           for (int i = 0; i < ncells; i++)
           {
             int  vtkId = cells[i];
-            int smdsId = myMesh->FromVtkToSmds( vtkId );
+            smIdType smdsId = myMesh->FromVtkToSmds( vtkId );
             const SMDS_MeshElement* elem = myMesh->FindElement( smdsId );
             if ( elem->GetType() == type )
             {
@@ -142,7 +143,7 @@ namespace
     const SMDS_MeshElement* next()
     {
       int vtkId  = myCellList[ myIter++ ];
-      int smdsId = myMesh->FromVtkToSmds( vtkId );
+      smIdType smdsId = myMesh->FromVtkToSmds( vtkId );
       const SMDS_MeshElement* elem = myMesh->FindElement(smdsId);
       if (!elem)
       {
index 2d134daca225d933875c65342fdadee2b1071f50..931bce06f98df225d29d6cd7808f31394ae85e17 100644 (file)
@@ -191,7 +191,7 @@ void SMDS_UnstructuredGrid::compactGrid(std::vector<smIdType>& idNodesOldToNew,
     // Use double type for storing coordinates of nodes instead float.
     vtkPoints *newPoints = vtkPoints::New();
     newPoints->SetDataType( VTK_DOUBLE );
-    newPoints->SetNumberOfPoints( newNodeSize );
+    newPoints->SetNumberOfPoints( FromIdType<int>(newNodeSize) );
 
     int i = 0, alreadyCopied = 0;
     while ( i < oldNodeSize )
@@ -257,11 +257,11 @@ void SMDS_UnstructuredGrid::compactGrid(std::vector<smIdType>& idNodesOldToNew,
 
   vtkUnsignedCharArray *newTypes = vtkUnsignedCharArray::New();
   newTypes->Initialize();
-  newTypes->SetNumberOfValues(newCellSize);
+  newTypes->SetNumberOfValues(FromIdType<int>(newCellSize));
 
   vtkIdTypeArray *newLocations = vtkIdTypeArray::New();
   newLocations->Initialize();
-  newLocations->SetNumberOfValues(newCellSize);
+  newLocations->SetNumberOfValues(FromIdType<int>(newCellSize));
 
   std::vector< vtkIdType > pointsCell(1024); // --- points id to fill a new cell
 
@@ -446,15 +446,15 @@ void SMDS_UnstructuredGrid::BuildDownwardConnectivity(bool /*withEdges*/)
 
   const SMDS_MeshInfo &meshInfo = _mesh->GetMeshInfo();
 
-  int nbLinTetra  = meshInfo.NbTetras  (ORDER_LINEAR);
-  int nbQuadTetra = meshInfo.NbTetras  (ORDER_QUADRATIC);
-  int nbLinPyra   = meshInfo.NbPyramids(ORDER_LINEAR);
-  int nbQuadPyra  = meshInfo.NbPyramids(ORDER_QUADRATIC);
-  int nbLinPrism  = meshInfo.NbPrisms  (ORDER_LINEAR);
-  int nbQuadPrism = meshInfo.NbPrisms  (ORDER_QUADRATIC);
-  int nbLinHexa   = meshInfo.NbHexas   (ORDER_LINEAR);
-  int nbQuadHexa  = meshInfo.NbHexas   (ORDER_QUADRATIC);
-  int nbHexPrism  = meshInfo.NbHexPrisms();
+  int nbLinTetra  = FromIdType<int>(meshInfo.NbTetras  (ORDER_LINEAR));
+  int nbQuadTetra = FromIdType<int>(meshInfo.NbTetras  (ORDER_QUADRATIC));
+  int nbLinPyra   = FromIdType<int>(meshInfo.NbPyramids(ORDER_LINEAR));
+  int nbQuadPyra  = FromIdType<int>(meshInfo.NbPyramids(ORDER_QUADRATIC));
+  int nbLinPrism  = FromIdType<int>(meshInfo.NbPrisms  (ORDER_LINEAR));
+  int nbQuadPrism = FromIdType<int>(meshInfo.NbPrisms  (ORDER_QUADRATIC));
+  int nbLinHexa   = FromIdType<int>(meshInfo.NbHexas   (ORDER_LINEAR));
+  int nbQuadHexa  = FromIdType<int>(meshInfo.NbHexas   (ORDER_QUADRATIC));
+  int nbHexPrism  = FromIdType<int>(meshInfo.NbHexPrisms());
 
   int nbLineGuess     = int((4.0 / 3.0) * nbLinTetra + 2 * nbLinPrism + 2.5 * nbLinPyra + 3 * nbLinHexa);
   int nbQuadEdgeGuess = int((4.0 / 3.0) * nbQuadTetra + 2 * nbQuadPrism + 2.5 * nbQuadPyra + 3 * nbQuadHexa);
index 57f4bda6ebbb1d64faf5b844cf8141f1d0141ea9..1a37f508271c566556bc77311a8650e15be6bc51 100644 (file)
@@ -978,14 +978,14 @@ namespace
       {
         if (( myOri = ( n1->GetID() < n2->GetID() )))
         {
-          first  = n1->GetID();
-          second = n2->GetID();
+          first  = FromIdType<int>(n1->GetID());
+          second = FromIdType<int>(n2->GetID());
         }
         else
         {
           myOri  = -1;
-          first  = n2->GetID();
-          second = n1->GetID();
+          first  = FromIdType<int>(n2->GetID());
+          second = FromIdType<int>(n1->GetID());
         }
         myOri *= ori;
       }
@@ -2212,5 +2212,5 @@ const SMDS_MeshVolume* SMDS_VolumeTool::Element() const
 
 int SMDS_VolumeTool::ID() const
 {
-  return myVolume ? myVolume->GetID() : 0;
+  return myVolume ? FromIdType<int>(myVolume->GetID()) : 0;
 }
index 2c7f619ae36edeac6766762ef201371d7d0047fd..d907a981244e729322755fdb992c8e3794755740 100644 (file)
@@ -30,6 +30,7 @@
 #define SMDS_VolumeTool_HeaderFile
 
 #include "SMESH_SMDS.hxx"
+#include <smIdType.hxx>
 
 class SMDS_MeshElement;
 class SMDS_MeshNode;
index 460d939a2b4b6ad0b5aaa1b163d4d50aa8751790..6a0c2f7ca5d8b09c8067194ef6a797e8c9a49646 100644 (file)
@@ -220,7 +220,7 @@ bool SMESHDS_Mesh::ChangeElementNodes(const SMDS_MeshElement * elem,
                                       const SMDS_MeshNode    * nodes[],
                                       const smIdType                nbnodes)
 {
-  if ( ! SMDS_Mesh::ChangeElementNodes( elem, nodes, nbnodes ))
+  if ( ! SMDS_Mesh::ChangeElementNodes( elem, nodes, FromIdType<int>(nbnodes) ))
     return false;
 
   std::vector<smIdType> IDs( nbnodes );
index 35746f138018bc285b1dc091f611a4a1ef739f2c..92cd666a5f34d5d12bd3ac799a8b4a2926ff5352 100644 (file)
@@ -106,7 +106,7 @@ void SMESHDS_SubMesh::AddElement(const SMDS_MeshElement * elem)
       AddNode( static_cast< const SMDS_MeshNode* >( elem ));
       return;
     }
-    int oldShapeId = elem->GetShapeID();
+    smIdType oldShapeId = elem->GetShapeID();
     if ( oldShapeId > 0 )
     {
       if (oldShapeId != myIndex)
index 902b65daf167634a5ac3783ded74983b7d83398c..650908ed3fb9110f882ba4b7ead0564906ef71be 100644 (file)
@@ -31,6 +31,7 @@
 
 #include "SMDS_ElementHolder.hxx"
 #include "SMDS_Mesh.hxx"
+#include <smIdType.hxx>
 #include <vector>
 
 #include <boost/container/flat_set.hpp>
index 3f786cd83633681b6c176bcfffc555c51a32d4d2..b4d62a64c41d78986296157a17915dc25a96d6e7 100644 (file)
@@ -106,7 +106,7 @@ namespace SMESH
                                                       CORBA::Boolean            isLogarithmic,
                                                       SMESH::SMESH_IDSource_ptr object);
     void                            SetPrecision( CORBA::Long thePrecision );
-    CORBA::Long                     GetPrecision();
+    SMESH::smIdType                     GetPrecision();
     Controls::NumericalFunctorPtr   GetNumericalFunctor();
     
   protected:
@@ -365,7 +365,7 @@ namespace SMESH
   {
   public:
     CORBA::Boolean                  IsSatisfy( CORBA::Long theElementId );
-    CORBA::Long                     NbSatisfying( SMESH::SMESH_IDSource_ptr obj );
+    SMESH::smIdType                 NbSatisfying( SMESH::SMESH_IDSource_ptr obj );
     Controls::PredicatePtr          GetPredicate();
     
   protected:
@@ -1081,7 +1081,7 @@ namespace SMESH
     CORBA::Boolean          SaveAs( const char* aFileName );
     
     CORBA::Boolean          IsPresent( const char* aFilterName );
-    CORBA::Long             NbFilters( ElementType );
+    SMESH::smIdType         NbFilters( ElementType );
     string_array*           GetNames( ElementType );
     string_array*           GetAllNames();
     void                    SetFileName( const char* theFileName );
index ad5b17f8c8ab13a011653dd5d542c124d91aa610..7ca682fa943c69ee7b2802ffb78c61467e5ab5b6 100644 (file)
@@ -6248,7 +6248,7 @@ int SMESH_Gen_i::RegisterObject(CORBA::Object_ptr theObject)
  */
 //================================================================================
 
-CORBA::Long SMESH_Gen_i::GetObjectId(CORBA::Object_ptr theObject)
+SMESH::smIdType  SMESH_Gen_i::GetObjectId(CORBA::Object_ptr theObject)
 {
   if ( myStudyContext && !CORBA::is_nil( theObject )) {
     string iorString = GetORB()->object_to_string( theObject );
index fb16909b89743ceb7c0822599a0afd0ef66409a9..7c310e63be697f547e9b362c7dca0b9ed20e4d6b 100644 (file)
@@ -45,6 +45,7 @@
 #include <Utils_CorbaException.hxx>
 
 #include <GEOM_Client.hxx>
+#include <smIdType.hxx>
 
 #include <TCollection_AsciiString.hxx>
 #include <Resource_DataMapOfAsciiStringAsciiString.hxx>
@@ -70,7 +71,7 @@ public:
   // register object in the internal map and return its id
   int         addObject( const std::string& theIOR );
   // find the object id in the internal map by the IOR
-  int         findId( const std::string& theIOR );
+  smIdType    findId( const std::string& theIOR );
   // get object's IOR by id
   std::string getIORbyId( const int theId );
   // get object's IOR by old id
@@ -536,7 +537,7 @@ public:
   int RegisterObject(CORBA::Object_ptr theObject);
 
   // Return id of registered object
-  CORBA::Long GetObjectId(CORBA::Object_ptr theObject);
+  SMESH::smIdType GetObjectId(CORBA::Object_ptr theObject);
 
   // Return an object that previously had an oldID
   template<class TInterface>
index 8f6077ca98c4a86b6dd26d699de7461ed2801987..c0b606009bad5a35fa76772ce31931039448d1ff 100644 (file)
@@ -1537,7 +1537,7 @@ int StudyContext::addObject( const std::string& theIOR )
 //purpose  : find the object id in the internal map by the IOR
 //=======================================================================
 
-int StudyContext::findId( const std::string& theIOR )
+smIdType StudyContext::findId( const std::string& theIOR )
 {
   TInt2StringMap::iterator imap;
   for ( imap = mapIdToIOR.begin(); imap != mapIdToIOR.end(); ++imap ) {
index d3fbdc742e35463c1c63c3d47637068344d8ee2f..cabb32254177d2e9372607a516b35f26e8603726 100644 (file)
@@ -209,7 +209,7 @@ SMESH::ElementType SMESH_GroupBase_i::GetType()
  */
 //=============================================================================
 
-CORBA::Long SMESH_GroupBase_i::Size()
+SMESH::smIdType  SMESH_GroupBase_i::Size()
 {
   if ( myPreMeshInfo )
     return GetType() == SMESH::NODE ? myPreMeshInfo->NbNodes() : myPreMeshInfo->NbElements();
@@ -298,7 +298,7 @@ CORBA::Boolean SMESH_GroupBase_i::Contains( CORBA::Long theID )
  */
 //=============================================================================
 
-CORBA::Long SMESH_Group_i::Add( const SMESH::long_array& theIDs )
+SMESH::smIdType  SMESH_Group_i::Add( const SMESH::long_array& theIDs )
 {
   if ( myPreMeshInfo )
     myPreMeshInfo->FullLoadFromFile();
@@ -329,7 +329,7 @@ CORBA::Long SMESH_Group_i::Add( const SMESH::long_array& theIDs )
  */
 //=============================================================================
 
-CORBA::Long SMESH_Group_i::Remove( const SMESH::long_array& theIDs )
+SMESH::smIdType  SMESH_Group_i::Remove( const SMESH::long_array& theIDs )
 {
   if ( myPreMeshInfo )
     myPreMeshInfo->FullLoadFromFile();
@@ -386,7 +386,7 @@ ChangeByPredicate( SMESH::Predicate_i* thePredicate,
   return aNb;
 }
 
-CORBA::Long 
+SMESH::smIdType  
 SMESH_Group_i::
 AddByPredicate( SMESH::Predicate_ptr thePredicate )
 {
@@ -401,7 +401,7 @@ AddByPredicate( SMESH::Predicate_ptr thePredicate )
   return 0;
 }
 
-CORBA::Long 
+SMESH::smIdType  
 SMESH_Group_i::
 RemoveByPredicate( SMESH::Predicate_ptr thePredicate )
 {
@@ -416,7 +416,7 @@ RemoveByPredicate( SMESH::Predicate_ptr thePredicate )
   return 0;
 }
 
-CORBA::Long SMESH_Group_i::AddFrom( SMESH::SMESH_IDSource_ptr theSource )
+SMESH::smIdType  SMESH_Group_i::AddFrom( SMESH::SMESH_IDSource_ptr theSource )
 {
   if ( myPreMeshInfo )
     myPreMeshInfo->FullLoadFromFile();
@@ -445,7 +445,7 @@ CORBA::Long SMESH_Group_i::AddFrom( SMESH::SMESH_IDSource_ptr theSource )
  */
 //=============================================================================
 
-CORBA::Long SMESH_GroupBase_i::GetID( CORBA::Long theIndex )
+SMESH::smIdType  SMESH_GroupBase_i::GetID( CORBA::Long theIndex )
 {
   if ( myPreMeshInfo )
     myPreMeshInfo->FullLoadFromFile();
@@ -509,7 +509,7 @@ namespace
  */
 //================================================================================
 
-CORBA::Long SMESH_GroupBase_i::GetNumberOfNodes()
+SMESH::smIdType  SMESH_GroupBase_i::GetNumberOfNodes()
 {
   if ( GetType() == SMESH::NODE )
     return Size();
@@ -651,7 +651,7 @@ void SMESH_GroupBase_i::SetColor(const SALOMEDS::Color& color)
  *
  */
 //=============================================================================
-CORBA::Long SMESH_GroupBase_i::GetColorNumber()
+SMESH::smIdType  SMESH_GroupBase_i::GetColorNumber()
 {
   SMESHDS_GroupBase* aGroupDS = GetGroupDS();
   if (aGroupDS)
index 92a34a24806afec599061acee35cf212b3bb071b..b39cd10fff100b9b406cf5ef80d7e726989589c7 100644 (file)
@@ -61,13 +61,13 @@ class SMESH_I_EXPORT SMESH_GroupBase_i:
   void SetName(const char* name);
   char* GetName();
   SMESH::ElementType GetType();
-  CORBA::Long Size();
+  SMESH::smIdType Size();
   CORBA::Boolean IsEmpty();
   CORBA::Boolean Contains(CORBA::Long elem_id);
-  CORBA::Long GetID(CORBA::Long elem_index);
+  SMESH::smIdType GetID(CORBA::Long elem_index);
   SMESH::long_array* GetListOfID();
   SMESH::long_array* GetNodeIDs();
-  CORBA::Long GetNumberOfNodes();
+  SMESH::smIdType GetNumberOfNodes();
   CORBA::Boolean IsNodeInfoAvailable(); // for gui
 
   virtual SMESH::SMESH_Mesh_ptr GetMesh();
@@ -118,7 +118,7 @@ class SMESH_I_EXPORT SMESH_GroupBase_i:
   SALOMEDS::Color GetColor();
 
   void SetColorNumber(CORBA::Long color);
-  CORBA::Long GetColorNumber();
+  SMESH::smIdType GetColorNumber();
 
 protected:
 
@@ -150,13 +150,13 @@ class SMESH_I_EXPORT SMESH_Group_i:
                  const int               theLocalID );
   // CORBA interface implementation
   void Clear();
-  CORBA::Long Add( const SMESH::long_array& theIDs );
-  CORBA::Long Remove( const SMESH::long_array& theIDs );
+  SMESH::smIdType Add( const SMESH::long_array& theIDs );
+  SMESH::smIdType Remove( const SMESH::long_array& theIDs );
 
-  CORBA::Long AddByPredicate( SMESH::Predicate_ptr thePredicate );
-  CORBA::Long RemoveByPredicate( SMESH::Predicate_ptr thePredicate );
+  SMESH::smIdType AddByPredicate( SMESH::Predicate_ptr thePredicate );
+  SMESH::smIdType RemoveByPredicate( SMESH::Predicate_ptr thePredicate );
 
-  CORBA::Long AddFrom( SMESH::SMESH_IDSource_ptr theSource );
+  SMESH::smIdType AddFrom( SMESH::SMESH_IDSource_ptr theSource );
 };
 
 // =========================
index fae136798babbda3ea2b366ca41dcd38fbd11fa5..1e32d929dd1d83c559ed593f9cf5cee793c991a3 100644 (file)
@@ -114,7 +114,7 @@ void SMESH_Hypothesis_i::SetLibName(const char* theLibName)
  */
 //=============================================================================
 
-CORBA::Long SMESH_Hypothesis_i::GetId()
+SMESH::smIdType SMESH_Hypothesis_i::GetId()
 {
   return myBaseImpl->GetID();
 }
index 0fcc83ca82b0b8deafc303af62192831cdd44c1f..746f3caa9fafc8a33dc857120eee42d1635d02e0 100644 (file)
@@ -69,7 +69,7 @@ public:
   void SetLibName( const char* theLibName );
 
   // Get unique id of hypothesis
-  virtual CORBA::Long GetId();
+  virtual SMESH::smIdType GetId();
 
   // Return true if a hypothesis has parameters
   virtual CORBA::Boolean HasParameters();
index d542d9c85ac4e29210a0f39c945615b3daea1db1..b0cf7a3b1cb74000f2e13705afb4505d2d6eea13 100644 (file)
@@ -755,7 +755,7 @@ bool SMESH_MeshEditor_i::IsTemporaryIDSource( SMESH::SMESH_IDSource_ptr& idSourc
   return SMESH::DownCast<SMESH_MeshEditor_i::_IDSource*>( idSource );
 }
 
-CORBA::Long* SMESH_MeshEditor_i::GetTemporaryIDs( SMESH::SMESH_IDSource_ptr& idSource,
+SMESH::smIdType* SMESH_MeshEditor_i::GetTemporaryIDs( SMESH::SMESH_IDSource_ptr& idSource,
                                                   int&                       nbIds)
 {
   if ( _IDSource* tmpIdSource = SMESH::DownCast<SMESH_MeshEditor_i::_IDSource*>( idSource ))
@@ -838,7 +838,7 @@ CORBA::Boolean SMESH_MeshEditor_i::RemoveNodes(const SMESH::long_array & IDsOfNo
  */
 //=============================================================================
 
-CORBA::Long SMESH_MeshEditor_i::RemoveOrphanNodes()
+SMESH::smIdType SMESH_MeshEditor_i::RemoveOrphanNodes()
 {
   SMESH_TRY;
   initData();
@@ -871,7 +871,7 @@ CORBA::Long SMESH_MeshEditor_i::RemoveOrphanNodes()
  */
 //=============================================================================
 
-CORBA::Long SMESH_MeshEditor_i::AddNode(CORBA::Double x,CORBA::Double y, CORBA::Double z)
+SMESH::smIdType SMESH_MeshEditor_i::AddNode(CORBA::Double x,CORBA::Double y, CORBA::Double z)
 {
   SMESH_TRY;
   initData();
@@ -895,7 +895,7 @@ CORBA::Long SMESH_MeshEditor_i::AddNode(CORBA::Double x,CORBA::Double y, CORBA::
  */
 //=============================================================================
 
-CORBA::Long SMESH_MeshEditor_i::Add0DElement(CORBA::Long    IDOfNode,
+SMESH::smIdType SMESH_MeshEditor_i::Add0DElement(CORBA::Long    IDOfNode,
                                              CORBA::Boolean DuplicateElements)
 {
   SMESH_TRY;
@@ -925,7 +925,7 @@ CORBA::Long SMESH_MeshEditor_i::Add0DElement(CORBA::Long    IDOfNode,
  */
 //=============================================================================
 
-CORBA::Long SMESH_MeshEditor_i::AddBall(CORBA::Long IDOfNode, CORBA::Double diameter)
+SMESH::smIdType SMESH_MeshEditor_i::AddBall(CORBA::Long IDOfNode, CORBA::Double diameter)
 {
   SMESH_TRY;
   initData();
@@ -954,7 +954,7 @@ CORBA::Long SMESH_MeshEditor_i::AddBall(CORBA::Long IDOfNode, CORBA::Double diam
  */
 //=============================================================================
 
-CORBA::Long SMESH_MeshEditor_i::AddEdge(const SMESH::long_array & IDsOfNodes)
+SMESH::smIdType SMESH_MeshEditor_i::AddEdge(const SMESH::long_array & IDsOfNodes)
 {
   SMESH_TRY;
   initData();
@@ -997,7 +997,7 @@ CORBA::Long SMESH_MeshEditor_i::AddEdge(const SMESH::long_array & IDsOfNodes)
  */
 //=============================================================================
 
-CORBA::Long SMESH_MeshEditor_i::AddFace(const SMESH::long_array & IDsOfNodes)
+SMESH::smIdType SMESH_MeshEditor_i::AddFace(const SMESH::long_array & IDsOfNodes)
 {
   SMESH_TRY;
   initData();
@@ -1045,7 +1045,7 @@ CORBA::Long SMESH_MeshEditor_i::AddFace(const SMESH::long_array & IDsOfNodes)
  */
 //=============================================================================
 
-CORBA::Long SMESH_MeshEditor_i::AddPolygonalFace (const SMESH::long_array & IDsOfNodes)
+SMESH::smIdType SMESH_MeshEditor_i::AddPolygonalFace (const SMESH::long_array & IDsOfNodes)
 {
   SMESH_TRY;
   initData();
@@ -1080,7 +1080,7 @@ CORBA::Long SMESH_MeshEditor_i::AddPolygonalFace (const SMESH::long_array & IDsO
  */
 //=============================================================================
 
-CORBA::Long SMESH_MeshEditor_i::AddQuadPolygonalFace (const SMESH::long_array & IDsOfNodes)
+SMESH::smIdType SMESH_MeshEditor_i::AddQuadPolygonalFace (const SMESH::long_array & IDsOfNodes)
 {
   SMESH_TRY;
   initData();
@@ -1115,7 +1115,7 @@ CORBA::Long SMESH_MeshEditor_i::AddQuadPolygonalFace (const SMESH::long_array &
  */
 //=============================================================================
 
-CORBA::Long SMESH_MeshEditor_i::AddVolume(const SMESH::long_array & IDsOfNodes)
+SMESH::smIdType SMESH_MeshEditor_i::AddVolume(const SMESH::long_array & IDsOfNodes)
 {
   SMESH_TRY;
   initData();
@@ -1174,7 +1174,7 @@ CORBA::Long SMESH_MeshEditor_i::AddVolume(const SMESH::long_array & IDsOfNodes)
  *  AddPolyhedralVolume
  */
 //=============================================================================
-CORBA::Long SMESH_MeshEditor_i::AddPolyhedralVolume (const SMESH::long_array & IDsOfNodes,
+SMESH::smIdType SMESH_MeshEditor_i::AddPolyhedralVolume (const SMESH::long_array & IDsOfNodes,
                                                      const SMESH::long_array & Quantities)
 {
   SMESH_TRY;
@@ -1213,7 +1213,7 @@ CORBA::Long SMESH_MeshEditor_i::AddPolyhedralVolume (const SMESH::long_array & I
  */
 //=============================================================================
 
-CORBA::Long SMESH_MeshEditor_i::AddPolyhedralVolumeByFaces (const SMESH::long_array & IdsOfFaces)
+SMESH::smIdType SMESH_MeshEditor_i::AddPolyhedralVolumeByFaces (const SMESH::long_array & IdsOfFaces)
 {
   SMESH_TRY;
   initData();
@@ -1718,7 +1718,7 @@ CORBA::Long SMESH_MeshEditor_i::Reorient2D(SMESH::SMESH_IDSource_ptr the2Dgroup,
 //purpose  : Reorient faces basing on orientation of adjacent volumes.
 //=======================================================================
 
-CORBA::Long SMESH_MeshEditor_i::Reorient2DBy3D(const SMESH::ListOfIDSources& faceGroups,
+SMESH::smIdType SMESH_MeshEditor_i::Reorient2DBy3D(const SMESH::ListOfIDSources& faceGroups,
                                                SMESH::SMESH_IDSource_ptr     volumeGroup,
                                                CORBA::Boolean                outsideNormal)
 {
@@ -4456,7 +4456,7 @@ CORBA::Boolean SMESH_MeshEditor_i::MoveNode(CORBA::Long   NodeID,
  */
 //================================================================================
 
-CORBA::Long SMESH_MeshEditor_i::FindNodeClosestTo(CORBA::Double x,
+SMESH::smIdType SMESH_MeshEditor_i::FindNodeClosestTo(CORBA::Double x,
                                                   CORBA::Double y,
                                                   CORBA::Double z)
 {
@@ -4663,7 +4663,7 @@ SMESH_MeshEditor_i::FindAmongElementsByPoint(SMESH::SMESH_IDSource_ptr elementID
 //           In the case if nothing found, return -1 and []
 //=======================================================================
 
-CORBA::Long SMESH_MeshEditor_i::ProjectPoint(CORBA::Double             x,
+SMESH::smIdType SMESH_MeshEditor_i::ProjectPoint(CORBA::Double             x,
                                              CORBA::Double             y,
                                              CORBA::Double             z,
                                              SMESH::ElementType        type,
@@ -7088,7 +7088,7 @@ SMESH_MeshEditor_i::MakeBoundaryMesh(SMESH::SMESH_IDSource_ptr idSource,
  */
 //================================================================================
 
-CORBA::Long SMESH_MeshEditor_i::MakeBoundaryElements(SMESH::Bnd_Dimension dim,
+SMESH::smIdType SMESH_MeshEditor_i::MakeBoundaryElements(SMESH::Bnd_Dimension dim,
                                                      const char* groupName,
                                                      const char* meshName,
                                                      CORBA::Boolean toCopyAll,
index b0b9dd2707e881f02ea23072ed0b21d843586a31..e657eca202f66382804d5bfd11105ab940908abc 100644 (file)
@@ -93,7 +93,7 @@ public:
   SMESH::SMESH_IDSource_ptr MakeIDSource(const SMESH::long_array& IDsOfElements,
                                          SMESH::ElementType       type);
   static bool               IsTemporaryIDSource( SMESH::SMESH_IDSource_ptr& idSource );
-  static CORBA::Long*       GetTemporaryIDs( SMESH::SMESH_IDSource_ptr& idSource, int& nbIds );
+  static SMESH::smIdType*       GetTemporaryIDs( SMESH::SMESH_IDSource_ptr& idSource, int& nbIds );
 
   /*!
    * \brief Generates the unique group name
@@ -102,23 +102,23 @@ public:
 
   CORBA::Boolean RemoveElements(const SMESH::long_array & IDsOfElements);
   CORBA::Boolean RemoveNodes   (const SMESH::long_array & IDsOfNodes);
-  CORBA::Long    RemoveOrphanNodes();
+  SMESH::smIdType    RemoveOrphanNodes();
 
   /*!
    * Methods for creation new elements.
    * Returns ID of created element or 0 if element not created
    */
-  CORBA::Long AddNode(CORBA::Double x, CORBA::Double y, CORBA::Double z);
-  CORBA::Long Add0DElement(CORBA::Long IDOfNode, CORBA::Boolean DuplicateElements);
-  CORBA::Long AddBall(CORBA::Long IDOfNodem, CORBA::Double diameter);
-  CORBA::Long AddEdge(const SMESH::long_array & IDsOfNodes);
-  CORBA::Long AddFace(const SMESH::long_array & IDsOfNodes);
-  CORBA::Long AddPolygonalFace(const SMESH::long_array & IDsOfNodes);
-  CORBA::Long AddQuadPolygonalFace(const SMESH::long_array & IDsOfNodes);
-  CORBA::Long AddVolume(const SMESH::long_array & IDsOfNodes);
-  CORBA::Long AddPolyhedralVolume(const SMESH::long_array & IDsOfNodes,
+  SMESH::smIdType AddNode(CORBA::Double x, CORBA::Double y, CORBA::Double z);
+  SMESH::smIdType Add0DElement(CORBA::Long IDOfNode, CORBA::Boolean DuplicateElements);
+  SMESH::smIdType AddBall(CORBA::Long IDOfNodem, CORBA::Double diameter);
+  SMESH::smIdType AddEdge(const SMESH::long_array & IDsOfNodes);
+  SMESH::smIdType AddFace(const SMESH::long_array & IDsOfNodes);
+  SMESH::smIdType AddPolygonalFace(const SMESH::long_array & IDsOfNodes);
+  SMESH::smIdType AddQuadPolygonalFace(const SMESH::long_array & IDsOfNodes);
+  SMESH::smIdType AddVolume(const SMESH::long_array & IDsOfNodes);
+  SMESH::smIdType AddPolyhedralVolume(const SMESH::long_array & IDsOfNodes,
                                   const SMESH::long_array & Quantities);
-  CORBA::Long AddPolyhedralVolumeByFaces(const SMESH::long_array & IdsOfFaces);
+  SMESH::smIdType AddPolyhedralVolumeByFaces(const SMESH::long_array & IdsOfFaces);
 
   /*!
    * \brief Create 0D elements on all nodes of the given object except those 
@@ -200,7 +200,7 @@ public:
    *        pointing either \a outside or \a inside the adjacent volumes.
    * \return number of reoriented faces.
    */
-  CORBA::Long Reorient2DBy3D(const SMESH::ListOfIDSources & faces,
+  SMESH::smIdType Reorient2DBy3D(const SMESH::ListOfIDSources & faces,
                              SMESH::SMESH_IDSource_ptr      volumes,
                              CORBA::Boolean                 outsideNormal);
 
@@ -450,7 +450,7 @@ public:
   /*!
    * \brief Return ID of node closest to a given point
    */
-  CORBA::Long FindNodeClosestTo(CORBA::Double x,
+  SMESH::smIdType FindNodeClosestTo(CORBA::Double x,
                                 CORBA::Double y,
                                 CORBA::Double z);
   /*!
@@ -478,7 +478,7 @@ public:
    * and coordinates of the projection point.
    * In the case if nothing found, return -1 and []
    */
-  CORBA::Long ProjectPoint(CORBA::Double             x,
+  SMESH::smIdType ProjectPoint(CORBA::Double             x,
                            CORBA::Double             y,
                            CORBA::Double             z,
                            SMESH::ElementType        type,
@@ -794,7 +794,7 @@ public:
                                          CORBA::Boolean            toCopyMissingBondary,
                                          SMESH::SMESH_Group_out    group);
 
-  CORBA::Long MakeBoundaryElements(SMESH::Bnd_Dimension dimension,
+  SMESH::smIdType MakeBoundaryElements(SMESH::Bnd_Dimension dimension,
                                    const char* groupName,
                                    const char* meshName,
                                    CORBA::Boolean toCopyAll,
index 7ce1d35c1a2f18e46fa6ae952fd855a375b1d1dd..d769be79aa07f4c4fd183073c2cc2cbb42a162f7 100644 (file)
@@ -1250,7 +1250,7 @@ SMESH::ListOfGroups * SMESH_Mesh_i::GetGroups()
  */
 //=============================================================================
 
-CORBA::Long SMESH_Mesh_i::NbGroups()
+SMESH::smIdType SMESH_Mesh_i::NbGroups()
 {
   Unexpect aCatch(SALOME_SalomeException);
   return _mapGroups.size();
@@ -3391,7 +3391,7 @@ void SMESH_Mesh_i::ClearLog()
  */
 //================================================================================
 
-CORBA::Long SMESH_Mesh_i::GetId()
+SMESH::smIdType SMESH_Mesh_i::GetId()
 {
   return _id;
 }
@@ -4396,7 +4396,7 @@ CORBA::Double SMESH_Mesh_i::GetComputeProgress()
  */
 //================================================================================
 
-CORBA::Long SMESH_Mesh_i::NbNodes()
+SMESH::smIdType SMESH_Mesh_i::NbNodes()
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4411,7 +4411,7 @@ CORBA::Long SMESH_Mesh_i::NbNodes()
  */
 //================================================================================
 
-CORBA::Long SMESH_Mesh_i::NbElements()
+SMESH::smIdType SMESH_Mesh_i::NbElements()
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4426,7 +4426,7 @@ CORBA::Long SMESH_Mesh_i::NbElements()
  */
 //================================================================================
 
-CORBA::Long SMESH_Mesh_i::Nb0DElements()
+SMESH::smIdType SMESH_Mesh_i::Nb0DElements()
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4441,7 +4441,7 @@ CORBA::Long SMESH_Mesh_i::Nb0DElements()
  */
 //================================================================================
 
-CORBA::Long SMESH_Mesh_i::NbBalls()
+SMESH::smIdType SMESH_Mesh_i::NbBalls()
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4456,7 +4456,7 @@ CORBA::Long SMESH_Mesh_i::NbBalls()
  */
 //================================================================================
 
-CORBA::Long SMESH_Mesh_i::NbEdges()
+SMESH::smIdType SMESH_Mesh_i::NbEdges()
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4471,7 +4471,7 @@ CORBA::Long SMESH_Mesh_i::NbEdges()
  */
 //================================================================================
 
-CORBA::Long SMESH_Mesh_i::NbEdgesOfOrder(SMESH::ElementOrder order)
+SMESH::smIdType SMESH_Mesh_i::NbEdgesOfOrder(SMESH::ElementOrder order)
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4486,7 +4486,7 @@ CORBA::Long SMESH_Mesh_i::NbEdgesOfOrder(SMESH::ElementOrder order)
  */
 //================================================================================
 
-CORBA::Long SMESH_Mesh_i::NbFaces()
+SMESH::smIdType SMESH_Mesh_i::NbFaces()
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4501,7 +4501,7 @@ CORBA::Long SMESH_Mesh_i::NbFaces()
  */
 //================================================================================
 
-CORBA::Long SMESH_Mesh_i::NbTriangles()
+SMESH::smIdType SMESH_Mesh_i::NbTriangles()
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4516,7 +4516,7 @@ CORBA::Long SMESH_Mesh_i::NbTriangles()
  */
 //================================================================================
 
-CORBA::Long SMESH_Mesh_i::NbBiQuadTriangles()
+SMESH::smIdType SMESH_Mesh_i::NbBiQuadTriangles()
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4525,7 +4525,7 @@ CORBA::Long SMESH_Mesh_i::NbBiQuadTriangles()
   return _impl->NbBiQuadTriangles();
 }
 
-CORBA::Long SMESH_Mesh_i::NbQuadrangles()
+SMESH::smIdType SMESH_Mesh_i::NbQuadrangles()
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4534,7 +4534,7 @@ CORBA::Long SMESH_Mesh_i::NbQuadrangles()
   return _impl->NbQuadrangles();
 }
 
-CORBA::Long SMESH_Mesh_i::NbBiQuadQuadrangles()
+SMESH::smIdType SMESH_Mesh_i::NbBiQuadQuadrangles()
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4543,7 +4543,7 @@ CORBA::Long SMESH_Mesh_i::NbBiQuadQuadrangles()
   return _impl->NbBiQuadQuadrangles();
 }
 
-CORBA::Long SMESH_Mesh_i::NbPolygons()
+SMESH::smIdType SMESH_Mesh_i::NbPolygons()
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4552,7 +4552,7 @@ CORBA::Long SMESH_Mesh_i::NbPolygons()
   return _impl->NbPolygons();
 }
 
-CORBA::Long SMESH_Mesh_i::NbPolygonsOfOrder(SMESH::ElementOrder order)
+SMESH::smIdType SMESH_Mesh_i::NbPolygonsOfOrder(SMESH::ElementOrder order)
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4561,7 +4561,7 @@ CORBA::Long SMESH_Mesh_i::NbPolygonsOfOrder(SMESH::ElementOrder order)
   return _impl->NbPolygons((SMDSAbs_ElementOrder)order);
 }
 
-CORBA::Long SMESH_Mesh_i::NbFacesOfOrder(SMESH::ElementOrder order)
+SMESH::smIdType SMESH_Mesh_i::NbFacesOfOrder(SMESH::ElementOrder order)
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4570,7 +4570,7 @@ CORBA::Long SMESH_Mesh_i::NbFacesOfOrder(SMESH::ElementOrder order)
   return _impl->NbFaces( (SMDSAbs_ElementOrder) order);
 }
 
-CORBA::Long SMESH_Mesh_i::NbTrianglesOfOrder(SMESH::ElementOrder order)
+SMESH::smIdType SMESH_Mesh_i::NbTrianglesOfOrder(SMESH::ElementOrder order)
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4579,7 +4579,7 @@ CORBA::Long SMESH_Mesh_i::NbTrianglesOfOrder(SMESH::ElementOrder order)
   return _impl->NbTriangles( (SMDSAbs_ElementOrder) order);
 }
 
-CORBA::Long SMESH_Mesh_i::NbQuadranglesOfOrder(SMESH::ElementOrder order)
+SMESH::smIdType SMESH_Mesh_i::NbQuadranglesOfOrder(SMESH::ElementOrder order)
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4590,7 +4590,7 @@ CORBA::Long SMESH_Mesh_i::NbQuadranglesOfOrder(SMESH::ElementOrder order)
 
 //=============================================================================
 
-CORBA::Long SMESH_Mesh_i::NbVolumes()
+SMESH::smIdType SMESH_Mesh_i::NbVolumes()
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4599,7 +4599,7 @@ CORBA::Long SMESH_Mesh_i::NbVolumes()
   return _impl->NbVolumes();
 }
 
-CORBA::Long SMESH_Mesh_i::NbTetras()
+SMESH::smIdType SMESH_Mesh_i::NbTetras()
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4608,7 +4608,7 @@ CORBA::Long SMESH_Mesh_i::NbTetras()
   return _impl->NbTetras();
 }
 
-CORBA::Long SMESH_Mesh_i::NbHexas()
+SMESH::smIdType SMESH_Mesh_i::NbHexas()
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4617,7 +4617,7 @@ CORBA::Long SMESH_Mesh_i::NbHexas()
   return _impl->NbHexas();
 }
 
-CORBA::Long SMESH_Mesh_i::NbTriQuadraticHexas()
+SMESH::smIdType SMESH_Mesh_i::NbTriQuadraticHexas()
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4626,7 +4626,7 @@ CORBA::Long SMESH_Mesh_i::NbTriQuadraticHexas()
   return _impl->NbTriQuadraticHexas();
 }
 
-CORBA::Long SMESH_Mesh_i::NbPyramids()
+SMESH::smIdType SMESH_Mesh_i::NbPyramids()
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4635,7 +4635,7 @@ CORBA::Long SMESH_Mesh_i::NbPyramids()
   return _impl->NbPyramids();
 }
 
-CORBA::Long SMESH_Mesh_i::NbPrisms()
+SMESH::smIdType SMESH_Mesh_i::NbPrisms()
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4644,7 +4644,7 @@ CORBA::Long SMESH_Mesh_i::NbPrisms()
   return _impl->NbPrisms();
 }
 
-CORBA::Long SMESH_Mesh_i::NbHexagonalPrisms()
+SMESH::smIdType SMESH_Mesh_i::NbHexagonalPrisms()
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4653,7 +4653,7 @@ CORBA::Long SMESH_Mesh_i::NbHexagonalPrisms()
   return _impl->NbHexagonalPrisms();
 }
 
-CORBA::Long SMESH_Mesh_i::NbPolyhedrons()
+SMESH::smIdType SMESH_Mesh_i::NbPolyhedrons()
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4662,7 +4662,7 @@ CORBA::Long SMESH_Mesh_i::NbPolyhedrons()
   return _impl->NbPolyhedrons();
 }
 
-CORBA::Long SMESH_Mesh_i::NbVolumesOfOrder(SMESH::ElementOrder order)
+SMESH::smIdType SMESH_Mesh_i::NbVolumesOfOrder(SMESH::ElementOrder order)
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4671,7 +4671,7 @@ CORBA::Long SMESH_Mesh_i::NbVolumesOfOrder(SMESH::ElementOrder order)
   return _impl->NbVolumes( (SMDSAbs_ElementOrder) order);
 }
 
-CORBA::Long SMESH_Mesh_i::NbTetrasOfOrder(SMESH::ElementOrder order)
+SMESH::smIdType SMESH_Mesh_i::NbTetrasOfOrder(SMESH::ElementOrder order)
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4680,7 +4680,7 @@ CORBA::Long SMESH_Mesh_i::NbTetrasOfOrder(SMESH::ElementOrder order)
   return _impl->NbTetras( (SMDSAbs_ElementOrder) order);
 }
 
-CORBA::Long SMESH_Mesh_i::NbHexasOfOrder(SMESH::ElementOrder order)
+SMESH::smIdType SMESH_Mesh_i::NbHexasOfOrder(SMESH::ElementOrder order)
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4689,7 +4689,7 @@ CORBA::Long SMESH_Mesh_i::NbHexasOfOrder(SMESH::ElementOrder order)
   return _impl->NbHexas( (SMDSAbs_ElementOrder) order);
 }
 
-CORBA::Long SMESH_Mesh_i::NbPyramidsOfOrder(SMESH::ElementOrder order)
+SMESH::smIdType SMESH_Mesh_i::NbPyramidsOfOrder(SMESH::ElementOrder order)
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4698,7 +4698,7 @@ CORBA::Long SMESH_Mesh_i::NbPyramidsOfOrder(SMESH::ElementOrder order)
   return _impl->NbPyramids( (SMDSAbs_ElementOrder) order);
 }
 
-CORBA::Long SMESH_Mesh_i::NbPrismsOfOrder(SMESH::ElementOrder order)
+SMESH::smIdType SMESH_Mesh_i::NbPrismsOfOrder(SMESH::ElementOrder order)
 {
   Unexpect aCatch(SALOME_SalomeException);
   if ( _preMeshInfo )
@@ -4713,7 +4713,7 @@ CORBA::Long SMESH_Mesh_i::NbPrismsOfOrder(SMESH::ElementOrder order)
  */
 //=============================================================================
 
-CORBA::Long SMESH_Mesh_i::NbSubMesh()
+SMESH::smIdType SMESH_Mesh_i::NbSubMesh()
 {
   Unexpect aCatch(SALOME_SalomeException);
   return _mapSubMesh_i.size();
@@ -5479,7 +5479,7 @@ SMESH::double_array* SMESH_Mesh_i::GetFaceNormal(CORBA::Long    elemId,
  */
 //================================================================================
 
-CORBA::Long SMESH_Mesh_i::FindElementByNodes(const SMESH::long_array& nodes)
+SMESH::smIdType SMESH_Mesh_i::FindElementByNodes(const SMESH::long_array& nodes)
 {
   if ( _preMeshInfo )
     _preMeshInfo->FullLoadFromFile();
@@ -6155,7 +6155,7 @@ namespace /* Iterators used in SMESH_Mesh_i::GetElements(SMESH::SMESH_IDSource_v
   //-----------------------------------------------------------------------------
   struct IDSourceIterator : public SMDS_ElemIterator
   {
-    const CORBA::Long*        _idPtr;
+    const SMESH::smIdType*    _idPtr;
     const CORBA::Long*        _idEndPtr;
     SMESH::long_array_var     _idArray;
     const SMDS_Mesh*          _mesh;
@@ -6325,7 +6325,7 @@ SMDS_ElemIteratorPtr SMESH_Mesh_i::GetElements(SMESH::SMESH_IDSource_ptr theObje
     if ( SMESH_MeshEditor_i::IsTemporaryIDSource( theObject ))
     {
       int nbIds;
-      if ( CORBA::Long* ids = SMESH_MeshEditor_i::GetTemporaryIDs( theObject, nbIds ))
+      if ( SMESH::smIdType* ids = SMESH_MeshEditor_i::GetTemporaryIDs( theObject, nbIds ))
         elemIt = SMDS_ElemIteratorPtr( new IDSourceIterator( meshDS, ids, nbIds, iterType ));
     }
     else
index 56edeee76b2d030a91b718027fc92ab40f8bd897..d0a19b1b71c2609b006582ee79b274e1325fd033 100644 (file)
@@ -112,7 +112,7 @@ public:
 
   SMESH::ListOfGroups* GetGroups();
 
-  CORBA::Long NbGroups();
+  SMESH::smIdType NbGroups();
 
   SMESH::SMESH_Group_ptr UnionGroups( SMESH::SMESH_GroupBase_ptr theGroup1,
                                       SMESH::SMESH_GroupBase_ptr theGroup2,
@@ -158,7 +158,7 @@ public:
 
   void ClearLog();
 
-  CORBA::Long GetId();
+  SMESH::smIdType GetId();
 
   // --- C++ interface
 
@@ -244,65 +244,65 @@ public:
 
   CORBA::Double GetComputeProgress();
 
-  CORBA::Long NbNodes();
+  SMESH::smIdType NbNodes();
 
-  CORBA::Long NbElements();
+  SMESH::smIdType NbElements();
 
-  CORBA::Long Nb0DElements();
+  SMESH::smIdType Nb0DElements();
 
-  CORBA::Long NbBalls();
+  SMESH::smIdType NbBalls();
 
-  CORBA::Long NbEdges();
+  SMESH::smIdType NbEdges();
 
-  CORBA::Long NbEdgesOfOrder(SMESH::ElementOrder order);
+  SMESH::smIdType NbEdgesOfOrder(SMESH::ElementOrder order);
 
-  CORBA::Long NbFaces();
+  SMESH::smIdType NbFaces();
 
-  CORBA::Long NbFacesOfOrder(SMESH::ElementOrder order);
+  SMESH::smIdType NbFacesOfOrder(SMESH::ElementOrder order);
 
-  CORBA::Long NbTriangles();
+  SMESH::smIdType NbTriangles();
 
-  CORBA::Long NbTrianglesOfOrder(SMESH::ElementOrder order);
+  SMESH::smIdType NbTrianglesOfOrder(SMESH::ElementOrder order);
 
-  CORBA::Long NbBiQuadTriangles();
+  SMESH::smIdType NbBiQuadTriangles();
 
-  CORBA::Long NbQuadrangles();
+  SMESH::smIdType NbQuadrangles();
 
-  CORBA::Long NbQuadranglesOfOrder(SMESH::ElementOrder order);
+  SMESH::smIdType NbQuadranglesOfOrder(SMESH::ElementOrder order);
 
-  CORBA::Long NbBiQuadQuadrangles();
+  SMESH::smIdType NbBiQuadQuadrangles();
 
-  CORBA::Long NbPolygons();
+  SMESH::smIdType NbPolygons();
 
-  CORBA::Long NbPolygonsOfOrder(SMESH::ElementOrder order = SMESH::ORDER_ANY);
+  SMESH::smIdType NbPolygonsOfOrder(SMESH::ElementOrder order = SMESH::ORDER_ANY);
 
-  CORBA::Long NbVolumes();
+  SMESH::smIdType NbVolumes();
 
-  CORBA::Long NbVolumesOfOrder(SMESH::ElementOrder order);
+  SMESH::smIdType NbVolumesOfOrder(SMESH::ElementOrder order);
 
-  CORBA::Long NbTetras();
+  SMESH::smIdType NbTetras();
 
-  CORBA::Long NbTetrasOfOrder(SMESH::ElementOrder order);
+  SMESH::smIdType NbTetrasOfOrder(SMESH::ElementOrder order);
 
-  CORBA::Long NbHexas();
+  SMESH::smIdType NbHexas();
 
-  CORBA::Long NbHexasOfOrder(SMESH::ElementOrder order);
+  SMESH::smIdType NbHexasOfOrder(SMESH::ElementOrder order);
 
-  CORBA::Long NbTriQuadraticHexas();
+  SMESH::smIdType NbTriQuadraticHexas();
 
-  CORBA::Long NbPyramids();
+  SMESH::smIdType NbPyramids();
 
-  CORBA::Long NbPyramidsOfOrder(SMESH::ElementOrder order);
+  SMESH::smIdType NbPyramidsOfOrder(SMESH::ElementOrder order);
 
-  CORBA::Long NbPrisms();
+  SMESH::smIdType NbPrisms();
 
-  CORBA::Long NbPrismsOfOrder(SMESH::ElementOrder order);
+  SMESH::smIdType NbPrismsOfOrder(SMESH::ElementOrder order);
 
-  CORBA::Long NbHexagonalPrisms();
+  SMESH::smIdType NbHexagonalPrisms();
 
-  CORBA::Long NbPolyhedrons();
+  SMESH::smIdType NbPolyhedrons();
 
-  CORBA::Long NbSubMesh();
+  SMESH::smIdType NbSubMesh();
 
   SMESH::long_array* GetElementsId();
 
@@ -504,7 +504,7 @@ public:
   /*!
    * Returns an element based on all given nodes.
    */
-  CORBA::Long FindElementByNodes(const SMESH::long_array& nodes);
+  SMESH::smIdType FindElementByNodes(const SMESH::long_array& nodes);
 
   /*!
    * Return elements including all given nodes.
index 5982ff089b339981cff994dd71183106d91d0dae..24195fa1b5ba27ddc031b365f70e9d7d9fbd2228 100644 (file)
@@ -140,7 +140,7 @@ bool getSubMeshes(::SMESH_subMesh*  theSubMesh,
  */
 //=============================================================================
 
-CORBA::Long SMESH_subMesh_i::GetNumberOfElements()
+SMESH::smIdType SMESH_subMesh_i::GetNumberOfElements()
 {
   Unexpect aCatch(SALOME_SalomeException);
 
@@ -170,7 +170,7 @@ CORBA::Long SMESH_subMesh_i::GetNumberOfElements()
  */
 //=============================================================================
 
-CORBA::Long SMESH_subMesh_i::GetNumberOfNodes(CORBA::Boolean all)
+SMESH::smIdType SMESH_subMesh_i::GetNumberOfNodes(CORBA::Boolean all)
 {
   Unexpect aCatch(SALOME_SalomeException);
 
@@ -372,7 +372,7 @@ SMESH::SMESH_Mesh_ptr SMESH_subMesh_i::GetFather()
  */
 //=============================================================================
   
-CORBA::Long SMESH_subMesh_i::GetId()
+SMESH::smIdType SMESH_subMesh_i::GetId()
 {
   return _localId;
 }
index 97c940b996ce1551b3cce122c72ead5e0ea2b92e..f79a581b0b7c0192c1c3f76b024eb824c38274a7 100644 (file)
@@ -53,9 +53,9 @@ public:
                    int                     localId );
   ~SMESH_subMesh_i();
 
-  CORBA::Long GetNumberOfElements();
+  SMESH::smIdType GetNumberOfElements();
   
-  CORBA::Long  GetNumberOfNodes( CORBA::Boolean all );
+  SMESH::smIdType  GetNumberOfNodes( CORBA::Boolean all );
   
   SMESH::long_array* GetElementsId();
 
@@ -69,7 +69,7 @@ public:
   
   GEOM::GEOM_Object_ptr GetSubShape();
 
-  CORBA::Long GetId();
+  SMESH::smIdType GetId();
 
 
   // =========================