]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
bos #20256: avoid clash with FromIdType() from MEDCOUPLING occ/20256
authoreap <eap@opencascade.com>
Fri, 19 Mar 2021 11:29:37 +0000 (14:29 +0300)
committereap <eap@opencascade.com>
Fri, 19 Mar 2021 11:29:37 +0000 (14:29 +0300)
22 files changed:
src/Controls/SMESH_Controls.cxx
src/DriverCGNS/DriverCGNS_Read.cxx
src/DriverCGNS/DriverCGNS_Write.cxx
src/DriverGMF/DriverGMF_Read.cxx
src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx
src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx
src/DriverUNV/DriverUNV_W_SMDS_Mesh.cxx
src/OBJECT/SMESH_DeviceActor.cxx
src/OBJECT/SMESH_Object.cxx
src/SMDS/SMDS_ElementFactory.cxx
src/SMDS/SMDS_UnstructuredGrid.cxx
src/SMESH/SMESH_MeshEditor.cxx
src/SMESHGUI/SMESHGUI_FilterDlg.cxx
src/SMESHGUI/SMESHGUI_MakeNodeAtPointDlg.cxx
src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx
src/SMESHGUI/SMESHGUI_MultiEditDlg.h
src/SMESHUtils/SMESH_MeshAlgos.cxx
src/SMESHUtils/SMESH_Offset.cxx
src/SMESHUtils/SMESH_TypeDefs.hxx
src/SMESH_I/SMESH_Mesh_i.cxx
src/StdMeshers/StdMeshers_Regular_1D.cxx
src/StdMeshersGUI/StdMeshersGUI_FixedPointsParamWdg.cxx

index 4864fb040b2ae461a2eade50f12bfd3af240c0d8..c3612f14231afd3be917c67558cd20f6a27fc361 100644 (file)
@@ -4178,7 +4178,7 @@ void ElementsOnSurface::process()
   if ( !myMeshModifTracer.GetMesh() )
     return;
 
-  int nbElems = FromIdType<int>( myMeshModifTracer.GetMesh()->GetMeshInfo().NbElements( myType ));
+  int nbElems = FromSmIdType<int>( myMeshModifTracer.GetMesh()->GetMeshInfo().NbElements( myType ));
   if ( nbElems > 0 )
     myIds.ReSize( nbElems );
 
index cfb37c3e4257ffea01e8863d4d35562934e8816a..85ddf9228f06e62f40bb81e1d9085e97a4cc76cc 100644 (file)
@@ -551,7 +551,7 @@ namespace
     vector<smIdType> idVec( ids[0] );
     for ( int i = 0; i < ids[0]; ++i )
       idVec[ i ] = (smIdType) ids[ i + 1];
-    return mesh->AddPolygonalFaceWithID( idVec, ToIdType(ID) );
+    return mesh->AddPolygonalFaceWithID( idVec, ID );
   }
 
   typedef SMDS_MeshElement* (* PAddElemFun) (cgsize_t* ids, SMESHDS_Mesh* mesh, int ID);
index 0643273cb61733042cd22c00c283db33c3b4d186..424ea027632f4c5f2fcf87581cc15ef836a4eaca 100644 (file)
@@ -285,8 +285,8 @@ Driver_Mesh::Status DriverCGNS_Write::Perform()
   else if ( meshDim == 2 )
     nbCells = myMesh->NbFaces();
 
