mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-03-10 20:04:37 +05:00
fix conversion error. Build completed
This commit is contained in:
parent
29df5478fc
commit
13ed46158e
@ -33,6 +33,8 @@
|
||||
#include "SMESH_Comment.hxx"
|
||||
#include "SMESH_TypeDefs.hxx"
|
||||
|
||||
#include <smIdType.hxx>
|
||||
|
||||
#include <gp_XYZ.hxx>
|
||||
|
||||
#include <cgnslib.h>
|
||||
@ -546,10 +548,10 @@ namespace
|
||||
}
|
||||
SMDS_MeshElement* add_NGON(cgsize_t* ids, SMESHDS_Mesh* mesh, int ID)
|
||||
{
|
||||
vector<int> idVec( ids[0] );
|
||||
vector<smIdType> idVec( ids[0] );
|
||||
for ( int i = 0; i < ids[0]; ++i )
|
||||
idVec[ i ] = (int) ids[ i + 1];
|
||||
return mesh->AddPolygonalFaceWithID( idVec, ID );
|
||||
idVec[ i ] = (smIdType) ids[ i + 1];
|
||||
return mesh->AddPolygonalFaceWithID( idVec, ToIdType(ID) );
|
||||
}
|
||||
|
||||
typedef SMDS_MeshElement* (* PAddElemFun) (cgsize_t* ids, SMESHDS_Mesh* mesh, int ID);
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include "MED_Utilities.hxx"
|
||||
|
||||
#include <NCollection_Map.hxx>
|
||||
#include <smIdType.hxx>
|
||||
|
||||
#include "utilities.h"
|
||||
|
||||
@ -225,7 +226,7 @@ Driver_Mesh::Status DriverMED_R_SMESHDS_Mesh::Perform()
|
||||
|
||||
// Reading pre information about all MED cells
|
||||
//--------------------------------------------
|
||||
typedef MED::TVector<int> TNodeIds;
|
||||
typedef MED::TVector<smIdType> TNodeIds;
|
||||
bool takeNumbers = true; // initially we trust the numbers from file
|
||||
MED::TEntityInfo aEntityInfo = aMed->GetEntityInfo(aMeshInfo, eNOD);
|
||||
MED::TEntityInfo::iterator anEntityIter = aEntityInfo.begin();
|
||||
@ -318,7 +319,7 @@ Driver_Mesh::Status DriverMED_R_SMESHDS_Mesh::Perform()
|
||||
EBooleen anIsElemNum = takeNumbers ? aPolygoneInfo->IsElemNum() : eFAUX;
|
||||
|
||||
typedef SMDS_MeshFace* (SMESHDS_Mesh::* FAddPolyWithID)
|
||||
(const std::vector<int> & nodes_ids, const int ID);
|
||||
(const std::vector<smIdType> & nodes_ids, const smIdType ID);
|
||||
typedef SMDS_MeshFace* (SMESHDS_Mesh::* FAddPolygon)
|
||||
(const std::vector<const SMDS_MeshNode*> & nodes);
|
||||
|
||||
@ -355,7 +356,7 @@ Driver_Mesh::Status DriverMED_R_SMESHDS_Mesh::Perform()
|
||||
#endif
|
||||
if ( anIsElemNum ) {
|
||||
TInt anElemId = aPolygoneInfo->GetElemNum( iElem );
|
||||
anElement = (myMesh->*addPolyWithID)( aNodeIds, anElemId );
|
||||
anElement = (myMesh->*addPolyWithID)( aNodeIds, ToIdType(anElemId) );
|
||||
}
|
||||
if ( !anElement ) {
|
||||
aNodes.resize( aNbConn );
|
||||
@ -436,7 +437,7 @@ Driver_Mesh::Status DriverMED_R_SMESHDS_Mesh::Perform()
|
||||
#endif
|
||||
if(anIsElemNum){
|
||||
TInt anElemId = aPolyedreInfo->GetElemNum(iElem);
|
||||
anElement = myMesh->AddPolyhedralVolumeWithID(aNodeIds,aQuantities,anElemId);
|
||||
anElement = myMesh->AddPolyhedralVolumeWithID(aNodeIds,aQuantities,ToIdType(anElemId));
|
||||
}
|
||||
if(!anElement){
|
||||
vector<const SMDS_MeshNode*> aNodes(aNbNodes);
|
||||
|
@ -285,7 +285,7 @@ void SMDS_ElementFactory::Compact( std::vector<smIdType>& theVtkIDsNewToOld )
|
||||
{
|
||||
smIdType newNbCells = NbUsedElements();
|
||||
smIdType maxCellID = GetMaxID();
|
||||
smIdType newNbChunks = newNbCells / theChunkSize + bool ( newNbCells % theChunkSize );
|
||||
int newNbChunks = newNbCells / theChunkSize + bool ( newNbCells % theChunkSize );
|
||||
|
||||
theVtkIDsNewToOld.resize( newNbCells );
|
||||
|
||||
@ -383,9 +383,9 @@ void SMDS_NodeFactory::Compact( std::vector<smIdType>& theVtkIDsOldToNew )
|
||||
// in the chunks. So we remove holes and report relocation in theVtkIDsOldToNew:
|
||||
// theVtkIDsOldToNew[ old VtkID ] = new VtkID
|
||||
|
||||
smIdType oldNbNodes = myMesh->GetGrid()->GetNumberOfPoints();
|
||||
smIdType newNbNodes = NbUsedElements();
|
||||
smIdType newNbChunks = newNbNodes / theChunkSize + bool ( newNbNodes % theChunkSize );
|
||||
int oldNbNodes = myMesh->GetGrid()->GetNumberOfPoints();
|
||||
int newNbNodes = NbUsedElements();
|
||||
int newNbChunks = newNbNodes / theChunkSize + bool ( newNbNodes % theChunkSize );
|
||||
smIdType maxNodeID = GetMaxID();
|
||||
|
||||
theVtkIDsOldToNew.resize( oldNbNodes, -1 );
|
||||
@ -488,7 +488,7 @@ void SMDS_NodeFactory::SetNbShapes( size_t nbShapes )
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
int SMDS_NodeFactory::GetShapeDim( smIdType shapeID ) const
|
||||
int SMDS_NodeFactory::GetShapeDim( int shapeID ) const
|
||||
{
|
||||
return shapeID < (int)myShapeDim.size() ? myShapeDim[ shapeID ] : theDefaultShapeDim;
|
||||
}
|
||||
@ -499,9 +499,9 @@ int SMDS_NodeFactory::GetShapeDim( smIdType shapeID ) const
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
void SMDS_NodeFactory::SetShapeDim( smIdType shapeID, int dim )
|
||||
void SMDS_NodeFactory::SetShapeDim( int shapeID, int dim )
|
||||
{
|
||||
if ( shapeID >= (smIdType)myShapeDim.size() )
|
||||
if ( shapeID >= (int)myShapeDim.size() )
|
||||
myShapeDim.resize( shapeID + 10, theDefaultShapeDim );
|
||||
myShapeDim[ shapeID ] = dim;
|
||||
}
|
||||
@ -836,7 +836,7 @@ void SMDS_ElementChunk::Compact()
|
||||
}
|
||||
else if ( it != mySubIDRanges.mySet.rbegin() )
|
||||
{
|
||||
smIdType nbNodes = (it-1)->my1st;
|
||||
int nbNodes = (it-1)->my1st;
|
||||
myPositions.resize( nbNodes * 2 );
|
||||
std::vector<TParam> newPos( myPositions.begin(), myPositions.end() );
|
||||
myPositions.swap( newPos );
|
||||
|
@ -98,7 +98,7 @@ public:
|
||||
const SMDS_MeshElement* FindElement( const smIdType id ) const;
|
||||
|
||||
//! Return a number of used elements
|
||||
smIdType NbUsedElements() const { return myNbUsedElements; }
|
||||
int NbUsedElements() const { return myNbUsedElements; }
|
||||
|
||||
//! Return an iterator on all element filtered using a given filter.
|
||||
// nbElemsToReturn is used to optimize by stopping the iteration as soon as
|
||||
@ -160,10 +160,10 @@ public:
|
||||
void SetNbShapes( size_t nbShapes );
|
||||
|
||||
//! Return a dimension of a shape
|
||||
int GetShapeDim( smIdType shapeID ) const;
|
||||
int GetShapeDim( int shapeID ) const;
|
||||
|
||||
//! Set a dimension of a shape
|
||||
void SetShapeDim( smIdType shapeID, int dim );
|
||||
void SetShapeDim( int shapeID, int dim );
|
||||
|
||||
//! De-allocate all nodes
|
||||
virtual void Clear();
|
||||
@ -405,7 +405,7 @@ public:
|
||||
static bool IsUsed( const _UsedRange& r ) { return r.myValue; }
|
||||
|
||||
//! Return index of an element in the chunk
|
||||
smIdType Index( const SMDS_MeshElement* e ) const { return e - myElements; }
|
||||
int Index( const SMDS_MeshElement* e ) const { return e - myElements; }
|
||||
|
||||
//! Return ID of the 1st element in the chunk
|
||||
int Get1stID() const { return my1stID; }
|
||||
|
@ -815,9 +815,9 @@ SMDS_MeshVolume* SMDS_Mesh::AddVolumeWithID(const SMDS_MeshNode * n1,
|
||||
SMDS_MeshFace* SMDS_Mesh::AddPolygonalFaceWithID (const std::vector<smIdType> & nodes_ids,
|
||||
const smIdType ID)
|
||||
{
|
||||
smIdType nbNodes = nodes_ids.size();
|
||||
int nbNodes = nodes_ids.size();
|
||||
std::vector<const SMDS_MeshNode*> nodes (nbNodes);
|
||||
for (smIdType i = 0; i < nbNodes; i++) {
|
||||
for (int i = 0; i < nbNodes; i++) {
|
||||
nodes[i] = myNodeFactory->FindNode( nodes_ids[i] );
|
||||
if (!nodes[i]) return NULL;
|
||||
}
|
||||
@ -911,9 +911,9 @@ SMDS_MeshVolume * SMDS_Mesh::AddPolyhedralVolumeWithID (const std::vector<smIdTy
|
||||
const std::vector<int> & quantities,
|
||||
const smIdType ID)
|
||||
{
|
||||
smIdType nbNodes = nodes_ids.size();
|
||||
int nbNodes = nodes_ids.size();
|
||||
std::vector<const SMDS_MeshNode*> nodes (nbNodes);
|
||||
for (smIdType i = 0; i < nbNodes; i++) {
|
||||
for (int i = 0; i < nbNodes; i++) {
|
||||
nodes[i] = myNodeFactory->FindNode(nodes_ids[i]);
|
||||
if (!nodes[i]) return NULL;
|
||||
}
|
||||
@ -1083,7 +1083,7 @@ bool SMDS_Mesh::ChangePolyhedronNodes(const SMDS_MeshElement * e
|
||||
|
||||
bool SMDS_Mesh::ChangeElementNodes(const SMDS_MeshElement * element,
|
||||
const SMDS_MeshNode * nodes[],
|
||||
const smIdType nbnodes)
|
||||
const int nbnodes)
|
||||
{
|
||||
// keep current nodes of element
|
||||
std::set<const SMDS_MeshNode*> oldNodes( element->begin_nodes(), element->end_nodes() );
|
||||
@ -1108,7 +1108,7 @@ bool SMDS_Mesh::ChangeElementNodes(const SMDS_MeshElement * element,
|
||||
|
||||
void SMDS_Mesh::updateInverseElements( const SMDS_MeshElement * element,
|
||||
const SMDS_MeshNode* const* nodes,
|
||||
const smIdType nbnodes,
|
||||
const int nbnodes,
|
||||
std::set<const SMDS_MeshNode*>& oldNodes )
|
||||
{
|
||||
if ( GetGrid()->HasLinks() ) // update InverseElements
|
||||
@ -1116,7 +1116,7 @@ void SMDS_Mesh::updateInverseElements( const SMDS_MeshElement * element,
|
||||
std::set<const SMDS_MeshNode*>::iterator it;
|
||||
|
||||
// AddInverseElement to new nodes
|
||||
for ( smIdType i = 0; i < nbnodes; i++ )
|
||||
for ( int i = 0; i < nbnodes; i++ )
|
||||
{
|
||||
it = oldNodes.find( nodes[i] );
|
||||
if ( it == oldNodes.end() )
|
||||
@ -1459,7 +1459,7 @@ int SMDS_Mesh::GetElementsByNodes(const std::vector<const SMDS_MeshNode *>& node
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Return the number of nodes
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
smIdType SMDS_Mesh::NbNodes() const
|
||||
int SMDS_Mesh::NbNodes() const
|
||||
{
|
||||
return myInfo.NbNodes();
|
||||
}
|
||||
@ -1467,14 +1467,14 @@ smIdType SMDS_Mesh::NbNodes() const
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Return the number of elements
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
smIdType SMDS_Mesh::NbElements() const
|
||||
int SMDS_Mesh::NbElements() const
|
||||
{
|
||||
return myInfo.NbElements();
|
||||
}
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Return the number of 0D elements
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
smIdType SMDS_Mesh::Nb0DElements() const
|
||||
int SMDS_Mesh::Nb0DElements() const
|
||||
{
|
||||
return myInfo.Nb0DElements();
|
||||
}
|
||||
@ -1482,7 +1482,7 @@ smIdType SMDS_Mesh::Nb0DElements() const
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Return the number of 0D elements
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
smIdType SMDS_Mesh::NbBalls() const
|
||||
int SMDS_Mesh::NbBalls() const
|
||||
{
|
||||
return myInfo.NbBalls();
|
||||
}
|
||||
@ -1490,7 +1490,7 @@ smIdType SMDS_Mesh::NbBalls() const
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Return the number of edges (including construction edges)
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
smIdType SMDS_Mesh::NbEdges() const
|
||||
int SMDS_Mesh::NbEdges() const
|
||||
{
|
||||
return myInfo.NbEdges();
|
||||
}
|
||||
@ -1498,7 +1498,7 @@ smIdType SMDS_Mesh::NbEdges() const
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Return the number of faces (including construction faces)
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
smIdType SMDS_Mesh::NbFaces() const
|
||||
int SMDS_Mesh::NbFaces() const
|
||||
{
|
||||
return myInfo.NbFaces();
|
||||
}
|
||||
@ -1506,7 +1506,7 @@ smIdType SMDS_Mesh::NbFaces() const
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
/// Return the number of volumes
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
smIdType SMDS_Mesh::NbVolumes() const
|
||||
int SMDS_Mesh::NbVolumes() const
|
||||
{
|
||||
return myInfo.NbVolumes();
|
||||
}
|
||||
@ -1515,7 +1515,7 @@ smIdType SMDS_Mesh::NbVolumes() const
|
||||
/// Return the number of child mesh of this mesh.
|
||||
/// Note that the tree structure of SMDS_Mesh is unused in SMESH
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
smIdType SMDS_Mesh::NbSubMesh() const
|
||||
int SMDS_Mesh::NbSubMesh() const
|
||||
{
|
||||
return myChildren.size();
|
||||
}
|
||||
@ -1589,7 +1589,7 @@ SMDS_NodeIteratorPtr SMDS_Mesh::nodesIterator() const
|
||||
|
||||
SMDS_ElemIteratorPtr SMDS_Mesh::elementGeomIterator(SMDSAbs_GeometryType type) const
|
||||
{
|
||||
smIdType nbElems = myCellFactory->CompactChangePointers() ? -1 : myInfo.NbElements( type );
|
||||
int nbElems = myCellFactory->CompactChangePointers() ? -1 : myInfo.NbElements( type );
|
||||
return myCellFactory->GetIterator< SMDS_ElemIterator >( new SMDS_MeshElement::GeomFilter( type ),
|
||||
nbElems);
|
||||
}
|
||||
@ -1600,7 +1600,7 @@ SMDS_ElemIteratorPtr SMDS_Mesh::elementEntityIterator(SMDSAbs_EntityType type) c
|
||||
{
|
||||
return myNodeFactory->GetIterator< SMDS_ElemIterator >( new SMDS_MeshElement::NonNullFilter );
|
||||
}
|
||||
smIdType nbElems = myCellFactory->CompactChangePointers() ? -1 : myInfo.NbElements( type );
|
||||
int nbElems = myCellFactory->CompactChangePointers() ? -1 : myInfo.NbElements( type );
|
||||
return myCellFactory->GetIterator<SMDS_ElemIterator>( new SMDS_MeshElement::EntityFilter( type ),
|
||||
nbElems);
|
||||
}
|
||||
@ -1620,7 +1620,7 @@ SMDS_ElemIteratorPtr SMDS_Mesh::elementsIterator(SMDSAbs_ElementType type) const
|
||||
return myNodeFactory->GetIterator< TIterator >( new SMDS_MeshElement::NonNullFilter );
|
||||
|
||||
default:
|
||||
smIdType nbElems = myCellFactory->CompactChangePointers() ? -1 : myInfo.NbElements( type );
|
||||
int nbElems = myCellFactory->CompactChangePointers() ? -1 : myInfo.NbElements( type );
|
||||
return myCellFactory->GetIterator< TIterator >( new SMDS_MeshElement::TypeFilter( type ),
|
||||
nbElems);
|
||||
}
|
||||
@ -1634,7 +1634,7 @@ SMDS_ElemIteratorPtr SMDS_Mesh::elementsIterator(SMDSAbs_ElementType type) const
|
||||
SMDS_EdgeIteratorPtr SMDS_Mesh::edgesIterator() const
|
||||
{
|
||||
typedef SMDS_EdgeIterator TIterator;
|
||||
smIdType nbElems = myCellFactory->CompactChangePointers() ? -1 : myInfo.NbEdges();
|
||||
int nbElems = myCellFactory->CompactChangePointers() ? -1 : myInfo.NbEdges();
|
||||
return myCellFactory->GetIterator< TIterator >( new SMDS_MeshElement::TypeFilter( SMDSAbs_Edge ),
|
||||
nbElems);
|
||||
}
|
||||
@ -1646,7 +1646,7 @@ SMDS_EdgeIteratorPtr SMDS_Mesh::edgesIterator() const
|
||||
SMDS_FaceIteratorPtr SMDS_Mesh::facesIterator() const
|
||||
{
|
||||
typedef SMDS_FaceIterator TIterator;
|
||||
smIdType nbElems = myCellFactory->CompactChangePointers() ? -1 : myInfo.NbFaces();
|
||||
int nbElems = myCellFactory->CompactChangePointers() ? -1 : myInfo.NbFaces();
|
||||
return myCellFactory->GetIterator< TIterator >( new SMDS_MeshElement::TypeFilter( SMDSAbs_Face ),
|
||||
nbElems);
|
||||
}
|
||||
@ -1658,7 +1658,7 @@ SMDS_FaceIteratorPtr SMDS_Mesh::facesIterator() const
|
||||
SMDS_VolumeIteratorPtr SMDS_Mesh::volumesIterator() const
|
||||
{
|
||||
typedef SMDS_VolumeIterator TIterator;
|
||||
smIdType nbElems = myCellFactory->CompactChangePointers() ? -1 : myInfo.NbVolumes();
|
||||
int nbElems = myCellFactory->CompactChangePointers() ? -1 : myInfo.NbVolumes();
|
||||
return
|
||||
myCellFactory->GetIterator< TIterator >( new SMDS_MeshElement::TypeFilter( SMDSAbs_Volume ),
|
||||
nbElems );
|
||||
@ -1705,7 +1705,7 @@ intersectionOfSets( std::set<const SMDS_MeshElement*> vs[], int numberOfSets )
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
static std::set<const SMDS_MeshElement*> * getFinitElements(const SMDS_MeshElement * element)
|
||||
{
|
||||
smIdType numberOfSets=element->NbNodes();
|
||||
int numberOfSets=element->NbNodes();
|
||||
std::set<const SMDS_MeshElement*> *initSet = new std::set<const SMDS_MeshElement*>[numberOfSets];
|
||||
|
||||
SMDS_NodeIteratorPtr itNodes = element->nodeIterator();
|
||||
@ -2981,8 +2981,8 @@ void SMDS_Mesh::CompactMesh()
|
||||
myCellFactory->Compact( idCellsNewToOld );
|
||||
|
||||
// make VTK IDs correspond to SMDS IDs
|
||||
smIdType newNodeSize = myNodeFactory->NbUsedElements();
|
||||
smIdType newCellSize = myCellFactory->NbUsedElements();
|
||||
int newNodeSize = myNodeFactory->NbUsedElements();
|
||||
int newCellSize = myCellFactory->NbUsedElements();
|
||||
myGrid->compactGrid( idNodesOldToNew, newNodeSize, idCellsNewToOld, newCellSize );
|
||||
|
||||
if ( idsChange && !myElemHolders.empty() )
|
||||
|
@ -613,7 +613,7 @@ public:
|
||||
|
||||
bool ChangeElementNodes(const SMDS_MeshElement * elem,
|
||||
const SMDS_MeshNode * nodes[],
|
||||
const smIdType nbnodes);
|
||||
const int nbnodes);
|
||||
bool ChangePolyhedronNodes(const SMDS_MeshElement * elem,
|
||||
const std::vector<const SMDS_MeshNode*>& nodes,
|
||||
const std::vector<int>& quantities);
|
||||
@ -689,14 +689,14 @@ public:
|
||||
|
||||
const SMDS_MeshInfo& GetMeshInfo() const { return myInfo; }
|
||||
|
||||
virtual smIdType NbNodes() const;
|
||||
virtual smIdType NbElements() const;
|
||||
virtual smIdType Nb0DElements() const;
|
||||
virtual smIdType NbBalls() const;
|
||||
virtual smIdType NbEdges() const;
|
||||
virtual smIdType NbFaces() const;
|
||||
virtual smIdType NbVolumes() const;
|
||||
virtual smIdType NbSubMesh() const;
|
||||
virtual int NbNodes() const;
|
||||
virtual int NbElements() const;
|
||||
virtual int Nb0DElements() const;
|
||||
virtual int NbBalls() const;
|
||||
virtual int NbEdges() const;
|
||||
virtual int NbFaces() const;
|
||||
virtual int NbVolumes() const;
|
||||
virtual int NbSubMesh() const;
|
||||
|
||||
virtual ~SMDS_Mesh();
|
||||
|
||||
@ -731,7 +731,7 @@ public:
|
||||
|
||||
void updateInverseElements( const SMDS_MeshElement * element,
|
||||
const SMDS_MeshNode* const* nodes,
|
||||
const smIdType nbnodes,
|
||||
const int nbnodes,
|
||||
std::set<const SMDS_MeshNode*>& oldNodes );
|
||||
|
||||
void setNbShapes( size_t nbShapes );
|
||||
|
@ -100,6 +100,8 @@
|
||||
|
||||
#include "SMESH_TryCatch.hxx" // include after OCCT headers!
|
||||
|
||||
#include <smIdType.hxx>
|
||||
|
||||
#define cast2Node(elem) static_cast<const SMDS_MeshNode*>( elem )
|
||||
|
||||
using namespace std;
|
||||
@ -3122,7 +3124,7 @@ public:
|
||||
long GetLinkID (const SMDS_MeshNode * n1,
|
||||
const SMDS_MeshNode * n2) const
|
||||
{
|
||||
return ( Min(n1->GetID(),n2->GetID()) * myMaxID + Max(n1->GetID(),n2->GetID()));
|
||||
return ( Min(FromIdType<int>(n1->GetID()),FromIdType<int>(n2->GetID())) * myMaxID + Max(FromIdType<int>(n1->GetID()),FromIdType<int>(n2->GetID())));
|
||||
}
|
||||
|
||||
bool GetNodes (const long theLinkID,
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include "SALOME_LifeCycleCORBA.hxx"
|
||||
|
||||
#include <SALOMEconfig.h>
|
||||
#include <smIdType.hxx>
|
||||
#include CORBA_SERVER_HEADER(SALOME_Component)
|
||||
#include CORBA_SERVER_HEADER(SALOME_Exception)
|
||||
|
||||
@ -231,10 +232,10 @@ namespace
|
||||
CORBA::Long anIndexId = 0, aNbElems = theSeq[theId].number;
|
||||
|
||||
for (CORBA::Long anElemId = 0; anElemId < aNbElems; anElemId++) {
|
||||
int aFaceId = anIndexes[anIndexId++];
|
||||
smIdType aFaceId = anIndexes[anIndexId++];
|
||||
|
||||
int aNbNodes = anIndexes[anIndexId++];
|
||||
std::vector<int> nodes_ids (aNbNodes);
|
||||
std::vector<smIdType> nodes_ids (aNbNodes);
|
||||
for (int i = 0; i < aNbNodes; i++) {
|
||||
nodes_ids[i] = anIndexes[anIndexId++];
|
||||
}
|
||||
@ -258,10 +259,10 @@ namespace
|
||||
CORBA::Long anIndexId = 0, aNbElems = theSeq[theId].number;
|
||||
|
||||
for (CORBA::Long anElemId = 0; anElemId < aNbElems; anElemId++) {
|
||||
int aFaceId = anIndexes[anIndexId++];
|
||||
smIdType aFaceId = anIndexes[anIndexId++];
|
||||
|
||||
int aNbNodes = anIndexes[anIndexId++];
|
||||
std::vector<int> nodes_ids (aNbNodes);
|
||||
std::vector<smIdType> nodes_ids (aNbNodes);
|
||||
for (int i = 0; i < aNbNodes; i++) {
|
||||
nodes_ids[i] = anIndexes[anIndexId++];
|
||||
}
|
||||
@ -414,10 +415,10 @@ namespace
|
||||
CORBA::Long anIndexId = 0, aNbElems = theSeq[theId].number;
|
||||
|
||||
for (CORBA::Long anElemId = 0; anElemId < aNbElems; anElemId++) {
|
||||
int aFaceId = anIndexes[anIndexId++];
|
||||
smIdType aFaceId = anIndexes[anIndexId++];
|
||||
|
||||
int aNbNodes = anIndexes[anIndexId++];
|
||||
std::vector<int> nodes_ids (aNbNodes);
|
||||
std::vector<smIdType> nodes_ids (aNbNodes);
|
||||
for (int i = 0; i < aNbNodes; i++) {
|
||||
nodes_ids[i] = anIndexes[anIndexId++];
|
||||
}
|
||||
|
@ -277,8 +277,8 @@ void SMESHDS_Command::AddVolume(int NewVolID,
|
||||
//function : AddPolygonalFace
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void SMESHDS_Command::AddPolygonalFace (const int ElementID,
|
||||
const std::vector<int>& nodes_ids)
|
||||
void SMESHDS_Command::AddPolygonalFace (const smIdType ElementID,
|
||||
const std::vector<smIdType>& nodes_ids)
|
||||
{
|
||||
if ( myType != SMESHDS_AddPolygon) {
|
||||
MESSAGE("SMESHDS_Command::AddPolygonalFace : Bad Type");
|
||||
@ -299,8 +299,8 @@ void SMESHDS_Command::AddPolygonalFace (const int ElementID,
|
||||
//function : AddQuadPolygonalFace
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void SMESHDS_Command::AddQuadPolygonalFace (const int ElementID,
|
||||
const std::vector<int>& nodes_ids)
|
||||
void SMESHDS_Command::AddQuadPolygonalFace (const smIdType ElementID,
|
||||
const std::vector<smIdType>& nodes_ids)
|
||||
{
|
||||
if ( myType != SMESHDS_AddQuadPolygon) {
|
||||
MESSAGE("SMESHDS_Command::AddQuadraticPolygonalFace : Bad Type");
|
||||
@ -321,8 +321,8 @@ void SMESHDS_Command::AddQuadPolygonalFace (const int ElementID,
|
||||
//function : AddPolyhedralVolume
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void SMESHDS_Command::AddPolyhedralVolume (const int ElementID,
|
||||
const std::vector<int>& nodes_ids,
|
||||
void SMESHDS_Command::AddPolyhedralVolume (const smIdType ElementID,
|
||||
const std::vector<smIdType>& nodes_ids,
|
||||
const std::vector<int>& quantities)
|
||||
{
|
||||
if ( myType != SMESHDS_AddPolyhedron) {
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "SMESH_SMESHDS.hxx"
|
||||
|
||||
#include "SMESHDS_CommandType.hxx"
|
||||
#include <smIdType.hxx>
|
||||
#include <list>
|
||||
#include <vector>
|
||||
|
||||
@ -55,12 +56,12 @@ class SMESHDS_EXPORT SMESHDS_Command
|
||||
void AddVolume(int NewVolID, int idnode1, int idnode2, int idnode3,
|
||||
int idnode4, int idnode5, int idnode6, int idnode7, int idnode8,
|
||||
int idnode9, int idnode10, int idnode11, int idnode12);
|
||||
void AddPolygonalFace (const int ElementID,
|
||||
const std::vector<int>& nodes_ids);
|
||||
void AddQuadPolygonalFace (const int ElementID,
|
||||
const std::vector<int>& nodes_ids);
|
||||
void AddPolyhedralVolume (const int ElementID,
|
||||
const std::vector<int>& nodes_ids,
|
||||
void AddPolygonalFace (const smIdType ElementID,
|
||||
const std::vector<smIdType>& nodes_ids);
|
||||
void AddQuadPolygonalFace (const smIdType ElementID,
|
||||
const std::vector<smIdType>& nodes_ids);
|
||||
void AddPolyhedralVolume (const smIdType ElementID,
|
||||
const std::vector<smIdType>& nodes_ids,
|
||||
const std::vector<int>& quantities);
|
||||
void AddBall(int NewBallID, int node, double diameter);
|
||||
// special methods for quadratic elements
|
||||
|
@ -790,7 +790,7 @@ SMESHDS_Mesh::AddQuadPolygonalFace (const std::vector<const SMDS_MeshNode*>& nod
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
SMDS_MeshVolume* SMESHDS_Mesh::AddPolyhedralVolumeWithID (const std::vector<smIdType>& nodes_ids,
|
||||
const std::vector<smIdType>& quantities,
|
||||
const std::vector<int>& quantities,
|
||||
const smIdType ID)
|
||||
{
|
||||
SMDS_MeshVolume *anElem = SMDS_Mesh::AddPolyhedralVolumeWithID(nodes_ids, quantities, ID);
|
||||
|
@ -246,7 +246,7 @@ void SMESHDS_Script::AddVolume(int NewVolID, int idnode1, int idnode2, int idnod
|
||||
//function : AddPolygonalFace
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void SMESHDS_Script::AddPolygonalFace (int NewFaceID, const std::vector<int>& nodes_ids)
|
||||
void SMESHDS_Script::AddPolygonalFace (smIdType NewFaceID, const std::vector<smIdType>& nodes_ids)
|
||||
{
|
||||
if(myIsEmbeddedMode){
|
||||
myIsModified = true;
|
||||
@ -259,7 +259,7 @@ void SMESHDS_Script::AddPolygonalFace (int NewFaceID, const std::vector<int>& no
|
||||
//function : AddQuadPolygonalFace
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void SMESHDS_Script::AddQuadPolygonalFace(int NewFaceID, const std::vector<int>& nodes_ids)
|
||||
void SMESHDS_Script::AddQuadPolygonalFace(smIdType NewFaceID, const std::vector<smIdType>& nodes_ids)
|
||||
{
|
||||
if(myIsEmbeddedMode){
|
||||
myIsModified = true;
|
||||
@ -272,8 +272,8 @@ void SMESHDS_Script::AddQuadPolygonalFace(int NewFaceID, const std::vector<int>&
|
||||
//function : AddPolyhedralVolume
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void SMESHDS_Script::AddPolyhedralVolume (int NewID,
|
||||
const std::vector<int>& nodes_ids,
|
||||
void SMESHDS_Script::AddPolyhedralVolume (smIdType NewID,
|
||||
const std::vector<smIdType>& nodes_ids,
|
||||
const std::vector<int>& quantities)
|
||||
{
|
||||
if(myIsEmbeddedMode){
|
||||
|
@ -31,6 +31,8 @@
|
||||
|
||||
#include "SMESHDS_Command.hxx"
|
||||
|
||||
#include <smIdType.hxx>
|
||||
|
||||
#include <list>
|
||||
#include <vector>
|
||||
|
||||
@ -62,12 +64,12 @@ class SMESHDS_EXPORT SMESHDS_Script
|
||||
int idnode4, int idnode5, int idnode6, int idnode7, int idnode8,
|
||||
int idnode9, int idnode10, int idnode11, int idnode12);
|
||||
|
||||
void AddPolygonalFace (const int NewFaceID,
|
||||
const std::vector<int>& nodes_ids);
|
||||
void AddQuadPolygonalFace (const int NewFaceID,
|
||||
const std::vector<int>& nodes_ids);
|
||||
void AddPolyhedralVolume (const int NewVolID,
|
||||
const std::vector<int>& nodes_ids,
|
||||
void AddPolygonalFace (const smIdType NewFaceID,
|
||||
const std::vector<smIdType>& nodes_ids);
|
||||
void AddQuadPolygonalFace (const smIdType NewFaceID,
|
||||
const std::vector<smIdType>& nodes_ids);
|
||||
void AddPolyhedralVolume (const smIdType NewVolID,
|
||||
const std::vector<smIdType>& nodes_ids,
|
||||
const std::vector<int>& quantities);
|
||||
void AddBall(int NewBallID, int node, double diameter);
|
||||
|
||||
|
@ -277,7 +277,7 @@ namespace
|
||||
|
||||
static Standard_Integer HashCode(const CutFace& f, const Standard_Integer upper)
|
||||
{
|
||||
return ::HashCode( f.myInitFace->GetID(), upper );
|
||||
return ::HashCode( (int)(f.myInitFace->GetID()), upper );
|
||||
}
|
||||
static Standard_Boolean IsEqual(const CutFace& f1, const CutFace& f2 )
|
||||
{
|
||||
|
@ -32,6 +32,8 @@
|
||||
#include "SMDS_SetIterator.hxx"
|
||||
#include "SMDS_MeshNode.hxx"
|
||||
|
||||
#include <smIdType.hxx>
|
||||
|
||||
#include <gp_XYZ.hxx>
|
||||
#include <gp_XY.hxx>
|
||||
|
||||
@ -154,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( link.node1()->GetID() + link.node2()->GetID(), aLimit );
|
||||
return ::HashCode( FromIdType<int>(link.node1()->GetID() + link.node2()->GetID()), aLimit );
|
||||
}
|
||||
static Standard_Boolean IsEqual(const SMESH_TLink& l1, const SMESH_TLink& l2)
|
||||
{
|
||||
@ -215,7 +217,7 @@ struct SMESH_Hasher
|
||||
{
|
||||
static Standard_Integer HashCode(const SMDS_MeshElement* e, const Standard_Integer upper)
|
||||
{
|
||||
return ::HashCode( e->GetID(), upper );
|
||||
return ::HashCode( FromIdType<int>(e->GetID()), upper );
|
||||
}
|
||||
static Standard_Boolean IsEqual( const SMDS_MeshElement* e1, const SMDS_MeshElement* e2 )
|
||||
{
|
||||
|
@ -28,6 +28,7 @@
|
||||
|
||||
#include "SMESHDS_Mesh.hxx"
|
||||
#include "SMESH_TypeDefs.hxx"
|
||||
#include <smIdType.hxx>
|
||||
|
||||
#include <SALOMEconfig.h>
|
||||
#include CORBA_SERVER_HEADER(SMESH_Mesh)
|
||||
@ -59,10 +60,10 @@ public:
|
||||
virtual const SMDS_MeshElement *FindElement(int IDelem) const;
|
||||
|
||||
virtual bool HasNumerationHoles();
|
||||
virtual int MaxNodeID() const;
|
||||
virtual int MinNodeID() const;
|
||||
virtual int MaxElementID() const;
|
||||
virtual int MinElementID() const;
|
||||
virtual smIdType MaxNodeID() const;
|
||||
virtual smIdType MinNodeID() const;
|
||||
virtual smIdType MaxElementID() const;
|
||||
virtual smIdType MinElementID() const;
|
||||
|
||||
private:
|
||||
TIDSortedElemSet _elements[ SMDSAbs_NbElementTypes ];
|
||||
|
@ -7057,19 +7057,19 @@ bool SMESH_MeshPartDS::HasNumerationHoles()
|
||||
MaxElementID() != NbElements() );
|
||||
}
|
||||
// -------------------------------------------------------------------------------------
|
||||
int SMESH_MeshPartDS::MaxNodeID() const
|
||||
smIdType SMESH_MeshPartDS::MaxNodeID() const
|
||||
{
|
||||
if ( _meshDS ) return _meshDS->MaxNodeID();
|
||||
return NbNodes() == 0 ? 0 : (*_elements[ SMDSAbs_Node ].rbegin())->GetID();
|
||||
}
|
||||
// -------------------------------------------------------------------------------------
|
||||
int SMESH_MeshPartDS::MinNodeID() const
|
||||
smIdType SMESH_MeshPartDS::MinNodeID() const
|
||||
{
|
||||
if ( _meshDS ) return _meshDS->MinNodeID();
|
||||
return NbNodes() == 0 ? 0 : (*_elements[ SMDSAbs_Node ].begin())->GetID();
|
||||
}
|
||||
// -------------------------------------------------------------------------------------
|
||||
int SMESH_MeshPartDS::MaxElementID() const
|
||||
smIdType SMESH_MeshPartDS::MaxElementID() const
|
||||
{
|
||||
if ( _meshDS ) return _meshDS->MaxElementID();
|
||||
int maxID = 0;
|
||||
@ -7079,7 +7079,7 @@ int SMESH_MeshPartDS::MaxElementID() const
|
||||
return maxID;
|
||||
}
|
||||
// -------------------------------------------------------------------------------------
|
||||
int SMESH_MeshPartDS::MinElementID() const
|
||||
smIdType SMESH_MeshPartDS::MinElementID() const
|
||||
{
|
||||
if ( _meshDS ) return _meshDS->MinElementID();
|
||||
int minID = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user