while (anElemIter->more()) {
const SMDS_MeshElement* anElem = anElemIter->next();
if (anElem != 0 && anElem->GetType() == SMDSAbs_Face) {
- int anId = anElem->GetID();
+ smIdType anId = anElem->GetID();
aMap.Add(anId);
if (aMapPrev.Contains(anId)) {
std::list< const SMDS_MeshNode*>& coincNodes = *groupIt;
std::list< const SMDS_MeshNode*>::iterator n = coincNodes.begin();
for ( ; n != coincNodes.end(); ++n )
- myCoincidentIDs.Add( (*n)->GetID() );
+ myCoincidentIDs.Add( FromIdType<int>((*n)->GetID()) );
}
}
}
{
if ( const SMDS_MeshElement* anElem = anElemIter->next())
{
- const int anId = anElem->GetID();
+ const int anId = FromIdType<int>(anElem->GetID());
if ( anId != theFaceId && anElem->GetNodeIndex( theNodes[1] ) >= 0 )
return false;
}
if ( !foundElems.empty() )
{
- myNodeID = foundElems[0]->GetNode(0)->GetID();
+ myNodeID = FromIdType<int>(foundElems[0]->GetNode(0)->GetID());
if ( myOkIDsReady && !myMeshModifTracer.IsMeshModified() )
isSameDomain = IsSatisfy( foundElems[0]->GetID() );
}
// keep elements of myType
const SMDS_MeshElement* element = eIt->next();
if ( myType == SMDSAbs_All || element->GetType() == myType )
- myOkIDs.insert( myOkIDs.end(), element->GetID() );
+ myOkIDs.insert( myOkIDs.end(), FromIdType<int>(element->GetID()) );
// enqueue nodes of the element
SMDS_ElemIteratorPtr nIt = element->nodesIterator();
while ( nIt->more() )
{
const SMDS_MeshNode* n = static_cast< const SMDS_MeshNode* >( nIt->next() );
- if ( checkedNodeIDs.insert( n->GetID() ).second )
+ if ( checkedNodeIDs.insert( FromIdType<int>(n->GetID()) ).second )
nodeQueue.push_back( n );
}
}
gp_Vec norm = getNormale( static_cast<const SMDS_MeshFace*>(f), &normOK );
if (!normOK || isLessAngle( myNorm, norm, cosTol))
{
- myCoplanarIDs.Add( f->GetID() );
+ myCoplanarIDs.Add( FromIdType<int>(f->GetID()) );
faceQueue.push_back( std::make_pair( f, norm ));
}
}
// as result next time when fi will be equal to aStartIndx
SMDS_MeshFace* aFacePtr = myAllFacePtr[ fi ];
- if ( aMapOfTreated.Contains( aFacePtr->GetID() ) )
+ if ( aMapOfTreated.Contains( FromIdType<int>(aFacePtr->GetID()) ) )
continue;
- aMapOfTreated.Add( aFacePtr->GetID() );
+ aMapOfTreated.Add( FromIdType<int>(aFacePtr->GetID()) );
TColStd_MapOfInteger aResFaces;
if ( !findConnected( myAllFacePtrIntDMap, aFacePtr,
aMapOfNonManifold, aResFaces ) )
if ( getNormale( theStartFace ).SquareModulus() <= gp::Resolution() )
{
- myMapBadGeomIds.Add( theStartFace->GetID() );
+ myMapBadGeomIds.Add( FromIdType<int>(theStartFace->GetID()) );
return false;
}
ManifoldPart::TMapOfLink aMapOfBoundary, aMapToSkip;
ManifoldPart::TVectorOfLink aSeqOfBoundary;
- theResFaces.Add( theStartFace->GetID() );
+ theResFaces.Add( FromIdType<int>(theStartFace->GetID()) );
ManifoldPart::TDataMapOfLinkFacePtr aDMapLinkFace;
expandBoundary( aMapOfBoundary, aSeqOfBoundary,
SMDS_MeshFace* aNextFace = *pFace;
if ( aPrevFace == aNextFace )
continue;
- int anNextFaceID = aNextFace->GetID();
+ int anNextFaceID = FromIdType<int>(aNextFace->GetID());
if ( myIsOnlyManifold && theResFaces.Contains( anNextFaceID ) )
// should not be with non manifold restriction. probably bad topology
continue;
gp_XYZ aNorm2XYZ = getNormale( theFace2 );
if ( aNorm2XYZ.SquareModulus() <= gp::Resolution() )
{
- myMapBadGeomIds.Add( theFace2->GetID() );
+ myMapBadGeomIds.Add( FromIdType<int>(theFace2->GetID()) );
return false;
}
if ( aNorm1.IsParallel( gp_Dir( aNorm2XYZ ), myAngToler ) )
if ( !myMeshModifTracer.GetMesh() )
return;
- myIds.ReSize( myMeshModifTracer.GetMesh()->GetMeshInfo().NbElements( myType ));
+ myIds.ReSize( FromIdType<int>(myMeshModifTracer.GetMesh()->GetMeshInfo().NbElements( myType )));
SMDS_ElemIteratorPtr anIter = myMeshModifTracer.GetMesh()->elementsIterator( myType );
for(; anIter->more(); )
}
}
if ( isSatisfy )
- myIds.Add( theElemPtr->GetID() );
+ myIds.Add( FromIdType<int>(theElemPtr->GetID()) );
}
bool ElementsOnSurface::isOnSurface( const SMDS_MeshNode* theNode )
int ref;
- const int nodeIDShift = myMesh->GetMeshInfo().NbNodes();
+ const smIdType nodeIDShift = myMesh->GetMeshInfo().NbNodes();
if ( version != GmfFloat )
{
double x, y, z;
int iN[28]; // 28 - nb nodes in HEX27 (+ 1 for safety :)
/* Read edges */
- const int edgeIDShift = myMesh->GetMeshInfo().NbElements();
+ const smIdType edgeIDShift = myMesh->GetMeshInfo().NbElements();
if ( int nbEdges = GmfStatKwd(meshID, GmfEdges))
{
// read extra vertices for quadratic edges
}
/* Read triangles */
- const int triaIDShift = myMesh->GetMeshInfo().NbElements();
+ const smIdType triaIDShift = myMesh->GetMeshInfo().NbElements();
if ( int nbTria = GmfStatKwd(meshID, GmfTriangles))
{
// read extra vertices for quadratic triangles
}
/* Read quadrangles */
- const int quadIDShift = myMesh->GetMeshInfo().NbElements();
+ const smIdType quadIDShift = myMesh->GetMeshInfo().NbElements();
if ( int nbQuad = GmfStatKwd(meshID, GmfQuadrilaterals))
{
// read extra vertices for quadratic quadrangles
}
/* Read terahedra */
- const int tetIDShift = myMesh->GetMeshInfo().NbElements();
+ const smIdType tetIDShift = myMesh->GetMeshInfo().NbElements();
if ( int nbTet = GmfStatKwd( meshID, GmfTetrahedra ))
{
// read extra vertices for quadratic tetrahedra
}
/* Read pyramids */
- const int pyrIDShift = myMesh->GetMeshInfo().NbElements();
+ const smIdType pyrIDShift = myMesh->GetMeshInfo().NbElements();
if ( int nbPyr = GmfStatKwd(meshID, GmfPyramids))
{
GmfGotoKwd(meshID, GmfPyramids);
}
/* Read hexahedra */
- const int hexIDShift = myMesh->GetMeshInfo().NbElements();
+ const smIdType hexIDShift = myMesh->GetMeshInfo().NbElements();
if ( int nbHex = GmfStatKwd(meshID, GmfHexahedra))
{
// read extra vertices for quadratic hexahedra
}
/* Read prism */
- const int prismIDShift = myMesh->GetMeshInfo().NbElements();
+ const smIdType prismIDShift = myMesh->GetMeshInfo().NbElements();
if ( int nbPrism = GmfStatKwd(meshID, GmfPrisms))
{
GmfGotoKwd(meshID, GmfPrisms);
int myEdgesDefaultFamilyId = 0;
int myFacesDefaultFamilyId = 0;
int myVolumesDefaultFamilyId = 0;
- int nbNodes = myMesh->NbNodes();
- int nb0DElements = myMesh->Nb0DElements();
- int nbBalls = myMesh->NbBalls();
- int nbEdges = myMesh->NbEdges();
- int nbFaces = myMesh->NbFaces();
- int nbVolumes = myMesh->NbVolumes();
+ smIdType nbNodes = myMesh->NbNodes();
+ smIdType nb0DElements = myMesh->Nb0DElements();
+ smIdType nbBalls = myMesh->NbBalls();
+ smIdType nbEdges = myMesh->NbEdges();
+ smIdType nbFaces = myMesh->NbFaces();
+ smIdType nbVolumes = myMesh->NbVolumes();
if (myDoGroupOfNodes) myNodesDefaultFamilyId = REST_NODES_FAMILY;
if (myDoGroupOfEdges) myEdgesDefaultFamilyId = REST_EDGES_FAMILY;
if (myDoGroupOfFaces) myFacesDefaultFamilyId = REST_FACES_FAMILY;
const EBooleen theIsElemNames = eFAUX;
const EConnectivite theConnMode = eNOD;
- TInt aNbNodes = myMesh->NbNodes();
+ TInt aNbNodes = FromIdType<int>(myMesh->NbNodes());
PNodeInfo aNodeInfo = myMed->CrNodeInfo(aMeshInfo, aNbNodes,
theMode, theSystem, theIsElemNum, theIsElemNames);
#endif
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
eBALL,
- nbElemInfo.NbBalls(),
+ FromIdType<int>(nbElemInfo.NbBalls()),
SMDSAbs_Ball));
#ifdef _ELEMENTS_BY_DIM_
anEntity = eARETE;
#endif
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
eSEG2,
- nbElemInfo.NbEdges( ORDER_LINEAR ),
+ FromIdType<int>(nbElemInfo.NbEdges( ORDER_LINEAR )),
SMDSAbs_Edge));
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
eSEG3,
- nbElemInfo.NbEdges( ORDER_QUADRATIC ),
+ FromIdType<int>(nbElemInfo.NbEdges( ORDER_QUADRATIC )),
SMDSAbs_Edge));
#ifdef _ELEMENTS_BY_DIM_
anEntity = eFACE;
#endif
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
eTRIA3,
- nbElemInfo.NbTriangles( ORDER_LINEAR ),
+ FromIdType<int>(nbElemInfo.NbTriangles( ORDER_LINEAR )),
SMDSAbs_Face));
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
eTRIA6,
- nbElemInfo.NbTriangles( ORDER_QUADRATIC ) -
- nbElemInfo.NbBiQuadTriangles(),
+ FromIdType<int>(nbElemInfo.NbTriangles( ORDER_QUADRATIC ) -
+ nbElemInfo.NbBiQuadTriangles()),
SMDSAbs_Face));
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
eTRIA7,
- nbElemInfo.NbBiQuadTriangles(),
+ FromIdType<int>(nbElemInfo.NbBiQuadTriangles()),
SMDSAbs_Face));
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
eQUAD4,
- nbElemInfo.NbQuadrangles( ORDER_LINEAR ),
+ FromIdType<int>(nbElemInfo.NbQuadrangles( ORDER_LINEAR )),
SMDSAbs_Face));
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
eQUAD8,
- nbElemInfo.NbQuadrangles( ORDER_QUADRATIC ) -
- nbElemInfo.NbBiQuadQuadrangles(),
+ FromIdType<int>(nbElemInfo.NbQuadrangles( ORDER_QUADRATIC ) -
+ nbElemInfo.NbBiQuadQuadrangles()),
SMDSAbs_Face));
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
eQUAD9,
- nbElemInfo.NbBiQuadQuadrangles(),
+ FromIdType<int>(nbElemInfo.NbBiQuadQuadrangles()),
SMDSAbs_Face));
if ( polyTypesSupported ) {
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
ePOLYGONE,
- nbElemInfo.NbPolygons( ORDER_LINEAR ),
+ FromIdType<int>(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,
- nbElemInfo.NbPolygons( ORDER_LINEAR ),
+ FromIdType<int>(nbElemInfo.NbPolygons( ORDER_LINEAR )),
SMDSAbs_Face));
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
ePOLYGON2,
- nbElemInfo.NbPolygons( ORDER_QUADRATIC ),
+ FromIdType<int>(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,
- nbElemInfo.NbPolygons( ORDER_QUADRATIC ),
+ FromIdType<int>(nbElemInfo.NbPolygons( ORDER_QUADRATIC )),
SMDSAbs_Face));
}
#ifdef _ELEMENTS_BY_DIM_
#endif
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
eTETRA4,
- nbElemInfo.NbTetras( ORDER_LINEAR ),
+ FromIdType<int>(nbElemInfo.NbTetras( ORDER_LINEAR )),
SMDSAbs_Volume));
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
eTETRA10,
- nbElemInfo.NbTetras( ORDER_QUADRATIC ),
+ FromIdType<int>(nbElemInfo.NbTetras( ORDER_QUADRATIC )),
SMDSAbs_Volume));
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
ePYRA5,
- nbElemInfo.NbPyramids( ORDER_LINEAR ),
+ FromIdType<int>(nbElemInfo.NbPyramids( ORDER_LINEAR )),
SMDSAbs_Volume));
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
ePYRA13,
- nbElemInfo.NbPyramids( ORDER_QUADRATIC ),
+ FromIdType<int>(nbElemInfo.NbPyramids( ORDER_QUADRATIC )),
SMDSAbs_Volume));
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
ePENTA6,
- nbElemInfo.NbPrisms( ORDER_LINEAR ),
+ FromIdType<int>(nbElemInfo.NbPrisms( ORDER_LINEAR )),
SMDSAbs_Volume));
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
ePENTA15,
- nbElemInfo.NbQuadPrisms(),
+ FromIdType<int>(nbElemInfo.NbQuadPrisms()),
SMDSAbs_Volume));
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
ePENTA18,
- nbElemInfo.NbBiQuadPrisms(),
+ FromIdType<int>(nbElemInfo.NbBiQuadPrisms()),
SMDSAbs_Volume));
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
eHEXA8,
- nbElemInfo.NbHexas( ORDER_LINEAR ),
+ FromIdType<int>(nbElemInfo.NbHexas( ORDER_LINEAR )),
SMDSAbs_Volume));
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
eHEXA20,
- nbElemInfo.NbHexas( ORDER_QUADRATIC )-
- nbElemInfo.NbTriQuadHexas(),
+ FromIdType<int>(nbElemInfo.NbHexas( ORDER_QUADRATIC )-
+ nbElemInfo.NbTriQuadHexas()),
SMDSAbs_Volume));
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
eHEXA27,
- nbElemInfo.NbTriQuadHexas(),
+ FromIdType<int>(nbElemInfo.NbTriQuadHexas()),
SMDSAbs_Volume));
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
eOCTA12,
- nbElemInfo.NbHexPrisms(),
+ FromIdType<int>(nbElemInfo.NbHexPrisms()),
SMDSAbs_Volume));
if ( polyTypesSupported ) {
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
ePOLYEDRE,
- nbElemInfo.NbPolyhedrons(),
+ FromIdType<int>(nbElemInfo.NbPolyhedrons()),
SMDSAbs_Volume));
// we need one more loop on poly elements to count nb of their nodes
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
ePOLYEDRE,
- nbElemInfo.NbPolyhedrons(),
+ FromIdType<int>(nbElemInfo.NbPolyhedrons()),
SMDSAbs_Volume));
}
for(TInt iNode = 0; iNode < aNbNodes; iNode++) {
const SMDS_MeshElement* aNode = anElem->GetNode( iNode );
#ifdef _EDF_NODE_IDS_
- aTConnSlice[ iNode ] = aNodeIdMap[aNode->GetID()];
+ aTConnSlice[ iNode ] = aNodeIdMap[FromIdType<int>(aNode->GetID())];
#else
aTConnSlice[ iNode ] = aNode->GetID();
#endif
}
// element number
- aPolygoneInfo->SetElemNum( iElem, anElem->GetID() );
+ aPolygoneInfo->SetElemNum( iElem, FromIdType<int>(anElem->GetID()) );
// family number
int famNum = getFamilyId( anElemFamMap, anElem, defaultFamilyId );
while ( nodeIt->more() ) {
const SMDS_MeshElement* aNode = nodeIt->next();
#ifdef _EDF_NODE_IDS_
- conn[ iNode ] = aNodeIdMap[aNode->GetID()];
+ conn[ iNode ] = aNodeIdMap[FromIdType<int>(aNode->GetID())];
#else
conn[ iNode ] = aNode->GetID();
#endif
++iNode;
}
// element number
- aPolyhInfo->SetElemNum( iElem, anElem->GetID() );
+ aPolyhInfo->SetElemNum( iElem, FromIdType<int>(anElem->GetID()) );
// family number
int famNum = getFamilyId( anElemFamMap, anElem, defaultFamilyId );
// connectivity
const SMDS_MeshElement* aNode = anElem->GetNode( 0 );
#ifdef _EDF_NODE_IDS_
- (*aBallInfo->myConn)[ iElem ] = aNodeIdMap[aNode->GetID()];
+ (*aBallInfo->myConn)[ iElem ] = aNodeIdMap[FromIdType<int>(aNode->GetID())];
#else
(*aBallInfo->myConn)[ iElem ] = aNode->GetID();
#endif
// element number
- aBallInfo->SetElemNum( iElem, anElem->GetID() );
+ aBallInfo->SetElemNum( iElem, FromIdType<int>(anElem->GetID()) );
// diameter
aBallInfo->myDiameters[ iElem ] =
for (TInt iNode = 0; iNode < aNbNodes; iNode++) {
const SMDS_MeshElement* aNode = anElem->GetNode( iNode );
#ifdef _EDF_NODE_IDS_
- aTConnSlice[ iNode ] = aNodeIdMap[aNode->GetID()];
+ aTConnSlice[ iNode ] = aNodeIdMap[FromIdType<int>(aNode->GetID())];
#else
aTConnSlice[ iNode ] = aNode->GetID();
#endif
}
// element number
- aCellInfo->SetElemNum( iElem, anElem->GetID() );
+ aCellInfo->SetElemNum( iElem, FromIdType<int>(anElem->GetID()) );
// family number
int famNum = getFamilyId( anElemFamMap, anElem, defaultFamilyId );