/*!
* Evaluates size of prospective mesh on a shape
*/
- long_array Evaluate(in SMESH_Mesh theMesh,
- in GEOM::GEOM_Object theSubObject)
+ smIdType_array Evaluate(in SMESH_Mesh theMesh,
+ in GEOM::GEOM_Object theSubObject)
raises ( SALOME::SALOME_Exception );
/*!
/*!
* Returns the number of elements in the group
*/
- long Size();
+ smIdType Size();
/*!
* Returns true if the group does not contain any elements
return aDist;
}
- int getNbMultiConnection( const SMDS_Mesh* theMesh, const int theId )
+ int getNbMultiConnection( const SMDS_Mesh* theMesh, const smIdType theId )
{
if ( theMesh == 0 )
return 0;
myMesh = theMesh;
}
-bool NumericalFunctor::GetPoints(const int theId,
+bool NumericalFunctor::GetPoints(const smIdType theId,
TSequenceOfXYZ& theRes ) const
{
theRes.clear();
*/
//================================================================================
-void NumericalFunctor::GetHistogram(int nbIntervals,
- std::vector<int>& nbEvents,
- std::vector<double>& funValues,
- const std::vector<int>& elements,
- const double* minmax,
- const bool isLogarithmic)
+void NumericalFunctor::GetHistogram(int nbIntervals,
+ std::vector<int>& nbEvents,
+ std::vector<double>& funValues,
+ const std::vector<smIdType>& elements,
+ const double* minmax,
+ const bool isLogarithmic)
{
if ( nbIntervals < 1 ||
!myMesh ||
}
else
{
- std::vector<int>::const_iterator id = elements.begin();
+ std::vector<smIdType>::const_iterator id = elements.begin();
for ( ; id != elements.end(); ++id )
values.insert( GetValue( *id ));
}
{
// use special nodes iterator
SMDS_NodeIteratorPtr anIter = anElem->interlacedNodesIterator();
- long aNodeId[4] = { 0,0,0,0 };
+ smIdType aNodeId[4] = { 0,0,0,0 };
gp_Pnt P[4];
double aLength = 0;
}
else {
SMDS_NodeIteratorPtr aNodesIter = anElem->nodeIterator();
- long aNodeId[2] = {0,0};
+ smIdType aNodeId[2] = {0,0};
gp_Pnt P[3];
double aLength;
for( ; aNodesIter->more(); )
{
aNode = aNodesIter->next();
- long anId = aNode->GetID();
+ smIdType anId = aNode->GetID();
P[2] = SMESH_NodeXYZ( aNode );
if (!anIter) break;
const SMDS_MeshNode *aNode, *aNode0 = 0;
- TColStd_MapOfInteger aMap, aMapPrev;
+ NCollection_Map< smIdType > aMap, aMapPrev;
for (i = 0; i <= len; i++) {
aMapPrev = aMap;
std::list< const SMDS_MeshNode*>& coincNodes = *groupIt;
std::list< const SMDS_MeshNode*>::iterator n = coincNodes.begin();
for ( ; n != coincNodes.end(); ++n )
- myCoincidentIDs.Add( FromIdType<int>((*n)->GetID()) );
+ myCoincidentIDs.Add( (*n)->GetID() );
}
}
}
myMesh = theMesh;
}
-bool FreeEdges::IsFreeEdge( const SMDS_MeshNode** theNodes, const int theFaceId )
+bool FreeEdges::IsFreeEdge( const SMDS_MeshNode** theNodes, const smIdType theFaceId )
{
SMDS_ElemIteratorPtr anElemIter = theNodes[ 0 ]->GetInverseElementIterator(SMDSAbs_Face);
while( anElemIter->more() )
{
if ( const SMDS_MeshElement* anElem = anElemIter->next())
{
- const int anId = FromIdType<int>(anElem->GetID());
+ const smIdType anId = anElem->GetID();
if ( anId != theFaceId && anElem->GetNodeIndex( theNodes[1] ) >= 0 )
return false;
}
if ( !foundElems.empty() )
{
- myNodeID = FromIdType<int>(foundElems[0]->GetNode(0)->GetID());
+ myNodeID = foundElems[0]->GetNode(0)->GetID();
if ( myOkIDsReady && !myMeshModifTracer.IsMeshModified() )
isSameDomain = IsSatisfy( foundElems[0]->GetID() );
}
return false;
std::list< const SMDS_MeshNode* > nodeQueue( 1, node0 );
- std::set< int > checkedNodeIDs;
+ std::set< smIdType > checkedNodeIDs;
// algo:
// foreach node in nodeQueue:
// foreach element sharing a node:
// keep elements of myType
const SMDS_MeshElement* element = eIt->next();
if ( myType == SMDSAbs_All || element->GetType() == myType )
- myOkIDs.insert( myOkIDs.end(), FromIdType<int>(element->GetID()) );
+ myOkIDs.insert( myOkIDs.end(), 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( FromIdType<int>(n->GetID()) ).second )
+ if ( checkedNodeIDs.insert( n->GetID()) )
nodeQueue.push_back( n );
}
}
gp_Vec norm = getNormale( static_cast<const SMDS_MeshFace*>(f), &normOK );
if (!normOK || isLessAngle( myNorm, norm, cosTol))
{
- myCoplanarIDs.Add( FromIdType<int>(f->GetID()) );
+ myCoplanarIDs.Add( f->GetID() );
faceQueue.push_back( std::make_pair( f, norm ));
}
}
// the map of non manifold links and bad geometry
TMapOfLink aMapOfNonManifold;
- TColStd_MapOfInteger aMapOfTreated;
+ TIDsMap aMapOfTreated;
// begin cycle on faces from start index and run on vector till the end
// and from begin to start index to cover whole vector
// as result next time when fi will be equal to aStartIndx
SMDS_MeshFace* aFacePtr = myAllFacePtr[ fi ];
- if ( aMapOfTreated.Contains( FromIdType<int>(aFacePtr->GetID()) ) )
+ if ( aMapOfTreated.Contains( aFacePtr->GetID()) )
continue;
- aMapOfTreated.Add( FromIdType<int>(aFacePtr->GetID()) );
- TColStd_MapOfInteger aResFaces;
+ aMapOfTreated.Add( aFacePtr->GetID() );
+ TIDsMap aResFaces;
if ( !findConnected( myAllFacePtrIntDMap, aFacePtr,
aMapOfNonManifold, aResFaces ) )
continue;
- TColStd_MapIteratorOfMapOfInteger anItr( aResFaces );
+ TIDsMap::Iterator anItr( aResFaces );
for ( ; anItr.More(); anItr.Next() )
{
- int aFaceId = anItr.Key();
+ smIdType aFaceId = anItr.Key();
aMapOfTreated.Add( aFaceId );
myMapIds.Add( aFaceId );
}
( const ManifoldPart::TDataMapFacePtrInt& theAllFacePtrInt,
SMDS_MeshFace* theStartFace,
ManifoldPart::TMapOfLink& theNonManifold,
- TColStd_MapOfInteger& theResFaces )
+ TIDsMap& theResFaces )
{
theResFaces.Clear();
if ( !theAllFacePtrInt.size() )
if ( getNormale( theStartFace ).SquareModulus() <= gp::Resolution() )
{
- myMapBadGeomIds.Add( FromIdType<int>(theStartFace->GetID()) );
+ myMapBadGeomIds.Add( theStartFace->GetID() );
return false;
}
ManifoldPart::TMapOfLink aMapOfBoundary, aMapToSkip;
ManifoldPart::TVectorOfLink aSeqOfBoundary;
- theResFaces.Add( FromIdType<int>(theStartFace->GetID()) );
+ theResFaces.Add( theStartFace->GetID() );
ManifoldPart::TDataMapOfLinkFacePtr aDMapLinkFace;
expandBoundary( aMapOfBoundary, aSeqOfBoundary,
SMDS_MeshFace* aNextFace = *pFace;
if ( aPrevFace == aNextFace )
continue;
- int anNextFaceID = FromIdType<int>(aNextFace->GetID());
+ smIdType anNextFaceID = 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( FromIdType<int>(theFace2->GetID()) );
+ myMapBadGeomIds.Add( theFace2->GetID() );
return false;
}
if ( aNorm1.IsParallel( gp_Dir( aNorm2XYZ ), myAngToler ) )
if ( !myMeshModifTracer.GetMesh() )
return;
- myIds.ReSize( FromIdType<int>(myMeshModifTracer.GetMesh()->GetMeshInfo().NbElements( myType )));
+ int nbElems = FromIdType<int>( myMeshModifTracer.GetMesh()->GetMeshInfo().NbElements( myType ));
+ if ( nbElems > 0 )
+ myIds.ReSize( nbElems );
SMDS_ElemIteratorPtr anIter = myMeshModifTracer.GetMesh()->elementsIterator( myType );
for(; anIter->more(); )
}
}
if ( isSatisfy )
- myIds.Add( FromIdType<int>(theElemPtr->GetID()) );
+ myIds.Add( heElemPtr->GetID() );
}
bool ElementsOnSurface::isOnSurface( const SMDS_MeshNode* theNode )
#include <GeomAPI_ProjectPointOnSurf.hxx>
#include <Quantity_Color.hxx>
#include <TColStd_MapOfInteger.hxx>
-#include <TColStd_SequenceOfInteger.hxx>
#include <TCollection_AsciiString.hxx>
+#include <NCollection_Map.hxx>
#include <TopAbs.hxx>
#include <TopoDS_Face.hxx>
#include <gp_XYZ.hxx>
class gp_Pln;
class gp_Pnt;
+typedef NCollection_Map< smIdType > TIDsMap;
+
namespace SMESH{
namespace Controls{
virtual void SetMesh( const SMDS_Mesh* theMesh );
virtual double GetValue( long theElementId );
virtual double GetValue(const TSequenceOfXYZ& /*thePoints*/) { return -1.0;};
- void GetHistogram(int nbIntervals,
- std::vector<int>& nbEvents,
- std::vector<double>& funValues,
- const std::vector<int>& elements,
- const double* minmax=0,
- const bool isLogarithmic = false);
+ void GetHistogram(int nbIntervals,
+ std::vector<int>& nbEvents,
+ std::vector<double>& funValues,
+ const std::vector<smIdType>& elements,
+ const double* minmax=0,
+ const bool isLogarithmic = false);
bool IsApplicable( long theElementId ) const;
virtual bool IsApplicable( const SMDS_MeshElement* element ) const;
virtual SMDSAbs_ElementType GetType() const = 0;
void SetPrecision( const long thePrecision );
double Round( const double & value );
- bool GetPoints(const int theId, TSequenceOfXYZ& theRes) const;
+ bool GetPoints(const smIdType theId, TSequenceOfXYZ& theRes) const;
static bool GetPoints(const SMDS_MeshElement* theElem, TSequenceOfXYZ& theRes);
protected:
const SMDS_Mesh* myMesh;
double GetTolerance () const { return myToler; }
private:
- double myToler;
- TColStd_MapOfInteger myCoincidentIDs;
- TMeshModifTracer myMeshModifTracer;
+ double myToler;
+ TIDsMap myCoincidentIDs;
+ TMeshModifTracer myMeshModifTracer;
};
typedef boost::shared_ptr<CoincidentNodes> CoincidentNodesPtr;
virtual void SetMesh( const SMDS_Mesh* theMesh );
virtual bool IsSatisfy( long theElementId );
virtual SMDSAbs_ElementType GetType() const;
- static bool IsFreeEdge( const SMDS_MeshNode** theNodes, const int theFaceId );
+ static bool IsFreeEdge( const SMDS_MeshNode** theNodes, const smIdType theFaceId );
typedef long TElemId;
struct Border{
TElemId myElemId;
protected:
const SMDS_Mesh* myMesh;
- TColStd_SequenceOfInteger myMin;
- TColStd_SequenceOfInteger myMax;
- TColStd_MapOfInteger myIds;
+ std::vector< smIdType> myMin;
+ std::vector< smIdType > myMax;
+ TIDsMap myIds;
SMDSAbs_ElementType myType;
};
bool findConnected( const TDataMapFacePtrInt& theAllFacePtrInt,
SMDS_MeshFace* theStartFace,
TMapOfLink& theNonManifold,
- TColStd_MapOfInteger& theResFaces );
+ TIDsMap& theResFaces );
bool isInPlane( const SMDS_MeshFace* theFace1,
const SMDS_MeshFace* theFace2 );
void expandBoundary( TMapOfLink& theMapOfBoundary,
private:
const SMDS_Mesh* myMesh;
- TColStd_MapOfInteger myMapIds;
- TColStd_MapOfInteger myMapBadGeomIds;
+ TIDsMap myMapIds;
+ TIDsMap myMapBadGeomIds;
TVectorOfFacePtr myAllFacePtr;
TDataMapFacePtrInt myAllFacePtrIntDMap;
double myAngToler;
private:
TMeshModifTracer myMeshModifTracer;
- TColStd_MapOfInteger myIds;
+ TIDsMap myIds;
SMDSAbs_ElementType myType;
TopoDS_Face mySurf;
double myToler;
TMeshModifTracer myMeshModifTracer;
long myFaceID;
double myToler;
- TColStd_MapOfInteger myCoplanarIDs;
+ TIDsMap myCoplanarIDs;
};
typedef boost::shared_ptr<CoplanarFaces> CoplanarFacesPtr;
//const std::set<long>& GetDomainIDs() const { return myOkIDs; }
private:
- int myNodeID;
+ smIdType myNodeID;
std::vector<double> myXYZ;
SMDSAbs_ElementType myType;
TMeshModifTracer myMeshModifTracer;
void clearOkIDs();
bool myOkIDsReady;
- std::set< int > myOkIDs; // empty means that there is one domain
+ std::set<smIdType> myOkIDs; // empty means that there is one domain
};
typedef boost::shared_ptr<ConnectedElements> ConnectedElementsPtr;
const EBooleen theIsElemNames = eFAUX;
const EConnectivite theConnMode = eNOD;
- TInt aNbNodes = FromIdType<int>(myMesh->NbNodes());
+ TInt aNbNodes = FromIdType<TInt>( myMesh->NbNodes() );
PNodeInfo aNodeInfo = myMed->CrNodeInfo(aMeshInfo, aNbNodes,
theMode, theSystem, theIsElemNum, theIsElemNames);
#endif
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
eBALL,
- FromIdType<int>(nbElemInfo.NbBalls()),
+ FromIdType<TInt>(nbElemInfo.NbBalls()),
SMDSAbs_Ball));
#ifdef _ELEMENTS_BY_DIM_
anEntity = eARETE;
#endif
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
eSEG2,
- FromIdType<int>(nbElemInfo.NbEdges( ORDER_LINEAR )),
+ FromIdType<TInt>(nbElemInfo.NbEdges( ORDER_LINEAR )),
SMDSAbs_Edge));
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
eSEG3,
- FromIdType<int>(nbElemInfo.NbEdges( ORDER_QUADRATIC )),
+ FromIdType<TInt>(nbElemInfo.NbEdges( ORDER_QUADRATIC )),
SMDSAbs_Edge));
#ifdef _ELEMENTS_BY_DIM_
anEntity = eFACE;
#endif
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
eTRIA3,
- FromIdType<int>(nbElemInfo.NbTriangles( ORDER_LINEAR )),
+ FromIdType<TInt>(nbElemInfo.NbTriangles( ORDER_LINEAR )),
SMDSAbs_Face));
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
eTRIA6,
- FromIdType<int>(nbElemInfo.NbTriangles( ORDER_QUADRATIC ) -
+ FromIdType<TInt>(nbElemInfo.NbTriangles( ORDER_QUADRATIC ) -
nbElemInfo.NbBiQuadTriangles()),
SMDSAbs_Face));
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
eTRIA7,
- FromIdType<int>(nbElemInfo.NbBiQuadTriangles()),
+ FromIdType<TInt>(nbElemInfo.NbBiQuadTriangles()),
SMDSAbs_Face));
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
eQUAD4,
- FromIdType<int>(nbElemInfo.NbQuadrangles( ORDER_LINEAR )),
+ FromIdType<TInt>(nbElemInfo.NbQuadrangles( ORDER_LINEAR )),
SMDSAbs_Face));
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
eQUAD8,
- FromIdType<int>(nbElemInfo.NbQuadrangles( ORDER_QUADRATIC ) -
+ FromIdType<TInt>(nbElemInfo.NbQuadrangles( ORDER_QUADRATIC ) -
nbElemInfo.NbBiQuadQuadrangles()),
SMDSAbs_Face));
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
eQUAD9,
- FromIdType<int>(nbElemInfo.NbBiQuadQuadrangles()),
+ FromIdType<TInt>(nbElemInfo.NbBiQuadQuadrangles()),
SMDSAbs_Face));
if ( polyTypesSupported ) {
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
ePOLYGONE,
- FromIdType<int>(nbElemInfo.NbPolygons( ORDER_LINEAR )),
+ FromIdType<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<int>(nbElemInfo.NbPolygons( ORDER_LINEAR )),
+ FromIdType<TInt>(nbElemInfo.NbPolygons( ORDER_LINEAR )),
SMDSAbs_Face));
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
ePOLYGON2,
- FromIdType<int>(nbElemInfo.NbPolygons( ORDER_QUADRATIC )),
+ FromIdType<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<int>(nbElemInfo.NbPolygons( ORDER_QUADRATIC )),
+ FromIdType<TInt>(nbElemInfo.NbPolygons( ORDER_QUADRATIC )),
SMDSAbs_Face));
}
#ifdef _ELEMENTS_BY_DIM_
#endif
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
eTETRA4,
- FromIdType<int>(nbElemInfo.NbTetras( ORDER_LINEAR )),
+ FromIdType<TInt>(nbElemInfo.NbTetras( ORDER_LINEAR )),
SMDSAbs_Volume));
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
eTETRA10,
- FromIdType<int>(nbElemInfo.NbTetras( ORDER_QUADRATIC )),
+ FromIdType<TInt>(nbElemInfo.NbTetras( ORDER_QUADRATIC )),
SMDSAbs_Volume));
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
ePYRA5,
- FromIdType<int>(nbElemInfo.NbPyramids( ORDER_LINEAR )),
+ FromIdType<TInt>(nbElemInfo.NbPyramids( ORDER_LINEAR )),
SMDSAbs_Volume));
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
ePYRA13,
- FromIdType<int>(nbElemInfo.NbPyramids( ORDER_QUADRATIC )),
+ FromIdType<TInt>(nbElemInfo.NbPyramids( ORDER_QUADRATIC )),
SMDSAbs_Volume));
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
ePENTA6,
- FromIdType<int>(nbElemInfo.NbPrisms( ORDER_LINEAR )),
+ FromIdType<TInt>(nbElemInfo.NbPrisms( ORDER_LINEAR )),
SMDSAbs_Volume));
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
ePENTA15,
- FromIdType<int>(nbElemInfo.NbQuadPrisms()),
+ FromIdType<TInt>(nbElemInfo.NbQuadPrisms()),
SMDSAbs_Volume));
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
ePENTA18,
- FromIdType<int>(nbElemInfo.NbBiQuadPrisms()),
+ FromIdType<TInt>(nbElemInfo.NbBiQuadPrisms()),
SMDSAbs_Volume));
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
eHEXA8,
- FromIdType<int>(nbElemInfo.NbHexas( ORDER_LINEAR )),
+ FromIdType<TInt>(nbElemInfo.NbHexas( ORDER_LINEAR )),
SMDSAbs_Volume));
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
eHEXA20,
- FromIdType<int>(nbElemInfo.NbHexas( ORDER_QUADRATIC )-
+ FromIdType<TInt>(nbElemInfo.NbHexas( ORDER_QUADRATIC )-
nbElemInfo.NbTriQuadHexas()),
SMDSAbs_Volume));
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
eHEXA27,
- FromIdType<int>(nbElemInfo.NbTriQuadHexas()),
+ FromIdType<TInt>(nbElemInfo.NbTriQuadHexas()),
SMDSAbs_Volume));
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
eOCTA12,
- FromIdType<int>(nbElemInfo.NbHexPrisms()),
+ FromIdType<TInt>(nbElemInfo.NbHexPrisms()),
SMDSAbs_Volume));
if ( polyTypesSupported ) {
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
ePOLYEDRE,
- FromIdType<int>(nbElemInfo.NbPolyhedrons()),
+ FromIdType<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<int>(nbElemInfo.NbPolyhedrons()),
+ FromIdType<TInt>(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[FromIdType<int>(aNode->GetID())];
+ aTConnSlice[ iNode ] = aNodeIdMap[FromIdType<TInt>(aNode->GetID())];
#else
aTConnSlice[ iNode ] = aNode->GetID();
#endif
}
// element number
- aPolygoneInfo->SetElemNum( iElem, FromIdType<int>(anElem->GetID()) );
+ aPolygoneInfo->SetElemNum( iElem, FromIdType<TInt>(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[FromIdType<int>(aNode->GetID())];
+ conn[ iNode ] = aNodeIdMap[FromIdType<TInt>(aNode->GetID())];
#else
conn[ iNode ] = aNode->GetID();
#endif
++iNode;
}
// element number
- aPolyhInfo->SetElemNum( iElem, FromIdType<int>(anElem->GetID()) );
+ aPolyhInfo->SetElemNum( iElem, FromIdType<TInt>(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[FromIdType<int>(aNode->GetID())];
+ (*aBallInfo->myConn)[ iElem ] = aNodeIdMap[FromIdType<TInt>(aNode->GetID())];
#else
(*aBallInfo->myConn)[ iElem ] = aNode->GetID();
#endif
// element number
- aBallInfo->SetElemNum( iElem, FromIdType<int>(anElem->GetID()) );
+ aBallInfo->SetElemNum( iElem, FromIdType<TInt>(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[FromIdType<int>(aNode->GetID())];
+ aTConnSlice[ iNode ] = aNodeIdMap[FromIdType<TInt>(aNode->GetID())];
#else
aTConnSlice[ iNode ] = aNode->GetID();
#endif
}
// element number
- aCellInfo->SetElemNum( iElem, FromIdType<int>(anElem->GetID()) );
+ aCellInfo->SetElemNum( iElem, FromIdType<TInt>(anElem->GetID()) );
// family number
int famNum = getFamilyId( anElemFamMap, anElem, defaultFamilyId );
}
std::map<SMDSAbs_ElementType,int> GetEntitiesFromObject(SMESH_VisualObj *theObject) {
- std::map<SMDSAbs_ElementType,int> entities;
- entities.insert(std::pair<SMDSAbs_ElementType,int>(SMDSAbs_0DElement,
+ std::map<SMDSAbs_ElementType,smIdType> entities;
+ entities.insert(std::pair<SMDSAbs_ElementType,smIdType>(SMDSAbs_0DElement,
theObject ? theObject->GetNbEntities(SMDSAbs_0DElement) : 0));
- entities.insert(std::pair<SMDSAbs_ElementType,int>(SMDSAbs_Ball,
+ entities.insert(std::pair<SMDSAbs_ElementType,smIdType>(SMDSAbs_Ball,
theObject ? theObject->GetNbEntities(SMDSAbs_Ball) : 0));
- entities.insert(std::pair<SMDSAbs_ElementType,int>(SMDSAbs_Edge,
+ entities.insert(std::pair<SMDSAbs_ElementType,smIdType>(SMDSAbs_Edge,
theObject ? theObject->GetNbEntities(SMDSAbs_Edge) : 0));
- entities.insert(std::pair<SMDSAbs_ElementType,int>(SMDSAbs_Face,
+ entities.insert(std::pair<SMDSAbs_ElementType,smIdType>(SMDSAbs_Face,
theObject ? theObject->GetNbEntities(SMDSAbs_Face) : 0));
- entities.insert(std::pair<SMDSAbs_ElementType,int>(SMDSAbs_Volume,
+ entities.insert(std::pair<SMDSAbs_ElementType,smIdType>(SMDSAbs_Volume,
theObject ? theObject->GetNbEntities(SMDSAbs_Volume) : 0));
return entities;
}
QString def);
SMESHOBJECT_EXPORT
- std::map<SMDSAbs_ElementType,int>
+ std::map<SMDSAbs_ElementType,smIdType>
GetEntitiesFromObject(SMESH_VisualObj *theObject);
SMESHOBJECT_EXPORT
unsigned int tmp = myEntitiesState;
ClearEntitiesFlags();
- map<SMDSAbs_ElementType,int> entities = SMESH::GetEntitiesFromObject(this);
+ map<SMDSAbs_ElementType,smIdType> entities = SMESH::GetEntitiesFromObject(this);
if( myEntitiesCache[SMDSAbs_0DElement] != 0 ||
virtual bool Update( int theIsClear = true ) = 0;
virtual bool NulData() = 0;
virtual void UpdateFunctor( const SMESH::Controls::FunctorPtr& theFunctor ) = 0;
- virtual int GetElemDimension( const int theObjId ) = 0;
+ virtual int GetElemDimension( const smIdType theObjId ) = 0;
- virtual int GetNbEntities( const SMDSAbs_ElementType theType) const = 0;
+ virtual smIdType GetNbEntities( const SMDSAbs_ElementType theType) const = 0;
virtual SMDS_Mesh* GetMesh() const = 0;
virtual SMESH::SMESH_Mesh_ptr GetMeshServer() = 0;
- virtual bool GetEdgeNodes( const int theElemId,
- const int theEdgeNum,
- int& theNodeId1,
- int& theNodeId2 ) const = 0;
+ virtual bool GetEdgeNodes( const smIdType theElemId,
+ const int theEdgeNum,
+ smIdType& theNodeId1,
+ smIdType& theNodeId2 ) const = 0;
virtual bool IsValid() const = 0;
virtual vtkUnstructuredGrid* GetUnstructuredGrid() = 0;
- virtual vtkIdType GetNodeObjId( int theVTKID ) = 0;
- virtual vtkIdType GetNodeVTKId( int theObjID ) = 0;
- virtual vtkIdType GetElemObjId( int theVTKID ) = 0;
- virtual vtkIdType GetElemVTKId( int theObjID ) = 0;
+ virtual vtkIdType GetNodeObjId( vtkIdType theVTKID ) = 0;
+ virtual vtkIdType GetNodeVTKId( vtkIdType theObjID ) = 0;
+ virtual vtkIdType GetElemObjId( vtkIdType theVTKID ) = 0;
+ virtual vtkIdType GetElemVTKId( vtkIdType theObjID ) = 0;
virtual void ClearEntitiesFlags() = 0;
virtual bool GetEntitiesFlag() = 0;
virtual unsigned int GetEntitiesState() = 0;
virtual bool Update( int theIsClear = true ) = 0;
virtual bool NulData() {return 0; };
virtual void UpdateFunctor( const SMESH::Controls::FunctorPtr& theFunctor ) = 0;
- virtual int GetElemDimension( const int theObjId ) = 0;
+ virtual int GetElemDimension( const smIdType theObjId ) = 0;
- virtual int GetNbEntities( const SMDSAbs_ElementType theType) const = 0;
- virtual int GetEntities( const SMDSAbs_ElementType, TEntityList& ) const = 0;
+ virtual smIdType GetNbEntities( const SMDSAbs_ElementType theType) const = 0;
+ virtual smIdType GetEntities( const SMDSAbs_ElementType, TEntityList& ) const = 0;
virtual bool IsNodePrs() const = 0;
virtual SMDS_Mesh* GetMesh() const = 0;
virtual SMESH::SMESH_Mesh_ptr GetMeshServer() = 0;
virtual bool IsValid() const;
- virtual bool GetEdgeNodes( const int theElemId,
- const int theEdgeNum,
- int& theNodeId1,
- int& theNodeId2 ) const;
+ virtual bool GetEdgeNodes( const smIdType theElemId,
+ const int theEdgeNum,
+ smIdType& theNodeId1,
+ smIdType& theNodeId2 ) const;
virtual vtkUnstructuredGrid* GetUnstructuredGrid();
- virtual vtkIdType GetNodeObjId( int theVTKID );
- virtual vtkIdType GetNodeVTKId( int theObjID );
- virtual vtkIdType GetElemObjId( int theVTKID );
- virtual vtkIdType GetElemVTKId( int theObjID );
+ virtual vtkIdType GetNodeObjId( vtkIdType theVTKID );
+ virtual vtkIdType GetNodeVTKId( vtkIdType theObjID );
+ virtual vtkIdType GetElemObjId( vtkIdType theVTKID );
+ virtual vtkIdType GetElemVTKId( vtkIdType theObjID );
virtual void ClearEntitiesFlags();
virtual bool GetEntitiesFlag();
unsigned int myEntitiesState;
vtkUnstructuredGrid* myGrid;
- std::map<SMDSAbs_ElementType,int> myEntitiesCache;
+ std::map<SMDSAbs_ElementType,smIdType> myEntitiesCache;
};
virtual bool Update( int theIsClear = true );
virtual bool NulData();
- virtual int GetNbEntities( const SMDSAbs_ElementType) const;
- virtual int GetEntities( const SMDSAbs_ElementType, TEntityList& ) const;
+ virtual smIdType GetNbEntities( const SMDSAbs_ElementType) const;
+ virtual smIdType GetEntities( const SMDSAbs_ElementType, TEntityList& ) const;
virtual bool IsNodePrs() const;
- virtual int GetElemDimension( const int theObjId );
+ virtual int GetElemDimension( const smIdType theObjId );
virtual void UpdateFunctor( const SMESH::Controls::FunctorPtr& theFunctor );
virtual bool Update( int theIsClear = true );
virtual void UpdateFunctor( const SMESH::Controls::FunctorPtr& theFunctor );
- virtual int GetElemDimension( const int theObjId );
+ virtual int GetElemDimension( const smidtype theObjId );
virtual SMDS_Mesh* GetMesh() const { return myMeshObj->GetMesh(); }
virtual SMESH::SMESH_Mesh_ptr GetMeshServer() { return myMeshObj->GetMeshServer(); }
SMESH_GroupObj( SMESH::SMESH_GroupBase_ptr, SMESH_MeshObj* );
virtual ~SMESH_GroupObj();
- virtual int GetNbEntities( const SMDSAbs_ElementType) const;
- virtual int GetEntities( const SMDSAbs_ElementType, TEntityList& ) const;
+ virtual smidtype GetNbEntities( const SMDSAbs_ElementType) const;
+ virtual smidtype GetEntities( const SMDSAbs_ElementType, TEntityList& ) const;
virtual bool IsNodePrs() const;
virtual SMDSAbs_ElementType GetElementType() const;
SMESH_MeshObj* );
virtual ~SMESH_subMeshObj();
- virtual int GetNbEntities( const SMDSAbs_ElementType) const;
- virtual int GetEntities( const SMDSAbs_ElementType, TEntityList& ) const;
+ virtual smIdtype GetNbEntities( const SMDSAbs_ElementType) const;
+ virtual smIdtype GetEntities( const SMDSAbs_ElementType, TEntityList& ) const;
virtual bool IsNodePrs() const;
protected:
void SMDS_ElementChunk::Free( const SMDS_MeshElement* e )
{
bool hasHoles = ( myUsedRanges.Size() > 1 );
- myUsedRanges.SetValue( FromIdType<int>(Index( e )), false );
+ myUsedRanges.SetValue( Index( e ), false );
SetShapeID( e, 0 ); // sub-mesh must do it?
SetIsMarked( e, false );
if ( !hasHoles )
{
if ((smIdType) myFactory->myVtkIDs.size() <= e->GetID() - 1 )
{
- size_t i = myFactory->myVtkIDs.size();
+ vtkIdType i = (vtkIdType) myFactory->myVtkIDs.size();
myFactory->myVtkIDs.resize( e->GetID() + 100 );
- for ( ; i < myFactory->myVtkIDs.size(); ++i )
- myFactory->myVtkIDs[i] = FromIdType<vtkIdType>(i);
+ vtkIdType newSize = (vtkIdType) myFactory->myVtkIDs.size();
+ for ( ; i < newSize; ++i )
+ myFactory->myVtkIDs[i] = i;
}
myFactory->myVtkIDs[ e->GetID() - 1 ] = vtkID;
int SMDS_ElementChunk::GetShapeID( const SMDS_MeshElement* e ) const
{
- return mySubIDRanges.GetValue( FromIdType<int>(Index( e )));
+ return mySubIDRanges.GetValue( Index( e ));
}
//================================================================================
//const size_t nbRanges = mySubIDRanges.Size();
SMDS_ElementChunk* me = const_cast<SMDS_ElementChunk*>( this );
- int oldShapeID = me->mySubIDRanges.SetValue( FromIdType<int>(Index( e )), shapeID );
+ int oldShapeID = me->mySubIDRanges.SetValue( Index( e ), shapeID );
if ( oldShapeID == shapeID ) return;
if ( const SMDS_MeshNode* n = dynamic_cast< const SMDS_MeshNode* >( e ))
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 (int)( e - myElements ); }
//! Return ID of the 1st element in the chunk
smIdType Get1stID() const { return my1stID; }
SMDS_MeshFace* SMDS_Mesh::AddPolygonalFaceWithID (const std::vector<smIdType> & nodes_ids,
const smIdType ID)
{
- smIdType nbNodes = nodes_ids.size();
+ size_t nbNodes = nodes_ids.size();
std::vector<const SMDS_MeshNode*> nodes (nbNodes);
- for (smIdType i = 0; i < nbNodes; i++) {
+ for ( size_t i = 0; i < nbNodes; i++) {
nodes[i] = myNodeFactory->FindNode( nodes_ids[i] );
if (!nodes[i]) return NULL;
}
const std::vector<int> & quantities,
const smIdType ID)
{
- smIdType nbNodes = nodes_ids.size();
+ size_t nbNodes = nodes_ids.size();
std::vector<const SMDS_MeshNode*> nodes (nbNodes);
- for (smIdType i = 0; i < nbNodes; i++) {
+ for ( size_t i = 0; i < nbNodes; i++) {
nodes[i] = myNodeFactory->FindNode(nodes_ids[i]);
if (!nodes[i]) return NULL;
}
bool Add(const SMDS_MeshElement * theElem);
bool Remove(const SMDS_MeshElement * theElem);
bool IsEmpty() const { return myElements.empty(); }
- int Extent() const { return myElements.size(); }
+ smIdType Extent() const { return (smIdType) myElements.size(); }
int Tic() const { return myTic; }
bool Contains(const SMDS_MeshElement * theElem) const;
// Use double type for storing coordinates of nodes instead float.
vtkPoints *newPoints = vtkPoints::New();
newPoints->SetDataType( VTK_DOUBLE );
- newPoints->SetNumberOfPoints( FromIdType<int>(newNodeSize) );
+ newPoints->SetNumberOfPoints( FromIdType<vtkIdType>(newNodeSize) );
vtkIdType i = 0, alreadyCopied = 0;
while ( i < oldNodeSize )
{
smIdType oldCellId = idCellsNewToOld[ newCellID ];
newFaceLocations->InsertNextValue( newFaces->GetMaxId()+1 );
- smIdType oldFaceLoc = this->FaceLocations->GetValue( FromIdType<int>(oldCellId) );
- smIdType nCellFaces = this->Faces->GetValue( FromIdType<int>(oldFaceLoc++) );
- newFaces->InsertNextValue( FromIdType<int>(nCellFaces) );
+ smIdType oldFaceLoc = this->FaceLocations->GetValue( FromIdType<vtkIdType>(oldCellId) );
+ smIdType nCellFaces = this->Faces->GetValue( FromIdType<vtkIdType>(oldFaceLoc++) );
+ newFaces->InsertNextValue( FromIdType<vtkIdType>(nCellFaces) );
for ( int n = 0; n < nCellFaces; n++ )
{
- int nptsInFace = this->Faces->GetValue( FromIdType<int>(oldFaceLoc++) );
+ int nptsInFace = this->Faces->GetValue( FromIdType<vtkIdType>(oldFaceLoc++) );
newFaces->InsertNextValue( nptsInFace );
for ( int k = 0; k < nptsInFace; k++ )
{
- vtkIdType oldpt = this->Faces->GetValue( FromIdType<int>(oldFaceLoc++) );
+ vtkIdType oldpt = this->Faces->GetValue( FromIdType<vtkIdType>(oldFaceLoc++) );
newFaces->InsertNextValue( idNodesOldToNew[ oldpt ]);
}
}
class TopoDS_Wire;
class gp_XYZ;
-typedef std::map< SMESH_subMesh*, std::vector<int> > MapShapeNbElems;
-typedef std::map< SMESH_subMesh*, std::vector<int> >::iterator MapShapeNbElemsItr;
+typedef std::map< SMESH_subMesh*, std::vector<smIdType> > MapShapeNbElems;
+typedef std::map< SMESH_subMesh*, std::vector<smIdType> >::iterator MapShapeNbElemsItr;
// ==================================================================================
/*!
virtual void SetType(SMDSAbs_ElementType theType);
- virtual int Extent() const;
+ virtual smIdType Extent() const;
virtual bool IsEmpty();
- virtual bool Contains (const int theID);
+ virtual bool Contains (const smIdType theID);
virtual bool Contains (const SMDS_MeshElement* elem);
virtual int GetTic() const;
- bool Add (const int theID);
+ bool Add (const smIdType theID);
bool Add (const SMDS_MeshElement* theElem );
- bool Remove (const int theID);
+ bool Remove (const smIdType theID);
void Clear();
*/
//=============================================================================
-int SMESHDS_GroupBase::GetID (const int theIndex)
+smIdType SMESHDS_GroupBase::GetID (const int theIndex)
{
if (myCurIndex < 1 || myCurIndex > theIndex) {
myIterator = GetElements();
}
while (myCurIndex < theIndex && myIterator->more()) {
myCurIndex++;
- myCurID = FromIdType<int>(myIterator->next()->GetID());
+ myCurID = myIterator->next()->GetID();
}
return myCurIndex == theIndex ? myCurID : -1;
}
const char* GetStoreName () const { return myStoreName.c_str(); }
- virtual int Extent() const;
+ virtual smIdType Extent() const;
virtual bool IsEmpty();
- virtual bool Contains (const int theID);
+ virtual bool Contains (const smIdType theID);
virtual bool Contains (const SMDS_MeshElement* elem);
virtual SMDS_ElemIteratorPtr GetElements() const = 0;
- virtual int GetID (const int theIndex);
+ virtual smIdType GetID (const int theIndex);
// DON'T use it for iterations 1..Extent()
virtual int GetTic() const = 0;
{ myDefaultColor = theColor;}
protected:
- const SMDS_MeshElement* findInMesh (const int theID) const;
+ const SMDS_MeshElement* findInMesh (const smIdType theID) const;
void resetIterator();
private:
Quantity_Color myColor;
// for GetID()
- int myCurIndex;
- int myCurID;
+ smIdType myCurIndex;
+ smIdType myCurID;
SMDS_ElemIteratorPtr myIterator;
static Quantity_Color myDefaultColor;
if ( IsUpToDate() )
{
for ( ; elIt->more(); curID += idSize )
- (*(int*) curID) = FromIdType<int>(elIt->next()->GetID());
+ (*(smIdType*) curID) = elIt->next()->GetID();
}
else
{
me->myMeshInfo.assign( SMDSEntity_Last, 0 );
me->myMeshInfo[ firstOkElem->GetEntityType() ]++;
- (*(int*) curID) = FromIdType<int>(firstOkElem->GetID());
+ (*(smidtype*) curID) = firstOkElem->GetID();
for ( curID += idSize; elIt->more(); curID += idSize )
{
const SMDS_MeshElement* e = elIt->next();
- (*(int*) curID) = FromIdType<int>(e->GetID());
+ (*(smIdtype*) curID) = e->GetID();
me->myMeshInfo[ e->GetEntityType() ]++;
}
}
std::vector< int > GetMeshInfo() const;
template< typename IDTYPE >
- int GetElementIds( IDTYPE* ids ) const
+ smIdType GetElementIds( IDTYPE* ids ) const
{
return getElementIds( (void*)ids, sizeof(IDTYPE));
}
- virtual int Extent() const;
+ virtual smIdType Extent() const;
virtual bool IsEmpty();
- virtual bool Contains (const int theID);
+ virtual bool Contains (const smIdType theID);
virtual bool Contains (const SMDS_MeshElement* elem);
// 2) The case of enough free memory. Remember all OK elements (myElements).
SMESH_PredicatePtr myPredicate;
- std::vector< int > myMeshInfo;
+ std::vector< smIdType > myMeshInfo;
std::vector< const SMDS_MeshElement*> myElements;
bool myElementsOK;
size_t myMeshModifTime; // when myMeshInfo was updated
TopoDS_Shape GetShape() const { return myShape; }
- virtual bool Contains (const int theID);
+ virtual bool Contains (const smIdType theID);
virtual bool Contains (const SMDS_MeshElement* elem);
SUIT_OverrideCursor aWaitCursor;
try {
OCC_CATCH_SIGNALS;
- SMESH::long_array_var tmp = gen->Evaluate(myMesh, myMainShape);
- for ( int i = 0; i < tmp->length(); ++i)
- aRes[ i ] = tmp [ i ];
+ aRes = gen->Evaluate(myMesh, myMainShape);
}
catch(const SALOME::SALOME_Exception & S_ex){
memoryLack = true;
typedef std::pair< bool, const SMDS_MeshNode* > TIsSharpAndMedium;
typedef NCollection_DataMap< SMESH_TLink, TIsSharpAndMedium, SMESH_TLink > TLinkSharpMap;
- TLinkSharpMap linkIsSharp( FromIdType<int>(theMesh->NbFaces()) );
+ TLinkSharpMap linkIsSharp;
+ Standard_Integer nbBuckets = FromIdType<Standard_Integer>( theMesh->NbFaces() );
+ if ( nbBuckets > 0 )
+ linkIsSharp.ReSize( nbBuckets );
+
TIsSharpAndMedium sharpMedium( true, 0 );
bool & isSharp = sharpMedium.first;
const SMDS_MeshNode* & nMedium = sharpMedium.second;
typedef std::vector< const SMDS_MeshElement* > TFaceVec;
typedef NCollection_DataMap< SMESH_TLink, TFaceVec, SMESH_TLink > TFacesByLinks;
- TFacesByLinks facesByLink( FromIdType<int>(theMesh->NbFaces()) );
+ TFacesByLinks facesByLink;
+ Standard_Integer nbBuckets = FromIdType<Standard_Integer>( theMesh->NbFaces() );
+ if ( nbBuckets > 0 )
+ facesByLink.ReSize( nbBuckets );
std::vector< const SMDS_MeshNode* > faceNodes;
for ( SMDS_FaceIteratorPtr faceIt = theMesh->facesIterator(); faceIt->more(); )
{
const CutFace& cf = *cutFacesIt;
smIdType index = cf.myInitFace->GetID(); // index in theNew2OldFaces
- if ((int) theNew2OldFaces.size() <= index )
+ if ((smIdType) theNew2OldFaces.size() <= index )
theNew2OldFaces.resize( index + 1 );
theNew2OldFaces[ index ] = std::make_pair( cf.myInitFace, index );
}
for ( SMDS_ElemIteratorPtr fIt = newNode->GetInverseElementIterator(); fIt->more(); )
{
const SMDS_MeshElement* newFace = fIt->next();
- const int faceIndex = FromIdType<int>(newFace->GetID());
+ const smIdType faceIndex = newFace->GetID();
const gp_XYZ& oldNorm = normals[ faceIndex ];
const gp_XYZ newXYZ = oldXYZ + oldNorm * theOffset;
if ( multiPos.empty() )
for ( SMDS_ElemIteratorPtr fIt = newNode->GetInverseElementIterator(); fIt->more(); )
{
const SMDS_MeshElement* newFace = fIt->next();
- const int faceIndex = FromIdType<int>(newFace->GetID());
+ const smIdType faceIndex = newFace->GetID();
const gp_XYZ& oldNorm = normals[ faceIndex ];
if ( !SMESH_MeshAlgos::FaceNormal( newFace, faceNorm, /*normalize=*/false ) ||
//faceNorm * moveVec < 0 )
*/
//================================================================================
- void findGroups( const SMDS_MeshElement * theFace,
- TGroupVec & theGroupsToUpdate,
- NCollection_DataMap< int, TGroupVec > & theFaceID2Groups,
- TGroupVec & theWorkGroups )
+ void findGroups( const SMDS_MeshElement * theFace,
+ TGroupVec & theGroupsToUpdate,
+ NCollection_DataMap< smIdType, TGroupVec > & theFaceID2Groups,
+ TGroupVec & theWorkGroups )
{
theWorkGroups.clear();
for ( size_t i = 0; i < theGroupsToUpdate.size(); ++i )
theWorkGroups.push_back( theGroupsToUpdate[i] );
if ( !theWorkGroups.empty() )
- theFaceID2Groups.Bind( FromIdType<int>(theFace->GetID()), theWorkGroups );
+ theFaceID2Groups.Bind( theFace->GetID(), theWorkGroups );
}
//================================================================================
std::vector< SMESH_NodeXYZ > facePoints(4);
std::vector< Intersector::TFace > cutFacePoints;
- NCollection_DataMap< int, TGroupVec > faceID2Groups;
+ NCollection_DataMap< smIdType, TGroupVec > faceID2Groups;
TGroupVec groupVec;
std::vector< gp_Ax1 > planeNormalVec(2);
*/
//=============================================================================
-SMESH::long_array* SMESH_Gen_i::Evaluate(SMESH::SMESH_Mesh_ptr theMesh,
- GEOM::GEOM_Object_ptr theShapeObject)
-// SMESH::long_array& theNbElems)
+SMESH::smIdType_array* SMESH_Gen_i::Evaluate(SMESH::SMESH_Mesh_ptr theMesh,
+ GEOM::GEOM_Object_ptr theShapeObject)
{
Unexpect aCatch(SALOME_SalomeException);
if(MYDEBUG) MESSAGE( "SMESH_Gen_i::Evaluate" );
if ( CORBA::is_nil( theMesh ) )
THROW_SALOME_CORBA_EXCEPTION( "bad Mesh reference", SALOME::BAD_PARAM );
- SMESH::long_array_var nbels = new SMESH::long_array;
+ SMESH::smIdType_array_var nbels = new SMESH::smIdType_array;
nbels->length(SMESH::Entity_Last);
int i = SMESH::Entity_Node;
for (; i < SMESH::Entity_Last; i++)
*/
//=============================================================================
-CORBA::Long SMESH_GroupBase_i::Size()
+CORBA::smIdType SMESH_GroupBase_i::Size()
{
if ( myPreMeshInfo )
return GetType() == SMESH::NODE ? myPreMeshInfo->NbNodes() : myPreMeshInfo->NbElements();
void SetName(const char* name);
char* GetName();
SMESH::ElementType GetType();
- CORBA::Long Size();
+ SMESH::smIdType Size();
CORBA::Boolean IsEmpty();
CORBA::Boolean Contains(SMESH::smIdType elem_id);
SMESH::smIdType GetID(SMESH::smIdType elem_index);
}
SMESH::smIdType* SMESH_MeshEditor_i::GetTemporaryIDs( SMESH::SMESH_IDSource_ptr& idSource,
- int& nbIds)
+ SMESH::smIdType& nbIds)
{
if ( _IDSource* tmpIdSource = SMESH::DownCast<SMESH_MeshEditor_i::_IDSource*>( idSource ))
{
- nbIds = (int) tmpIdSource->_ids.length();
+ nbIds = (SMESH::smIdType) tmpIdSource->_ids.length();
return & tmpIdSource->_ids[0];
}
nbIds = 0;
SMDSAbs_ElementType iterType = isNodes ? SMDSAbs_Node : elemType;
if ( SMESH_MeshEditor_i::IsTemporaryIDSource( theObject ))
{
- int nbIds;
+ SMESH::smIdType nbIds;
if ( SMESH::smIdType* ids = SMESH_MeshEditor_i::GetTemporaryIDs( theObject, nbIds ))
elemIt = SMDS_ElemIteratorPtr( new IDSourceIterator( meshDS, ids, nbIds, iterType ));
}