-  cgsize_t size[9] = { FromIdType<cgsize_t>( myMesh->NbNodes() ),
-                       FromIdType<cgsize_t>( nbCells ),
+  cgsize_t size[9] = { FromSmIdType<cgsize_t>( myMesh->NbNodes() ),
+                       FromSmIdType<cgsize_t>( nbCells ),
                        /*NBoundVertex=*/0, 0,0,0,0,0,0 };
   int iZone;
   if ( cg_zone_write( _fn, iBase, "SMESH_Mesh", size,
index b70f6a33c29e6dd213300ed90edc12d58b7607f3..17e721c6d74d65938918dbcee808b282d61fd0e2 100644 (file)
@@ -429,7 +429,7 @@ Driver_Mesh::Status DriverGMF_Read::Perform()
     };
     for ( int i = 0; i < 4; ++i )
     {
-      int                 gmfKwd = FromIdType<int>( kes[i][0] );
+      int                 gmfKwd = FromSmIdType<int>( kes[i][0] );
       SMDSAbs_ElementType entity = (SMDSAbs_ElementType) kes[i][1];
       smIdType            shift  = kes[i][2];
       if ( int nb = GmfStatKwd(meshID, gmfKwd))
@@ -472,7 +472,7 @@ Driver_Mesh::Status DriverGMF_Read::Perform()
     };
     for ( int i = 0; i < 7; ++i )
     {
-      int                 gmfKwd = FromIdType<int>( kes[i][0] );
+      int                 gmfKwd = FromSmIdType<int>( kes[i][0] );
       SMDSAbs_ElementType entity = (SMDSAbs_ElementType) kes[i][1];
       smIdType            shift  = kes[i][2];
       if ( int nb = GmfStatKwd(meshID, gmfKwd))
index fac44fc86b10b59e9c744c39ee12b5540113b3d4..b46e696b1693da473f8389951a829029b9a047f6 100644 (file)
@@ -270,7 +270,7 @@ Driver_Mesh::Status DriverMED_R_SMESHDS_Mesh::Perform()
               aNodeIds.assign( aBallInfo->myConn->begin(), aBallInfo->myConn->end());
 
             // allocate array of diameters
-            vtkIdType maxID = FromIdType<vtkIdType>(myMesh->MaxElementID() + aNbBalls);
+            vtkIdType maxID = FromSmIdType<vtkIdType>(myMesh->MaxElementID() + aNbBalls);
             if ( anIsElemNum && !aBallInfo->myElemNum->empty() )
               maxID = *std::max_element( aBallInfo->myElemNum->begin(),
                                          aBallInfo->myElemNum->end() );
@@ -356,7 +356,7 @@ Driver_Mesh::Status DriverMED_R_SMESHDS_Mesh::Perform()
 #endif
                 if ( anIsElemNum ) {
                   TInt anElemId = aPolygoneInfo->GetElemNum( iElem );
-                  anElement = (myMesh->*addPolyWithID)( aNodeIds, ToIdType(anElemId) );
+                  anElement = (myMesh->*addPolyWithID)( aNodeIds, ToSmIdType(anElemId) );
                 }
                 if ( !anElement ) {
                   aNodes.resize( aNbConn );
@@ -437,7 +437,7 @@ Driver_Mesh::Status DriverMED_R_SMESHDS_Mesh::Perform()
 #endif
                 if(anIsElemNum){
                   TInt anElemId = aPolyedreInfo->GetElemNum(iElem);
-                  anElement = myMesh->AddPolyhedralVolumeWithID(aNodeIds,aQuantities,ToIdType(anElemId));
+                  anElement = myMesh->AddPolyhedralVolumeWithID(aNodeIds,aQuantities,ToSmIdType(anElemId));
                 }
                 if(!anElement){
                   vector<const SMDS_MeshNode*> aNodes(aNbNodes);
index bd5e48f4704ee4e84d6df5b4ff784119c5c02b4c..f2e3fefb7fe7dbe8cf0f5c5de54a47d5e6837c76 100644 (file)
@@ -548,7 +548,7 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
     const EBooleen      theIsElemNames = eFAUX;
     const EConnectivite theConnMode    = eNOD;
 
-    TInt aNbNodes = FromIdType<TInt>( myMesh->NbNodes() );
+    TInt aNbNodes = FromSmIdType<TInt>( myMesh->NbNodes() );
     PNodeInfo aNodeInfo = myMed->CrNodeInfo(aMeshInfo, aNbNodes,
                                             theMode, theSystem, theIsElemNum, theIsElemNames);
 
@@ -568,7 +568,7 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
         aTCoordSlice[2] = 0.;
 
       // node number
-      TInt aNodeID = FromIdType<TInt>( aCoordHelperPtr->GetID() );
+      TInt aNodeID = FromSmIdType<TInt>( aCoordHelperPtr->GetID() );
       aNodeInfo->SetElemNum( iNode, aNodeID );
 #ifdef _EDF_NODE_IDS_
       aNodeIdMap.insert( aNodeIdMap.end(), make_pair( aNodeID, iNode+1 ));
@@ -634,66 +634,66 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
 #endif
     aTElemTypeDatas.push_back( TElemTypeData(anEntity,
                                              eBALL,
-                                             FromIdType<TInt>(nbElemInfo.NbBalls()),
+                                             FromSmIdType<TInt>(nbElemInfo.NbBalls()),
                                              SMDSAbs_Ball));
 #ifdef _ELEMENTS_BY_DIM_
     anEntity = eARETE;
 #endif
     aTElemTypeDatas.push_back( TElemTypeData(anEntity,
                                              eSEG2,
-                                             FromIdType<TInt>(nbElemInfo.NbEdges( ORDER_LINEAR )),
+                                             FromSmIdType<TInt>(nbElemInfo.NbEdges( ORDER_LINEAR )),
                                              SMDSAbs_Edge));
     aTElemTypeDatas.push_back( TElemTypeData(anEntity,
                                              eSEG3,
-                                             FromIdType<TInt>(nbElemInfo.NbEdges( ORDER_QUADRATIC )),
+                                             FromSmIdType<TInt>(nbElemInfo.NbEdges( ORDER_QUADRATIC )),
                                              SMDSAbs_Edge));
 #ifdef _ELEMENTS_BY_DIM_
     anEntity = eFACE;
 #endif
     aTElemTypeDatas.push_back( TElemTypeData(anEntity,
                                              eTRIA3,
-                                             FromIdType<TInt>(nbElemInfo.NbTriangles( ORDER_LINEAR )),
+                                             FromSmIdType<TInt>(nbElemInfo.NbTriangles( ORDER_LINEAR )),
                                              SMDSAbs_Face));
     aTElemTypeDatas.push_back( TElemTypeData(anEntity,
                                              eTRIA6,
-                                             FromIdType<TInt>(nbElemInfo.NbTriangles( ORDER_QUADRATIC ) -
+                                             FromSmIdType<TInt>(nbElemInfo.NbTriangles( ORDER_QUADRATIC ) -
                                              nbElemInfo.NbBiQuadTriangles()),
                                              SMDSAbs_Face));
     aTElemTypeDatas.push_back( TElemTypeData(anEntity,
                                              eTRIA7,
-                                             FromIdType<TInt>(nbElemInfo.NbBiQuadTriangles()),
+                                             FromSmIdType<TInt>(nbElemInfo.NbBiQuadTriangles()),
                                              SMDSAbs_Face));
     aTElemTypeDatas.push_back( TElemTypeData(anEntity,
                                              eQUAD4,
-                                             FromIdType<TInt>(nbElemInfo.NbQuadrangles( ORDER_LINEAR )),
+                                             FromSmIdType<TInt>(nbElemInfo.NbQuadrangles( ORDER_LINEAR )),
                                              SMDSAbs_Face));
     aTElemTypeDatas.push_back( TElemTypeData(anEntity,
                                              eQUAD8,
-                                             FromIdType<TInt>(nbElemInfo.NbQuadrangles( ORDER_QUADRATIC ) -
+                                             FromSmIdType<TInt>(nbElemInfo.NbQuadrangles( ORDER_QUADRATIC ) -
                                              nbElemInfo.NbBiQuadQuadrangles()),
                                              SMDSAbs_Face));
     aTElemTypeDatas.push_back( TElemTypeData(anEntity,
                                              eQUAD9,
-                                             FromIdType<TInt>(nbElemInfo.NbBiQuadQuadrangles()),
+                                             FromSmIdType<TInt>(nbElemInfo.NbBiQuadQuadrangles()),
                                              SMDSAbs_Face));
     if ( polyTypesSupported ) {
       aTElemTypeDatas.push_back( TElemTypeData(anEntity,
                                                ePOLYGONE,
-                                               FromIdType<TInt>(nbElemInfo.NbPolygons( ORDER_LINEAR )),
+                                               FromSmIdType<TInt>(nbElemInfo.NbPolygons( ORDER_LINEAR )),
                                                SMDSAbs_Face));
       // we need one more loop on poly elements to count nb of their nodes
       aTElemTypeDatas.push_back( TElemTypeData(anEntity,
                                                ePOLYGONE,
-                                               FromIdType<TInt>(nbElemInfo.NbPolygons( ORDER_LINEAR )),
+                                               FromSmIdType<TInt>(nbElemInfo.NbPolygons( ORDER_LINEAR )),
                                                SMDSAbs_Face));
       aTElemTypeDatas.push_back( TElemTypeData(anEntity,
                                                ePOLYGON2,
-                                               FromIdType<TInt>(nbElemInfo.NbPolygons( ORDER_QUADRATIC )),
+                                               FromSmIdType<TInt>(nbElemInfo.NbPolygons( ORDER_QUADRATIC )),
                                                SMDSAbs_Face));
       // we need one more loop on QUAD poly elements to count nb of their nodes
       aTElemTypeDatas.push_back( TElemTypeData(anEntity,
                                                ePOLYGON2,
-                                               FromIdType<TInt>(nbElemInfo.NbPolygons( ORDER_QUADRATIC )),
+                                               FromSmIdType<TInt>(nbElemInfo.NbPolygons( ORDER_QUADRATIC )),
                                                SMDSAbs_Face));
     }
 #ifdef _ELEMENTS_BY_DIM_
@@ -701,58 +701,58 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
 #endif
     aTElemTypeDatas.push_back( TElemTypeData(anEntity,
                                              eTETRA4,
-                                             FromIdType<TInt>(nbElemInfo.NbTetras( ORDER_LINEAR )),
+                                             FromSmIdType<TInt>(nbElemInfo.NbTetras( ORDER_LINEAR )),
                                              SMDSAbs_Volume));
     aTElemTypeDatas.push_back( TElemTypeData(anEntity,
                                              eTETRA10,
-                                             FromIdType<TInt>(nbElemInfo.NbTetras( ORDER_QUADRATIC )),
+                                             FromSmIdType<TInt>(nbElemInfo.NbTetras( ORDER_QUADRATIC )),
                                              SMDSAbs_Volume));
     aTElemTypeDatas.push_back( TElemTypeData(anEntity,
                                              ePYRA5,
-                                             FromIdType<TInt>(nbElemInfo.NbPyramids( ORDER_LINEAR )),
+                                             FromSmIdType<TInt>(nbElemInfo.NbPyramids( ORDER_LINEAR )),
                                              SMDSAbs_Volume));
     aTElemTypeDatas.push_back( TElemTypeData(anEntity,
                                              ePYRA13,
-                                             FromIdType<TInt>(nbElemInfo.NbPyramids( ORDER_QUADRATIC )),
+                                             FromSmIdType<TInt>(nbElemInfo.NbPyramids( ORDER_QUADRATIC )),
                                              SMDSAbs_Volume));
     aTElemTypeDatas.push_back( TElemTypeData(anEntity,
                                              ePENTA6,
-                                             FromIdType<TInt>(nbElemInfo.NbPrisms( ORDER_LINEAR )),
+                                             FromSmIdType<TInt>(nbElemInfo.NbPrisms( ORDER_LINEAR )),
                                              SMDSAbs_Volume));
     aTElemTypeDatas.push_back( TElemTypeData(anEntity,
                                              ePENTA15,
-                                             FromIdType<TInt>(nbElemInfo.NbQuadPrisms()),
+                                             FromSmIdType<TInt>(nbElemInfo.NbQuadPrisms()),
                                              SMDSAbs_Volume));
     aTElemTypeDatas.push_back( TElemTypeData(anEntity,
                                              ePENTA18,
-                                             FromIdType<TInt>(nbElemInfo.NbBiQuadPrisms()),
+                                             FromSmIdType<TInt>(nbElemInfo.NbBiQuadPrisms()),
                                              SMDSAbs_Volume));
     aTElemTypeDatas.push_back( TElemTypeData(anEntity,
                                              eHEXA8,
-                                             FromIdType<TInt>(nbElemInfo.NbHexas( ORDER_LINEAR )),
+                                             FromSmIdType<TInt>(nbElemInfo.NbHexas( ORDER_LINEAR )),
                                              SMDSAbs_Volume));
     aTElemTypeDatas.push_back( TElemTypeData(anEntity,
                                              eHEXA20,
-                                             FromIdType<TInt>(nbElemInfo.NbHexas( ORDER_QUADRATIC )-
+                                             FromSmIdType<TInt>(nbElemInfo.NbHexas( ORDER_QUADRATIC )-
                                              nbElemInfo.NbTriQuadHexas()),
                                              SMDSAbs_Volume));
     aTElemTypeDatas.push_back( TElemTypeData(anEntity,
                                              eHEXA27,
-                                             FromIdType<TInt>(nbElemInfo.NbTriQuadHexas()),
+                                             FromSmIdType<TInt>(nbElemInfo.NbTriQuadHexas()),
                                              SMDSAbs_Volume));
     aTElemTypeDatas.push_back( TElemTypeData(anEntity,
                                              eOCTA12,
-                                             FromIdType<TInt>(nbElemInfo.NbHexPrisms()),
+                                             FromSmIdType<TInt>(nbElemInfo.NbHexPrisms()),
                                              SMDSAbs_Volume));
     if ( polyTypesSupported ) {
       aTElemTypeDatas.push_back( TElemTypeData(anEntity,
                                                ePOLYEDRE,
-                                               FromIdType<TInt>(nbElemInfo.NbPolyhedrons()),
+                                               FromSmIdType<TInt>(nbElemInfo.NbPolyhedrons()),
                                                SMDSAbs_Volume));
       // we need one more loop on poly elements to count nb of their nodes
       aTElemTypeDatas.push_back( TElemTypeData(anEntity,
                                                ePOLYEDRE,
-                                               FromIdType<TInt>(nbElemInfo.NbPolyhedrons()),
+                                               FromSmIdType<TInt>(nbElemInfo.NbPolyhedrons()),
                                                SMDSAbs_Volume));
     }
 
@@ -831,13 +831,13 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
             for(TInt iNode = 0; iNode < aNbNodes; iNode++) {
               const SMDS_MeshElement* aNode = anElem->GetNode( iNode );
 #ifdef _EDF_NODE_IDS_
-              aTConnSlice[ iNode ] = aNodeIdMap[FromIdType<TInt>(aNode->GetID())];
+              aTConnSlice[ iNode ] = aNodeIdMap[FromSmIdType<TInt>(aNode->GetID())];
 #else
               aTConnSlice[ iNode ] = aNode->GetID();
 #endif
             }
             // element number
-            aPolygoneInfo->SetElemNum( iElem, FromIdType<TInt>(anElem->GetID()) );
+            aPolygoneInfo->SetElemNum( iElem, FromSmIdType<TInt>(anElem->GetID()) );
 
             // family number
             int famNum = getFamilyId( anElemFamMap, anElem, defaultFamilyId );
@@ -905,14 +905,14 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
             while ( nodeIt->more() ) {
               const SMDS_MeshElement* aNode = nodeIt->next();
 #ifdef _EDF_NODE_IDS_
-              conn[ iNode ] = aNodeIdMap[FromIdType<TInt>(aNode->GetID())];
+              conn[ iNode ] = aNodeIdMap[FromSmIdType<TInt>(aNode->GetID())];
 #else
               conn[ iNode ] = aNode->GetID();
 #endif
               ++iNode;
             }
             // element number
-            aPolyhInfo->SetElemNum( iElem, FromIdType<TInt>(anElem->GetID()) );
+            aPolyhInfo->SetElemNum( iElem, FromSmIdType<TInt>(anElem->GetID()) );
 
             // family number
             int famNum = getFamilyId( anElemFamMap, anElem, defaultFamilyId );
@@ -939,12 +939,12 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
           // connectivity
           const SMDS_MeshElement* aNode = anElem->GetNode( 0 );
 #ifdef _EDF_NODE_IDS_
-          (*aBallInfo->myConn)[ iElem ] = aNodeIdMap[FromIdType<TInt>(aNode->GetID())];
+          (*aBallInfo->myConn)[ iElem ] = aNodeIdMap[FromSmIdType<TInt>(aNode->GetID())];
 #else
           (*aBallInfo->myConn)[ iElem ] = aNode->GetID();
 #endif
           // element number
-          aBallInfo->SetElemNum( iElem, FromIdType<TInt>(anElem->GetID()) );
+          aBallInfo->SetElemNum( iElem, FromSmIdType<TInt>(anElem->GetID()) );
 
           // diameter
           aBallInfo->myDiameters[ iElem ] =
@@ -987,13 +987,13 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
           for (TInt iNode = 0; iNode < aNbNodes; iNode++) {
             const SMDS_MeshElement* aNode = anElem->GetNode( iNode );
 #ifdef _EDF_NODE_IDS_
-            aTConnSlice[ iNode ] = aNodeIdMap[FromIdType<TInt>(aNode->GetID())];
+            aTConnSlice[ iNode ] = aNodeIdMap[FromSmIdType<TInt>(aNode->GetID())];
 #else
             aTConnSlice[ iNode ] = aNode->GetID();
 #endif
           }
           // element number
-          aCellInfo->SetElemNum( iElem, FromIdType<TInt>(anElem->GetID()) );
+          aCellInfo->SetElemNum( iElem, FromSmIdType<TInt>(anElem->GetID()) );
 
           // family number
           int famNum = getFamilyId( anElemFamMap, anElem, defaultFamilyId );
index da3381285d67c6268b4405d01e85afb3937602ca..7cd4ecd376a225489746f1d952fb1cdf66cef375 100644 (file)
@@ -117,7 +117,7 @@ Driver_Mesh::Status DriverUNV_W_SMDS_Mesh::Perform()
           {
             const SMDS_MeshNode* aNode = aNodesIter->next();
             if ( nodeLabelByID.empty() )
-              aRec.node_labels.push_back( FromIdType<int>(aNode->GetID()) );
+              aRec.node_labels.push_back( FromSmIdType<int>(aNode->GetID()) );
             else
               aRec.node_labels.push_back( nodeLabelByID[ aNode->GetID() ]);
           }
@@ -141,7 +141,7 @@ Driver_Mesh::Status DriverUNV_W_SMDS_Mesh::Perform()
           for ( aRec.node_labels.clear(); aNodesIter->more();  ) {
             const SMDS_MeshNode* aNode = aNodesIter->next();
             if ( nodeLabelByID.empty() )
-              aRec.node_labels.push_back( FromIdType<int>(aNode->GetID()) );
+              aRec.node_labels.push_back( FromSmIdType<int>(aNode->GetID()) );
             else
               aRec.node_labels.push_back( nodeLabelByID[ aNode->GetID() ]);
           }
@@ -199,7 +199,7 @@ Driver_Mesh::Status DriverUNV_W_SMDS_Mesh::Perform()
           {
             const SMDS_MeshElement* aNode = aNodesIter->next();
             if ( nodeLabelByID.empty() )
-              aRec.node_labels.push_back( FromIdType<int>(aNode->GetID()) );
+              aRec.node_labels.push_back( FromSmIdType<int>(aNode->GetID()) );
             else
               aRec.node_labels.push_back( nodeLabelByID[ aNode->GetID() ]);
           }
@@ -230,7 +230,7 @@ Driver_Mesh::Status DriverUNV_W_SMDS_Mesh::Perform()
             while ( aIter->more() ) {
               const SMDS_MeshElement* aNode = aIter->next();
               if ( nodeLabelByID.empty() )
-                aRec.NodeList.push_back( FromIdType<int>(aNode->GetID()) );
+                aRec.NodeList.push_back( FromSmIdType<int>(aNode->GetID()) );
               else
                 aRec.NodeList.push_back( nodeLabelByID[ aNode->GetID() ]);
             }
@@ -240,7 +240,7 @@ Driver_Mesh::Status DriverUNV_W_SMDS_Mesh::Perform()
             while ( aIter->more() ) {
               const SMDS_MeshElement* aElem = aIter->next();
               if ( elemLabelByID.empty() )
-                aRec.ElementList.push_back( FromIdType<int>(aElem->GetID()) );
+                aRec.ElementList.push_back( FromSmIdType<int>(aElem->GetID()) );
               else
                 aRec.ElementList.push_back( elemLabelByID[ aElem->GetID() ]);
             }
index 7733dd88d79d415f1cb7634b5c7f5950381c6ffc..14cb5394ba64e11833643c5ad18ead248482da32 100644 (file)
@@ -604,7 +604,7 @@ SMESH_DeviceActor
            ( aPredicate = dynamic_cast<CoincidentNodes*>(theFunctor.get())))
   {
     myExtractUnstructuredGrid->SetModeOfChanging(VTKViewer_ExtractUnstructuredGrid::eAdding);
-    vtkIdType aNbNodes = FromIdType<vtkIdType>(myVisualObj->GetNbEntities(SMDSAbs_Node));
+    vtkIdType aNbNodes = FromSmIdType<vtkIdType>(myVisualObj->GetNbEntities(SMDSAbs_Node));
     for( vtkIdType i = 0; i < aNbNodes; i++ ){
       vtkIdType anObjId = myVisualObj->GetNodeObjId(i);
       if(aPredicate->IsSatisfy(anObjId))
index e7696cd000eb33006aa981c8123766352d4c4bd7..002bf2a4361adb2bcefacfcfc3aa6a8dd687ab9c 100644 (file)
@@ -114,7 +114,7 @@ vtkIdType SMESH_VisualObjDef::GetNodeObjId( vtkIdType theVTKID )
   if( this->GetMesh() )
     aNode = this->GetMesh()->FindNodeVtk( theVTKID );
 
-  return aNode ? FromIdType<vtkIdType>(aNode->GetID()) : -1;
+  return aNode ? FromSmIdType<vtkIdType>(aNode->GetID()) : -1;
 }
 
 vtkIdType SMESH_VisualObjDef::GetNodeVTKId( vtkIdType theObjID )
@@ -139,7 +139,7 @@ vtkIdType SMESH_VisualObjDef::GetElemObjId( vtkIdType theVTKID )
     TMapOfIds::const_iterator i = myVTK2SMDSElems.find(theVTKID);
     return i == myVTK2SMDSElems.end() ? -1 : i->second;
   }
-  return FromIdType<vtkIdType>(this->GetMesh()->FromVtkToSmds(theVTKID));
+  return FromSmIdType<vtkIdType>(this->GetMesh()->FromVtkToSmds(theVTKID));
 }
 
 vtkIdType SMESH_VisualObjDef::GetElemVTKId( vtkIdType theObjID )
@@ -171,7 +171,7 @@ void SMESH_VisualObjDef::createPoints( vtkPoints* thePoints )
     return;
 
   TEntityList aNodes;
-  vtkIdType nbNodes = FromIdType<vtkIdType>(GetEntities( SMDSAbs_Node, aNodes ));
+  vtkIdType nbNodes = FromSmIdType<vtkIdType>(GetEntities( SMDSAbs_Node, aNodes ));
   thePoints->SetNumberOfPoints( nbNodes );
 
   int nbPoints = 0;
@@ -424,7 +424,7 @@ void SMESH_VisualObjDef::buildElemPrs()
                 anIdList->InsertNextId(ph->NbFaceNodes(i));
                 for(int j = 1; j <= ph->NbFaceNodes(i); j++) {
                   if ( const SMDS_MeshNode* n = ph->GetFaceNode( i, j ))
-                    anIdList->InsertNextId( mySMDS2VTKNodes[ FromIdType<vtkIdType>(n->GetID()) ]);
+                    anIdList->InsertNextId( mySMDS2VTKNodes[ FromSmIdType<vtkIdType>(n->GetID()) ]);
                 }
               }
             }
@@ -441,7 +441,7 @@ void SMESH_VisualObjDef::buildElemPrs()
             else {
               for( vtkIdType aNodeId = 0; aNodesIter->more(); aNodeId++ ){
                 const SMDS_MeshElement* aNode = aNodesIter->next();
-                anIdList->SetId( aNodeId, mySMDS2VTKNodes[FromIdType<vtkIdType>(aNode->GetID())] );
+                anIdList->SetId( aNodeId, mySMDS2VTKNodes[FromSmIdType<vtkIdType>(aNode->GetID())]);
               }
             }
           }
index 1501b1eb566c07e6c8006640d6925204daf600e2..dc8fa6bf99af6d775033e25bad71b195cd11f079 100644 (file)
@@ -178,11 +178,11 @@ SMDS_MeshElement* SMDS_ElementFactory::NewElement( const smIdType id )
     smIdType id0 = myChunks.size() * theChunkSize + 1;
     myChunks.push_back( new SMDS_ElementChunk( this, id0 ));
   }
-  SMDS_MeshElement* e = myChunks[iChunk].Element( FromIdType<int>(index) );
+  SMDS_MeshElement* e = myChunks[iChunk].Element( FromSmIdType<int>(index) );
   if ( !e->IsNull() )
     return 0; // element with given ID already exists
 
-  myChunks[iChunk].UseElement( FromIdType<int>(index) );
+  myChunks[iChunk].UseElement( FromSmIdType<int>(index) );
   ++myNbUsedElements;
 
   e->myHolder = & myChunks[iChunk];
@@ -208,7 +208,7 @@ const SMDS_MeshElement* SMDS_ElementFactory::FindElement( const smIdType id ) co
     smIdType index  = ( id - 1 ) % theChunkSize;
     if ( iChunk < (smIdType) myChunks.size() )
     {
-      const SMDS_MeshElement* e = myChunks[iChunk].Element( FromIdType<int>(index) );
+      const SMDS_MeshElement* e = myChunks[iChunk].Element( FromSmIdType<int>(index) );
       return e->IsNull() ? 0 : e;
     }
   }
@@ -647,7 +647,7 @@ void SMDS_ElementChunk::SetVTKID( const SMDS_MeshElement* e, const vtkIdType vtk
 
 vtkIdType SMDS_ElementChunk::GetVtkID( const SMDS_MeshElement* e ) const
 {
-  vtkIdType dfltVtkID = FromIdType<vtkIdType>(e->GetID() - 1);
+  vtkIdType dfltVtkID = FromSmIdType<vtkIdType>(e->GetID() - 1);
   return ( dfltVtkID < (vtkIdType)myFactory->myVtkIDs.size() ) ? myFactory->myVtkIDs[ dfltVtkID ] : dfltVtkID;
 }
 
index 039d4920b1949c72e9d4c56348a5d1f0feeea3ca..9cb9a20402ed5322aadf4326f85d276e3b9d34b2 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( FromIdType<vtkIdType>(newNodeSize) );
+    newPoints->SetNumberOfPoints( FromSmIdType<vtkIdType>(newNodeSize) );
 
     vtkIdType 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(FromIdType<vtkIdType>(newCellSize));
+  newTypes->SetNumberOfValues(FromSmIdType<vtkIdType>(newCellSize));
 
   vtkIdTypeArray *newLocations = vtkIdTypeArray::New();
   newLocations->Initialize();
-  newLocations->SetNumberOfValues(FromIdType<vtkIdType>(newCellSize));
+  newLocations->SetNumberOfValues(FromSmIdType<vtkIdType>(newCellSize));
 
   std::vector< vtkIdType > pointsCell(1024); // --- points id to fill a new cell
 
@@ -298,16 +298,16 @@ void SMDS_UnstructuredGrid::compactGrid(std::vector<smIdType>& idNodesOldToNew,
       {
         smIdType oldCellId = idCellsNewToOld[ newCellID ];
         newFaceLocations->InsertNextValue( newFaces->GetMaxId()+1 );
-        smIdType oldFaceLoc = this->FaceLocations->GetValue( FromIdType<vtkIdType>(oldCellId) );
-        smIdType nCellFaces = this->Faces->GetValue( FromIdType<vtkIdType>(oldFaceLoc++) );
-        newFaces->InsertNextValue( FromIdType<vtkIdType>(nCellFaces) );
+        smIdType oldFaceLoc = this->FaceLocations->GetValue( FromSmIdType<vtkIdType>(oldCellId) );
+        smIdType nCellFaces = this->Faces->GetValue( FromSmIdType<vtkIdType>(oldFaceLoc++) );
+        newFaces->InsertNextValue( FromSmIdType<vtkIdType>(nCellFaces) );
         for ( int n = 0; n < nCellFaces; n++ )
         {
-          int nptsInFace = this->Faces->GetValue( FromIdType<vtkIdType>(oldFaceLoc++) );
+          int nptsInFace = this->Faces->GetValue( FromSmIdType<vtkIdType>(oldFaceLoc++) );
           newFaces->InsertNextValue( nptsInFace );
           for ( int k = 0; k < nptsInFace; k++ )
           {
-            vtkIdType oldpt = this->Faces->GetValue( FromIdType<vtkIdType>(oldFaceLoc++) );
+            vtkIdType oldpt = this->Faces->GetValue( FromSmIdType<vtkIdType>(oldFaceLoc++) );
             newFaces->InsertNextValue( idNodesOldToNew[ oldpt ]);
           }
         }
@@ -446,15 +446,15 @@ void SMDS_UnstructuredGrid::BuildDownwardConnectivity(bool /*withEdges*/)
 
   const SMDS_MeshInfo &meshInfo = _mesh->GetMeshInfo();
 
-  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 nbLinTetra  = FromSmIdType<int>(meshInfo.NbTetras  (ORDER_LINEAR));
+  int nbQuadTetra = FromSmIdType<int>(meshInfo.NbTetras  (ORDER_QUADRATIC));
+  int nbLinPyra   = FromSmIdType<int>(meshInfo.NbPyramids(ORDER_LINEAR));
+  int nbQuadPyra  = FromSmIdType<int>(meshInfo.NbPyramids(ORDER_QUADRATIC));
+  int nbLinPrism  = FromSmIdType<int>(meshInfo.NbPrisms  (ORDER_LINEAR));
+  int nbQuadPrism = FromSmIdType<int>(meshInfo.NbPrisms  (ORDER_QUADRATIC));
+  int nbLinHexa   = FromSmIdType<int>(meshInfo.NbHexas   (ORDER_LINEAR));
+  int nbQuadHexa  = FromSmIdType<int>(meshInfo.NbHexas   (ORDER_QUADRATIC));
+  int nbHexPrism  = FromSmIdType<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 3cb125ff2c426a91c15f925605969bcf82d14401..2c7cbab0dc8c050b481675ebdc56f9e02ec6c166 100644 (file)
@@ -7474,7 +7474,7 @@ public:
 
   static int HashCode(const ComparableElement& se, int limit )
   {
-    return ::HashCode( FromIdType<int>(se.mySumID), limit );
+    return ::HashCode( FromSmIdType<int>(se.mySumID), limit );
   }
   static Standard_Boolean IsEqual(const ComparableElement& se1, const ComparableElement& se2 )
   {
index 79e415e442f38fdd0da158a7082cd0200ac73417..36ba5eaa10197895d0f153d86bd8573fc1ecc2ac 100644 (file)
@@ -3539,7 +3539,7 @@ void SMESHGUI_FilterDlg::filterSource (const int theType,
       return;
     SMESH::smIdType_array_var anIds = myFilter[ theType ]->GetElementsId(myMesh);
     for (int i = 0, n = anIds->length(); i < n; i++)
-      theResIds.append(FromIdType<int>(anIds[ i ]));
+      theResIds.append(FromSmIdType<int>(anIds[ i ]));
   }
   else if (aSourceId == Selection)
   {
@@ -3593,7 +3593,7 @@ void SMESHGUI_FilterDlg::filterSelectionSource (const int theType,
         SMESH::smIdType_array_var anIds =
           theType == SMESH::NODE ? aSubMesh->GetNodesId() : aSubMesh->GetElementsId();
         for (int i = 0, n = anIds->length(); i < n; i++)
-          aToBeFiltered.Add(FromIdType<int>(anIds[ i ]));
+          aToBeFiltered.Add(FromSmIdType<int>(anIds[ i ]));
       }
     }
 
@@ -3606,7 +3606,7 @@ void SMESHGUI_FilterDlg::filterSelectionSource (const int theType,
       {
         SMESH::smIdType_array_var anIds = aGroup->GetListOfID();
         for (int i = 0, n = anIds->length(); i < n; i++)
-          aToBeFiltered.Add(FromIdType<int>(anIds[ i ]));
+          aToBeFiltered.Add(FromSmIdType<int>(anIds[ i ]));
       }
     }
 
index 6febe32b6d9dbb9388969d2aa5e0b2d5a461d340..9898f9051a2c053ea8e94a16d8d473bf6e43b8fc 100644 (file)
@@ -533,7 +533,7 @@ bool SMESHGUI_MakeNodeAtPointOp::onApply()
     bool ok;
     int anId = myDlg->myId->text().toInt( &ok );
     if( !ok || anId < 1 )
-      anId = FromIdType<int>(aMeshEditor->FindNodeClosestTo(myDlg->myDestinationX->GetValue(),
+      anId = FromSmIdType<int>(aMeshEditor->FindNodeClosestTo(myDlg->myDestinationX->GetValue(),
                                                             myDlg->myDestinationY->GetValue(),
                                                             myDlg->myDestinationZ->GetValue()));
 
@@ -770,7 +770,7 @@ void SMESHGUI_MakeNodeAtPointOp::redisplayPreview()
               myDlg->myDestDZ->setReadOnly(true);
             }
             if ( isPreview && isMoveNode && anId == 0 )
-              anId = FromIdType<int>(aPreviewer->FindNodeClosestTo(myDlg->myDestinationX->GetValue(),
+              anId = FromSmIdType<int>(aPreviewer->FindNodeClosestTo(myDlg->myDestinationX->GetValue(),
                                                                    myDlg->myDestinationY->GetValue(),
                                                                    myDlg->myDestinationZ->GetValue()));
             // find id and/or just compute preview
@@ -870,7 +870,7 @@ void SMESHGUI_MakeNodeAtPointOp::onTextChange( const QString& theText )
       if( const SMDS_MeshNode* aNode = aMesh->FindNode( theText.toInt() ) )
       {
         SVTK_TVtkIDsMap aListInd;
-        aListInd.Add( FromIdType<int>(aNode->GetID()) );
+        aListInd.Add( FromSmIdType<int>(aNode->GetID()) );
         selector()->AddOrRemoveIndex( anIO, aListInd, false );
         if( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( SMESHGUI::GetSMESHGUI() ) )
           aViewWindow->highlight( anIO, true, true );
index 34ba6a13ae4e7d53bf8d8ebd508008ca34f2a009..b964c90bdb699afea2b7177623bd42b3132a07a3 100644 (file)
@@ -711,7 +711,7 @@ void SMESHGUI_MultiEditDlg::onAddBtn()
         if (aSubMesh->GetFather()->GetId() == myMesh->GetId()) {
           SMESH::smIdType_array_var anIds = aSubMesh->GetElementsId();
           for (int i = 0, n = anIds->length(); i < n; i++) {
-            if (isIdValid(FromIdType<int>(anIds[ i ])))
+            if (isIdValid(FromSmIdType<int>(anIds[ i ])))
               toBeAdded.Add(anIds[ i ]);
           }
         }
@@ -727,7 +727,7 @@ void SMESHGUI_MultiEditDlg::onAddBtn()
         if (aGroup->GetMesh()->GetId() == myMesh->GetId()) {
           SMESH::smIdType_array_var anIds = aGroup->GetListOfID();
           for (int i = 0, n = anIds->length(); i < n; i++) {
-            if (isIdValid(FromIdType<int>(anIds[ i ])))
+            if (isIdValid(FromSmIdType<int>(anIds[ i ])))
               toBeAdded.Add(anIds[ i ]);
           }
         }
@@ -1109,9 +1109,9 @@ bool SMESHGUI_ChangeOrientationDlg::process (SMESH::SMESH_MeshEditor_ptr  theEdi
     return theEditor->ReorientObject( obj );
 }
 
-int SMESHGUI_ChangeOrientationDlg::nbElemsInMesh()
+smIdType SMESHGUI_ChangeOrientationDlg::nbElemsInMesh()
 {
-  return ( myFilterType == SMESH::FaceFilter ) ? FromIdType<int>(myMesh->NbFaces()) : FromIdType<int>(myMesh->NbVolumes());
+  return ( myFilterType == SMESH::FaceFilter ) ? myMesh->NbFaces() : myMesh->NbVolumes();
 }
 
 /*!
@@ -1207,9 +1207,9 @@ bool SMESHGUI_UnionOfTrianglesDlg::process (SMESH::SMESH_MeshEditor_ptr theEdito
   return ok;
 }
 
-int SMESHGUI_UnionOfTrianglesDlg::nbElemsInMesh()
+smIdType SMESHGUI_UnionOfTrianglesDlg::nbElemsInMesh()
 {
-  return FromIdType<int>(myMesh->NbTriangles());
+  return myMesh->NbTriangles();
 }
   
 void SMESHGUI_UnionOfTrianglesDlg::onDisplaySimulation( bool toDisplayPreview )
@@ -1327,9 +1327,9 @@ bool SMESHGUI_CuttingOfQuadsDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor,
   return hasObj ? theEditor->QuadToTriObject(obj, aCrit) : theEditor->QuadToTri(theIds, aCrit);
 }
 
-int SMESHGUI_CuttingOfQuadsDlg::nbElemsInMesh()
+smIdType SMESHGUI_CuttingOfQuadsDlg::nbElemsInMesh()
 {
-  return FromIdType<int>(myMesh->NbQuadrangles());
+  return myMesh->NbQuadrangles();
 }
 
 
@@ -1439,13 +1439,13 @@ void SMESHGUI_CuttingOfQuadsDlg::displayPreview()
       const SMDS_MeshNode* aNode = static_cast<const SMDS_MeshNode*>(anIter->next());
       if (aNode)
       {
-        if (!anIdToVtk.IsBound(FromIdType<int>(aNode->GetID())))
+        if (!anIdToVtk.IsBound(FromSmIdType<int>(aNode->GetID())))
         {
           aPoints->SetPoint(++nbPoints, aNode->X(), aNode->Y(), aNode->Z());
-          anIdToVtk.Bind(FromIdType<int>(aNode->GetID()), nbPoints);
+          anIdToVtk.Bind(FromSmIdType<int>(aNode->GetID()), nbPoints);
         }
 
-        aNodes[ k++ ] = FromIdType<int>(aNode->GetID());
+        aNodes[ k++ ] = FromSmIdType<int>(aNode->GetID());
       }
     }
 
@@ -1696,9 +1696,9 @@ bool SMESHGUI_SplitVolumesDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor,
   return true;
 }
 
-int SMESHGUI_SplitVolumesDlg::nbElemsInMesh()
+smIdType SMESHGUI_SplitVolumesDlg::nbElemsInMesh()
 {
-  return isIntoPrisms() ? FromIdType<int>(myMesh->NbHexas()) : FromIdType<int>(myMesh->NbVolumes() - myMesh->NbTetras());
+  return isIntoPrisms() ? myMesh->NbHexas() : myMesh->NbVolumes() - myMesh->NbTetras();
 }
 
 bool SMESHGUI_SplitVolumesDlg::isIntoPrisms()
index e62901bfe606850dd203db23f24e789e1b87d669..88c8293d0cfb61bffd67232f6d96bcc5c29fc4d7 100644 (file)
@@ -41,6 +41,8 @@
 #include CORBA_SERVER_HEADER(SMESH_Mesh)
 #include CORBA_SERVER_HEADER(SMESH_MeshEditor)
 
+#include <smIdType.hxx>
+
 class SMESHGUI;
 class SMESHGUI_FilterDlg;
 class SMESHGUI_SpinBox;
@@ -120,7 +122,7 @@ protected:
   virtual bool              process( SMESH::SMESH_MeshEditor_ptr, 
                                      const SMESH::smIdType_array& ,
                                      SMESH::SMESH_IDSource_ptr obj) = 0;
-  virtual int               nbElemsInMesh() = 0;
+  virtual smIdType          nbElemsInMesh() = 0;
   int                       entityType();
 
 protected:
@@ -184,7 +186,7 @@ protected:
   virtual bool process( SMESH::SMESH_MeshEditor_ptr,
                         const SMESH::smIdType_array& ,
                         SMESH::SMESH_IDSource_ptr obj);
-  virtual int  nbElemsInMesh();
+  virtual smIdType nbElemsInMesh();
 };
 
 /*!
@@ -204,7 +206,7 @@ protected:
   virtual bool      process( SMESH::SMESH_MeshEditor_ptr,
                              const SMESH::smIdType_array&,
                              SMESH::SMESH_IDSource_ptr obj );
-  virtual int       nbElemsInMesh();
+  virtual smIdType  nbElemsInMesh();
 
 protected slots:
    virtual void     onDisplaySimulation( bool );
@@ -229,7 +231,7 @@ protected:
   virtual bool  process( SMESH::SMESH_MeshEditor_ptr,
                          const SMESH::smIdType_array& ,
                          SMESH::SMESH_IDSource_ptr obj);
-  virtual int   nbElemsInMesh();
+  virtual smIdType nbElemsInMesh();
 
 protected slots:
   virtual void  reject();
@@ -271,7 +273,7 @@ protected:
   virtual bool process( SMESH::SMESH_MeshEditor_ptr,
                         const SMESH::smIdType_array&,
                         SMESH::SMESH_IDSource_ptr obj );
-  virtual int  nbElemsInMesh();
+  virtual smIdType nbElemsInMesh();
 
   virtual void setSelectionMode();
   void         showFacetByElement( int id );
index 9a6a427509b62bd11620d86962813e8c23cd20ae..bcb28899108b65e80df4ff32cd6b872ab197f169 100644 (file)
@@ -1985,7 +1985,7 @@ SMESH_MeshAlgos::FindSharpEdges( SMDS_Mesh* theMesh,
   typedef NCollection_DataMap< SMESH_TLink, TIsSharpAndMedium, SMESH_TLink > TLinkSharpMap;
 
   TLinkSharpMap linkIsSharp;
-  Standard_Integer nbBuckets = FromIdType<Standard_Integer>( theMesh->NbFaces() );
+  Standard_Integer nbBuckets = FromSmIdType<Standard_Integer>( theMesh->NbFaces() );
   if ( nbBuckets > 0 )
     linkIsSharp.ReSize( nbBuckets );
 
@@ -2096,7 +2096,7 @@ SMESH_MeshAlgos::SeparateFacesByEdges( SMDS_Mesh* theMesh, const std::vector< Ed
   typedef std::vector< const SMDS_MeshElement* >                    TFaceVec;
   typedef NCollection_DataMap< SMESH_TLink, TFaceVec, SMESH_TLink > TFacesByLinks;
   TFacesByLinks facesByLink;
-  Standard_Integer nbBuckets = FromIdType<Standard_Integer>( theMesh->NbFaces() );
+  Standard_Integer nbBuckets = FromSmIdType<Standard_Integer>( theMesh->NbFaces() );
   if ( nbBuckets > 0 )
     facesByLink.ReSize( nbBuckets );
 
index cd886ee58026fc4aab3a2c8b8794e7e78ef175bf..830e03ab9577553e49d9c3ecbf1623c8040ac9e7 100644 (file)
@@ -277,7 +277,7 @@ namespace
 
     static Standard_Integer HashCode(const CutFace& f, const Standard_Integer upper)
     {
-      return ::HashCode( FromIdType<int>(f.myInitFace->GetID()), upper );
+      return ::HashCode( FromSmIdType<int>(f.myInitFace->GetID()), upper );
     }
     static Standard_Boolean IsEqual(const CutFace& f1, const CutFace& f2 )
     {
index f6cb1d3ed7692ebd571efa578ab1a0e6cc69e8c5..f4dd5c67e1289b5e47fdad1a3c9a563e992f5af6 100644 (file)
@@ -156,7 +156,7 @@ struct SMESH_TLink: public NLink
   // methods for usage of SMESH_TLink as a hasher in NCollection maps
   static int HashCode(const SMESH_TLink& link, int aLimit)
   {
-    return ::HashCode( FromIdType<int>(link.node1()->GetID() + link.node2()->GetID()), aLimit );
+    return smIdHasher::HashCode( link.node1()->GetID() + link.node2()->GetID(), aLimit );
   }
   static Standard_Boolean IsEqual(const SMESH_TLink& l1, const SMESH_TLink& l2)
   {
@@ -217,7 +217,7 @@ struct SMESH_Hasher
 {
   static Standard_Integer HashCode(const SMDS_MeshElement* e, const Standard_Integer upper)
   {
-    return ::HashCode( FromIdType<int>(e->GetID()), upper );
+    return smIdHasher::HashCode( e->GetID(), upper );
   }
   static Standard_Boolean IsEqual( const SMDS_MeshElement* e1, const SMDS_MeshElement* e2 )
   {
index a7c67171c1afb1f0c1bac4a32e4637d8f5746d57..0470c9fcd4cf71c8e58cbf20ceb3cadb74d447a9 100644 (file)
@@ -2065,7 +2065,7 @@ void SMESH_Mesh_i::ReplaceShape(GEOM::GEOM_Object_ptr theNewGeom)
   }
 
   typedef struct {
-    int shapeID, fromID, toID; // indices of elements of a sub-mesh
+    int shapeID; smIdType fromID, toID; // indices of elements of a sub-mesh
   } TRange;
   std::vector< TRange > elemRanges, nodeRanges; // elements of sub-meshes
   std::vector< SMDS_PositionPtr > positions; // node positions
@@ -2101,7 +2101,7 @@ void SMESH_Mesh_i::ReplaceShape(GEOM::GEOM_Object_ptr theNewGeom)
         TRange &        lastRange = ranges.back();
         if ( lastRange.shapeID != shapeID ||
              lastRange.toID    != elemID )
-          ranges.push_back( TRange{ shapeID, FromIdType<int>(elemID), FromIdType<int>(elemID + 1) });
+          ranges.push_back( TRange{ shapeID, elemID, elemID + 1 });
         else
           lastRange.toID = elemID + 1;
 
index ed0d0d29447c70bcb480f780e6d9ae9988aa7498..950d0cdf97cc657e2519e7b074db88825730bbc6 100644 (file)
@@ -583,7 +583,7 @@ bool StdMeshers_Regular_1D::divideIntoEqualSegments( SMESH_Mesh &        theMesh
   bool ok = false;
   if ( theNbPoints < IntegerLast() )
   {
-    int nbPnt = FromIdType<int>( theNbPoints );
+    int nbPnt = FromSmIdType<int>( theNbPoints );
     GCPnts_UniformAbscissa discret(theC3d, nbPnt, theFirstU, theLastU, theTol );
     if ( !discret.IsDone() )
       return error( "GCPnts_UniformAbscissa failed");
@@ -801,7 +801,7 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh &     theMesh,
       if (nbseg <= 0)
         nbseg = 1; // degenerated edge
       eltSize = theLength / nbseg * ( 1. - 1e-9 );
-      nbSegments = ToIdType( nbseg );
+      nbSegments = ToSmIdType( nbseg );
     }
     else if ( _hypType == LOCAL_LENGTH )
     {
@@ -827,7 +827,7 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh &     theMesh,
             smIdType  nb_segments = smds->NbElements();
             if (nbseg - 1 <= nb_segments && nb_segments <= nbseg + 1) {
               isFound = true;
-              nbseg = FromIdType<double>( nb_segments );
+              nbseg = FromSmIdType<double>( nb_segments );
             }
           }
         }
@@ -842,7 +842,7 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh &     theMesh,
       if (nbseg <= 0)
         nbseg = 1;                        // degenerated edge
       eltSize = theLength / nbseg;
-      nbSegments = ToIdType( nbseg );
+      nbSegments = ToSmIdType( nbseg );
     }
     else
     {
@@ -891,7 +891,7 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh &     theMesh,
         break;
       case StdMeshers_NumberOfSegments::DT_TabFunc:
         {
-          FunctionTable func(_vvalue[ TAB_FUNC_IND ], FromIdType<int>( _ivalue[ CONV_MODE_IND ]));
+          FunctionTable func(_vvalue[ TAB_FUNC_IND ], FromSmIdType<int>( _ivalue[ CONV_MODE_IND ]));
           return computeParamByFunc(theC3d, f, l, theLength, theReverse,
                                     _ivalue[ NB_SEGMENTS_IND ], func,
                                     theParams);
@@ -900,7 +900,7 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh &     theMesh,
       case StdMeshers_NumberOfSegments::DT_ExprFunc:
         {
           FunctionExpr func(_svalue[ EXPR_FUNC_IND ].c_str(),
-                            FromIdType<int>( _ivalue[ CONV_MODE_IND ]));
+                            FromSmIdType<int>( _ivalue[ CONV_MODE_IND ]));
           return computeParamByFunc(theC3d, f, l, theLength, theReverse,
                                     _ivalue[ NB_SEGMENTS_IND ], func,
                                     theParams);
index 8793f3bcee1858c6b6801e5017e3d1090aaaf187..e69a8024d1b0784e398cad502a943faacb3dc72f 100644 (file)
@@ -305,14 +305,14 @@ void StdMeshersGUI_FixedPointsParamWdg::setNbSegments( int idx, SMESH::smIdType
 {
   if ( idx >= 0 && idx < myTreeWidget->topLevelItemCount() )
   {
-    myTreeWidget->topLevelItem( idx )->setData( 1, Qt::UserRole, FromIdType<int>( val ));
+    myTreeWidget->topLevelItem( idx )->setData( 1, Qt::UserRole, qlonglong( val ));
     myTreeWidget->topLevelItem( idx )->setText( 1, idx > 0 && mySameValues->isChecked() ? QString( SAME_TEXT ) : QString::number( val ) );
   }
 }
 
 smIdType StdMeshersGUI_FixedPointsParamWdg::nbSegments( int idx ) const
 {
-  return ToIdType( idx >= 0 && idx < myTreeWidget->topLevelItemCount() ? myTreeWidget->topLevelItem( idx )->data( 1, Qt::UserRole ).toInt() : 1 );
+  return idx >= 0 && idx < myTreeWidget->topLevelItemCount() ? myTreeWidget->topLevelItem( idx )->data( 1, Qt::UserRole ).toLongLong() : 1;
 }
 
 //=================================================================================