fix warnings. Build completed

This commit is contained in:
Viktor UZLOV 2021-02-11 19:35:07 +03:00
parent f498480757
commit 017ea5b3ea
16 changed files with 87 additions and 84 deletions

View File

@ -2868,8 +2868,8 @@ void GroupColor::SetMesh( const SMDS_Mesh* theMesh )
SMDSAbs_ElementType aGrpElType = (SMDSAbs_ElementType)aGrp->GetType(); SMDSAbs_ElementType aGrpElType = (SMDSAbs_ElementType)aGrp->GetType();
if ( myType == aGrpElType || (myType == SMDSAbs_All && aGrpElType != SMDSAbs_Node) ) { if ( myType == aGrpElType || (myType == SMDSAbs_All && aGrpElType != SMDSAbs_Node) ) {
// add elements IDS into control // add elements IDS into control
int aSize = aGrp->Extent(); smIdType aSize = aGrp->Extent();
for (int i = 0; i < aSize; i++) for (smIdType i = 0; i < aSize; i++)
myIDs.insert( aGrp->GetID(i+1) ); myIDs.insert( aGrp->GetID(i+1) );
} }
} }
@ -3020,7 +3020,7 @@ ConnectedElements::ConnectedElements():
SMDSAbs_ElementType ConnectedElements::GetType() const SMDSAbs_ElementType ConnectedElements::GetType() const
{ return myType; } { return myType; }
int ConnectedElements::GetNode() const smIdType ConnectedElements::GetNode() const
{ return myXYZ.empty() ? myNodeID : 0; } // myNodeID can be found by myXYZ { return myXYZ.empty() ? myNodeID : 0; } // myNodeID can be found by myXYZ
std::vector<double> ConnectedElements::GetPoint() const std::vector<double> ConnectedElements::GetPoint() const
@ -3047,7 +3047,7 @@ void ConnectedElements::SetMesh( const SMDS_Mesh* theMesh )
} }
} }
void ConnectedElements::SetNode( int nodeID ) void ConnectedElements::SetNode( smIdType nodeID )
{ {
myNodeID = nodeID; myNodeID = nodeID;
myXYZ.clear(); myXYZ.clear();
@ -3279,14 +3279,14 @@ void RangeOfIds::GetRangeStr( TCollection_AsciiString& theResStr )
{ {
theResStr.Clear(); theResStr.Clear();
TColStd_SequenceOfInteger anIntSeq; TIDsSeq anIntSeq;
TColStd_SequenceOfAsciiString aStrSeq; TColStd_SequenceOfAsciiString aStrSeq;
TIDsMap::Iterator anIter( myIds ); TIDsMap::Iterator anIter( myIds );
for ( ; anIter.More(); anIter.Next() ) for ( ; anIter.More(); anIter.Next() )
{ {
int anId = anIter.Key(); smIdType anId = anIter.Key();
TCollection_AsciiString aStr( anId ); TCollection_AsciiString aStr( FromIdType<int>(anId) );
anIntSeq.Append( anId ); anIntSeq.Append( anId );
aStrSeq.Append( aStr ); aStrSeq.Append( aStr );
} }
@ -3300,7 +3300,7 @@ void RangeOfIds::GetRangeStr( TCollection_AsciiString& theResStr )
if ( aMinId != IntegerFirst() ) if ( aMinId != IntegerFirst() )
aStr << aMinId; aStr << aMinId;
aStr += "-"; aStr << "-";
if ( aMaxId != std::numeric_limits<smIdType>::max() ) if ( aMaxId != std::numeric_limits<smIdType>::max() )
aStr << aMaxId; aStr << aMaxId;

View File

@ -59,6 +59,7 @@ class gp_Pln;
class gp_Pnt; class gp_Pnt;
typedef NCollection_Map< smIdType, smIdHasher > TIDsMap; typedef NCollection_Map< smIdType, smIdHasher > TIDsMap;
typedef NCollection_Sequence<smIdType> TIDsSeq;
namespace SMESH{ namespace SMESH{
namespace Controls{ namespace Controls{
@ -1164,16 +1165,16 @@ namespace SMESH{
public: public:
ConnectedElements(); ConnectedElements();
//virtual Predicate* clone() const { return new ConnectedElements( *this ); } //virtual Predicate* clone() const { return new ConnectedElements( *this ); }
void SetNode( int nodeID ); void SetNode( smIdType nodeID );
void SetPoint( double x, double y, double z ); void SetPoint( double x, double y, double z );
int GetNode() const; smIdType GetNode() const;
std::vector<double> GetPoint() const; std::vector<double> GetPoint() const;
void SetType( SMDSAbs_ElementType theType ); void SetType( SMDSAbs_ElementType theType );
virtual SMDSAbs_ElementType GetType() const; virtual SMDSAbs_ElementType GetType() const;
virtual void SetMesh( const SMDS_Mesh* theMesh ); virtual void SetMesh( const SMDS_Mesh* theMesh );
virtual bool IsSatisfy( long theElementId ); virtual bool IsSatisfy( smIdType theElementId );
//const std::set<long>& GetDomainIDs() const { return myOkIDs; } //const std::set<long>& GetDomainIDs() const { return myOkIDs; }

View File

@ -61,9 +61,9 @@ namespace
struct TZoneData struct TZoneData
{ {
int _id; int _id;
int _nodeIdShift; // nb nodes in previously read zones smIdType _nodeIdShift; // nb nodes in previously read zones
int _elemIdShift; // nb faces in previously read zones smIdType _elemIdShift; // nb faces in previously read zones
int _nbNodes, _nbElems; smIdType _nbNodes, _nbElems;
int _meshDim; int _meshDim;
int _sizeX, _sizeY, _sizeZ, _nbCells; // structured int _sizeX, _sizeY, _sizeZ, _nbCells; // structured
cgsize_t _sizes[NB_ZONE_SIZE_VAL]; cgsize_t _sizes[NB_ZONE_SIZE_VAL];
@ -1133,7 +1133,7 @@ Driver_Mesh::Status DriverCGNS_Read::Perform()
case 2: addElemFun = & add_QUAD_4; break; case 2: addElemFun = & add_QUAD_4; break;
case 3: addElemFun = & add_HEXA_8; break; case 3: addElemFun = & add_HEXA_8; break;
} }
int elemID = meshInfo.NbElements(); smIdType elemID = meshInfo.NbElements();
const SMDS_MeshElement* elem = 0; const SMDS_MeshElement* elem = 0;
for ( size_t i = 0; i < ids.size(); i += nbElemNodes ) for ( size_t i = 0; i < ids.size(); i += nbElemNodes )
{ {

View File

@ -201,17 +201,17 @@ namespace
*/ */
struct TPolyhedFace struct TPolyhedFace
{ {
int _id; // id of NGON_n smIdType _id; // id of NGON_n
vector< int > _nodes; // lowest node IDs used for sorting vector< smIdType > _nodes; // lowest node IDs used for sorting
TPolyhedFace( const SMDS_MeshNode** nodes, const int nbNodes, int ID):_id(ID) TPolyhedFace( const SMDS_MeshNode** nodes, const smIdType nbNodes, smIdType ID):_id(ID)
{ {
set< int > ids; set< smIdType > ids;
for ( int i = 0; i < nbNodes; ++i ) for ( smIdType i = 0; i < nbNodes; ++i )
ids.insert( nodes[i]->GetID() ); ids.insert( nodes[i]->GetID() );
_nodes.resize( 3 ); // std::min( nbNodes, 4 )); hope 3 nodes is enough _nodes.resize( 3 ); // std::min( nbNodes, 4 )); hope 3 nodes is enough
set< int >::iterator idIt = ids.begin(); set< smIdType >::iterator idIt = ids.begin();
for ( size_t j = 0; j < _nodes.size(); ++j, ++idIt ) for ( size_t j = 0; j < _nodes.size(); ++j, ++idIt )
_nodes[j] = *idIt; _nodes[j] = *idIt;
} }
@ -276,7 +276,7 @@ Driver_Mesh::Status DriverCGNS_Write::Perform()
// create a Zone // create a Zone
// -------------- // --------------
int nbCells = myMesh->NbEdges(); smIdType nbCells = myMesh->NbEdges();
if ( meshDim == 3 ) if ( meshDim == 3 )
nbCells = myMesh->NbVolumes(); nbCells = myMesh->NbVolumes();
else if ( meshDim == 2 ) else if ( meshDim == 2 )

View File

@ -37,7 +37,7 @@ Driver_Mesh::Status DriverDAT_W_SMDS_Mesh::Perform()
Kernel_Utils::Localizer loc; Kernel_Utils::Localizer loc;
Status aResult = DRS_OK; Status aResult = DRS_OK;
int nbNodes, nbCells; smIdType nbNodes, nbCells;
#if defined(WIN32) && defined(UNICODE) #if defined(WIN32) && defined(UNICODE)
std::wstring file2Read = Kernel_Utils::utf8_decode_s(myFile); std::wstring file2Read = Kernel_Utils::utf8_decode_s(myFile);
FILE* aFileId = _wfopen(file2Read.c_str(), L"w+"); FILE* aFileId = _wfopen(file2Read.c_str(), L"w+");
@ -60,7 +60,7 @@ Driver_Mesh::Status DriverDAT_W_SMDS_Mesh::Perform()
nbNodes = myMesh->NbNodes(); nbNodes = myMesh->NbNodes();
/* Combien de mailles, faces ou aretes ? */ /* Combien de mailles, faces ou aretes ? */
int nb_of_edges, nb_of_faces, nb_of_volumes; smIdType nb_of_edges, nb_of_faces, nb_of_volumes;
nb_of_edges = myMesh->NbEdges(); nb_of_edges = myMesh->NbEdges();
nb_of_faces = myMesh->NbFaces(); nb_of_faces = myMesh->NbFaces();
nb_of_volumes = myMesh->NbVolumes(); nb_of_volumes = myMesh->NbVolumes();
@ -104,7 +104,7 @@ Driver_Mesh::Status DriverDAT_W_SMDS_Mesh::Perform()
for ( SMDS_ElemIteratorPtr it = elem->nodesIterator(); it->more(); ) for ( SMDS_ElemIteratorPtr it = elem->nodesIterator(); it->more(); )
{ {
int nodeID = it->next()->GetID(); smIdType nodeID = it->next()->GetID();
if ( !nodeNumByID.empty() ) if ( !nodeNumByID.empty() )
nodeID = nodeNumByID[ nodeID ]; nodeID = nodeNumByID[ nodeID ];
fprintf(aFileId, "%d ", nodeID ); fprintf(aFileId, "%d ", nodeID );
@ -120,7 +120,7 @@ Driver_Mesh::Status DriverDAT_W_SMDS_Mesh::Perform()
for( SMDS_ElemIteratorPtr it = elem->nodesIterator(); it->more(); ) for( SMDS_ElemIteratorPtr it = elem->nodesIterator(); it->more(); )
{ {
int nodeID = it->next()->GetID(); smIdType nodeID = it->next()->GetID();
if ( !nodeNumByID.empty() ) if ( !nodeNumByID.empty() )
nodeID = nodeNumByID[ nodeID ]; nodeID = nodeNumByID[ nodeID ];
fprintf(aFileId, "%d ", nodeID ); fprintf(aFileId, "%d ", nodeID );
@ -155,7 +155,7 @@ Driver_Mesh::Status DriverDAT_W_SMDS_Mesh::Perform()
for( SMDS_ElemIteratorPtr it = elem->nodesIterator(); it->more(); ) for( SMDS_ElemIteratorPtr it = elem->nodesIterator(); it->more(); )
{ {
int nodeID = it->next()->GetID(); smIdType nodeID = it->next()->GetID();
if ( !nodeNumByID.empty() ) if ( !nodeNumByID.empty() )
nodeID = nodeNumByID[ nodeID ]; nodeID = nodeNumByID[ nodeID ];
fprintf(aFileId, "%d ", nodeID ); fprintf(aFileId, "%d ", nodeID );

View File

@ -246,7 +246,7 @@ namespace
const SMDS_MeshNode* GetNode(){ const SMDS_MeshNode* GetNode(){
return myCurrentNode; return myCurrentNode;
} }
MED::TIntVector::value_type GetID(){ MED::TIDVector::value_type GetID(){
return myCurrentNode->GetID(); return myCurrentNode->GetID();
} }
MED::TFloatVector::value_type GetCoord(TInt theCoodId){ MED::TFloatVector::value_type GetCoord(TInt theCoodId){

View File

@ -32,6 +32,7 @@
#include <map> #include <map>
#include <med.h> #include <med.h>
#include <smIdType.hxx>
#ifdef WIN32 #ifdef WIN32
#pragma warning(disable:4099) #pragma warning(disable:4099)
@ -77,6 +78,7 @@ namespace MED
typedef enum {eCOOR, eCONN, eNOM, eNUM, eFAM, eCOOR_IND1, eCOOR_IND2, eCOOR_IND3} ETable; typedef enum {eCOOR, eCONN, eNOM, eNUM, eFAM, eCOOR_IND1, eCOOR_IND2, eCOOR_IND3} ETable;
typedef TVector<TInt> TIntVector; typedef TVector<TInt> TIntVector;
typedef TVector<smIdType> TIDVector;
typedef TVector<TFloat> TFloatVector; typedef TVector<TFloat> TFloatVector;
typedef TVector<std::string> TStringVector; typedef TVector<std::string> TStringVector;
typedef std::set<std::string> TStringSet; typedef std::set<std::string> TStringSet;

View File

@ -969,7 +969,7 @@ bool SMDS_VolumeTool::GetFaceNodes (int faceIndex,
namespace namespace
{ {
struct NLink : public std::pair<int,int> struct NLink : public std::pair<smIdType,smIdType>
{ {
int myOri; int myOri;
NLink(const SMDS_MeshNode* n1=0, const SMDS_MeshNode* n2=0, int ori=1 ) NLink(const SMDS_MeshNode* n1=0, const SMDS_MeshNode* n2=0, int ori=1 )

View File

@ -1043,7 +1043,7 @@ int SMESH_Algo::NumberOfPoints(SMESH_Mesh& aMesh, const TopoDS_Wire& W)
int nbPoints = 0; int nbPoints = 0;
for (TopExp_Explorer exp(W,TopAbs_EDGE); exp.More(); exp.Next()) { for (TopExp_Explorer exp(W,TopAbs_EDGE); exp.More(); exp.Next()) {
const TopoDS_Edge& E = TopoDS::Edge(exp.Current()); const TopoDS_Edge& E = TopoDS::Edge(exp.Current());
int nb = aMesh.GetSubMesh(E)->GetSubMeshDS()->NbNodes(); smIdType nb = aMesh.GetSubMesh(E)->GetSubMeshDS()->NbNodes();
if(_quadraticMesh) if(_quadraticMesh)
nb = nb/2; nb = nb/2;
nbPoints += nb + 1; // internal points plus 1 vertex of 2 (last point ?) nbPoints += nb + 1; // internal points plus 1 vertex of 2 (last point ?)

View File

@ -1183,7 +1183,7 @@ void SMESH_Mesh::NotifySubMeshesHypothesisModification(const SMESH_Hypothesis* h
if ( !GetMeshDS()->IsUsedHypothesis( hyp )) if ( !GetMeshDS()->IsUsedHypothesis( hyp ))
return; return;
int nbEntities = ( _myMeshDS->NbNodes() + _myMeshDS->NbElements() ); smIdType nbEntities = ( _myMeshDS->NbNodes() + _myMeshDS->NbElements() );
if ( hyp && _callUp && !_callUp->IsLoaded() ) // for not loaded mesh (#16648) if ( hyp && _callUp && !_callUp->IsLoaded() ) // for not loaded mesh (#16648)
{ {
_callUp->HypothesisModified( hyp->GetID(), /*updateIcons=*/true ); _callUp->HypothesisModified( hyp->GetID(), /*updateIcons=*/true );
@ -1257,7 +1257,7 @@ void SMESH_Mesh::NotifySubMeshesHypothesisModification(const SMESH_Hypothesis* h
HasModificationsToDiscard(); // to reset _isModified flag if mesh becomes empty HasModificationsToDiscard(); // to reset _isModified flag if mesh becomes empty
GetMeshDS()->Modified(); GetMeshDS()->Modified();
int newNbEntities = ( _myMeshDS->NbNodes() + _myMeshDS->NbElements() ); smIdType newNbEntities = ( _myMeshDS->NbNodes() + _myMeshDS->NbElements() );
if ( hyp && _callUp ) if ( hyp && _callUp )
_callUp->HypothesisModified( hyp->GetID(), newNbEntities != nbEntities ); _callUp->HypothesisModified( hyp->GetID(), newNbEntities != nbEntities );
} }
@ -1746,7 +1746,7 @@ double SMESH_Mesh::GetComputeProgress() const
*/ */
//================================================================================ //================================================================================
int SMESH_Mesh::NbNodes() const smIdType SMESH_Mesh::NbNodes() const
{ {
Unexpect aCatch(SalomeException); Unexpect aCatch(SalomeException);
return _myMeshDS->NbNodes(); return _myMeshDS->NbNodes();
@ -1758,7 +1758,7 @@ int SMESH_Mesh::NbNodes() const
*/ */
//================================================================================ //================================================================================
int SMESH_Mesh::Nb0DElements() const smIdType SMESH_Mesh::Nb0DElements() const
{ {
Unexpect aCatch(SalomeException); Unexpect aCatch(SalomeException);
return _myMeshDS->GetMeshInfo().Nb0DElements(); return _myMeshDS->GetMeshInfo().Nb0DElements();
@ -1770,7 +1770,7 @@ int SMESH_Mesh::Nb0DElements() const
*/ */
//================================================================================ //================================================================================
int SMESH_Mesh::NbEdges(SMDSAbs_ElementOrder order) const smIdType SMESH_Mesh::NbEdges(SMDSAbs_ElementOrder order) const
{ {
Unexpect aCatch(SalomeException); Unexpect aCatch(SalomeException);
return _myMeshDS->GetMeshInfo().NbEdges(order); return _myMeshDS->GetMeshInfo().NbEdges(order);
@ -1782,7 +1782,7 @@ int SMESH_Mesh::NbEdges(SMDSAbs_ElementOrder order) const
*/ */
//================================================================================ //================================================================================
int SMESH_Mesh::NbFaces(SMDSAbs_ElementOrder order) const smIdType SMESH_Mesh::NbFaces(SMDSAbs_ElementOrder order) const
{ {
Unexpect aCatch(SalomeException); Unexpect aCatch(SalomeException);
return _myMeshDS->GetMeshInfo().NbFaces(order); return _myMeshDS->GetMeshInfo().NbFaces(order);
@ -1794,7 +1794,7 @@ int SMESH_Mesh::NbFaces(SMDSAbs_ElementOrder order) const
*/ */
//================================================================================ //================================================================================
int SMESH_Mesh::NbTriangles(SMDSAbs_ElementOrder order) const smIdType SMESH_Mesh::NbTriangles(SMDSAbs_ElementOrder order) const
{ {
Unexpect aCatch(SalomeException); Unexpect aCatch(SalomeException);
return _myMeshDS->GetMeshInfo().NbTriangles(order); return _myMeshDS->GetMeshInfo().NbTriangles(order);
@ -1806,7 +1806,7 @@ int SMESH_Mesh::NbTriangles(SMDSAbs_ElementOrder order) const
*/ */
//================================================================================ //================================================================================
int SMESH_Mesh::NbBiQuadTriangles() const smIdType SMESH_Mesh::NbBiQuadTriangles() const
{ {
Unexpect aCatch(SalomeException); Unexpect aCatch(SalomeException);
return _myMeshDS->GetMeshInfo().NbBiQuadTriangles(); return _myMeshDS->GetMeshInfo().NbBiQuadTriangles();
@ -1818,7 +1818,7 @@ int SMESH_Mesh::NbBiQuadTriangles() const
*/ */
//================================================================================ //================================================================================
int SMESH_Mesh::NbQuadrangles(SMDSAbs_ElementOrder order) const smIdType SMESH_Mesh::NbQuadrangles(SMDSAbs_ElementOrder order) const
{ {
Unexpect aCatch(SalomeException); Unexpect aCatch(SalomeException);
return _myMeshDS->GetMeshInfo().NbQuadrangles(order); return _myMeshDS->GetMeshInfo().NbQuadrangles(order);
@ -1830,7 +1830,7 @@ int SMESH_Mesh::NbQuadrangles(SMDSAbs_ElementOrder order) const
*/ */
//================================================================================ //================================================================================
int SMESH_Mesh::NbBiQuadQuadrangles() const smIdType SMESH_Mesh::NbBiQuadQuadrangles() const
{ {
Unexpect aCatch(SalomeException); Unexpect aCatch(SalomeException);
return _myMeshDS->GetMeshInfo().NbBiQuadQuadrangles(); return _myMeshDS->GetMeshInfo().NbBiQuadQuadrangles();
@ -1842,7 +1842,7 @@ int SMESH_Mesh::NbBiQuadQuadrangles() const
*/ */
//================================================================================ //================================================================================
int SMESH_Mesh::NbPolygons(SMDSAbs_ElementOrder order) const smIdType SMESH_Mesh::NbPolygons(SMDSAbs_ElementOrder order) const
{ {
Unexpect aCatch(SalomeException); Unexpect aCatch(SalomeException);
return _myMeshDS->GetMeshInfo().NbPolygons(order); return _myMeshDS->GetMeshInfo().NbPolygons(order);
@ -1854,7 +1854,7 @@ int SMESH_Mesh::NbPolygons(SMDSAbs_ElementOrder order) const
*/ */
//================================================================================ //================================================================================
int SMESH_Mesh::NbVolumes(SMDSAbs_ElementOrder order) const smIdType SMESH_Mesh::NbVolumes(SMDSAbs_ElementOrder order) const
{ {
Unexpect aCatch(SalomeException); Unexpect aCatch(SalomeException);
return _myMeshDS->GetMeshInfo().NbVolumes(order); return _myMeshDS->GetMeshInfo().NbVolumes(order);
@ -1866,7 +1866,7 @@ int SMESH_Mesh::NbVolumes(SMDSAbs_ElementOrder order) const
*/ */
//================================================================================ //================================================================================
int SMESH_Mesh::NbTetras(SMDSAbs_ElementOrder order) const smIdType SMESH_Mesh::NbTetras(SMDSAbs_ElementOrder order) const
{ {
Unexpect aCatch(SalomeException); Unexpect aCatch(SalomeException);
return _myMeshDS->GetMeshInfo().NbTetras(order); return _myMeshDS->GetMeshInfo().NbTetras(order);
@ -1878,7 +1878,7 @@ int SMESH_Mesh::NbTetras(SMDSAbs_ElementOrder order) const
*/ */
//================================================================================ //================================================================================
int SMESH_Mesh::NbHexas(SMDSAbs_ElementOrder order) const smIdType SMESH_Mesh::NbHexas(SMDSAbs_ElementOrder order) const
{ {
Unexpect aCatch(SalomeException); Unexpect aCatch(SalomeException);
return _myMeshDS->GetMeshInfo().NbHexas(order); return _myMeshDS->GetMeshInfo().NbHexas(order);
@ -1890,7 +1890,7 @@ int SMESH_Mesh::NbHexas(SMDSAbs_ElementOrder order) const
*/ */
//================================================================================ //================================================================================
int SMESH_Mesh::NbTriQuadraticHexas() const smIdType SMESH_Mesh::NbTriQuadraticHexas() const
{ {
Unexpect aCatch(SalomeException); Unexpect aCatch(SalomeException);
return _myMeshDS->GetMeshInfo().NbTriQuadHexas(); return _myMeshDS->GetMeshInfo().NbTriQuadHexas();
@ -1902,7 +1902,7 @@ int SMESH_Mesh::NbTriQuadraticHexas() const
*/ */
//================================================================================ //================================================================================
int SMESH_Mesh::NbPyramids(SMDSAbs_ElementOrder order) const smIdType SMESH_Mesh::NbPyramids(SMDSAbs_ElementOrder order) const
{ {
Unexpect aCatch(SalomeException); Unexpect aCatch(SalomeException);
return _myMeshDS->GetMeshInfo().NbPyramids(order); return _myMeshDS->GetMeshInfo().NbPyramids(order);
@ -1914,19 +1914,19 @@ int SMESH_Mesh::NbPyramids(SMDSAbs_ElementOrder order) const
*/ */
//================================================================================ //================================================================================
int SMESH_Mesh::NbPrisms(SMDSAbs_ElementOrder order) const smIdType SMESH_Mesh::NbPrisms(SMDSAbs_ElementOrder order) const
{ {
Unexpect aCatch(SalomeException); Unexpect aCatch(SalomeException);
return _myMeshDS->GetMeshInfo().NbPrisms(order); return _myMeshDS->GetMeshInfo().NbPrisms(order);
} }
int SMESH_Mesh::NbQuadPrisms() const smIdType SMESH_Mesh::NbQuadPrisms() const
{ {
Unexpect aCatch(SalomeException); Unexpect aCatch(SalomeException);
return _myMeshDS->GetMeshInfo().NbQuadPrisms(); return _myMeshDS->GetMeshInfo().NbQuadPrisms();
} }
int SMESH_Mesh::NbBiQuadPrisms() const smIdType SMESH_Mesh::NbBiQuadPrisms() const
{ {
Unexpect aCatch(SalomeException); Unexpect aCatch(SalomeException);
return _myMeshDS->GetMeshInfo().NbBiQuadPrisms(); return _myMeshDS->GetMeshInfo().NbBiQuadPrisms();
@ -1939,7 +1939,7 @@ int SMESH_Mesh::NbBiQuadPrisms() const
*/ */
//================================================================================ //================================================================================
int SMESH_Mesh::NbHexagonalPrisms() const smIdType SMESH_Mesh::NbHexagonalPrisms() const
{ {
Unexpect aCatch(SalomeException); Unexpect aCatch(SalomeException);
return _myMeshDS->GetMeshInfo().NbHexPrisms(); return _myMeshDS->GetMeshInfo().NbHexPrisms();
@ -1951,7 +1951,7 @@ int SMESH_Mesh::NbHexagonalPrisms() const
*/ */
//================================================================================ //================================================================================
int SMESH_Mesh::NbPolyhedrons() const smIdType SMESH_Mesh::NbPolyhedrons() const
{ {
Unexpect aCatch(SalomeException); Unexpect aCatch(SalomeException);
return _myMeshDS->GetMeshInfo().NbPolyhedrons(); return _myMeshDS->GetMeshInfo().NbPolyhedrons();
@ -1963,7 +1963,7 @@ int SMESH_Mesh::NbPolyhedrons() const
*/ */
//================================================================================ //================================================================================
int SMESH_Mesh::NbBalls() const smIdType SMESH_Mesh::NbBalls() const
{ {
Unexpect aCatch(SalomeException); Unexpect aCatch(SalomeException);
return _myMeshDS->GetMeshInfo().NbBalls(); return _myMeshDS->GetMeshInfo().NbBalls();
@ -1975,7 +1975,7 @@ int SMESH_Mesh::NbBalls() const
*/ */
//================================================================================ //================================================================================
int SMESH_Mesh::NbSubMesh() const smIdType SMESH_Mesh::NbSubMesh() const
{ {
Unexpect aCatch(SalomeException); Unexpect aCatch(SalomeException);
return _myMeshDS->NbSubMesh(); return _myMeshDS->NbSubMesh();

View File

@ -282,31 +282,31 @@ class SMESH_EXPORT SMESH_Mesh
double GetComputeProgress() const; double GetComputeProgress() const;
int NbNodes() const; smIdType NbNodes() const;
int Nb0DElements() const; smIdType Nb0DElements() const;
int NbBalls() const; smIdType NbBalls() const;
int NbEdges(SMDSAbs_ElementOrder order = ORDER_ANY) const; smIdType NbEdges(SMDSAbs_ElementOrder order = ORDER_ANY) const;
int NbFaces(SMDSAbs_ElementOrder order = ORDER_ANY) const; smIdType NbFaces(SMDSAbs_ElementOrder order = ORDER_ANY) const;
int NbTriangles(SMDSAbs_ElementOrder order = ORDER_ANY) const; smIdType NbTriangles(SMDSAbs_ElementOrder order = ORDER_ANY) const;
int NbQuadrangles(SMDSAbs_ElementOrder order = ORDER_ANY) const; smIdType NbQuadrangles(SMDSAbs_ElementOrder order = ORDER_ANY) const;
int NbBiQuadQuadrangles() const; smIdType NbBiQuadQuadrangles() const;
int NbBiQuadTriangles() const; smIdType NbBiQuadTriangles() const;
int NbPolygons(SMDSAbs_ElementOrder order = ORDER_ANY) const; smIdType NbPolygons(SMDSAbs_ElementOrder order = ORDER_ANY) const;
int NbVolumes(SMDSAbs_ElementOrder order = ORDER_ANY) const; smIdType NbVolumes(SMDSAbs_ElementOrder order = ORDER_ANY) const;
int NbTetras(SMDSAbs_ElementOrder order = ORDER_ANY) const; smIdType NbTetras(SMDSAbs_ElementOrder order = ORDER_ANY) const;
int NbHexas(SMDSAbs_ElementOrder order = ORDER_ANY) const; smIdType NbHexas(SMDSAbs_ElementOrder order = ORDER_ANY) const;
int NbTriQuadraticHexas() const; smIdType NbTriQuadraticHexas() const;
int NbPyramids(SMDSAbs_ElementOrder order = ORDER_ANY) const; smIdType NbPyramids(SMDSAbs_ElementOrder order = ORDER_ANY) const;
int NbPrisms(SMDSAbs_ElementOrder order = ORDER_ANY) const; smIdType NbPrisms(SMDSAbs_ElementOrder order = ORDER_ANY) const;
int NbQuadPrisms() const; smIdType NbQuadPrisms() const;
int NbBiQuadPrisms() const; smIdType NbBiQuadPrisms() const;
int NbHexagonalPrisms() const; smIdType NbHexagonalPrisms() const;
int NbPolyhedrons() const; smIdType NbPolyhedrons() const;
int NbSubMesh() const; smIdType NbSubMesh() const;
int NbGroup() const { return _mapGroup.size(); } int NbGroup() const { return _mapGroup.size(); }

View File

@ -188,7 +188,7 @@ SMESH_MeshEditor::AddElement(const vector<const SMDS_MeshNode*> & node,
SMDS_MeshElement* e = 0; SMDS_MeshElement* e = 0;
int nbnode = node.size(); int nbnode = node.size();
SMESHDS_Mesh* mesh = GetMeshDS(); SMESHDS_Mesh* mesh = GetMeshDS();
const int ID = features.myID; const smIdType ID = features.myID;
switch ( features.myType ) { switch ( features.myType ) {
case SMDSAbs_Face: case SMDSAbs_Face:
@ -8751,7 +8751,7 @@ smIdType SMESH_MeshEditor::convertElemToQuadratic(SMESHDS_SubMesh * theSm,
} }
// get elem data needed to re-create it // get elem data needed to re-create it
// //
const int id = elem->GetID(); const smIdType id = elem->GetID();
const int nbNodes = elem->NbCornerNodes(); const int nbNodes = elem->NbCornerNodes();
nodes.assign(elem->begin_nodes(), elem->end_nodes()); nodes.assign(elem->begin_nodes(), elem->end_nodes());
if ( aGeomType == SMDSEntity_Polyhedra ) if ( aGeomType == SMDSEntity_Polyhedra )

View File

@ -574,8 +574,8 @@ bool SMESH_Pattern::Load (SMESH_Mesh* theMesh,
SMESH_MesherHelper helper( *theMesh ); SMESH_MesherHelper helper( *theMesh );
helper.SetSubShape( theFace ); helper.SetSubShape( theFace );
int nbNodes = ( !fSubMesh ? 0 : fSubMesh->NbNodes() ); smIdType nbNodes = ( !fSubMesh ? 0 : fSubMesh->NbNodes() );
int nbElems = ( !fSubMesh ? 0 : fSubMesh->NbElements() ); smIdType nbElems = ( !fSubMesh ? 0 : fSubMesh->NbElements() );
if ( nbElems == 0 && aMeshDS->NbFaces() == 0 ) if ( nbElems == 0 && aMeshDS->NbFaces() == 0 )
{ {
MESSAGE( "No elements bound to the face"); MESSAGE( "No elements bound to the face");
@ -3231,7 +3231,7 @@ bool SMESH_Pattern::Load (SMESH_Mesh* theMesh,
return setErrorCode( ERR_LOADV_BAD_SHAPE ); return setErrorCode( ERR_LOADV_BAD_SHAPE );
// count nodes // count nodes
int nbNodes = 0, shapeID; smIdType nbNodes = 0, shapeID;
for ( shapeID = 1; shapeID <= myShapeIDMap.Extent(); shapeID++ ) for ( shapeID = 1; shapeID <= myShapeIDMap.Extent(); shapeID++ )
{ {
const TopoDS_Shape& S = myShapeIDMap( shapeID ); const TopoDS_Shape& S = myShapeIDMap( shapeID );

View File

@ -402,9 +402,9 @@ SMDS_ElemIteratorPtr SMESH_ProxyMesh::GetFaces() const
*/ */
//================================================================================ //================================================================================
int SMESH_ProxyMesh::NbFaces() const smIdType SMESH_ProxyMesh::NbFaces() const
{ {
int nb = 0; smIdType nb = 0;
if ( _mesh->HasShapeToMesh() ) if ( _mesh->HasShapeToMesh() )
{ {
TopTools_IndexedMapOfShape FF; TopTools_IndexedMapOfShape FF;

View File

@ -128,7 +128,7 @@ public:
SMDS_ElemIteratorPtr GetFaces(const TopoDS_Shape& face) const; SMDS_ElemIteratorPtr GetFaces(const TopoDS_Shape& face) const;
// Return total nb of faces taking into account substitutions // Return total nb of faces taking into account substitutions
int NbFaces() const; smIdType NbFaces() const;
bool IsTemporary(const SMDS_MeshElement* elem ) const; bool IsTemporary(const SMDS_MeshElement* elem ) const;

View File

@ -1331,12 +1331,12 @@ static void cleanSubMesh( SMESH_subMesh * subMesh )
if (SMESHDS_SubMesh * subMeshDS = subMesh->GetSubMeshDS()) if (SMESHDS_SubMesh * subMeshDS = subMesh->GetSubMeshDS())
{ {
SMESHDS_Mesh * meshDS = subMesh->GetFather()->GetMeshDS(); SMESHDS_Mesh * meshDS = subMesh->GetFather()->GetMeshDS();
int nbElems = subMeshDS->NbElements(); smIdType nbElems = subMeshDS->NbElements();
if ( nbElems > 0 ) if ( nbElems > 0 )
for ( SMDS_ElemIteratorPtr ite = subMeshDS->GetElements(); ite->more(); ) for ( SMDS_ElemIteratorPtr ite = subMeshDS->GetElements(); ite->more(); )
meshDS->RemoveFreeElement( ite->next(), subMeshDS ); meshDS->RemoveFreeElement( ite->next(), subMeshDS );
int nbNodes = subMeshDS->NbNodes(); smIdType nbNodes = subMeshDS->NbNodes();
if ( nbNodes > 0 ) if ( nbNodes > 0 )
for ( SMDS_NodeIteratorPtr itn = subMeshDS->GetNodes(); itn->more() ; ) for ( SMDS_NodeIteratorPtr itn = subMeshDS->GetNodes(); itn->more() ; )
{ {