fix errors from idl changes

This commit is contained in:
Viktor UZLOV 2021-02-05 19:27:39 +03:00
parent 81147ab62f
commit b78dbc1817
65 changed files with 710 additions and 697 deletions

View File

@ -908,13 +908,13 @@ SMDSAbs_ElementType SMESH_GroupObj::GetElementType() const
// function : getNodesFromElems // function : getNodesFromElems
// purpose : Retrieve nodes from elements // purpose : Retrieve nodes from elements
//================================================================================= //=================================================================================
static int getNodesFromElems( SMESH::long_array_var& theElemIds, static int getNodesFromElems( SMESH::smIdType_array_var& theElemIds,
const SMDS_Mesh* theMesh, const SMDS_Mesh* theMesh,
std::list<const SMDS_MeshElement*>& theResList ) std::list<const SMDS_MeshElement*>& theResList )
{ {
set<const SMDS_MeshElement*> aNodeSet; set<const SMDS_MeshElement*> aNodeSet;
for ( CORBA::Long i = 0, n = theElemIds->length(); i < n; i++ ) for ( SMESH::smIdType i = 0, n = theElemIds->length(); i < n; i++ )
{ {
const SMDS_MeshElement* anElem = theMesh->FindElement( theElemIds[ i ] ); const SMDS_MeshElement* anElem = theMesh->FindElement( theElemIds[ i ] );
if ( anElem != 0 ) if ( anElem != 0 )
@ -941,11 +941,11 @@ static int getNodesFromElems( SMESH::long_array_var& theElemIds,
// purpose : Get std::list<const SMDS_MeshElement*> from list of IDs // purpose : Get std::list<const SMDS_MeshElement*> from list of IDs
//================================================================================= //=================================================================================
static int getPointers( const SMDSAbs_ElementType theRequestType, static int getPointers( const SMDSAbs_ElementType theRequestType,
SMESH::long_array_var& theElemIds, SMESH::smIdType_array_var& theElemIds,
const SMDS_Mesh* theMesh, const SMDS_Mesh* theMesh,
std::list<const SMDS_MeshElement*>& theResList ) std::list<const SMDS_MeshElement*>& theResList )
{ {
for ( CORBA::Long i = 0, n = theElemIds->length(); i < n; i++ ) for ( SMESH::smIdType i = 0, n = theElemIds->length(); i < n; i++ )
{ {
const SMDS_MeshElement* anElem = theRequestType == SMDSAbs_Node const SMDS_MeshElement* anElem = theRequestType == SMDSAbs_Node
? theMesh->FindNode( theElemIds[ i ] ) : theMesh->FindElement( theElemIds[ i ] ); ? theMesh->FindNode( theElemIds[ i ] ) : theMesh->FindElement( theElemIds[ i ] );
@ -985,7 +985,7 @@ int SMESH_GroupObj::GetEntities( const SMDSAbs_ElementType theType, TEntityList&
if ( aGrpType != theType && theType != SMDSAbs_Node ) if ( aGrpType != theType && theType != SMDSAbs_Node )
return 0; return 0;
SMESH::long_array_var anIds = myGroupServer->GetListOfID(); SMESH::smIdType_array_var anIds = myGroupServer->GetListOfID();
if ( anIds->length() == 0 ) if ( anIds->length() == 0 )
return 0; return 0;
@ -1043,7 +1043,7 @@ int SMESH_subMeshObj::GetNbEntities( const SMDSAbs_ElementType theType) const
case SMDSAbs_Face: case SMDSAbs_Face:
case SMDSAbs_Volume: case SMDSAbs_Volume:
{ {
SMESH::long_array_var anIds = SMESH::smIdType_array_var anIds =
mySubMeshServer->GetElementsByType( SMESH::ElementType(theType) ); mySubMeshServer->GetElementsByType( SMESH::ElementType(theType) );
return anIds->length(); return anIds->length();
} }
@ -1067,7 +1067,7 @@ int SMESH_subMeshObj::GetEntities( const SMDSAbs_ElementType theType, TEntityLis
{ {
if ( theType == SMDSAbs_Node ) if ( theType == SMDSAbs_Node )
{ {
SMESH::long_array_var anIds = mySubMeshServer->GetNodesId(); SMESH::smIdType_array_var anIds = mySubMeshServer->GetNodesId();
return getPointers( SMDSAbs_Node, anIds, aMesh, theResList ); return getPointers( SMDSAbs_Node, anIds, aMesh, theResList );
} }
} }
@ -1075,12 +1075,12 @@ int SMESH_subMeshObj::GetEntities( const SMDSAbs_ElementType theType, TEntityLis
{ {
if ( theType == SMDSAbs_Node ) if ( theType == SMDSAbs_Node )
{ {
SMESH::long_array_var anIds = mySubMeshServer->GetElementsId(); SMESH::smIdType_array_var anIds = mySubMeshServer->GetElementsId();
return getNodesFromElems( anIds, aMesh, theResList ); return getNodesFromElems( anIds, aMesh, theResList );
} }
else else
{ {
SMESH::long_array_var anIds = SMESH::smIdType_array_var anIds =
mySubMeshServer->GetElementsByType( SMESH::ElementType(theType) ); mySubMeshServer->GetElementsByType( SMESH::ElementType(theType) );
return getPointers( theType, anIds, aMesh, theResList ); return getPointers( theType, anIds, aMesh, theResList );
} }

View File

@ -59,7 +59,7 @@ SMDS_ElementHolder::~SMDS_ElementHolder()
void SMDS_ElementHolder::beforeCompacting() void SMDS_ElementHolder::beforeCompacting()
{ {
for ( SMDS_ElemIteratorPtr it = getElements(); it->more() ) for ( SMDS_ElemIteratorPtr it = getElements(); it->more(); )
{ {
const SMDS_MeshElement* e = it->next(); const SMDS_MeshElement* e = it->next();
if ( !e ) continue; if ( !e ) continue;

View File

@ -30,6 +30,7 @@
#include "SMDS_ElemIterator.hxx" #include "SMDS_ElemIterator.hxx"
#include <smIdType.hxx> #include <smIdType.hxx>
#include <vtkType.h>
#include <vector> #include <vector>
#include <set> #include <set>

View File

@ -130,8 +130,8 @@ public:
virtual smIdType GetID() const; virtual smIdType GetID() const;
virtual vtkIdType GetVtkID() const; virtual vtkIdType GetVtkID() const;
virtual smIdType getshapeId() const { return GetShapeID(); } virtual int getshapeId() const { return GetShapeID(); }
virtual smIdType GetShapeID() const; virtual int GetShapeID() const;
// mark this element; to be used in algos // mark this element; to be used in algos
virtual void setIsMarked( bool is ) const; virtual void setIsMarked( bool is ) const;

View File

@ -193,7 +193,7 @@ void SMDS_UnstructuredGrid::compactGrid(std::vector<smIdType>& idNodesOldToNew,
newPoints->SetDataType( VTK_DOUBLE ); newPoints->SetDataType( VTK_DOUBLE );
newPoints->SetNumberOfPoints( FromIdType<int>(newNodeSize) ); newPoints->SetNumberOfPoints( FromIdType<int>(newNodeSize) );
int vtkIdType = 0, alreadyCopied = 0; vtkIdType i = 0, alreadyCopied = 0;
while ( i < oldNodeSize ) while ( i < oldNodeSize )
{ {
// skip a hole if any // skip a hole if any
@ -239,15 +239,15 @@ void SMDS_UnstructuredGrid::compactGrid(std::vector<smIdType>& idNodesOldToNew,
if ((vtkIdType) idNodesOldToNew.size() < oldNodeSize ) if ((vtkIdType) idNodesOldToNew.size() < oldNodeSize )
{ {
idNodesOldToNew.reserve( oldNodeSize ); idNodesOldToNew.reserve( oldNodeSize );
for ( vvtkIdType i = idNodesOldToNew.size(); i < oldNodeSize; ++i ) for ( vtkIdType i = idNodesOldToNew.size(); i < oldNodeSize; ++i )
idNodesOldToNew.push_back( i ); idNodesOldToNew.push_back( i );
} }
// --- create new compacted Connectivity, Locations and Types // --- create new compacted Connectivity, Locations and Types
vvtkIdType newConnectivitySize = this->Connectivity->GetNumberOfConnectivityEntries(); vtkIdType newConnectivitySize = this->Connectivity->GetNumberOfConnectivityEntries();
if ( newCellSize != oldCellSize ) if ( newCellSize != oldCellSize )
for ( vvtkIdType i = 0; i < oldCellSize - 1; ++i ) for ( vtkIdType i = 0; i < oldCellSize - 1; ++i )
if ( this->Types->GetValue( i ) == VTK_EMPTY_CELL ) if ( this->Types->GetValue( i ) == VTK_EMPTY_CELL )
newConnectivitySize -= this->Connectivity->GetCellSize( i ); newConnectivitySize -= this->Connectivity->GetCellSize( i );
@ -273,11 +273,11 @@ void SMDS_UnstructuredGrid::compactGrid(std::vector<smIdType>& idNodesOldToNew,
{ {
vtkDoubleArray* newDiameters = vtkDoubleArray::New(); vtkDoubleArray* newDiameters = vtkDoubleArray::New();
newDiameters->SetNumberOfComponents(1); newDiameters->SetNumberOfComponents(1);
for ( vvtkIdType newCellID = 0; newCellID < newCellSize; newCellID++ ) for ( vtkIdType newCellID = 0; newCellID < newCellSize; newCellID++ )
{ {
if ( newTypes->GetValue( newCellID ) == VTK_POLY_VERTEX ) if ( newTypes->GetValue( newCellID ) == VTK_POLY_VERTEX )
{ {
vvtkIdType oldCellID = idCellsNewToOld[ newCellID ]; vtkIdType oldCellID = idCellsNewToOld[ newCellID ];
newDiameters->InsertValue( newCellID, diameters->GetValue( oldCellID )); newDiameters->InsertValue( newCellID, diameters->GetValue( oldCellID ));
} }
vtkDataSet::CellData->SetScalars( newDiameters ); vtkDataSet::CellData->SetScalars( newDiameters );
@ -292,7 +292,7 @@ void SMDS_UnstructuredGrid::compactGrid(std::vector<smIdType>& idNodesOldToNew,
vtkIdTypeArray *newFaces = vtkIdTypeArray::New(); vtkIdTypeArray *newFaces = vtkIdTypeArray::New();
newFaces->Initialize(); newFaces->Initialize();
newFaces->Allocate(this->Faces->GetSize()); newFaces->Allocate(this->Faces->GetSize());
for ( vvtkIdType newCellID = 0; newCellID < newCellSize; newCellID++ ) for ( vtkIdType newCellID = 0; newCellID < newCellSize; newCellID++ )
{ {
if ( newTypes->GetValue( newCellID ) == VTK_POLYHEDRON ) if ( newTypes->GetValue( newCellID ) == VTK_POLYHEDRON )
{ {
@ -337,13 +337,13 @@ void SMDS_UnstructuredGrid::compactGrid(std::vector<smIdType>& idNodesOldToNew,
void SMDS_UnstructuredGrid::copyNodes(vtkPoints * newPoints, void SMDS_UnstructuredGrid::copyNodes(vtkPoints * newPoints,
std::vector<smIdType>& /*idNodesOldToNew*/, std::vector<smIdType>& /*idNodesOldToNew*/,
vvtkIdType& alreadyCopied, vtkIdType& alreadyCopied,
vvtkIdType start, vtkIdType start,
vvtkIdType end) vtkIdType end)
{ {
void *target = newPoints->GetVoidPointer(3 * alreadyCopied); void *target = newPoints->GetVoidPointer(3 * alreadyCopied);
void *source = this->Points->GetVoidPointer(3 * start); void *source = this->Points->GetVoidPointer(3 * start);
vvtkIdType nbPoints = end - start; vtkIdType nbPoints = end - start;
if (nbPoints > 0) if (nbPoints > 0)
{ {
memcpy(target, source, 3 * sizeof(double) * nbPoints); memcpy(target, source, 3 * sizeof(double) * nbPoints);
@ -360,7 +360,7 @@ void SMDS_UnstructuredGrid::copyBloc(vtkUnsignedCharArray * newTypes,
{ {
for ( size_t iNew = 0; iNew < idCellsNewToOld.size(); iNew++ ) for ( size_t iNew = 0; iNew < idCellsNewToOld.size(); iNew++ )
{ {
vvtkIdType iOld = idCellsNewToOld[ iNew ]; vtkIdType iOld = idCellsNewToOld[ iNew ];
newTypes->SetValue( iNew, this->Types->GetValue( iOld )); newTypes->SetValue( iNew, this->Types->GetValue( iOld ));
vtkIdType oldLoc = ((vtkIdTypeArray *)(this->Connectivity->GetOffsetsArray()))->GetValue( iOld ); vtkIdType oldLoc = ((vtkIdTypeArray *)(this->Connectivity->GetOffsetsArray()))->GetValue( iOld );
@ -371,25 +371,25 @@ void SMDS_UnstructuredGrid::copyBloc(vtkUnsignedCharArray * newTypes,
pointsCell.resize( nbpts ); pointsCell.resize( nbpts );
for ( int l = 0; l < nbpts; l++ ) for ( int l = 0; l < nbpts; l++ )
{ {
vvtkIdType oldval = oldPtsCell[l]; vtkIdType oldval = oldPtsCell[l];
pointsCell[l] = idNodesOldToNew[oldval]; pointsCell[l] = idNodesOldToNew[oldval];
} }
/*vvtkIdType newcnt = */newConnectivity->InsertNextCell( nbpts, pointsCell.data() ); /*vtkIdType newcnt = */newConnectivity->InsertNextCell( nbpts, pointsCell.data() );
vvtkIdType newLoc = newConnectivity->GetInsertLocation( nbpts ); vtkIdType newLoc = newConnectivity->GetInsertLocation( nbpts );
newLocations->SetValue( iNew, newLoc ); newLocations->SetValue( iNew, newLoc );
} }
} }
int SMDS_UnstructuredGrid::CellIdToDownId(vtkIdType vtkCellId) int SMDS_UnstructuredGrid::CellIdToDownId(vtkIdType vtkCellId)
{ {
if ((vtkCellId < 0) || (vtkCellId >= (vvtkIdType)_cellIdToDownId.size())) if ((vtkCellId < 0) || (vtkCellId >= (vtkIdType)_cellIdToDownId.size()))
{ {
return -1; return -1;
} }
return _cellIdToDownId[vtkCellId]; return _cellIdToDownId[vtkCellId];
} }
void SMDS_UnstructuredGrid::setCellIdToDownId(vvtkIdType vtkCellId, int downId) void SMDS_UnstructuredGrid::setCellIdToDownId(vtkIdType vtkCellId, int downId)
{ {
// ASSERT((vtkCellId >= 0) && (vtkCellId < _cellIdToDownId.size())); // ASSERT((vtkCellId >= 0) && (vtkCellId < _cellIdToDownId.size()));
_cellIdToDownId[vtkCellId] = downId; _cellIdToDownId[vtkCellId] = downId;

View File

@ -715,7 +715,7 @@ void SMESH_ProxyMesh::SubMesh::Clear()
*/ */
//================================================================================ //================================================================================
int SMESH_ProxyMesh::SubMesh::NbElements() const smIdType SMESH_ProxyMesh::SubMesh::NbElements() const
{ {
return _uvPtStructVec.empty() ? _elements.size() : _uvPtStructVec.size() - 1; return _uvPtStructVec.empty() ? _elements.size() : _uvPtStructVec.size() - 1;
} }
@ -740,7 +740,7 @@ SMDS_ElemIteratorPtr SMESH_ProxyMesh::SubMesh::GetElements() const
*/ */
//================================================================================ //================================================================================
int SMESH_ProxyMesh::SubMesh::NbNodes() const smIdType SMESH_ProxyMesh::SubMesh::NbNodes() const
{ {
return _uvPtStructVec.size(); return _uvPtStructVec.size();
} }

View File

@ -32,6 +32,7 @@
#include <TopoDS_Shape.hxx> #include <TopoDS_Shape.hxx>
#include <NCollection_DataMap.hxx> #include <NCollection_DataMap.hxx>
#include <smIdType.hxx>
#include <map> #include <map>
#include <vector> #include <vector>
@ -66,8 +67,8 @@ public:
const SMDS_MeshNode* GetProxyNode( const SMDS_MeshNode* n ) const; const SMDS_MeshNode* GetProxyNode( const SMDS_MeshNode* n ) const;
const UVPtStructVec& GetUVPtStructVec() const { return _uvPtStructVec; } const UVPtStructVec& GetUVPtStructVec() const { return _uvPtStructVec; }
virtual void AddElement(const SMDS_MeshElement * e); virtual void AddElement(const SMDS_MeshElement * e);
virtual int NbElements() const; virtual smIdType NbElements() const;
virtual int NbNodes() const; virtual smIdType NbNodes() const;
virtual SMDS_ElemIteratorPtr GetElements() const; virtual SMDS_ElemIteratorPtr GetElements() const;
virtual SMDS_NodeIteratorPtr GetNodes() const; virtual SMDS_NodeIteratorPtr GetNodes() const;
virtual void Clear(); virtual void Clear();

View File

@ -273,7 +273,7 @@ bool SMESHDS_Mesh
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Mesh::Renumber (const bool /*isNodes*/, const int /*startID*/, const int /*deltaID*/) void SMESHDS_Mesh::Renumber (const bool /*isNodes*/, const smIdType /*startID*/, const smIdType /*deltaID*/)
{ {
// TODO not possible yet to have node numbers not starting to O and continuous. // TODO not possible yet to have node numbers not starting to O and continuous.
if ( !this->IsCompacted() ) if ( !this->IsCompacted() )

View File

@ -606,7 +606,7 @@ namespace
} }
if ( ! notSupportedElemTypes.empty() ) if ( ! notSupportedElemTypes.empty() )
{ {
SMESH::long_array_var nbElems = aMeshOrGroup->GetMeshInfo(); SMESH::smIdType_array_var nbElems = aMeshOrGroup->GetMeshInfo();
for ( size_t iType = 0; iType < notSupportedElemTypes.size(); ++iType ) for ( size_t iType = 0; iType < notSupportedElemTypes.size(); ++iType )
if ( nbElems[ notSupportedElemTypes[ iType ]] > 0 ) if ( nbElems[ notSupportedElemTypes[ iType ]] > 0 )
presentNotSupported.push_back( notSupportedElemTypes[ iType ]); presentNotSupported.push_back( notSupportedElemTypes[ iType ]);
@ -1223,7 +1223,7 @@ namespace
SMESH::IObjectToInterface<SMESH::SMESH_IDSource>(anIO); SMESH::IObjectToInterface<SMESH::SMESH_IDSource>(anIO);
if ( !idSource->_is_nil() ) if ( !idSource->_is_nil() )
{ {
SMESH::long_array_var ids = idSource->GetIDs(); SMESH::smIdType_array_var ids = idSource->GetIDs();
elements.resize( ids->length() ); elements.resize( ids->length() );
for ( unsigned i = 0; i < elements.size(); ++i ) for ( unsigned i = 0; i < elements.size(); ++i )
elements[i] = ids[i]; elements[i] = ids[i];
@ -2252,7 +2252,7 @@ bool SMESHGUI::automaticUpdate( SMESH::SMESH_IDSource_ptr theMesh,
long updateLimit = resMgr->integerValue( "SMESH", "update_limit", 500000 ); long updateLimit = resMgr->integerValue( "SMESH", "update_limit", 500000 );
bool incrementalLimit = resMgr->booleanValue( "SMESH", "incremental_limit", false ); bool incrementalLimit = resMgr->booleanValue( "SMESH", "incremental_limit", false );
SMESH::long_array_var info = theMesh->GetMeshInfo(); SMESH::smIdType_array_var info = theMesh->GetMeshInfo();
long nbOdElems = info[SMDSEntity_0D]; long nbOdElems = info[SMDSEntity_0D];
long nbEdges = info[SMDSEntity_Edge] + info[SMDSEntity_Quad_Edge]; long nbEdges = info[SMDSEntity_Edge] + info[SMDSEntity_Quad_Edge];
long nbFaces = info[SMDSEntity_Triangle] + info[SMDSEntity_Quad_Triangle] + info[SMDSEntity_BiQuad_Triangle] + long nbFaces = info[SMDSEntity_Triangle] + info[SMDSEntity_Quad_Triangle] + info[SMDSEntity_BiQuad_Triangle] +
@ -3104,10 +3104,10 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
try { try {
SMESH::SMESH_Mesh_var aMesh = aSubMesh->GetFather(); SMESH::SMESH_Mesh_var aMesh = aSubMesh->GetFather();
// get submesh elements list by types // get submesh elements list by types
SMESH::long_array_var aNodes = aSubMesh->GetElementsByType(SMESH::NODE); SMESH::smIdType_array_var aNodes = aSubMesh->GetElementsByType(SMESH::NODE);
SMESH::long_array_var aEdges = aSubMesh->GetElementsByType(SMESH::EDGE); SMESH::smIdType_array_var aEdges = aSubMesh->GetElementsByType(SMESH::EDGE);
SMESH::long_array_var aFaces = aSubMesh->GetElementsByType(SMESH::FACE); SMESH::smIdType_array_var aFaces = aSubMesh->GetElementsByType(SMESH::FACE);
SMESH::long_array_var aVolumes = aSubMesh->GetElementsByType(SMESH::VOLUME); SMESH::smIdType_array_var aVolumes = aSubMesh->GetElementsByType(SMESH::VOLUME);
// create group for each type o elements // create group for each type o elements
QString aName = IObject->getName(); QString aName = IObject->getName();
QStringList anEntryList; QStringList anEntryList;

View File

@ -426,7 +426,7 @@ bool SMESHGUI_Add0DElemsOnAllNodesOp::onApply()
SUIT_MessageBox::warning( myDlg, tr( "SMESH_WRN_WARNING" ), tr( "SMESH_BAD_SELECTION" ) ); SUIT_MessageBox::warning( myDlg, tr( "SMESH_WRN_WARNING" ), tr( "SMESH_BAD_SELECTION" ) );
return false; return false;
} }
SMESH::long_array_var idArray = new SMESH::long_array; SMESH::smIdType_array_var idArray = new SMESH::smIdType_array;
idArray->length( idList.count() ); idArray->length( idList.count() );
QStringList::iterator idIt = idList.begin(); QStringList::iterator idIt = idList.begin();
for ( int i = 0; idIt != idList.end(); ++idIt, ++i ) for ( int i = 0; idIt != idList.end(); ++idIt, ++i )

View File

@ -553,7 +553,7 @@ void SMESHGUI_AddMeshElementDlg::ClickOnApply()
if (myNbOkNodes && !SMESHGUI::isStudyLocked()) { if (myNbOkNodes && !SMESHGUI::isStudyLocked()) {
myBusy = true; myBusy = true;
QStringList aListId = myEditCurrentArgument->text().split(" ", QString::SkipEmptyParts); QStringList aListId = myEditCurrentArgument->text().split(" ", QString::SkipEmptyParts);
SMESH::long_array_var anArrayOfIndices = new SMESH::long_array; SMESH::smIdType_array_var anArrayOfIndices = new SMESH::smIdType_array;
anArrayOfIndices->length(aListId.count()); anArrayOfIndices->length(aListId.count());
const std::vector<int>& revIndex = SMDS_MeshCell::reverseSmdsOrder( myGeomType ); const std::vector<int>& revIndex = SMDS_MeshCell::reverseSmdsOrder( myGeomType );
if ( ReverseOrDulicate && ReverseOrDulicate->isChecked() && (int)revIndex.size() == aListId.count() ) if ( ReverseOrDulicate && ReverseOrDulicate->isChecked() && (int)revIndex.size() == aListId.count() )
@ -598,7 +598,7 @@ void SMESHGUI_AddMeshElementDlg::ClickOnApply()
} }
SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor(); SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
SMESH::long_array_var anIdList = new SMESH::long_array; SMESH::smIdType_array_var anIdList = new SMESH::smIdType_array;
anIdList->length( 1 ); anIdList->length( 1 );
anIdList[0] = -1; anIdList[0] = -1;
int nbElemsBefore = 0; int nbElemsBefore = 0;

View File

@ -741,7 +741,7 @@ bool SMESHGUI_AddQuadraticElementDlg::ClickOnApply()
ReverseConnectivity( anIds, myGeomType, /*toReverse=*/true, /*toVtkOrder=*/false ); ReverseConnectivity( anIds, myGeomType, /*toReverse=*/true, /*toVtkOrder=*/false );
int aNumberOfIds = anIds.size(); int aNumberOfIds = anIds.size();
SMESH::long_array_var anArrayOfIdeces = new SMESH::long_array; SMESH::smIdType_array_var anArrayOfIdeces = new SMESH::smIdType_array;
anArrayOfIdeces->length( aNumberOfIds ); anArrayOfIdeces->length( aNumberOfIds );
for (int i = 0; i < aNumberOfIds; i++) for (int i = 0; i < aNumberOfIds; i++)
@ -841,7 +841,7 @@ bool SMESHGUI_AddQuadraticElementDlg::ClickOnApply()
} }
if ( !aGroupUsed->_is_nil() ) { if ( !aGroupUsed->_is_nil() ) {
SMESH::long_array_var anIdList = new SMESH::long_array; SMESH::smIdType_array_var anIdList = new SMESH::smIdType_array;
anIdList->length( 1 ); anIdList->length( 1 );
anIdList[0] = anElemId; anIdList[0] = anElemId;
aGroupUsed->Add( anIdList.inout() ); aGroupUsed->Add( anIdList.inout() );

View File

@ -1147,7 +1147,7 @@ void SMESHGUI_BaseComputeOp::showComputeResult( const bool theMemoryLack,
} }
else if ( theNoCompError && theNoHypoError ) else if ( theNoCompError && theNoHypoError )
{ {
SMESH::long_array_var aRes = myMesh->GetMeshInfo(); SMESH::smIdType_array_var aRes = myMesh->GetMeshInfo();
aCompDlg->myFullInfo->SetMeshInfo( aRes ); aCompDlg->myFullInfo->SetMeshInfo( aRes );
aCompDlg->myFullInfo->show(); aCompDlg->myFullInfo->show();
aCompDlg->myBriefInfo->hide(); aCompDlg->myBriefInfo->hide();
@ -1162,7 +1162,7 @@ void SMESHGUI_BaseComputeOp::showComputeResult( const bool theMemoryLack,
theCompErrors[ i ].code == SMESH::COMPERR_NO_MESH_ON_SHAPE ); theCompErrors[ i ].code == SMESH::COMPERR_NO_MESH_ON_SHAPE );
// full or brief mesh info // full or brief mesh info
SMESH::long_array_var aRes = myMesh->GetMeshInfo(); SMESH::smIdType_array_var aRes = myMesh->GetMeshInfo();
if ( onlyWarnings ) { if ( onlyWarnings ) {
aCompDlg->myFullInfo->SetMeshInfo( aRes ); aCompDlg->myFullInfo->SetMeshInfo( aRes );
aCompDlg->myFullInfo->show(); aCompDlg->myFullInfo->show();
@ -2211,7 +2211,7 @@ void SMESHGUI_BaseComputeOp::evaluateMesh()
QString aHypErrors; QString aHypErrors;
bool evaluateFailed = true, memoryLack = false; bool evaluateFailed = true, memoryLack = false;
SMESH::long_array_var aRes; SMESH::smIdType_array_var aRes;
_PTR(SObject) aMeshSObj = SMESH::FindSObject(myMesh); _PTR(SObject) aMeshSObj = SMESH::FindSObject(myMesh);
if ( !aMeshSObj ) // IPAL21340 if ( !aMeshSObj ) // IPAL21340
@ -2286,7 +2286,7 @@ void SMESHGUI_BaseComputeOp::evaluateMesh()
} }
void SMESHGUI_BaseComputeOp::showEvaluateResult(const SMESH::long_array& theRes, void SMESHGUI_BaseComputeOp::showEvaluateResult(const SMESH::smIdType_array& theRes,
const bool theMemoryLack, const bool theMemoryLack,
const bool theNoCompError, const bool theNoCompError,
SMESH::compute_error_array_var& theCompErrors, SMESH::compute_error_array_var& theCompErrors,

View File

@ -87,7 +87,7 @@ protected:
const QString& ); const QString& );
SMESHGUI_ComputeDlg* evaluateDlg() const; SMESHGUI_ComputeDlg* evaluateDlg() const;
void evaluateMesh(); void evaluateMesh();
void showEvaluateResult(const SMESH::long_array& theRes, void showEvaluateResult(const SMESH::smIdType_array& theRes,
const bool, const bool,
const bool, const bool,
SMESH::compute_error_array_var&, SMESH::compute_error_array_var&,

View File

@ -328,7 +328,7 @@ SMESHGUI_ConvToQuadOp::MeshDestinationType
SMESHGUI_ConvToQuadOp::DestinationMesh( const SMESH::SMESH_IDSource_var& idSource, SMESHGUI_ConvToQuadOp::DestinationMesh( const SMESH::SMESH_IDSource_var& idSource,
bool* isMixOrder) bool* isMixOrder)
{ {
SMESH::long_array_var nbElemOfType = idSource->GetMeshInfo(); SMESH::smIdType_array_var nbElemOfType = idSource->GetMeshInfo();
bool hasBiQuad = ( nbElemOfType[SMDSEntity_BiQuad_Triangle ] || bool hasBiQuad = ( nbElemOfType[SMDSEntity_BiQuad_Triangle ] ||
nbElemOfType[SMDSEntity_BiQuad_Quadrangle ] || nbElemOfType[SMDSEntity_BiQuad_Quadrangle ] ||

View File

@ -439,7 +439,7 @@ bool SMESHGUI_CopyMeshDlg::ClickOnApply()
else else
{ {
QStringList aListElementsId = myLineEditElements->text().split(" ", QString::SkipEmptyParts); QStringList aListElementsId = myLineEditElements->text().split(" ", QString::SkipEmptyParts);
SMESH::long_array_var anElementsId = new SMESH::long_array; SMESH::smIdType_array_var anElementsId = new SMESH::smIdType_array;
anElementsId->length(aListElementsId.count()); anElementsId->length(aListElementsId.count());
for (int i = 0; i < aListElementsId.count(); i++) for (int i = 0; i < aListElementsId.count(); i++)
anElementsId[i] = aListElementsId[i].toInt(); anElementsId[i] = aListElementsId[i].toInt();

View File

@ -480,7 +480,7 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::ClickOnApply()
if (GetConstructorId() == 0) if (GetConstructorId() == 0)
{ {
SMESH::long_array_var anIdsOfNodes = new SMESH::long_array; SMESH::smIdType_array_var anIdsOfNodes = new SMESH::smIdType_array;
SMESH::long_array_var aQuantities = new SMESH::long_array; SMESH::long_array_var aQuantities = new SMESH::long_array;
aQuantities->length( myFacesByNodes->count() ); aQuantities->length( myFacesByNodes->count() );
@ -518,7 +518,7 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::ClickOnApply()
} }
else if (GetConstructorId() == 1) else if (GetConstructorId() == 1)
{ {
SMESH::long_array_var anIdsOfFaces = new SMESH::long_array; SMESH::smIdType_array_var anIdsOfFaces = new SMESH::smIdType_array;
QStringList aListId = myEditCurrentArgument->text().split( " ", QString::SkipEmptyParts ); QStringList aListId = myEditCurrentArgument->text().split( " ", QString::SkipEmptyParts );
anIdsOfFaces->length(aListId.count()); anIdsOfFaces->length(aListId.count());
@ -562,7 +562,7 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::ClickOnApply()
} }
if ( !aGroupUsed->_is_nil() ) { if ( !aGroupUsed->_is_nil() ) {
SMESH::long_array_var anIdList = new SMESH::long_array; SMESH::smIdType_array_var anIdList = new SMESH::smIdType_array;
anIdList->length( 1 ); anIdList->length( 1 );
anIdList[0] = anElemId; anIdList[0] = anElemId;
aGroupUsed->Add( anIdList.inout() ); aGroupUsed->Add( anIdList.inout() );

View File

@ -1147,7 +1147,7 @@ bool SMESHGUI_ExtrusionAlongPathDlg::isValuesValid()
} }
else else
{ {
SMESH::long_array_var elems = mesh->GetNodeInverseElements( aNodeStart, SMESH::ALL ); SMESH::smIdType_array_var elems = mesh->GetNodeInverseElements( aNodeStart, SMESH::ALL );
if ( elems->length() != 1 || if ( elems->length() != 1 ||
mesh->GetElementType( elems[0], true ) != SMESH::EDGE ) mesh->GetElementType( elems[0], true ) != SMESH::EDGE )
return false; return false;

View File

@ -294,7 +294,7 @@ void SMESHGUI_3TypesSelector::selectionIntoArgument()
int nbElements = aMapIndex.Extent(); int nbElements = aMapIndex.Extent();
if ( nbElements > 0 ) if ( nbElements > 0 )
{ {
SMESH::long_array_var ids = new SMESH::long_array; SMESH::smIdType_array_var ids = new SMESH::smIdType_array;
ids->length( nbElements ); ids->length( nbElements );
for ( int i = 0; i < nbElements; ++i ) for ( int i = 0; i < nbElements; ++i )
aString += QString(" %1").arg( ids[ i ] = aMapIndex( i+1 )); aString += QString(" %1").arg( ids[ i ] = aMapIndex( i+1 ));
@ -352,7 +352,7 @@ void SMESHGUI_3TypesSelector::onTextChange( const QString& theNewText )
SMDSAbs_ElementType SMDSType = SMDSAbs_ElementType( iType+1 ); SMDSAbs_ElementType SMDSType = SMDSAbs_ElementType( iType+1 );
const bool isNode = ( SMDSType == SMDSAbs_Node ); const bool isNode = ( SMDSType == SMDSAbs_Node );
SMESH::long_array_var ids = new SMESH::long_array; SMESH::smIdType_array_var ids = new SMESH::smIdType_array;
ids->length( aListId.count() ); ids->length( aListId.count() );
TColStd_MapOfInteger newIndices; TColStd_MapOfInteger newIndices;
for (int i = 0; i < aListId.count(); i++) { for (int i = 0; i < aListId.count(); i++) {
@ -392,7 +392,7 @@ void SMESHGUI_3TypesSelector::onTextChange( const QString& theNewText )
*/ */
//================================================================================ //================================================================================
void SMESHGUI_3TypesSelector::addTmpIdSource( SMESH::long_array_var& ids, int iType, int index ) void SMESHGUI_3TypesSelector::addTmpIdSource( SMESH::smIdType_array_var& ids, int iType, int index )
{ {
SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor(); SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
SMESH::SMESH_IDSource_var idSrc = SMESH::SMESH_IDSource_var idSrc =

View File

@ -100,7 +100,7 @@ class SMESHGUI_EXPORT SMESHGUI_3TypesSelector : public QWidget
private: private:
void addTmpIdSource( SMESH::long_array_var& ids, void addTmpIdSource( SMESH::smIdType_array_var& ids,
int iType, int index); int iType, int index);
QGroupBox* myGroups [3]; QGroupBox* myGroups [3];

View File

@ -3536,7 +3536,7 @@ void SMESHGUI_FilterDlg::filterSource (const int theType,
{ {
if (myMesh->_is_nil()) if (myMesh->_is_nil())
return; return;
SMESH::long_array_var anIds = myFilter[ theType ]->GetElementsId(myMesh); SMESH::smIdType_array_var anIds = myFilter[ theType ]->GetElementsId(myMesh);
for (int i = 0, n = anIds->length(); i < n; i++) for (int i = 0, n = anIds->length(); i < n; i++)
theResIds.append(anIds[ i ]); theResIds.append(anIds[ i ]);
} }
@ -3589,7 +3589,7 @@ void SMESHGUI_FilterDlg::filterSelectionSource (const int theType,
{ {
if (aSubMesh->GetFather()->GetId() == myMesh->GetId()) if (aSubMesh->GetFather()->GetId() == myMesh->GetId())
{ {
SMESH::long_array_var anIds = SMESH::smIdType_array_var anIds =
theType == SMESH::NODE ? aSubMesh->GetNodesId() : aSubMesh->GetElementsId(); theType == SMESH::NODE ? aSubMesh->GetNodesId() : aSubMesh->GetElementsId();
for (int i = 0, n = anIds->length(); i < n; i++) for (int i = 0, n = anIds->length(); i < n; i++)
aToBeFiltered.Add(anIds[ i ]); aToBeFiltered.Add(anIds[ i ]);
@ -3603,7 +3603,7 @@ void SMESHGUI_FilterDlg::filterSelectionSource (const int theType,
{ {
if (aGroup->GetType() == theType && aGroup->GetMesh()->GetId() == myMesh->GetId()) if (aGroup->GetType() == theType && aGroup->GetMesh()->GetId() == myMesh->GetId())
{ {
SMESH::long_array_var anIds = aGroup->GetListOfID(); SMESH::smIdType_array_var anIds = aGroup->GetListOfID();
for (int i = 0, n = anIds->length(); i < n; i++) for (int i = 0, n = anIds->length(); i < n; i++)
aToBeFiltered.Add(anIds[ i ]); aToBeFiltered.Add(anIds[ i ]);
} }

View File

@ -434,7 +434,7 @@ void SMESHGUI_FindElemByPointOp::onFind()
if (aMeshEditor->_is_nil()) if (aMeshEditor->_is_nil())
return; return;
SMESH::long_array_var foundIds; SMESH::smIdType_array_var foundIds;
if ( aMesh->_is_equivalent( myMeshOrPart ) ) if ( aMesh->_is_equivalent( myMeshOrPart ) )
foundIds = foundIds =
aMeshEditor->FindElementsByPoint( myDlg->myX->GetValue(), aMeshEditor->FindElementsByPoint( myDlg->myX->GetValue(),

View File

@ -668,7 +668,7 @@ void SMESHGUI_GroupDlg::init (SMESH::SMESH_GroupBase_ptr theGroup,
myIdList.clear(); myIdList.clear();
if (!theGroup->IsEmpty()) { if (!theGroup->IsEmpty()) {
SMESH::long_array_var anElements = theGroup->GetListOfID(); SMESH::smIdType_array_var anElements = theGroup->GetListOfID();
int k = anElements->length(); int k = anElements->length();
for (int i = 0; i < k; i++) { for (int i = 0; i < k; i++) {
myIdList.append(anElements[i]); myIdList.append(anElements[i]);
@ -1003,7 +1003,7 @@ bool SMESHGUI_GroupDlg::onApply()
} }
else else
{ {
SMESH::long_array_var anIdList = new SMESH::long_array; SMESH::smIdType_array_var anIdList = new SMESH::smIdType_array;
int i, k = myElements->count(); int i, k = myElements->count();
anIdList->length(k); anIdList->length(k);
for (i = 0; i < k; i++) { for (i = 0; i < k; i++) {
@ -1037,7 +1037,7 @@ bool SMESHGUI_GroupDlg::onApply()
myIdList.removeAt(idx); myIdList.removeAt(idx);
} }
if (!aAddList.empty()) { if (!aAddList.empty()) {
SMESH::long_array_var anIdList = new SMESH::long_array; SMESH::smIdType_array_var anIdList = new SMESH::smIdType_array;
int added = aAddList.count(); int added = aAddList.count();
anIdList->length(added); anIdList->length(added);
for (i = 0; i < added; i++) for (i = 0; i < added; i++)
@ -1045,7 +1045,7 @@ bool SMESHGUI_GroupDlg::onApply()
myGroup->Add(anIdList.inout()); myGroup->Add(anIdList.inout());
} }
if (!myIdList.empty()) { if (!myIdList.empty()) {
SMESH::long_array_var anIdList = new SMESH::long_array; SMESH::smIdType_array_var anIdList = new SMESH::smIdType_array;
int removed = myIdList.count(); int removed = myIdList.count();
anIdList->length(removed); anIdList->length(removed);
for (i = 0; i < removed; i++) for (i = 0; i < removed; i++)
@ -1956,7 +1956,7 @@ void SMESHGUI_GroupDlg::onAdd()
// check if mesh is the same // check if mesh is the same
if (aSubMesh->GetFather()->GetId() == myMesh->GetId()) { if (aSubMesh->GetFather()->GetId() == myMesh->GetId()) {
try { try {
SMESH::long_array_var anElements = aSubMesh->GetElementsByType(aType); SMESH::smIdType_array_var anElements = aSubMesh->GetElementsByType(aType);
int k = anElements->length(); int k = anElements->length();
for (int i = 0; i < k; i++) { for (int i = 0; i < k; i++) {
QString aText = QString::number(anElements[i]); QString aText = QString::number(anElements[i]);
@ -2004,7 +2004,7 @@ void SMESHGUI_GroupDlg::onAdd()
if (!aGroup->_is_nil()) { if (!aGroup->_is_nil()) {
// check if mesh is the same // check if mesh is the same
if (aGroup->GetType() == aType && aGroup->GetMesh()->GetId() == myMesh->GetId()) { if (aGroup->GetType() == aType && aGroup->GetMesh()->GetId() == myMesh->GetId()) {
SMESH::long_array_var anElements = aGroup->GetListOfID(); SMESH::smIdType_array_var anElements = aGroup->GetListOfID();
int k = anElements->length(); int k = anElements->length();
for (int i = 0; i < k; i++) { for (int i = 0; i < k; i++) {
QString aText = QString::number(anElements[i]); QString aText = QString::number(anElements[i]);
@ -2062,7 +2062,7 @@ void SMESHGUI_GroupDlg::onAdd()
aBelongToGeom->SetElementType(aType); aBelongToGeom->SetElementType(aType);
aFilter->SetPredicate(aBelongToGeom); aFilter->SetPredicate(aBelongToGeom);
SMESH::long_array_var anElements = aFilter->GetElementsId(myMesh); SMESH::smIdType_array_var anElements = aFilter->GetElementsId(myMesh);
int k = anElements->length(); int k = anElements->length();
for (int i = 0; i < k; i++) { for (int i = 0; i < k; i++) {
@ -2143,7 +2143,7 @@ void SMESHGUI_GroupDlg::onRemove()
if (aSubMesh->GetFather()->GetId() == myMesh->GetId()) { if (aSubMesh->GetFather()->GetId() == myMesh->GetId()) {
if (aType == SMESH::NODE) { if (aType == SMESH::NODE) {
try { try {
SMESH::long_array_var anElements = aSubMesh->GetNodesId(); SMESH::smIdType_array_var anElements = aSubMesh->GetNodesId();
int k = anElements->length(); int k = anElements->length();
for (int i = 0; i < k; i++) { for (int i = 0; i < k; i++) {
QList<QListWidgetItem*> found = QList<QListWidgetItem*> found =
@ -2158,7 +2158,7 @@ void SMESHGUI_GroupDlg::onRemove()
} }
else { else {
try { try {
SMESH::long_array_var anElements = aSubMesh->GetElementsId(); SMESH::smIdType_array_var anElements = aSubMesh->GetElementsId();
int k = anElements->length(); int k = anElements->length();
for (int i = 0; i < k; i++) { for (int i = 0; i < k; i++) {
QList<QListWidgetItem*> found = QList<QListWidgetItem*> found =
@ -2185,7 +2185,7 @@ void SMESHGUI_GroupDlg::onRemove()
if (!aGroup->_is_nil()) { if (!aGroup->_is_nil()) {
// check if mesh is the same // check if mesh is the same
if (aGroup->GetType() == aType && aGroup->GetMesh()->GetId() == myMesh->GetId()) { if (aGroup->GetType() == aType && aGroup->GetMesh()->GetId() == myMesh->GetId()) {
SMESH::long_array_var anElements = aGroup->GetListOfID(); SMESH::smIdType_array_var anElements = aGroup->GetListOfID();
int k = anElements->length(); int k = anElements->length();
for (int i = 0; i < k; i++) { for (int i = 0; i < k; i++) {
QList<QListWidgetItem*> found = QList<QListWidgetItem*> found =

View File

@ -546,7 +546,7 @@ void SMESHGUI_MinDistance::compute()
SMESH::SMESH_Mesh_var m = myFirstSrc->GetMesh(); SMESH::SMESH_Mesh_var m = myFirstSrc->GetMesh();
long id = myFirstTgt->text().toLong(); long id = myFirstTgt->text().toLong();
if ( !CORBA::is_nil( m ) && id ) { if ( !CORBA::is_nil( m ) && id ) {
SMESH::long_array_var ids = new SMESH::long_array(); SMESH::smIdType_array_var ids = new SMESH::smIdType_array();
ids->length( 1 ); ids->length( 1 );
ids[0] = id; ids[0] = id;
SMESH::SMESH_MeshEditor_var me = m->GetMeshEditor(); SMESH::SMESH_MeshEditor_var me = m->GetMeshEditor();
@ -565,7 +565,7 @@ void SMESHGUI_MinDistance::compute()
SMESH::SMESH_Mesh_var m = mySecondSrc->GetMesh(); SMESH::SMESH_Mesh_var m = mySecondSrc->GetMesh();
long id = mySecondTgt->text().toLong(); long id = mySecondTgt->text().toLong();
if ( !CORBA::is_nil( m ) && id ) { if ( !CORBA::is_nil( m ) && id ) {
SMESH::long_array_var ids = new SMESH::long_array(); SMESH::smIdType_array_var ids = new SMESH::smIdType_array();
ids->length( 1 ); ids->length( 1 );
ids[0] = id; ids[0] = id;
SMESH::SMESH_MeshEditor_var me = m->GetMeshEditor(); SMESH::SMESH_MeshEditor_var me = m->GetMeshEditor();
@ -1047,7 +1047,7 @@ void SMESHGUI_BoundingBox::compute()
SMESH::SMESH_Mesh_var m = mySrc[0]->GetMesh(); SMESH::SMESH_Mesh_var m = mySrc[0]->GetMesh();
QStringList ids = myIDs.split( " ", QString::SkipEmptyParts ); QStringList ids = myIDs.split( " ", QString::SkipEmptyParts );
if ( !CORBA::is_nil( m ) && ids.count() > 0 ) { if ( !CORBA::is_nil( m ) && ids.count() > 0 ) {
SMESH::long_array_var ids_in = new SMESH::long_array(); SMESH::smIdType_array_var ids_in = new SMESH::smIdType_array();
ids_in->length( ids.count() ); ids_in->length( ids.count() );
for( int i = 0; i < ids.count(); i++ ) for( int i = 0; i < ids.count(); i++ )
ids_in[i] = ids[i].trimmed().toLong(); ids_in[i] = ids[i].trimmed().toLong();

View File

@ -556,7 +556,7 @@ bool SMESHGUI_MergeDlg::ClickOnApply()
int i, nb = KeepList->count(); int i, nb = KeepList->count();
if ( isKeepIDsSelection() ) if ( isKeepIDsSelection() )
{ {
SMESH::long_array_var anIdList = new SMESH::long_array(); SMESH::smIdType_array_var anIdList = new SMESH::smIdType_array();
anIdList->length(nb); anIdList->length(nb);
for (i = 0; i < nb; i++) for (i = 0; i < nb; i++)
anIdList[i] = KeepList->item(i)->text().toInt(); anIdList[i] = KeepList->item(i)->text().toInt();

View File

@ -3646,7 +3646,7 @@ void SMESHGUI_CtrlInfo::showInfo( const SMESH::SelectionProxy& proxy )
for ( int i = 0; i < myButtons.count(); ++i ) for ( int i = 0; i < myButtons.count(); ++i )
myButtons[i]->setEnabled( true ); myButtons[i]->setEnabled( true );
SMESH::long_array_var nbElemsByType = obj->GetNbElementsByType(); SMESH::smIdType_array_var nbElemsByType = obj->GetNbElementsByType();
if ( ! &nbElemsByType.in() ) return; if ( ! &nbElemsByType.in() ) return;
const CORBA::Long ctrlLimit = const CORBA::Long ctrlLimit =

View File

@ -418,7 +418,7 @@ SMESHGUI_MeshInfosBox::SMESHGUI_MeshInfosBox(const bool full, QWidget* theParent
*/ */
// ========================================================================================= // =========================================================================================
void SMESHGUI_MeshInfosBox::SetMeshInfo(const SMESH::long_array& theInfo) void SMESHGUI_MeshInfosBox::SetMeshInfo(const SMESH::smIdType_array& theInfo)
{ {
// nodes // nodes
myNbNode ->setText( QString("%1").arg( theInfo[SMDSEntity_Node] )); myNbNode ->setText( QString("%1").arg( theInfo[SMDSEntity_Node] ));

View File

@ -46,7 +46,7 @@ class SMESHGUI_EXPORT SMESHGUI_MeshInfosBox : public QGroupBox
public: public:
SMESHGUI_MeshInfosBox( const bool, QWidget* ); SMESHGUI_MeshInfosBox( const bool, QWidget* );
void SetMeshInfo( const SMESH::long_array& theInfo ); void SetMeshInfo( const SMESH::smIdType_array& theInfo );
private: private:
bool myFull; bool myFull;

View File

@ -479,9 +479,9 @@ bool SMESHGUI_MeshPatternDlg::onApply()
} }
QList<int> ids; QList<int> ids;
getIds(ids); getIds(ids);
SMESH::long_array_var varIds = new SMESH::long_array(); SMESH::smIdType_array_var varIds = new SMESH::smIdType_array();
varIds->length(ids.count()); varIds->length(ids.count());
int i = 0; smIdType i = 0;
for (QList<int>::iterator it = ids.begin(); it != ids.end(); ++it) for (QList<int>::iterator it = ids.begin(); it != ids.end(); ++it)
varIds[i++] = *it; varIds[i++] = *it;
myType == Type_2d myType == Type_2d
@ -1258,9 +1258,9 @@ vtkUnstructuredGrid* SMESHGUI_MeshPatternDlg::getGrid()
SMESH::point_array_var pnts; SMESH::point_array_var pnts;
QList<int> ids; QList<int> ids;
if (isRefine() && getIds(ids)) { if (isRefine() && getIds(ids)) {
SMESH::long_array_var varIds = new SMESH::long_array(); SMESH::smIdType_array_var varIds = new SMESH::smIdType_array();
varIds->length(ids.count()); varIds->length(ids.count());
int i = 0; smIdType i = 0;
for (QList<int>::iterator it = ids.begin(); it != ids.end(); ++it) for (QList<int>::iterator it = ids.begin(); it != ids.end(); ++it)
varIds[i++] = *it; varIds[i++] = *it;
pnts = myType == Type_2d pnts = myType == Type_2d

View File

@ -437,9 +437,9 @@ void SMESHGUI_MultiEditDlg::onOk()
// Purpose : Retrieve identifiers from list box or the whole object // Purpose : Retrieve identifiers from list box or the whole object
//======================================================================= //=======================================================================
SMESH::long_array_var SMESHGUI_MultiEditDlg::getIds(SMESH::SMESH_IDSource_var& obj) SMESH::smIdType_array_var SMESHGUI_MultiEditDlg::getIds(SMESH::SMESH_IDSource_var& obj)
{ {
SMESH::long_array_var anIds = new SMESH::long_array; SMESH::smIdType_array_var anIds = new SMESH::smIdType_array;
if (myToAllChk->isChecked()) if (myToAllChk->isChecked())
{ {
@ -709,7 +709,7 @@ void SMESHGUI_MultiEditDlg::onAddBtn()
SMESH::IObjectToInterface<SMESH::SMESH_subMesh>(anIter.Value()); SMESH::IObjectToInterface<SMESH::SMESH_subMesh>(anIter.Value());
if (!aSubMesh->_is_nil()) { if (!aSubMesh->_is_nil()) {
if (aSubMesh->GetFather()->GetId() == myMesh->GetId()) { if (aSubMesh->GetFather()->GetId() == myMesh->GetId()) {
SMESH::long_array_var anIds = aSubMesh->GetElementsId(); SMESH::smIdType_array_var anIds = aSubMesh->GetElementsId();
for (int i = 0, n = anIds->length(); i < n; i++) { for (int i = 0, n = anIds->length(); i < n; i++) {
if (isIdValid(anIds[ i ])) if (isIdValid(anIds[ i ]))
toBeAdded.Add(anIds[ i ]); toBeAdded.Add(anIds[ i ]);
@ -725,7 +725,7 @@ void SMESHGUI_MultiEditDlg::onAddBtn()
if (!aGroup->_is_nil() && ((aGroup->GetType() == SMESH::FACE && entityType() == 0) || if (!aGroup->_is_nil() && ((aGroup->GetType() == SMESH::FACE && entityType() == 0) ||
(aGroup->GetType() == SMESH::VOLUME && entityType() == 1))) { (aGroup->GetType() == SMESH::VOLUME && entityType() == 1))) {
if (aGroup->GetMesh()->GetId() == myMesh->GetId()) { if (aGroup->GetMesh()->GetId() == myMesh->GetId()) {
SMESH::long_array_var anIds = aGroup->GetListOfID(); SMESH::smIdType_array_var anIds = aGroup->GetListOfID();
for (int i = 0, n = anIds->length(); i < n; i++) { for (int i = 0, n = anIds->length(); i < n; i++) {
if (isIdValid(anIds[ i ])) if (isIdValid(anIds[ i ]))
toBeAdded.Add(anIds[ i ]); toBeAdded.Add(anIds[ i ]);
@ -1008,7 +1008,7 @@ bool SMESHGUI_MultiEditDlg::onApply()
SUIT_OverrideCursor aWaitCursor; SUIT_OverrideCursor aWaitCursor;
SMESH::SMESH_IDSource_var obj; SMESH::SMESH_IDSource_var obj;
SMESH::long_array_var anIds = getIds(obj); SMESH::smIdType_array_var anIds = getIds(obj);
bool aResult = process(aMeshEditor, anIds.inout(), obj); bool aResult = process(aMeshEditor, anIds.inout(), obj);
if (aResult) { if (aResult) {
@ -1099,9 +1099,9 @@ SMESHGUI_ChangeOrientationDlg::~SMESHGUI_ChangeOrientationDlg()
{ {
} }
bool SMESHGUI_ChangeOrientationDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor, bool SMESHGUI_ChangeOrientationDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor,
const SMESH::long_array& theIds, const SMESH::smIdType_array& theIds,
SMESH::SMESH_IDSource_ptr obj) SMESH::SMESH_IDSource_ptr obj)
{ {
if ( CORBA::is_nil( obj )) if ( CORBA::is_nil( obj ))
return theEditor->Reorient(theIds); return theEditor->Reorient(theIds);
@ -1189,7 +1189,7 @@ bool SMESHGUI_UnionOfTrianglesDlg::isValid (const bool theMess)
} }
bool SMESHGUI_UnionOfTrianglesDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor, bool SMESHGUI_UnionOfTrianglesDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor,
const SMESH::long_array& theIds, const SMESH::smIdType_array& theIds,
SMESH::SMESH_IDSource_ptr obj) SMESH::SMESH_IDSource_ptr obj)
{ {
{ {
@ -1220,7 +1220,7 @@ void SMESHGUI_UnionOfTrianglesDlg::onDisplaySimulation( bool toDisplayPreview )
SUIT_OverrideCursor aWaitCursor; SUIT_OverrideCursor aWaitCursor;
// get Ids of elements // get Ids of elements
SMESH::SMESH_IDSource_var obj; SMESH::SMESH_IDSource_var obj;
SMESH::long_array_var anElemIds = getIds( obj ); SMESH::smIdType_array_var anElemIds = getIds( obj );
SMESH::NumericalFunctor_var aCriterion = getNumericalFunctor(); SMESH::NumericalFunctor_var aCriterion = getNumericalFunctor();
SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditPreviewer(); SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditPreviewer();
@ -1302,7 +1302,7 @@ void SMESHGUI_CuttingOfQuadsDlg::reject()
} }
bool SMESHGUI_CuttingOfQuadsDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor, bool SMESHGUI_CuttingOfQuadsDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor,
const SMESH::long_array& theIds, const SMESH::smIdType_array& theIds,
SMESH::SMESH_IDSource_ptr obj) SMESH::SMESH_IDSource_ptr obj)
{ {
bool hasObj = (! CORBA::is_nil( obj )); bool hasObj = (! CORBA::is_nil( obj ));
@ -1382,7 +1382,7 @@ void SMESHGUI_CuttingOfQuadsDlg::displayPreview()
SUIT_OverrideCursor aWaitCursor; SUIT_OverrideCursor aWaitCursor;
// get Ids of elements // get Ids of elements
SMESH::SMESH_IDSource_var obj; SMESH::SMESH_IDSource_var obj;
SMESH::long_array_var anElemIds = getIds(obj); SMESH::smIdType_array_var anElemIds = getIds(obj);
if (anElemIds->length() == 0 && obj->_is_nil() ) if (anElemIds->length() == 0 && obj->_is_nil() )
return; return;
@ -1648,7 +1648,7 @@ SMESHGUI_SplitVolumesDlg::~SMESHGUI_SplitVolumesDlg()
} }
bool SMESHGUI_SplitVolumesDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor, bool SMESHGUI_SplitVolumesDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor,
const SMESH::long_array& theIds, const SMESH::smIdType_array& theIds,
SMESH::SMESH_IDSource_ptr theObj) SMESH::SMESH_IDSource_ptr theObj)
{ {
SMESH::IDSource_wrap obj = theObj; SMESH::IDSource_wrap obj = theObj;

View File

@ -113,12 +113,12 @@ protected:
QWidget* createButtonFrame( QWidget* ); QWidget* createButtonFrame( QWidget* );
QWidget* createMainFrame( QWidget*, const bool ); QWidget* createMainFrame( QWidget*, const bool );
virtual bool isValid( const bool ); virtual bool isValid( const bool );
SMESH::long_array_var getIds(SMESH::SMESH_IDSource_var& obj); SMESH::smIdType_array_var getIds(SMESH::SMESH_IDSource_var& obj);
void updateButtons(); void updateButtons();
virtual void setSelectionMode(); virtual void setSelectionMode();
virtual bool isIdValid( const int ) const; virtual bool isIdValid( const int ) const;
virtual bool process( SMESH::SMESH_MeshEditor_ptr, virtual bool process( SMESH::SMESH_MeshEditor_ptr,
const SMESH::long_array& , const SMESH::smIdType_array& ,
SMESH::SMESH_IDSource_ptr obj) = 0; SMESH::SMESH_IDSource_ptr obj) = 0;
virtual int nbElemsInMesh() = 0; virtual int nbElemsInMesh() = 0;
int entityType(); int entityType();
@ -182,7 +182,7 @@ public:
protected: protected:
virtual bool process( SMESH::SMESH_MeshEditor_ptr, virtual bool process( SMESH::SMESH_MeshEditor_ptr,
const SMESH::long_array& , const SMESH::smIdType_array& ,
SMESH::SMESH_IDSource_ptr obj); SMESH::SMESH_IDSource_ptr obj);
virtual int nbElemsInMesh(); virtual int nbElemsInMesh();
}; };
@ -202,7 +202,7 @@ public:
protected: protected:
virtual bool isValid( const bool ); virtual bool isValid( const bool );
virtual bool process( SMESH::SMESH_MeshEditor_ptr, virtual bool process( SMESH::SMESH_MeshEditor_ptr,
const SMESH::long_array&, const SMESH::smIdType_array&,
SMESH::SMESH_IDSource_ptr obj ); SMESH::SMESH_IDSource_ptr obj );
virtual int nbElemsInMesh(); virtual int nbElemsInMesh();
@ -227,7 +227,7 @@ public:
protected: protected:
virtual bool process( SMESH::SMESH_MeshEditor_ptr, virtual bool process( SMESH::SMESH_MeshEditor_ptr,
const SMESH::long_array& , const SMESH::smIdType_array& ,
SMESH::SMESH_IDSource_ptr obj); SMESH::SMESH_IDSource_ptr obj);
virtual int nbElemsInMesh(); virtual int nbElemsInMesh();
@ -269,7 +269,7 @@ protected slots:
protected: protected:
virtual bool process( SMESH::SMESH_MeshEditor_ptr, virtual bool process( SMESH::SMESH_MeshEditor_ptr,
const SMESH::long_array&, const SMESH::smIdType_array&,
SMESH::SMESH_IDSource_ptr obj ); SMESH::SMESH_IDSource_ptr obj );
virtual int nbElemsInMesh(); virtual int nbElemsInMesh();

View File

@ -497,7 +497,7 @@ bool SMESHGUI_NodesDlg::ClickOnApply()
} }
if ( !aGroupUsed->_is_nil() ) { if ( !aGroupUsed->_is_nil() ) {
SMESH::long_array_var anIdList = new SMESH::long_array; SMESH::smIdType_array_var anIdList = new SMESH::smIdType_array;
anIdList->length( 1 ); anIdList->length( 1 );
anIdList[0] = aNodeId; anIdList[0] = aNodeId;
aGroupUsed->Add( anIdList.inout() ); aGroupUsed->Add( anIdList.inout() );

View File

@ -340,7 +340,7 @@ bool SMESHGUI_OffsetDlg::ClickOnApply()
{ {
QStringList aListElementsId = myElementsId.split(" ", QString::SkipEmptyParts); QStringList aListElementsId = myElementsId.split(" ", QString::SkipEmptyParts);
SMESH::long_array_var anElementsId = new SMESH::long_array; SMESH::smIdType_array_var anElementsId = new SMESH::smIdType_array;
anElementsId->length(aListElementsId.count()); anElementsId->length(aListElementsId.count());
for (int i = 0; i < aListElementsId.count(); i++) for (int i = 0; i < aListElementsId.count(); i++)
anElementsId[i] = aListElementsId[i].toInt(); anElementsId[i] = aListElementsId[i].toInt();
@ -918,7 +918,7 @@ void SMESHGUI_OffsetDlg::onDisplaySimulation( bool toDisplayPreview )
} }
else else
{ {
SMESH::long_array_var anElementsId = new SMESH::long_array; SMESH::smIdType_array_var anElementsId = new SMESH::smIdType_array;
QStringList aListElementsId = myElementsId.split(" ", QString::SkipEmptyParts); QStringList aListElementsId = myElementsId.split(" ", QString::SkipEmptyParts);
anElementsId->length(aListElementsId.count()); anElementsId->length(aListElementsId.count());
for (int i = 0; i < aListElementsId.count(); i++) for (int i = 0; i < aListElementsId.count(); i++)

View File

@ -231,7 +231,7 @@ void SMESHGUI_RemoveElementsDlg::ClickOnApply()
SUIT_OverrideCursor wc; SUIT_OverrideCursor wc;
QStringList aListId = myEditCurrentArgument->text().split(" ", QString::SkipEmptyParts); QStringList aListId = myEditCurrentArgument->text().split(" ", QString::SkipEmptyParts);
SMESH::long_array_var anArrayOfIdeces = new SMESH::long_array; SMESH::smIdType_array_var anArrayOfIdeces = new SMESH::smIdType_array;
anArrayOfIdeces->length(aListId.count()); anArrayOfIdeces->length(aListId.count());
for (int i = 0; i < aListId.count(); i++) for (int i = 0; i < aListId.count(); i++)
anArrayOfIdeces[i] = aListId[ i ].toInt(); anArrayOfIdeces[i] = aListId[ i ].toInt();

View File

@ -234,7 +234,7 @@ void SMESHGUI_RemoveNodesDlg::ClickOnApply()
if (myNbOkNodes) { if (myNbOkNodes) {
QStringList aListId = myEditCurrentArgument->text().split(" ", QString::SkipEmptyParts); QStringList aListId = myEditCurrentArgument->text().split(" ", QString::SkipEmptyParts);
SMESH::long_array_var anArrayOfIdeces = new SMESH::long_array; SMESH::smIdType_array_var anArrayOfIdeces = new SMESH::smIdType_array;
anArrayOfIdeces->length(aListId.count()); anArrayOfIdeces->length(aListId.count());
for (int i = 0; i < aListId.count(); i++) for (int i = 0; i < aListId.count(); i++)
anArrayOfIdeces[i] = aListId[ i ].toInt(); anArrayOfIdeces[i] = aListId[ i ].toInt();

View File

@ -409,7 +409,7 @@ bool SMESHGUI_RotationDlg::ClickOnApply()
if (myNbOkElements && IsAxisOk()) { if (myNbOkElements && IsAxisOk()) {
QStringList aListElementsId = myElementsId.split(" ", QString::SkipEmptyParts); QStringList aListElementsId = myElementsId.split(" ", QString::SkipEmptyParts);
SMESH::long_array_var anElementsId = new SMESH::long_array; SMESH::smIdType_array_var anElementsId = new SMESH::smIdType_array;
anElementsId->length(aListElementsId.count()); anElementsId->length(aListElementsId.count());
for (int i = 0; i < aListElementsId.count(); i++) for (int i = 0; i < aListElementsId.count(); i++)
@ -1135,7 +1135,7 @@ void SMESHGUI_RotationDlg::onDisplaySimulation( bool toDisplayPreview ) {
if (myPreviewCheckBox->isChecked() && toDisplayPreview) { if (myPreviewCheckBox->isChecked() && toDisplayPreview) {
if(myNbOkElements && isValid() && IsAxisOk()) { if(myNbOkElements && isValid() && IsAxisOk()) {
QStringList aListElementsId = myElementsId.split(" ", QString::SkipEmptyParts); QStringList aListElementsId = myElementsId.split(" ", QString::SkipEmptyParts);
SMESH::long_array_var anElementsId = new SMESH::long_array; SMESH::smIdType_array_var anElementsId = new SMESH::smIdType_array;
anElementsId->length(aListElementsId.count()); anElementsId->length(aListElementsId.count());
for (int i = 0; i < aListElementsId.count(); i++) for (int i = 0; i < aListElementsId.count(); i++)

View File

@ -448,7 +448,7 @@ bool SMESHGUI_ScaleDlg::ClickOnApply()
if (myNbOkElements) { if (myNbOkElements) {
QStringList aListElementsId = myElementsId.split(" ", QString::SkipEmptyParts); QStringList aListElementsId = myElementsId.split(" ", QString::SkipEmptyParts);
SMESH::long_array_var anElementsId = new SMESH::long_array; SMESH::smIdType_array_var anElementsId = new SMESH::smIdType_array;
anElementsId->length(aListElementsId.count()); anElementsId->length(aListElementsId.count());
for (int i = 0; i < aListElementsId.count(); i++) for (int i = 0; i < aListElementsId.count(); i++)
@ -1145,7 +1145,7 @@ void SMESHGUI_ScaleDlg::onDisplaySimulation( bool toDisplayPreview ) {
if ( myNbOkElements && isValid() ) { if ( myNbOkElements && isValid() ) {
QStringList aListElementsId = myElementsId.split(" ", QString::SkipEmptyParts); QStringList aListElementsId = myElementsId.split(" ", QString::SkipEmptyParts);
SMESH::long_array_var anElementsId = new SMESH::long_array; SMESH::smIdType_array_var anElementsId = new SMESH::smIdType_array;
anElementsId->length(aListElementsId.count()); anElementsId->length(aListElementsId.count());
for (int i = 0; i < aListElementsId.count(); i++) for (int i = 0; i < aListElementsId.count(); i++)

View File

@ -276,7 +276,7 @@ SMESH::MeshInfo SMESH::SelectionProxy::meshInfo() const
SMESH::MeshInfo info; SMESH::MeshInfo info;
if ( !isNull() ) if ( !isNull() )
{ {
SMESH::long_array_var data = myObject->GetMeshInfo(); SMESH::smIdType_array_var data = myObject->GetMeshInfo();
for ( uint type = SMESH::Entity_Node; type < SMESH::Entity_Last; type++ ) for ( uint type = SMESH::Entity_Node; type < SMESH::Entity_Last; type++ )
{ {
if ( type < data->length() ) if ( type < data->length() )
@ -494,7 +494,7 @@ bool SMESH::SelectionProxy::nodeConnectivity( int id, SMESH::Connectivity& conne
SMESH::SMESH_Mesh_var mesh = myObject->GetMesh(); SMESH::SMESH_Mesh_var mesh = myObject->GetMesh();
if ( !CORBA::is_nil( mesh ) ) if ( !CORBA::is_nil( mesh ) )
{ {
SMESH::long_array_var elements = mesh->GetNodeInverseElements( id, SMESH::ALL ); SMESH::smIdType_array_var elements = mesh->GetNodeInverseElements( id, SMESH::ALL );
for ( int i = 0, n = elements->length(); i < n; i++ ) for ( int i = 0, n = elements->length(); i < n; i++ )
{ {
SMESH::ElementType type = mesh->GetElementType( elements[i], true ); SMESH::ElementType type = mesh->GetElementType( elements[i], true );
@ -589,7 +589,7 @@ bool SMESH::SelectionProxy::hasElement( int id )
SMESH::SMESH_Mesh_var mesh = myObject->GetMesh(); SMESH::SMESH_Mesh_var mesh = myObject->GetMesh();
if ( !CORBA::is_nil( mesh ) ) if ( !CORBA::is_nil( mesh ) )
{ {
SMESH::long_array_var nodes = mesh->GetElemNodes( id ); SMESH::smIdType_array_var nodes = mesh->GetElemNodes( id );
result = nodes->length() > 0; result = nodes->length() > 0;
} }
} }
@ -693,7 +693,7 @@ bool SMESH::SelectionProxy::elementConnectivity( int id, Connectivity& connectiv
SMESH::SMESH_Mesh_var mesh = myObject->GetMesh(); SMESH::SMESH_Mesh_var mesh = myObject->GetMesh();
if ( !CORBA::is_nil( mesh ) ) if ( !CORBA::is_nil( mesh ) )
{ {
SMESH::long_array_var nn = mesh->GetElemNodes( id ); SMESH::smIdType_array_var nn = mesh->GetElemNodes( id );
for ( int i = 0, nb = nn->length(); i < nb; i++ ) for ( int i = 0, nb = nn->length(); i < nb; i++ )
{ {
if ( !nodes.contains( nn[i] )) if ( !nodes.contains( nn[i] ))
@ -751,7 +751,7 @@ bool SMESH::SelectionProxy::perFaceConnectivity( int id, Connectivity& connectiv
CORBA::Long nbFaces = mesh->ElemNbFaces( id ); CORBA::Long nbFaces = mesh->ElemNbFaces( id );
for ( CORBA::Long iF = 0; iF < nbFaces; ++iF ) for ( CORBA::Long iF = 0; iF < nbFaces; ++iF )
{ {
SMESH::long_array_var nodes = mesh->GetElemFaceNodes( id, iF ); SMESH::smIdType_array_var nodes = mesh->GetElemFaceNodes( id, iF );
for ( CORBA::ULong iN = 0; iN < nodes->length(); ++iN ) for ( CORBA::ULong iN = 0; iN < nodes->length(); ++iN )
{ {
connectivity[ iF+1 ] << nodes[iN]; connectivity[ iF+1 ] << nodes[iN];
@ -825,7 +825,7 @@ bool SMESH::SelectionProxy::elementGravityCenter( int id, SMESH::XYZ& xyz )
SMESH::SMESH_Mesh_var mesh = myObject->GetMesh(); SMESH::SMESH_Mesh_var mesh = myObject->GetMesh();
if ( !CORBA::is_nil( mesh ) ) if ( !CORBA::is_nil( mesh ) )
{ {
SMESH::long_array_var nodes = mesh->GetElemNodes( id ); SMESH::smIdType_array_var nodes = mesh->GetElemNodes( id );
for ( int i = 0, n = nodes->length(); i < n; i++ ) for ( int i = 0, n = nodes->length(); i < n; i++ )
{ {
SMESH::double_array_var coords = mesh->GetNodeXYZ( nodes[i] ); SMESH::double_array_var coords = mesh->GetNodeXYZ( nodes[i] );
@ -1220,7 +1220,7 @@ QSet<uint> SMESH::SelectionProxy::ids() const
SMESH::SMESH_GroupBase_var group = SMESH::SMESH_GroupBase::_narrow( myObject ); SMESH::SMESH_GroupBase_var group = SMESH::SMESH_GroupBase::_narrow( myObject );
if ( !CORBA::is_nil( group ) ) if ( !CORBA::is_nil( group ) )
{ {
SMESH::long_array_var seq = group->GetListOfID(); SMESH::smIdType_array_var seq = group->GetListOfID();
for ( int i = 0, n = seq->length(); i < n; i++ ) for ( int i = 0, n = seq->length(); i < n; i++ )
result << (uint)seq[i]; result << (uint)seq[i];
} }

View File

@ -1368,8 +1368,8 @@ bool SMESHGUI_SewingDlg::ClickOnApply()
QStringList aListElementsId1 = LineEdit1->text().split(" ", QString::SkipEmptyParts); QStringList aListElementsId1 = LineEdit1->text().split(" ", QString::SkipEmptyParts);
QStringList aListElementsId2 = LineEdit4->text().split(" ", QString::SkipEmptyParts); QStringList aListElementsId2 = LineEdit4->text().split(" ", QString::SkipEmptyParts);
SMESH::long_array_var anElementsId1 = new SMESH::long_array; SMESH::smIdType_array_var anElementsId1 = new SMESH::smIdType_array;
SMESH::long_array_var anElementsId2 = new SMESH::long_array; SMESH::smIdType_array_var anElementsId2 = new SMESH::smIdType_array;
anElementsId1->length(aListElementsId1.count()); anElementsId1->length(aListElementsId1.count());
anElementsId2->length(aListElementsId2.count()); anElementsId2->length(aListElementsId2.count());

View File

@ -351,8 +351,8 @@ bool SMESHGUI_SmoothingDlg::ClickOnApply()
QStringList aListElementsId = LineEditElements->text().split(" ", QString::SkipEmptyParts); QStringList aListElementsId = LineEditElements->text().split(" ", QString::SkipEmptyParts);
QStringList aListNodesId = LineEditNodes->text().split(" ", QString::SkipEmptyParts); QStringList aListNodesId = LineEditNodes->text().split(" ", QString::SkipEmptyParts);
SMESH::long_array_var anElementsId = new SMESH::long_array; SMESH::smIdType_array_var anElementsId = new SMESH::smIdType_array;
SMESH::long_array_var aNodesId = new SMESH::long_array; SMESH::smIdType_array_var aNodesId = new SMESH::smIdType_array;
anElementsId->length(aListElementsId.count()); anElementsId->length(aListElementsId.count());
for (int i = 0; i < aListElementsId.count(); i++) for (int i = 0; i < aListElementsId.count(); i++)

View File

@ -483,7 +483,7 @@ bool SMESHGUI_SymmetryDlg::ClickOnApply()
if (myNbOkElements && IsMirrorOk()) { if (myNbOkElements && IsMirrorOk()) {
QStringList aListElementsId = myElementsId.split(" ", QString::SkipEmptyParts); QStringList aListElementsId = myElementsId.split(" ", QString::SkipEmptyParts);
SMESH::long_array_var anElementsId = new SMESH::long_array; SMESH::smIdType_array_var anElementsId = new SMESH::smIdType_array;
anElementsId->length(aListElementsId.count()); anElementsId->length(aListElementsId.count());
for (int i = 0; i < aListElementsId.count(); i++) for (int i = 0; i < aListElementsId.count(); i++)
@ -1202,7 +1202,7 @@ void SMESHGUI_SymmetryDlg::onDisplaySimulation( bool toDisplayPreview )
if ( myNbOkElements && isValid() && IsMirrorOk() ) if ( myNbOkElements && isValid() && IsMirrorOk() )
{ {
QStringList aListElementsId = myElementsId.split(" ", QString::SkipEmptyParts); QStringList aListElementsId = myElementsId.split(" ", QString::SkipEmptyParts);
SMESH::long_array_var anElementsId = new SMESH::long_array; SMESH::smIdType_array_var anElementsId = new SMESH::smIdType_array;
anElementsId->length(aListElementsId.count()); anElementsId->length(aListElementsId.count());
for (int i = 0; i < aListElementsId.count(); i++) for (int i = 0; i < aListElementsId.count(); i++)

View File

@ -484,7 +484,7 @@ bool SMESHGUI_TranslationDlg::ClickOnApply()
if (myNbOkElements) { if (myNbOkElements) {
QStringList aListElementsId = myElementsId.split(" ", QString::SkipEmptyParts); QStringList aListElementsId = myElementsId.split(" ", QString::SkipEmptyParts);
SMESH::long_array_var anElementsId = new SMESH::long_array; SMESH::smIdType_array_var anElementsId = new SMESH::smIdType_array;
anElementsId->length(aListElementsId.count()); anElementsId->length(aListElementsId.count());
for (int i = 0; i < aListElementsId.count(); i++) for (int i = 0; i < aListElementsId.count(); i++)
@ -1182,7 +1182,7 @@ void SMESHGUI_TranslationDlg::onDisplaySimulation( bool toDisplayPreview )
{ {
QStringList aListElementsId = myElementsId.split(" ", QString::SkipEmptyParts); QStringList aListElementsId = myElementsId.split(" ", QString::SkipEmptyParts);
SMESH::long_array_var anElementsId = new SMESH::long_array; SMESH::smIdType_array_var anElementsId = new SMESH::smIdType_array;
anElementsId->length(aListElementsId.count()); anElementsId->length(aListElementsId.count());
for (int i = 0; i < aListElementsId.count(); i++) for (int i = 0; i < aListElementsId.count(); i++)

View File

@ -214,12 +214,12 @@ ElementType Functor_i::GetElementType()
Class : NumericalFunctor_i Class : NumericalFunctor_i
Description : Base class for numerical functors Description : Base class for numerical functors
*/ */
CORBA::Double NumericalFunctor_i::GetValue( CORBA::Long theId ) CORBA::Double NumericalFunctor_i::GetValue( SMESH::smIdType theId )
{ {
return myNumericalFunctorPtr->GetValue( theId ); return myNumericalFunctorPtr->GetValue( theId );
} }
CORBA::Boolean NumericalFunctor_i::IsApplicable( CORBA::Long theElementId ) CORBA::Boolean NumericalFunctor_i::IsApplicable( SMESH::smIdType theElementId )
{ {
return myNumericalFunctorPtr->IsApplicable( theElementId ); return myNumericalFunctorPtr->IsApplicable( theElementId );
} }
@ -268,9 +268,9 @@ SMESH::Histogram* NumericalFunctor_i::GetLocalHistogram(CORBA::Short
} }
else else
{ {
SMESH::SMESH_Mesh_var mesh = object->GetMesh(); SMESH::SMESH_Mesh_var mesh = object->GetMesh();
SMESH::long_array_var objNbElems = object->GetNbElementsByType(); SMESH::smIdType_array_var objNbElems = object->GetNbElementsByType();
SMESH::long_array_var meshNbElems = mesh-> GetNbElementsByType(); SMESH::smIdType_array_var meshNbElems = mesh-> GetNbElementsByType();
if ( meshNbElems[ GetElementType() ] != if ( meshNbElems[ GetElementType() ] !=
objNbElems [ GetElementType() ] ) objNbElems [ GetElementType() ] )
{ {
@ -1412,10 +1412,10 @@ RangeOfIds_i::RangeOfIds_i()
myFunctorPtr = myPredicatePtr = myRangeOfIdsPtr; myFunctorPtr = myPredicatePtr = myRangeOfIdsPtr;
} }
void RangeOfIds_i::SetRange( const SMESH::long_array& theIds ) void RangeOfIds_i::SetRange( const SMESH::smIdType_array& theIds )
{ {
CORBA::Long iEnd = theIds.length(); SMESH::smIdType iEnd = theIds.length();
for ( CORBA::Long i = 0; i < iEnd; i++ ) for ( SMESH::smIdType i = 0; i < iEnd; i++ )
myRangeOfIdsPtr->AddToRange( theIds[ i ] ); myRangeOfIdsPtr->AddToRange( theIds[ i ] );
TPythonDump()<<this<<".SetRange("<<theIds<<")"; TPythonDump()<<this<<".SetRange("<<theIds<<")";
} }
@ -1657,7 +1657,7 @@ void ConnectedElements_i::SetVertex( GEOM::GEOM_Object_ptr vertex )
TPythonDump() << this << ".SetVertex( " << vertex << " )"; TPythonDump() << this << ".SetVertex( " << vertex << " )";
} }
void ConnectedElements_i::SetNode ( CORBA::Long nodeID ) void ConnectedElements_i::SetNode ( SMESH::smIdType nodeID )
{ {
if ( nodeID < 1 ) if ( nodeID < 1 )
THROW_SALOME_CORBA_EXCEPTION( "ConnectedElements_i::SetNode(): nodeID must be > 0", THROW_SALOME_CORBA_EXCEPTION( "ConnectedElements_i::SetNode(): nodeID must be > 0",
@ -2574,7 +2574,7 @@ SetMesh( SMESH_Mesh_ptr theMesh )
myPredicate->GetPredicate()->SetMesh( aMesh ); myPredicate->GetPredicate()->SetMesh( aMesh );
} }
SMESH::long_array* SMESH::smIdType_array*
Filter_i:: Filter_i::
GetIDs() GetIDs()
{ {
@ -2606,11 +2606,11 @@ GetElementsId( Predicate_i* thePredicate,
Controls::Filter::GetElementsId(aMesh,thePredicate->GetPredicate(),theSequence); Controls::Filter::GetElementsId(aMesh,thePredicate->GetPredicate(),theSequence);
} }
SMESH::long_array* SMESH::smIdType_array*
Filter_i:: Filter_i::
GetElementsId( SMESH_Mesh_ptr theMesh ) GetElementsId( SMESH_Mesh_ptr theMesh )
{ {
SMESH::long_array_var anArray = new SMESH::long_array; SMESH::smIdType_array_var anArray = new SMESH::smIdType_array;
if(!CORBA::is_nil(theMesh) && myPredicate){ if(!CORBA::is_nil(theMesh) && myPredicate){
theMesh->Load(); theMesh->Load();
Controls::Filter::TIdSequence aSequence; Controls::Filter::TIdSequence aSequence;
@ -2623,11 +2623,11 @@ GetElementsId( SMESH_Mesh_ptr theMesh )
return anArray._retn(); return anArray._retn();
} }
SMESH::long_array* SMESH::smIdType_array*
Filter_i:: Filter_i::
GetElementsIdFromParts( const ListOfIDSources& theParts ) GetElementsIdFromParts( const ListOfIDSources& theParts )
{ {
SMESH::long_array_var array = new SMESH::long_array; SMESH::smIdType_array_var array = new SMESH::smIdType_array;
if ( theParts.length() > 0 && myPredicate ) if ( theParts.length() > 0 && myPredicate )
{ {
SMESH_Mesh_ptr mesh = theParts[0]->GetMesh(); SMESH_Mesh_ptr mesh = theParts[0]->GetMesh();
@ -2659,9 +2659,9 @@ GetElementsIdFromParts( const ListOfIDSources& theParts )
*/ */
//============================================================================= //=============================================================================
SMESH::long_array* ::Filter_i::GetMeshInfo() SMESH::smIdType_array* ::Filter_i::GetMeshInfo()
{ {
SMESH::long_array_var aRes = new SMESH::long_array(); SMESH::smIdType_array_var aRes = new SMESH::smIdType_array();
aRes->length(SMESH::Entity_Last); aRes->length(SMESH::Entity_Last);
for (int i = 0; i < SMESH::Entity_Last; i++) for (int i = 0; i < SMESH::Entity_Last; i++)
aRes[i] = 0; aRes[i] = 0;
@ -2687,9 +2687,9 @@ SMESH::long_array* ::Filter_i::GetMeshInfo()
*/ */
//============================================================================= //=============================================================================
SMESH::long_array* ::Filter_i::GetNbElementsByType() SMESH::smIdType_array* ::Filter_i::GetNbElementsByType()
{ {
SMESH::long_array_var aRes = new SMESH::long_array(); SMESH::smIdType_array_var aRes = new SMESH::smIdType_array();
aRes->length(SMESH::NB_ELEMENT_TYPES); aRes->length(SMESH::NB_ELEMENT_TYPES);
for (int i = 0; i < SMESH::NB_ELEMENT_TYPES; i++) for (int i = 0; i < SMESH::NB_ELEMENT_TYPES; i++)
aRes[i] = 0; aRes[i] = 0;
@ -2697,7 +2697,7 @@ SMESH::long_array* ::Filter_i::GetNbElementsByType()
if ( !CORBA::is_nil(myMesh) && myPredicate ) { if ( !CORBA::is_nil(myMesh) && myPredicate ) {
const SMDS_Mesh* aMesh = MeshPtr2SMDSMesh(myMesh); const SMDS_Mesh* aMesh = MeshPtr2SMDSMesh(myMesh);
SMDS_ElemIteratorPtr it = aMesh->elementsIterator( SMDSAbs_ElementType( GetElementType() )); SMDS_ElemIteratorPtr it = aMesh->elementsIterator( SMDSAbs_ElementType( GetElementType() ));
CORBA::Long& nbElems = aRes[ GetElementType() ]; SMESH::smIdType& nbElems = aRes[ GetElementType() ];
while ( it->more() ) while ( it->more() )
{ {
const SMDS_MeshElement* anElem = it->next(); const SMDS_MeshElement* anElem = it->next();

View File

@ -98,15 +98,15 @@ namespace SMESH
public virtual Functor_i public virtual Functor_i
{ {
public: public:
CORBA::Double GetValue( CORBA::Long theElementId ); CORBA::Double GetValue( SMESH::smIdType theElementId );
CORBA::Boolean IsApplicable( CORBA::Long theElementId ); CORBA::Boolean IsApplicable( SMESH::smIdType theElementId );
SMESH::Histogram* GetHistogram(CORBA::Short nbIntervals, SMESH::Histogram* GetHistogram(CORBA::Short nbIntervals,
CORBA::Boolean isLogarithmic); CORBA::Boolean isLogarithmic);
SMESH::Histogram* GetLocalHistogram(CORBA::Short nbIntervals, SMESH::Histogram* GetLocalHistogram(CORBA::Short nbIntervals,
CORBA::Boolean isLogarithmic, CORBA::Boolean isLogarithmic,
SMESH::SMESH_IDSource_ptr object); SMESH::SMESH_IDSource_ptr object);
void SetPrecision( CORBA::Long thePrecision ); void SetPrecision( CORBA::Long thePrecision );
SMESH::smIdType GetPrecision(); CORBA::Long GetPrecision();
Controls::NumericalFunctorPtr GetNumericalFunctor(); Controls::NumericalFunctorPtr GetNumericalFunctor();
protected: protected:
@ -365,7 +365,7 @@ namespace SMESH
{ {
public: public:
CORBA::Boolean IsSatisfy( CORBA::Long theElementId ); CORBA::Boolean IsSatisfy( CORBA::Long theElementId );
SMESH::smIdType NbSatisfying( SMESH::SMESH_IDSource_ptr obj ); CORBA::Long NbSatisfying( SMESH::SMESH_IDSource_ptr obj );
Controls::PredicatePtr GetPredicate(); Controls::PredicatePtr GetPredicate();
protected: protected:
@ -704,7 +704,7 @@ namespace SMESH
{ {
public: public:
RangeOfIds_i(); RangeOfIds_i();
void SetRange( const SMESH::long_array& theIds ); void SetRange( const SMESH::smIdType_array& theIds );
CORBA::Boolean SetRangeStr( const char* theRange ); CORBA::Boolean SetRangeStr( const char* theRange );
char* GetRangeStr(); char* GetRangeStr();
@ -823,7 +823,7 @@ namespace SMESH
void SetElementType( ElementType theType ); void SetElementType( ElementType theType );
void SetPoint( CORBA::Double x, CORBA::Double y, CORBA::Double z ); void SetPoint( CORBA::Double x, CORBA::Double y, CORBA::Double z );
void SetVertex( GEOM::GEOM_Object_ptr vertex ); void SetVertex( GEOM::GEOM_Object_ptr vertex );
void SetNode ( CORBA::Long nodeID ); void SetNode ( SMESH::smIdType nodeID );
void SetThreshold ( const char* threshold, void SetThreshold ( const char* threshold,
SMESH::ConnectedElements::ThresholdType type ); SMESH::ConnectedElements::ThresholdType type );
char* GetThreshold ( SMESH::ConnectedElements::ThresholdType& type ); char* GetThreshold ( SMESH::ConnectedElements::ThresholdType& type );
@ -1006,11 +1006,11 @@ namespace SMESH
Controls::Filter::TIdSequence& ); Controls::Filter::TIdSequence& );
virtual virtual
long_array* smIdType_array*
GetElementsId( SMESH_Mesh_ptr ); GetElementsId( SMESH_Mesh_ptr );
virtual virtual
long_array* smIdType_array*
GetElementsIdFromParts( const ListOfIDSources& theParts ); GetElementsIdFromParts( const ListOfIDSources& theParts );
virtual virtual
@ -1040,9 +1040,9 @@ namespace SMESH
// ========================= // =========================
// SMESH_IDSource interface // SMESH_IDSource interface
// ========================= // =========================
virtual SMESH::long_array* GetIDs(); virtual SMESH::smIdType_array* GetIDs();
virtual SMESH::long_array* GetMeshInfo(); virtual SMESH::smIdType_array* GetMeshInfo();
virtual SMESH::long_array* GetNbElementsByType(); virtual SMESH::smIdType_array* GetNbElementsByType();
virtual SMESH::array_of_ElementType* GetTypes(); virtual SMESH::array_of_ElementType* GetTypes();
virtual SMESH::SMESH_Mesh_ptr GetMesh(); virtual SMESH::SMESH_Mesh_ptr GetMesh();
virtual bool IsMeshInfoCorrect() { return true; } virtual bool IsMeshInfoCorrect() { return true; }
@ -1081,7 +1081,7 @@ namespace SMESH
CORBA::Boolean SaveAs( const char* aFileName ); CORBA::Boolean SaveAs( const char* aFileName );
CORBA::Boolean IsPresent( const char* aFilterName ); CORBA::Boolean IsPresent( const char* aFilterName );
SMESH::smIdType NbFilters( ElementType ); CORBA::Long NbFilters( ElementType );
string_array* GetNames( ElementType ); string_array* GetNames( ElementType );
string_array* GetAllNames(); string_array* GetAllNames();
void SetFileName( const char* theFileName ); void SetFileName( const char* theFileName );

View File

@ -2418,7 +2418,7 @@ SMESH::long_array* SMESH_Gen_i::Evaluate(SMESH::SMESH_Mesh_ptr theMesh,
GEOM::GEOM_Object_ptr GEOM::GEOM_Object_ptr
SMESH_Gen_i::GetGeometryByMeshElement( SMESH::SMESH_Mesh_ptr theMesh, SMESH_Gen_i::GetGeometryByMeshElement( SMESH::SMESH_Mesh_ptr theMesh,
CORBA::Long theElementID, SMESH::smIdType theElementID,
const char* theGeomName) const char* theGeomName)
{ {
Unexpect aCatch(SALOME_SalomeException); Unexpect aCatch(SALOME_SalomeException);
@ -2482,7 +2482,7 @@ SMESH_Gen_i::GetGeometryByMeshElement( SMESH::SMESH_Mesh_ptr theMesh,
GEOM::GEOM_Object_ptr GEOM::GEOM_Object_ptr
SMESH_Gen_i::FindGeometryByMeshElement( SMESH::SMESH_Mesh_ptr theMesh, SMESH_Gen_i::FindGeometryByMeshElement( SMESH::SMESH_Mesh_ptr theMesh,
CORBA::Long theElementID) SMESH::smIdType theElementID)
{ {
Unexpect aCatch(SALOME_SalomeException); Unexpect aCatch(SALOME_SalomeException);
if ( CORBA::is_nil( theMesh ) ) if ( CORBA::is_nil( theMesh ) )
@ -2670,7 +2670,7 @@ SMESH_Gen_i::ConcatenateCommon(const SMESH::ListOfIDSources& theMeshesArray,
} }
// remember nb of elements before filling in // remember nb of elements before filling in
SMESH::long_array_var prevState = newMesh->GetNbElementsByType(); SMESH::smIdType_array_var prevState = newMesh->GetNbElementsByType();
// copy nodes // copy nodes
@ -2720,7 +2720,7 @@ SMESH_Gen_i::ConcatenateCommon(const SMESH::ListOfIDSources& theMeshesArray,
int _assert[( nbNames == SMESH::NB_ELEMENT_TYPES ) ? 2 : -1 ]; _assert[0]=_assert[1]=0; int _assert[( nbNames == SMESH::NB_ELEMENT_TYPES ) ? 2 : -1 ]; _assert[0]=_assert[1]=0;
} }
SMESH::long_array_var curState = newMesh->GetNbElementsByType(); SMESH::smIdType_array_var curState = newMesh->GetNbElementsByType();
for( groupType = SMESH::NODE; for( groupType = SMESH::NODE;
groupType < SMESH::NB_ELEMENT_TYPES; groupType < SMESH::NB_ELEMENT_TYPES;
@ -2767,7 +2767,7 @@ SMESH_Gen_i::ConcatenateCommon(const SMESH::ListOfIDSources& theMeshesArray,
SMESH::SMESH_GroupBase_ptr group; SMESH::SMESH_GroupBase_ptr group;
CORBA::String_var groupName; CORBA::String_var groupName;
SMESH::long_array_var newIDs = new SMESH::long_array(); SMESH::smIdType_array_var newIDs = new SMESH::smIdType_array();
// loop on groups of a source mesh // loop on groups of a source mesh
SMESH::ListOfGroups_var listOfGroups = initImpl->GetGroups(); SMESH::ListOfGroups_var listOfGroups = initImpl->GetGroups();
@ -2932,7 +2932,7 @@ SMESH::SMESH_Mesh_ptr SMESH_Gen_i::CopyMesh(SMESH::SMESH_IDSource_ptr meshPart,
} }
else else
{ {
SMESH::long_array_var ids = meshPart->GetIDs(); SMESH::smIdType_array_var ids = meshPart->GetIDs();
if ( srcElemTypes->length() == 1 && srcElemTypes[0] == SMESH::NODE ) // group of nodes if ( srcElemTypes->length() == 1 && srcElemTypes[0] == SMESH::NODE ) // group of nodes
{ {
for ( CORBA::ULong i=0; i < ids->length(); i++ ) for ( CORBA::ULong i=0; i < ids->length(); i++ )
@ -3887,7 +3887,7 @@ CORBA::Boolean SMESH_Gen_i::CopyMeshWithGeom( SMESH::SMESH_Mesh_ptr theSou
{ {
if ( newMeshDS->GetMeshInfo().NbElements( SMDSAbs_ElementType( elemType )) > 0 ) if ( newMeshDS->GetMeshInfo().NbElements( SMDSAbs_ElementType( elemType )) > 0 )
{ {
SMESH::long_array_var elemIDs = stdlGroup->GetIDs(); SMESH::smIdType_array_var elemIDs = stdlGroup->GetIDs();
const bool isElem = ( elemType != SMESH::NODE ); const bool isElem = ( elemType != SMESH::NODE );
CORBA::ULong iE = 0; CORBA::ULong iE = 0;
for ( ; iE < elemIDs->length(); ++iE ) // check if any element has been copied for ( ; iE < elemIDs->length(); ++iE ) // check if any element has been copied
@ -6248,7 +6248,7 @@ int SMESH_Gen_i::RegisterObject(CORBA::Object_ptr theObject)
*/ */
//================================================================================ //================================================================================
SMESH::smIdType SMESH_Gen_i::GetObjectId(CORBA::Object_ptr theObject) CORBA::Long SMESH_Gen_i::GetObjectId(CORBA::Object_ptr theObject)
{ {
if ( myStudyContext && !CORBA::is_nil( theObject )) { if ( myStudyContext && !CORBA::is_nil( theObject )) {
string iorString = GetORB()->object_to_string( theObject ); string iorString = GetORB()->object_to_string( theObject );
@ -6548,7 +6548,7 @@ std::vector<long> SMESH_Gen_i::_GetInside( SMESH::SMESH_IDSource_ptr meshPart,
SMESH::SMESH_Group_var gsource = SMESH::SMESH_Group::_narrow(meshPart); SMESH::SMESH_Group_var gsource = SMESH::SMESH_Group::_narrow(meshPart);
if ( !gsource->_is_nil() ) { if ( !gsource->_is_nil() ) {
if(theElemType == SMESH::NODE) { if(theElemType == SMESH::NODE) {
SMESH::long_array_var nodes = gsource->GetNodeIDs(); SMESH::smIdType_array_var nodes = gsource->GetNodeIDs();
for ( CORBA::ULong i = 0; i < nodes->length(); ++i ) { for ( CORBA::ULong i = 0; i < nodes->length(); ++i ) {
if ( const SMDS_MeshNode* node = meshDS->FindNode( nodes[i] )) { if ( const SMDS_MeshNode* node = meshDS->FindNode( nodes[i] )) {
long anId = node->GetID(); long anId = node->GetID();
@ -6557,7 +6557,7 @@ std::vector<long> SMESH_Gen_i::_GetInside( SMESH::SMESH_IDSource_ptr meshPart,
} }
} }
} else if (gsource->GetType() == theElemType || theElemType == SMESH::ALL ) { } else if (gsource->GetType() == theElemType || theElemType == SMESH::ALL ) {
SMESH::long_array_var elems = gsource->GetListOfID(); SMESH::smIdType_array_var elems = gsource->GetListOfID();
for ( CORBA::ULong i = 0; i < elems->length(); ++i ) { for ( CORBA::ULong i = 0; i < elems->length(); ++i ) {
if ( const SMDS_MeshElement* elem = meshDS->FindElement( elems[i] )) { if ( const SMDS_MeshElement* elem = meshDS->FindElement( elems[i] )) {
long anId = elem->GetID(); long anId = elem->GetID();
@ -6569,7 +6569,7 @@ std::vector<long> SMESH_Gen_i::_GetInside( SMESH::SMESH_IDSource_ptr meshPart,
} }
SMESH::SMESH_subMesh_var smsource = SMESH::SMESH_subMesh::_narrow(meshPart); SMESH::SMESH_subMesh_var smsource = SMESH::SMESH_subMesh::_narrow(meshPart);
if ( !smsource->_is_nil() ) { if ( !smsource->_is_nil() ) {
SMESH::long_array_var elems = smsource->GetElementsByType( theElemType ); SMESH::smIdType_array_var elems = smsource->GetElementsByType( theElemType );
for ( CORBA::ULong i = 0; i < elems->length(); ++i ) { for ( CORBA::ULong i = 0; i < elems->length(); ++i ) {
const SMDS_MeshElement* elem = ( theElemType == SMESH::NODE ) ? meshDS->FindNode( elems[i] ) : meshDS->FindElement( elems[i] ); const SMDS_MeshElement* elem = ( theElemType == SMESH::NODE ) ? meshDS->FindNode( elems[i] ) : meshDS->FindElement( elems[i] );
if (elem) { if (elem) {

View File

@ -322,12 +322,12 @@ public:
// Return geometrical object the given element is built on. Publish it in study. // Return geometrical object the given element is built on. Publish it in study.
GEOM::GEOM_Object_ptr GetGeometryByMeshElement( SMESH::SMESH_Mesh_ptr theMesh, GEOM::GEOM_Object_ptr GetGeometryByMeshElement( SMESH::SMESH_Mesh_ptr theMesh,
CORBA::Long theElementID, SMESH::smIdType theElementID,
const char* theGeomName); const char* theGeomName);
// Return geometrical object the given element is built on. Don't publish it in study. // Return geometrical object the given element is built on. Don't publish it in study.
GEOM::GEOM_Object_ptr FindGeometryByMeshElement( SMESH::SMESH_Mesh_ptr theMesh, GEOM::GEOM_Object_ptr FindGeometryByMeshElement( SMESH::SMESH_Mesh_ptr theMesh,
CORBA::Long theElementID); SMESH::smIdType theElementID);
// Concatenate the given meshes into one mesh // Concatenate the given meshes into one mesh
SMESH::SMESH_Mesh_ptr ConcatenateCommon(const SMESH::ListOfIDSources& meshesArray, SMESH::SMESH_Mesh_ptr ConcatenateCommon(const SMESH::ListOfIDSources& meshesArray,
@ -537,7 +537,7 @@ public:
int RegisterObject(CORBA::Object_ptr theObject); int RegisterObject(CORBA::Object_ptr theObject);
// Return id of registered object // Return id of registered object
SMESH::smIdType GetObjectId(CORBA::Object_ptr theObject); CORBA::Long GetObjectId(CORBA::Object_ptr theObject);
// Return an object that previously had an oldID // Return an object that previously had an oldID
template<class TInterface> template<class TInterface>

View File

@ -1001,7 +1001,7 @@ void SMESH_Gen_i::UpdateIcons( SMESH::SMESH_Mesh_ptr theMesh )
{ {
if ( isGroupOnFilter ) // GetTypes() can be very long on GroupOnFilter! if ( isGroupOnFilter ) // GetTypes() can be very long on GroupOnFilter!
{ {
SMESH::long_array_var nbByType = mesh_i->GetNbElementsByType(); SMESH::smIdType_array_var nbByType = mesh_i->GetNbElementsByType();
isEmpty = ( nbByType[ grp->GetType() ] == 0 ); isEmpty = ( nbByType[ grp->GetType() ] == 0 );
} }
else else

View File

@ -209,7 +209,7 @@ SMESH::ElementType SMESH_GroupBase_i::GetType()
*/ */
//============================================================================= //=============================================================================
SMESH::smIdType SMESH_GroupBase_i::Size() CORBA::Long SMESH_GroupBase_i::Size()
{ {
if ( myPreMeshInfo ) if ( myPreMeshInfo )
return GetType() == SMESH::NODE ? myPreMeshInfo->NbNodes() : myPreMeshInfo->NbElements(); return GetType() == SMESH::NODE ? myPreMeshInfo->NbNodes() : myPreMeshInfo->NbElements();
@ -281,7 +281,7 @@ void SMESH_Group_i::Clear()
*/ */
//============================================================================= //=============================================================================
CORBA::Boolean SMESH_GroupBase_i::Contains( CORBA::Long theID ) CORBA::Boolean SMESH_GroupBase_i::Contains( SMESH::smIdType theID )
{ {
if ( myPreMeshInfo ) if ( myPreMeshInfo )
myPreMeshInfo->FullLoadFromFile(); myPreMeshInfo->FullLoadFromFile();
@ -298,7 +298,7 @@ CORBA::Boolean SMESH_GroupBase_i::Contains( CORBA::Long theID )
*/ */
//============================================================================= //=============================================================================
SMESH::smIdType SMESH_Group_i::Add( const SMESH::long_array& theIDs ) SMESH::smIdType SMESH_Group_i::Add( const SMESH::smIdType_array& theIDs )
{ {
if ( myPreMeshInfo ) if ( myPreMeshInfo )
myPreMeshInfo->FullLoadFromFile(); myPreMeshInfo->FullLoadFromFile();
@ -329,7 +329,7 @@ SMESH::smIdType SMESH_Group_i::Add( const SMESH::long_array& theIDs )
*/ */
//============================================================================= //=============================================================================
SMESH::smIdType SMESH_Group_i::Remove( const SMESH::long_array& theIDs ) SMESH::smIdType SMESH_Group_i::Remove( const SMESH::smIdType_array& theIDs )
{ {
if ( myPreMeshInfo ) if ( myPreMeshInfo )
myPreMeshInfo->FullLoadFromFile(); myPreMeshInfo->FullLoadFromFile();
@ -445,7 +445,7 @@ SMESH::smIdType SMESH_Group_i::AddFrom( SMESH::SMESH_IDSource_ptr theSource )
*/ */
//============================================================================= //=============================================================================
SMESH::smIdType SMESH_GroupBase_i::GetID( CORBA::Long theIndex ) SMESH::smIdType SMESH_GroupBase_i::GetID( SMESH::smIdType theIndex )
{ {
if ( myPreMeshInfo ) if ( myPreMeshInfo )
myPreMeshInfo->FullLoadFromFile(); myPreMeshInfo->FullLoadFromFile();
@ -463,12 +463,12 @@ SMESH::smIdType SMESH_GroupBase_i::GetID( CORBA::Long theIndex )
*/ */
//============================================================================= //=============================================================================
SMESH::long_array* SMESH_GroupBase_i::GetListOfID() SMESH::smIdType_array* SMESH_GroupBase_i::GetListOfID()
{ {
if ( myPreMeshInfo ) if ( myPreMeshInfo )
myPreMeshInfo->FullLoadFromFile(); myPreMeshInfo->FullLoadFromFile();
SMESH::long_array_var aRes = new SMESH::long_array(); SMESH::smIdType_array_var aRes = new SMESH::smIdType_array();
SMESHDS_GroupBase* aGroupDS = GetGroupDS(); SMESHDS_GroupBase* aGroupDS = GetGroupDS();
if (aGroupDS) if (aGroupDS)
{ {
@ -553,7 +553,7 @@ CORBA::Boolean SMESH_GroupBase_i::IsNodeInfoAvailable()
*/ */
//================================================================================ //================================================================================
SMESH::long_array* SMESH_GroupBase_i::GetNodeIDs() SMESH::smIdType_array* SMESH_GroupBase_i::GetNodeIDs()
{ {
if ( GetType() == SMESH::NODE ) if ( GetType() == SMESH::NODE )
return GetListOfID(); return GetListOfID();
@ -561,7 +561,7 @@ SMESH::long_array* SMESH_GroupBase_i::GetNodeIDs()
if ( myPreMeshInfo ) if ( myPreMeshInfo )
myPreMeshInfo->FullLoadFromFile(); myPreMeshInfo->FullLoadFromFile();
SMESH::long_array_var aRes = new SMESH::long_array(); SMESH::smIdType_array_var aRes = new SMESH::smIdType_array();
if ( SMESHDS_GroupBase* g = GetGroupDS()) if ( SMESHDS_GroupBase* g = GetGroupDS())
{ {
std::set<const SMDS_MeshNode* > nodes; std::set<const SMDS_MeshNode* > nodes;
@ -651,7 +651,7 @@ void SMESH_GroupBase_i::SetColor(const SALOMEDS::Color& color)
* *
*/ */
//============================================================================= //=============================================================================
SMESH::smIdType SMESH_GroupBase_i::GetColorNumber() CORBA::Long SMESH_GroupBase_i::GetColorNumber()
{ {
SMESHDS_GroupBase* aGroupDS = GetGroupDS(); SMESHDS_GroupBase* aGroupDS = GetGroupDS();
if (aGroupDS) if (aGroupDS)
@ -684,12 +684,12 @@ void SMESH_GroupBase_i::SetColorNumber(CORBA::Long color)
*/ */
//============================================================================= //=============================================================================
SMESH::long_array* SMESH_GroupBase_i::GetMeshInfo() SMESH::smIdType_array* SMESH_GroupBase_i::GetMeshInfo()
{ {
if ( myPreMeshInfo ) if ( myPreMeshInfo )
return myPreMeshInfo->GetMeshInfo(); return myPreMeshInfo->GetMeshInfo();
SMESH::long_array_var aRes = new SMESH::long_array(); SMESH::smIdType_array_var aRes = new SMESH::smIdType_array();
aRes->length(SMESH::Entity_Last); aRes->length(SMESH::Entity_Last);
for (int i = SMESH::Entity_Node; i < SMESH::Entity_Last; i++) for (int i = SMESH::Entity_Node; i < SMESH::Entity_Last; i++)
aRes[i] = 0; aRes[i] = 0;
@ -712,9 +712,9 @@ SMESH::long_array* SMESH_GroupBase_i::GetMeshInfo()
*/ */
//============================================================================= //=============================================================================
SMESH::long_array* SMESH_GroupBase_i::GetNbElementsByType() SMESH::smIdType_array* SMESH_GroupBase_i::GetNbElementsByType()
{ {
SMESH::long_array_var aRes = new SMESH::long_array(); SMESH::smIdType_array_var aRes = new SMESH::smIdType_array();
aRes->length(SMESH::NB_ELEMENT_TYPES); aRes->length(SMESH::NB_ELEMENT_TYPES);
for (int i = 0; i < SMESH::NB_ELEMENT_TYPES; i++) for (int i = 0; i < SMESH::NB_ELEMENT_TYPES; i++)
aRes[ i ] = 0; aRes[ i ] = 0;
@ -732,7 +732,7 @@ SMESH::long_array* SMESH_GroupBase_i::GetNbElementsByType()
//purpose : Return ids of members //purpose : Return ids of members
//======================================================================= //=======================================================================
SMESH::long_array* SMESH_GroupBase_i::GetIDs() SMESH::smIdType_array* SMESH_GroupBase_i::GetIDs()
{ {
return GetListOfID(); return GetListOfID();
} }
@ -893,12 +893,12 @@ bool SMESH_GroupOnFilter_i::IsMeshInfoCorrect()
//purpose : Return ids of members //purpose : Return ids of members
//======================================================================= //=======================================================================
SMESH::long_array* SMESH_GroupOnFilter_i::GetListOfID() SMESH::smIdType_array* SMESH_GroupOnFilter_i::GetListOfID()
{ {
if ( myPreMeshInfo ) if ( myPreMeshInfo )
myPreMeshInfo->FullLoadFromFile(); myPreMeshInfo->FullLoadFromFile();
SMESH::long_array_var aRes = new SMESH::long_array(); SMESH::smIdType_array_var aRes = new SMESH::smIdType_array();
SMESHDS_GroupBase* aGroupDS = GetGroupDS(); SMESHDS_GroupBase* aGroupDS = GetGroupDS();
if ( SMESHDS_GroupOnFilter* grDS = dynamic_cast< SMESHDS_GroupOnFilter*>( GetGroupDS() )) if ( SMESHDS_GroupOnFilter* grDS = dynamic_cast< SMESHDS_GroupOnFilter*>( GetGroupDS() ))
{ {
@ -921,12 +921,12 @@ SMESH::long_array* SMESH_GroupOnFilter_i::GetListOfID()
*/ */
//============================================================================= //=============================================================================
SMESH::long_array* SMESH_GroupOnFilter_i::GetMeshInfo() SMESH::smIdType_array* SMESH_GroupOnFilter_i::GetMeshInfo()
{ {
if ( myPreMeshInfo ) if ( myPreMeshInfo )
return myPreMeshInfo->GetMeshInfo(); return myPreMeshInfo->GetMeshInfo();
SMESH::long_array_var aRes = new SMESH::long_array(); SMESH::smIdType_array_var aRes = new SMESH::smIdType_array();
aRes->length(SMESH::Entity_Last); aRes->length(SMESH::Entity_Last);
for (int i = SMESH::Entity_Node; i < SMESH::Entity_Last; i++) for (int i = SMESH::Entity_Node; i < SMESH::Entity_Last; i++)
aRes[i] = 0; aRes[i] = 0;

View File

@ -61,12 +61,12 @@ class SMESH_I_EXPORT SMESH_GroupBase_i:
void SetName(const char* name); void SetName(const char* name);
char* GetName(); char* GetName();
SMESH::ElementType GetType(); SMESH::ElementType GetType();
SMESH::smIdType Size(); CORBA::Long Size();
CORBA::Boolean IsEmpty(); CORBA::Boolean IsEmpty();
CORBA::Boolean Contains(CORBA::Long elem_id); CORBA::Boolean Contains(SMESH::smIdType elem_id);
SMESH::smIdType GetID(CORBA::Long elem_index); SMESH::smIdType GetID(SMESH::smIdType elem_index);
SMESH::long_array* GetListOfID(); SMESH::smIdType_array* GetListOfID();
SMESH::long_array* GetNodeIDs(); SMESH::smIdType_array* GetNodeIDs();
SMESH::smIdType GetNumberOfNodes(); SMESH::smIdType GetNumberOfNodes();
CORBA::Boolean IsNodeInfoAvailable(); // for gui CORBA::Boolean IsNodeInfoAvailable(); // for gui
@ -77,15 +77,15 @@ class SMESH_I_EXPORT SMESH_GroupBase_i:
* Result array of number of elements per \a EntityType * Result array of number of elements per \a EntityType
* Inherited from SMESH_IDSource * Inherited from SMESH_IDSource
*/ */
virtual SMESH::long_array* GetMeshInfo(); virtual SMESH::smIdType_array* GetMeshInfo();
/*! /*!
* Returns number of mesh elements of each \a ElementType * Returns number of mesh elements of each \a ElementType
*/ */
virtual SMESH::long_array* GetNbElementsByType(); virtual SMESH::smIdType_array* GetNbElementsByType();
/*! /*!
* Returns a sequence of all element IDs * Returns a sequence of all element IDs
*/ */
virtual SMESH::long_array* GetIDs(); virtual SMESH::smIdType_array* GetIDs();
/*! /*!
* Returns types of elements it contains * Returns types of elements it contains
* Inherited from SMESH_IDSource interface * Inherited from SMESH_IDSource interface
@ -118,7 +118,7 @@ class SMESH_I_EXPORT SMESH_GroupBase_i:
SALOMEDS::Color GetColor(); SALOMEDS::Color GetColor();
void SetColorNumber(CORBA::Long color); void SetColorNumber(CORBA::Long color);
SMESH::smIdType GetColorNumber(); CORBA::Long GetColorNumber();
protected: protected:
@ -150,8 +150,8 @@ class SMESH_I_EXPORT SMESH_Group_i:
const int theLocalID ); const int theLocalID );
// CORBA interface implementation // CORBA interface implementation
void Clear(); void Clear();
SMESH::smIdType Add( const SMESH::long_array& theIDs ); SMESH::smIdType Add( const SMESH::smIdType_array& theIDs );
SMESH::smIdType Remove( const SMESH::long_array& theIDs ); SMESH::smIdType Remove( const SMESH::smIdType_array& theIDs );
SMESH::smIdType AddByPredicate( SMESH::Predicate_ptr thePredicate ); SMESH::smIdType AddByPredicate( SMESH::Predicate_ptr thePredicate );
SMESH::smIdType RemoveByPredicate( SMESH::Predicate_ptr thePredicate ); SMESH::smIdType RemoveByPredicate( SMESH::Predicate_ptr thePredicate );
@ -199,8 +199,8 @@ class SMESH_I_EXPORT SMESH_GroupOnFilter_i:
void SetFilter(SMESH::Filter_ptr theFilter); void SetFilter(SMESH::Filter_ptr theFilter);
SMESH::Filter_ptr GetFilter(); SMESH::Filter_ptr GetFilter();
virtual CORBA::Boolean IsUpToDate(); virtual CORBA::Boolean IsUpToDate();
virtual SMESH::long_array* GetListOfID(); virtual SMESH::smIdType_array* GetListOfID();
virtual SMESH::long_array* GetMeshInfo(); virtual SMESH::smIdType_array* GetMeshInfo();
//! @return false in two cases: 1) if mesh not loaded and GetMeshInfo() returns //! @return false in two cases: 1) if mesh not loaded and GetMeshInfo() returns
//! incorrect information 2) mesh loaded but group contents is not computed. //! incorrect information 2) mesh loaded but group contents is not computed.
virtual bool IsMeshInfoCorrect(); virtual bool IsMeshInfoCorrect();

View File

@ -114,7 +114,7 @@ void SMESH_Hypothesis_i::SetLibName(const char* theLibName)
*/ */
//============================================================================= //=============================================================================
SMESH::smIdType SMESH_Hypothesis_i::GetId() CORBA::Short SMESH_Hypothesis_i::GetId()
{ {
return myBaseImpl->GetID(); return myBaseImpl->GetID();
} }

View File

@ -69,7 +69,7 @@ public:
void SetLibName( const char* theLibName ); void SetLibName( const char* theLibName );
// Get unique id of hypothesis // Get unique id of hypothesis
virtual SMESH::smIdType GetId(); virtual CORBA::Short GetId();
// Return true if a hypothesis has parameters // Return true if a hypothesis has parameters
virtual CORBA::Boolean HasParameters(); virtual CORBA::Boolean HasParameters();

View File

@ -174,7 +174,7 @@ static double getNumericalValue(SMESH::SMESH_IDSource_ptr theSource,
if ( aMesh ) { if ( aMesh ) {
theFunctor->SetMesh( aMesh ); theFunctor->SetMesh( aMesh );
SMESH::long_array_var anElementsId = theSource->GetIDs(); SMESH::smIdType_array_var anElementsId = theSource->GetIDs();
for ( CORBA::ULong i = 0; i < anElementsId->length(); i++) { for ( CORBA::ULong i = 0; i < anElementsId->length(); i++) {
value += theFunctor->GetValue( anElementsId[i] ); value += theFunctor->GetValue( anElementsId[i] );
} }
@ -209,8 +209,8 @@ SMESH::Measure Measurements_i::MinDistance
bool isNode1 = isNodeType(types1); bool isNode1 = isNodeType(types1);
bool isNode2 = isOrigin || isNodeType(types2); bool isNode2 = isOrigin || isNodeType(types2);
SMESH::long_array_var aElementsId1 = theSource1->GetIDs(); SMESH::smIdType_array_var aElementsId1 = theSource1->GetIDs();
SMESH::long_array_var aElementsId2; SMESH::smIdType_array_var aElementsId2;
// compute distance between two entities // compute distance between two entities
/* NOTE: currently only node-to-node case is implemented /* NOTE: currently only node-to-node case is implemented
@ -297,7 +297,7 @@ static void enlargeBoundingBox(const SMESH::SMESH_IDSource_ptr theObject,
else else
{ {
SMESH::array_of_ElementType_var types = theObject->GetTypes(); SMESH::array_of_ElementType_var types = theObject->GetTypes();
SMESH::long_array_var aElementsId = theObject->GetIDs(); SMESH::smIdType_array_var aElementsId = theObject->GetIDs();
// here we assume that type of all IDs defined by first type in array // here we assume that type of all IDs defined by first type in array
const bool isNode = isNodeType( types ); const bool isNode = isNodeType( types );
for(int i = 0, n = aElementsId->length(); i < n; i++) for(int i = 0, n = aElementsId->length(); i < n; i++)

View File

@ -264,11 +264,11 @@ namespace MeshEditor_I {
*/ */
//================================================================================ //================================================================================
void arrayToSet(const SMESH::long_array & IDs, void arrayToSet(const SMESH::smIdType_array & IDs,
const SMESHDS_Mesh* aMesh, const SMESHDS_Mesh* aMesh,
TIDSortedElemSet& aMap, TIDSortedElemSet& aMap,
const SMDSAbs_ElementType aType = SMDSAbs_All, const SMDSAbs_ElementType aType = SMDSAbs_All,
SMDS_MeshElement::Filter* aFilter = NULL) SMDS_MeshElement::Filter* aFilter = NULL)
{ {
SMDS_MeshElement::NonNullFilter filter1; SMDS_MeshElement::NonNullFilter filter1;
SMDS_MeshElement::TypeFilter filter2( aType ); SMDS_MeshElement::TypeFilter filter2( aType );
@ -279,13 +279,13 @@ namespace MeshEditor_I {
SMDS_MeshElement::Filter & filter = *aFilter; SMDS_MeshElement::Filter & filter = *aFilter;
if ( aType == SMDSAbs_Node ) if ( aType == SMDSAbs_Node )
for ( CORBA::ULong i = 0; i < IDs.length(); i++ ) { for ( SMESH::smIdType i = 0; i < IDs.length(); i++ ) {
const SMDS_MeshElement * elem = aMesh->FindNode( IDs[i] ); const SMDS_MeshElement * elem = aMesh->FindNode( IDs[i] );
if ( filter( elem )) if ( filter( elem ))
aMap.insert( aMap.end(), elem ); aMap.insert( aMap.end(), elem );
} }
else else
for ( CORBA::ULong i = 0; i<IDs.length(); i++) { for ( SMESH::smIdType i = 0; i<IDs.length(); i++) {
const SMDS_MeshElement * elem = aMesh->FindElement( IDs[i] ); const SMDS_MeshElement * elem = aMesh->FindElement( IDs[i] );
if ( filter( elem )) if ( filter( elem ))
aMap.insert( aMap.end(), elem ); aMap.insert( aMap.end(), elem );
@ -314,7 +314,7 @@ namespace MeshEditor_I {
else else
{ {
SMESH::array_of_ElementType_var types = theObject->GetTypes(); SMESH::array_of_ElementType_var types = theObject->GetTypes();
SMESH::long_array_var aElementsId = theObject->GetIDs(); SMESH::smIdType_array_var aElementsId = theObject->GetIDs();
if ( types->length() == 1 && types[0] == SMESH::NODE) if ( types->length() == 1 && types[0] == SMESH::NODE)
{ {
for ( CORBA::ULong i = 0; i < aElementsId->length(); i++ ) for ( CORBA::ULong i = 0; i < aElementsId->length(); i++ )
@ -615,14 +615,14 @@ SMESH::MeshPreviewStruct* SMESH_MeshEditor_i::GetPreviewData()
*/ */
//================================================================================ //================================================================================
SMESH::long_array* SMESH_MeshEditor_i::GetLastCreatedNodes() SMESH::smIdType_array* SMESH_MeshEditor_i::GetLastCreatedNodes()
{ {
SMESH_TRY; SMESH_TRY;
SMESH::long_array_var myLastCreatedNodes = new SMESH::long_array(); SMESH::smIdType_array_var myLastCreatedNodes = new SMESH::smIdType_array();
const SMESH_SequenceOfElemPtr& aSeq = getEditor().GetLastCreatedNodes(); const SMESH_SequenceOfElemPtr& aSeq = getEditor().GetLastCreatedNodes();
myLastCreatedNodes->length( aSeq.size() ); myLastCreatedNodes->length( aSeq.size() );
for ( size_t i = 0; i < aSeq.size(); i++) for ( smIdType i = 0; i < aSeq.size(); i++)
myLastCreatedNodes[i] = aSeq[i]->GetID(); myLastCreatedNodes[i] = aSeq[i]->GetID();
return myLastCreatedNodes._retn(); return myLastCreatedNodes._retn();
@ -637,14 +637,14 @@ SMESH::long_array* SMESH_MeshEditor_i::GetLastCreatedNodes()
*/ */
//================================================================================ //================================================================================
SMESH::long_array* SMESH_MeshEditor_i::GetLastCreatedElems() SMESH::smIdType_array* SMESH_MeshEditor_i::GetLastCreatedElems()
{ {
SMESH_TRY; SMESH_TRY;
SMESH::long_array_var myLastCreatedElems = new SMESH::long_array(); SMESH::smIdType_array_var myLastCreatedElems = new SMESH::smIdType_array();
const SMESH_SequenceOfElemPtr& aSeq = getEditor().GetLastCreatedElems(); const SMESH_SequenceOfElemPtr& aSeq = getEditor().GetLastCreatedElems();
myLastCreatedElems->length( aSeq.size() ); myLastCreatedElems->length( aSeq.size() );
for ( size_t i = 0; i < aSeq.size(); i++ ) for ( smIdType i = 0; i < aSeq.size(); i++ )
myLastCreatedElems[i] = aSeq[i]->GetID(); myLastCreatedElems[i] = aSeq[i]->GetID();
return myLastCreatedElems._retn(); return myLastCreatedElems._retn();
@ -704,16 +704,16 @@ SMESH::ComputeError* SMESH_MeshEditor_i::GetLastError()
struct SMESH_MeshEditor_i::_IDSource : public virtual POA_SMESH::SMESH_IDSource, struct SMESH_MeshEditor_i::_IDSource : public virtual POA_SMESH::SMESH_IDSource,
public virtual SALOME::GenericObj_i public virtual SALOME::GenericObj_i
{ {
SMESH::long_array _ids; SMESH::smIdType_array _ids;
SMESH::ElementType _type; SMESH::ElementType _type;
SMESH::SMESH_Mesh_ptr _mesh; SMESH::SMESH_Mesh_ptr _mesh;
SMESH::long_array* GetIDs() { return new SMESH::long_array( _ids ); } SMESH::smIdType_array* GetIDs() { return new SMESH::smIdType_array( _ids ); }
SMESH::long_array* GetMeshInfo() { return 0; } SMESH::smIdType_array* GetMeshInfo() { return 0; }
SMESH::long_array* GetNbElementsByType() SMESH::smIdType_array* GetNbElementsByType()
{ {
SMESH::long_array_var aRes = new SMESH::long_array(); SMESH::smIdType_array_var aRes = new SMESH::smIdType_array();
aRes->length(SMESH::NB_ELEMENT_TYPES); aRes->length(SMESH::NB_ELEMENT_TYPES);
for (int i = 0; i < SMESH::NB_ELEMENT_TYPES; i++) for (smIdType i = 0; i < SMESH::NB_ELEMENT_TYPES; i++)
aRes[ i ] = ( i == _type ) ? _ids.length() : 0; aRes[ i ] = ( i == _type ) ? _ids.length() : 0;
return aRes._retn(); return aRes._retn();
} }
@ -735,8 +735,8 @@ struct SMESH_MeshEditor_i::_IDSource : public virtual POA_SMESH::SMESH_IDSource,
} }
}; };
SMESH::SMESH_IDSource_ptr SMESH_MeshEditor_i::MakeIDSource(const SMESH::long_array& ids, SMESH::SMESH_IDSource_ptr SMESH_MeshEditor_i::MakeIDSource(const SMESH::smIdType_array& ids,
SMESH::ElementType type) SMESH::ElementType type)
{ {
_IDSource* idSrc = new _IDSource; _IDSource* idSrc = new _IDSource;
idSrc->_mesh = myMesh_i->_this(); idSrc->_mesh = myMesh_i->_this();
@ -782,7 +782,7 @@ SMESH::smIdType* SMESH_MeshEditor_i::GetTemporaryIDs( SMESH::SMESH_IDSource_ptr&
//============================================================================= //=============================================================================
CORBA::Boolean CORBA::Boolean
SMESH_MeshEditor_i::RemoveElements(const SMESH::long_array & IDsOfElements) SMESH_MeshEditor_i::RemoveElements(const SMESH::smIdType_array & IDsOfElements)
{ {
SMESH_TRY; SMESH_TRY;
initData(); initData();
@ -811,7 +811,7 @@ SMESH_MeshEditor_i::RemoveElements(const SMESH::long_array & IDsOfElements)
*/ */
//============================================================================= //=============================================================================
CORBA::Boolean SMESH_MeshEditor_i::RemoveNodes(const SMESH::long_array & IDsOfNodes) CORBA::Boolean SMESH_MeshEditor_i::RemoveNodes(const SMESH::smIdType_array & IDsOfNodes)
{ {
SMESH_TRY; SMESH_TRY;
initData(); initData();
@ -895,8 +895,8 @@ SMESH::smIdType SMESH_MeshEditor_i::AddNode(CORBA::Double x,CORBA::Double y, COR
*/ */
//============================================================================= //=============================================================================
SMESH::smIdType SMESH_MeshEditor_i::Add0DElement(CORBA::Long IDOfNode, SMESH::smIdType SMESH_MeshEditor_i::Add0DElement(SMESH::smIdType IDOfNode,
CORBA::Boolean DuplicateElements) CORBA::Boolean DuplicateElements)
{ {
SMESH_TRY; SMESH_TRY;
initData(); initData();
@ -925,7 +925,7 @@ SMESH::smIdType SMESH_MeshEditor_i::Add0DElement(CORBA::Long IDOfNode,
*/ */
//============================================================================= //=============================================================================
SMESH::smIdType SMESH_MeshEditor_i::AddBall(CORBA::Long IDOfNode, CORBA::Double diameter) SMESH::smIdType SMESH_MeshEditor_i::AddBall(SMESH::smIdType IDOfNode, CORBA::Double diameter)
{ {
SMESH_TRY; SMESH_TRY;
initData(); initData();
@ -954,7 +954,7 @@ SMESH::smIdType SMESH_MeshEditor_i::AddBall(CORBA::Long IDOfNode, CORBA::Double
*/ */
//============================================================================= //=============================================================================
SMESH::smIdType SMESH_MeshEditor_i::AddEdge(const SMESH::long_array & IDsOfNodes) SMESH::smIdType SMESH_MeshEditor_i::AddEdge(const SMESH::smIdType_array & IDsOfNodes)
{ {
SMESH_TRY; SMESH_TRY;
initData(); initData();
@ -997,7 +997,7 @@ SMESH::smIdType SMESH_MeshEditor_i::AddEdge(const SMESH::long_array & IDsOfNodes
*/ */
//============================================================================= //=============================================================================
SMESH::smIdType SMESH_MeshEditor_i::AddFace(const SMESH::long_array & IDsOfNodes) SMESH::smIdType SMESH_MeshEditor_i::AddFace(const SMESH::smIdType_array & IDsOfNodes)
{ {
SMESH_TRY; SMESH_TRY;
initData(); initData();
@ -1045,7 +1045,7 @@ SMESH::smIdType SMESH_MeshEditor_i::AddFace(const SMESH::long_array & IDsOfNodes
*/ */
//============================================================================= //=============================================================================
SMESH::smIdType SMESH_MeshEditor_i::AddPolygonalFace (const SMESH::long_array & IDsOfNodes) SMESH::smIdType SMESH_MeshEditor_i::AddPolygonalFace (const SMESH::smIdType_array & IDsOfNodes)
{ {
SMESH_TRY; SMESH_TRY;
initData(); initData();
@ -1080,7 +1080,7 @@ SMESH::smIdType SMESH_MeshEditor_i::AddPolygonalFace (const SMESH::long_array &
*/ */
//============================================================================= //=============================================================================
SMESH::smIdType SMESH_MeshEditor_i::AddQuadPolygonalFace (const SMESH::long_array & IDsOfNodes) SMESH::smIdType SMESH_MeshEditor_i::AddQuadPolygonalFace (const SMESH::smIdType_array & IDsOfNodes)
{ {
SMESH_TRY; SMESH_TRY;
initData(); initData();
@ -1115,7 +1115,7 @@ SMESH::smIdType SMESH_MeshEditor_i::AddQuadPolygonalFace (const SMESH::long_arra
*/ */
//============================================================================= //=============================================================================
SMESH::smIdType SMESH_MeshEditor_i::AddVolume(const SMESH::long_array & IDsOfNodes) SMESH::smIdType SMESH_MeshEditor_i::AddVolume(const SMESH::smIdType_array & IDsOfNodes)
{ {
SMESH_TRY; SMESH_TRY;
initData(); initData();
@ -1174,7 +1174,7 @@ SMESH::smIdType SMESH_MeshEditor_i::AddVolume(const SMESH::long_array & IDsOfNod
* AddPolyhedralVolume * AddPolyhedralVolume
*/ */
//============================================================================= //=============================================================================
SMESH::smIdType SMESH_MeshEditor_i::AddPolyhedralVolume (const SMESH::long_array & IDsOfNodes, SMESH::smIdType SMESH_MeshEditor_i::AddPolyhedralVolume (const SMESH::smIdType_array & IDsOfNodes,
const SMESH::long_array & Quantities) const SMESH::long_array & Quantities)
{ {
SMESH_TRY; SMESH_TRY;
@ -1213,7 +1213,7 @@ SMESH::smIdType SMESH_MeshEditor_i::AddPolyhedralVolume (const SMESH::long_array
*/ */
//============================================================================= //=============================================================================
SMESH::smIdType SMESH_MeshEditor_i::AddPolyhedralVolumeByFaces (const SMESH::long_array & IdsOfFaces) SMESH::smIdType SMESH_MeshEditor_i::AddPolyhedralVolumeByFaces (const SMESH::smIdType_array & IdsOfFaces)
{ {
SMESH_TRY; SMESH_TRY;
initData(); initData();
@ -1272,10 +1272,10 @@ SMESH_MeshEditor_i::Create0DElementsOnAllNodes(SMESH::SMESH_IDSource_ptr theObje
if ( idSourceToSet( theObject, getMeshDS(), elements, SMDSAbs_All, /*emptyIfIsMesh=*/1)) if ( idSourceToSet( theObject, getMeshDS(), elements, SMDSAbs_All, /*emptyIfIsMesh=*/1))
getEditor().Create0DElementsOnAllNodes( elements, elems0D, theDuplicateElements ); getEditor().Create0DElementsOnAllNodes( elements, elems0D, theDuplicateElements );
SMESH::long_array_var newElems = new SMESH::long_array; SMESH::smIdType_array_var newElems = new SMESH::smIdType_array;
newElems->length( elems0D.size() ); newElems->length( elems0D.size() );
TIDSortedElemSet::iterator eIt = elems0D.begin(); TIDSortedElemSet::iterator eIt = elems0D.begin();
for ( size_t i = 0; i < elems0D.size(); ++i, ++eIt ) for ( smIdType i = 0; i < elems0D.size(); ++i, ++eIt )
newElems[ i ] = (*eIt)->GetID(); newElems[ i ] = (*eIt)->GetID();
SMESH::SMESH_GroupBase_var groupToFill; SMESH::SMESH_GroupBase_var groupToFill;
@ -1329,7 +1329,7 @@ SMESH_MeshEditor_i::Create0DElementsOnAllNodes(SMESH::SMESH_IDSource_ptr theObje
*/ */
//============================================================================= //=============================================================================
void SMESH_MeshEditor_i::SetNodeOnVertex(CORBA::Long NodeID, CORBA::Long VertexID) void SMESH_MeshEditor_i::SetNodeOnVertex(SMESH::smIdType NodeID, CORBA::Long VertexID)
{ {
SMESH_TRY; SMESH_TRY;
@ -1362,7 +1362,7 @@ void SMESH_MeshEditor_i::SetNodeOnVertex(CORBA::Long NodeID, CORBA::Long VertexI
*/ */
//============================================================================= //=============================================================================
void SMESH_MeshEditor_i::SetNodeOnEdge(CORBA::Long NodeID, CORBA::Long EdgeID, void SMESH_MeshEditor_i::SetNodeOnEdge(SMESH::smIdType NodeID, CORBA::Long EdgeID,
CORBA::Double paramOnEdge) CORBA::Double paramOnEdge)
{ {
SMESH_TRY; SMESH_TRY;
@ -1405,7 +1405,7 @@ void SMESH_MeshEditor_i::SetNodeOnEdge(CORBA::Long NodeID, CORBA::Long EdgeID,
*/ */
//============================================================================= //=============================================================================
void SMESH_MeshEditor_i::SetNodeOnFace(CORBA::Long NodeID, CORBA::Long FaceID, void SMESH_MeshEditor_i::SetNodeOnFace(SMESH::smIdType NodeID, CORBA::Long FaceID,
CORBA::Double u, CORBA::Double v) CORBA::Double u, CORBA::Double v)
{ {
SMESH_TRY; SMESH_TRY;
@ -1450,7 +1450,7 @@ void SMESH_MeshEditor_i::SetNodeOnFace(CORBA::Long NodeID, CORBA::Long FaceID,
*/ */
//============================================================================= //=============================================================================
void SMESH_MeshEditor_i::SetNodeInVolume(CORBA::Long NodeID, CORBA::Long SolidID) void SMESH_MeshEditor_i::SetNodeInVolume(SMESH::smIdType NodeID, CORBA::Long SolidID)
{ {
SMESH_TRY; SMESH_TRY;
SMESHDS_Mesh * mesh = getMeshDS(); SMESHDS_Mesh * mesh = getMeshDS();
@ -1479,7 +1479,7 @@ void SMESH_MeshEditor_i::SetNodeInVolume(CORBA::Long NodeID, CORBA::Long SolidID
*/ */
//============================================================================= //=============================================================================
void SMESH_MeshEditor_i::SetMeshElementOnShape(CORBA::Long ElementID, void SMESH_MeshEditor_i::SetMeshElementOnShape(SMESH::smIdType ElementID,
CORBA::Long ShapeID) CORBA::Long ShapeID)
{ {
SMESH_TRY; SMESH_TRY;
@ -1511,8 +1511,8 @@ void SMESH_MeshEditor_i::SetMeshElementOnShape(CORBA::Long ElementID,
*/ */
//============================================================================= //=============================================================================
CORBA::Boolean SMESH_MeshEditor_i::InverseDiag(CORBA::Long NodeID1, CORBA::Boolean SMESH_MeshEditor_i::InverseDiag(SMESH::smIdType NodeID1,
CORBA::Long NodeID2) SMESH::smIdType NodeID2)
{ {
SMESH_TRY; SMESH_TRY;
initData(); initData();
@ -1541,8 +1541,8 @@ CORBA::Boolean SMESH_MeshEditor_i::InverseDiag(CORBA::Long NodeID1,
*/ */
//============================================================================= //=============================================================================
CORBA::Boolean SMESH_MeshEditor_i::DeleteDiag(CORBA::Long NodeID1, CORBA::Boolean SMESH_MeshEditor_i::DeleteDiag(SMESH::smIdType NodeID1,
CORBA::Long NodeID2) SMESH::smIdType NodeID2)
{ {
SMESH_TRY; SMESH_TRY;
initData(); initData();
@ -1573,7 +1573,7 @@ CORBA::Boolean SMESH_MeshEditor_i::DeleteDiag(CORBA::Long NodeID1,
*/ */
//============================================================================= //=============================================================================
CORBA::Boolean SMESH_MeshEditor_i::Reorient(const SMESH::long_array & IDsOfElements) CORBA::Boolean SMESH_MeshEditor_i::Reorient(const SMESH::smIdType_array & IDsOfElements)
{ {
SMESH_TRY; SMESH_TRY;
initData(); initData();
@ -1610,7 +1610,7 @@ CORBA::Boolean SMESH_MeshEditor_i::ReorientObject(SMESH::SMESH_IDSource_ptr theO
prepareIdSource( theObject ); prepareIdSource( theObject );
SMESH::long_array_var anElementsId = theObject->GetIDs(); SMESH::smIdType_array_var anElementsId = theObject->GetIDs();
CORBA::Boolean isDone = Reorient(anElementsId); CORBA::Boolean isDone = Reorient(anElementsId);
// Update Python script // Update Python script
@ -1718,7 +1718,7 @@ CORBA::Long SMESH_MeshEditor_i::Reorient2D(SMESH::SMESH_IDSource_ptr the2Dgroup,
//purpose : Reorient faces basing on orientation of adjacent volumes. //purpose : Reorient faces basing on orientation of adjacent volumes.
//======================================================================= //=======================================================================
SMESH::smIdType SMESH_MeshEditor_i::Reorient2DBy3D(const SMESH::ListOfIDSources& faceGroups, CORBA::Long SMESH_MeshEditor_i::Reorient2DBy3D(const SMESH::ListOfIDSources& faceGroups,
SMESH::SMESH_IDSource_ptr volumeGroup, SMESH::SMESH_IDSource_ptr volumeGroup,
CORBA::Boolean outsideNormal) CORBA::Boolean outsideNormal)
{ {
@ -1768,7 +1768,7 @@ SMESH::smIdType SMESH_MeshEditor_i::Reorient2DBy3D(const SMESH::ListOfIDSources&
*/ */
//============================================================================= //=============================================================================
CORBA::Boolean SMESH_MeshEditor_i::TriToQuad (const SMESH::long_array & IDsOfElements, CORBA::Boolean SMESH_MeshEditor_i::TriToQuad (const SMESH::smIdType_array & IDsOfElements,
SMESH::NumericalFunctor_ptr Criterion, SMESH::NumericalFunctor_ptr Criterion,
CORBA::Double MaxAngle) CORBA::Double MaxAngle)
{ {
@ -1826,7 +1826,7 @@ CORBA::Boolean SMESH_MeshEditor_i::TriToQuadObject (SMESH::SMESH_IDSource_ptr
TPythonDump aTPythonDump; // suppress dump in TriToQuad() TPythonDump aTPythonDump; // suppress dump in TriToQuad()
prepareIdSource( theObject ); prepareIdSource( theObject );
SMESH::long_array_var anElementsId = theObject->GetIDs(); SMESH::smIdType_array_var anElementsId = theObject->GetIDs();
CORBA::Boolean isDone = TriToQuad(anElementsId, Criterion, MaxAngle); CORBA::Boolean isDone = TriToQuad(anElementsId, Criterion, MaxAngle);
if ( !myIsPreviewMode ) { if ( !myIsPreviewMode ) {
@ -1850,7 +1850,7 @@ CORBA::Boolean SMESH_MeshEditor_i::TriToQuadObject (SMESH::SMESH_IDSource_ptr
*/ */
//============================================================================= //=============================================================================
CORBA::Boolean SMESH_MeshEditor_i::QuadToTri (const SMESH::long_array & IDsOfElements, CORBA::Boolean SMESH_MeshEditor_i::QuadToTri (const SMESH::smIdType_array & IDsOfElements,
SMESH::NumericalFunctor_ptr Criterion) SMESH::NumericalFunctor_ptr Criterion)
{ {
SMESH_TRY; SMESH_TRY;
@ -1896,7 +1896,7 @@ CORBA::Boolean SMESH_MeshEditor_i::QuadToTriObject (SMESH::SMESH_IDSource_ptr
TPythonDump aTPythonDump; // suppress dump in QuadToTri() TPythonDump aTPythonDump; // suppress dump in QuadToTri()
prepareIdSource( theObject ); prepareIdSource( theObject );
SMESH::long_array_var anElementsId = theObject->GetIDs(); SMESH::smIdType_array_var anElementsId = theObject->GetIDs();
CORBA::Boolean isDone = QuadToTri(anElementsId, Criterion); CORBA::Boolean isDone = QuadToTri(anElementsId, Criterion);
SMESH::NumericalFunctor_i* aNumericalFunctor = SMESH::NumericalFunctor_i* aNumericalFunctor =
@ -1943,7 +1943,7 @@ void SMESH_MeshEditor_i::QuadTo4Tri (SMESH::SMESH_IDSource_ptr theObject)
*/ */
//============================================================================= //=============================================================================
CORBA::Boolean SMESH_MeshEditor_i::SplitQuad (const SMESH::long_array & IDsOfElements, CORBA::Boolean SMESH_MeshEditor_i::SplitQuad (const SMESH::smIdType_array & IDsOfElements,
CORBA::Boolean Diag13) CORBA::Boolean Diag13)
{ {
SMESH_TRY; SMESH_TRY;
@ -1981,7 +1981,7 @@ CORBA::Boolean SMESH_MeshEditor_i::SplitQuadObject (SMESH::SMESH_IDSource_ptr th
TPythonDump aTPythonDump; // suppress dump in SplitQuad() TPythonDump aTPythonDump; // suppress dump in SplitQuad()
prepareIdSource( theObject ); prepareIdSource( theObject );
SMESH::long_array_var anElementsId = theObject->GetIDs(); SMESH::smIdType_array_var anElementsId = theObject->GetIDs();
CORBA::Boolean isDone = SplitQuad(anElementsId, Diag13); CORBA::Boolean isDone = SplitQuad(anElementsId, Diag13);
// Update Python script // Update Python script
@ -2090,7 +2090,7 @@ void SMESH_MeshEditor_i::SplitHexahedraIntoPrisms( SMESH::SMESH_IDSource_ptr el
facetToSplitNormal.PS.z )); facetToSplitNormal.PS.z ));
TIDSortedElemSet elemSet; TIDSortedElemSet elemSet;
prepareIdSource( elems ); prepareIdSource( elems );
SMESH::long_array_var anElementsId = elems->GetIDs(); SMESH::smIdType_array_var anElementsId = elems->GetIDs();
SMDS_MeshElement::GeomFilter filter( SMDSGeom_HEXA ); SMDS_MeshElement::GeomFilter filter( SMDSGeom_HEXA );
arrayToSet( anElementsId, getMeshDS(), elemSet, SMDSAbs_Volume, &filter ); arrayToSet( anElementsId, getMeshDS(), elemSet, SMDSAbs_Volume, &filter );
@ -2167,9 +2167,9 @@ void SMESH_MeshEditor_i::SplitBiQuadraticIntoLinear(const SMESH::ListOfIDSources
//======================================================================= //=======================================================================
CORBA::Boolean CORBA::Boolean
SMESH_MeshEditor_i::Smooth(const SMESH::long_array & IDsOfElements, SMESH_MeshEditor_i::Smooth(const SMESH::smIdType_array & IDsOfElements,
const SMESH::long_array & IDsOfFixedNodes, const SMESH::smIdType_array & IDsOfFixedNodes,
CORBA::Long MaxNbOfIterations, CORBA::Short MaxNbOfIterations,
CORBA::Double MaxAspectRatio, CORBA::Double MaxAspectRatio,
SMESH::SMESH_MeshEditor::Smooth_Method Method) SMESH::SMESH_MeshEditor::Smooth_Method Method)
{ {
@ -2184,9 +2184,9 @@ SMESH_MeshEditor_i::Smooth(const SMESH::long_array & IDsOfElements,
//======================================================================= //=======================================================================
CORBA::Boolean CORBA::Boolean
SMESH_MeshEditor_i::SmoothParametric(const SMESH::long_array & IDsOfElements, SMESH_MeshEditor_i::SmoothParametric(const SMESH::smIdType_array & IDsOfElements,
const SMESH::long_array & IDsOfFixedNodes, const SMESH::smIdType_array & IDsOfFixedNodes,
CORBA::Long MaxNbOfIterations, CORBA::Short MaxNbOfIterations,
CORBA::Double MaxAspectRatio, CORBA::Double MaxAspectRatio,
SMESH::SMESH_MeshEditor::Smooth_Method Method) SMESH::SMESH_MeshEditor::Smooth_Method Method)
{ {
@ -2202,8 +2202,8 @@ SMESH_MeshEditor_i::SmoothParametric(const SMESH::long_array & IDsO
CORBA::Boolean CORBA::Boolean
SMESH_MeshEditor_i::SmoothObject(SMESH::SMESH_IDSource_ptr theObject, SMESH_MeshEditor_i::SmoothObject(SMESH::SMESH_IDSource_ptr theObject,
const SMESH::long_array & IDsOfFixedNodes, const SMESH::smIdType_array & IDsOfFixedNodes,
CORBA::Long MaxNbOfIterations, CORBA::Short MaxNbOfIterations,
CORBA::Double MaxAspectRatio, CORBA::Double MaxAspectRatio,
SMESH::SMESH_MeshEditor::Smooth_Method Method) SMESH::SMESH_MeshEditor::Smooth_Method Method)
{ {
@ -2219,8 +2219,8 @@ SMESH_MeshEditor_i::SmoothObject(SMESH::SMESH_IDSource_ptr theObjec
CORBA::Boolean CORBA::Boolean
SMESH_MeshEditor_i::SmoothParametricObject(SMESH::SMESH_IDSource_ptr theObject, SMESH_MeshEditor_i::SmoothParametricObject(SMESH::SMESH_IDSource_ptr theObject,
const SMESH::long_array & IDsOfFixedNodes, const SMESH::smIdType_array & IDsOfFixedNodes,
CORBA::Long MaxNbOfIterations, CORBA::Short MaxNbOfIterations,
CORBA::Double MaxAspectRatio, CORBA::Double MaxAspectRatio,
SMESH::SMESH_MeshEditor::Smooth_Method Method) SMESH::SMESH_MeshEditor::Smooth_Method Method)
{ {
@ -2236,9 +2236,9 @@ SMESH_MeshEditor_i::SmoothParametricObject(SMESH::SMESH_IDSource_ptr
//============================================================================= //=============================================================================
CORBA::Boolean CORBA::Boolean
SMESH_MeshEditor_i::smooth(const SMESH::long_array & IDsOfElements, SMESH_MeshEditor_i::smooth(const SMESH::smIdType_array & IDsOfElements,
const SMESH::long_array & IDsOfFixedNodes, const SMESH::smIdType_array & IDsOfFixedNodes,
CORBA::Long MaxNbOfIterations, CORBA::Short MaxNbOfIterations,
CORBA::Double MaxAspectRatio, CORBA::Double MaxAspectRatio,
SMESH::SMESH_MeshEditor::Smooth_Method Method, SMESH::SMESH_MeshEditor::Smooth_Method Method,
bool IsParametric) bool IsParametric)
@ -2252,8 +2252,8 @@ SMESH_MeshEditor_i::smooth(const SMESH::long_array & IDsOfElements,
arrayToSet(IDsOfElements, aMesh, elements, SMDSAbs_Face); arrayToSet(IDsOfElements, aMesh, elements, SMDSAbs_Face);
set<const SMDS_MeshNode*> fixedNodes; set<const SMDS_MeshNode*> fixedNodes;
for ( CORBA::ULong i = 0; i < IDsOfFixedNodes.length(); i++) { for ( SMESH::smIdType i = 0; i < IDsOfFixedNodes.length(); i++) {
CORBA::Long index = IDsOfFixedNodes[i]; SMESH::smIdType index = IDsOfFixedNodes[i];
const SMDS_MeshNode * node = aMesh->FindNode(index); const SMDS_MeshNode * node = aMesh->FindNode(index);
if ( node ) if ( node )
fixedNodes.insert( node ); fixedNodes.insert( node );
@ -2290,8 +2290,8 @@ SMESH_MeshEditor_i::smooth(const SMESH::long_array & IDsOfElements,
CORBA::Boolean CORBA::Boolean
SMESH_MeshEditor_i::smoothObject(SMESH::SMESH_IDSource_ptr theObject, SMESH_MeshEditor_i::smoothObject(SMESH::SMESH_IDSource_ptr theObject,
const SMESH::long_array & IDsOfFixedNodes, const SMESH::smIdType_array & IDsOfFixedNodes,
CORBA::Long MaxNbOfIterations, CORBA::Short MaxNbOfIterations,
CORBA::Double MaxAspectRatio, CORBA::Double MaxAspectRatio,
SMESH::SMESH_MeshEditor::Smooth_Method Method, SMESH::SMESH_MeshEditor::Smooth_Method Method,
bool IsParametric) bool IsParametric)
@ -2302,7 +2302,7 @@ SMESH_MeshEditor_i::smoothObject(SMESH::SMESH_IDSource_ptr theObjec
TPythonDump aTPythonDump; // suppress dump in smooth() TPythonDump aTPythonDump; // suppress dump in smooth()
prepareIdSource( theObject ); prepareIdSource( theObject );
SMESH::long_array_var anElementsId = theObject->GetIDs(); SMESH::smIdType_array_var anElementsId = theObject->GetIDs();
CORBA::Boolean isDone = smooth (anElementsId, IDsOfFixedNodes, MaxNbOfIterations, CORBA::Boolean isDone = smooth (anElementsId, IDsOfFixedNodes, MaxNbOfIterations,
MaxAspectRatio, Method, IsParametric); MaxAspectRatio, Method, IsParametric);
@ -2741,12 +2741,12 @@ SMESH_MeshEditor_i::ExtrusionByNormal(const SMESH::ListOfIDSources& objects,
//======================================================================= //=======================================================================
SMESH::ListOfGroups* SMESH::ListOfGroups*
SMESH_MeshEditor_i::AdvancedExtrusion(const SMESH::long_array & theIDsOfElements, SMESH_MeshEditor_i::AdvancedExtrusion(const SMESH::smIdType_array & theIDsOfElements,
const SMESH::DirStruct & theStepVector, const SMESH::DirStruct & theStepVector,
CORBA::Long theNbOfSteps, CORBA::Long theNbOfSteps,
CORBA::Long theExtrFlags, CORBA::Long theExtrFlags,
CORBA::Double theSewTolerance, CORBA::Double theSewTolerance,
CORBA::Boolean theMakeGroups) CORBA::Boolean theMakeGroups)
{ {
SMESH_TRY; SMESH_TRY;
initData(); initData();
@ -2823,7 +2823,7 @@ SMESH_MeshEditor_i::ExtrusionAlongPathObjects(const SMESH::ListOfIDSources & the
const SMESH::ListOfIDSources & theFaces, const SMESH::ListOfIDSources & theFaces,
SMESH::SMESH_IDSource_ptr thePathObject, SMESH::SMESH_IDSource_ptr thePathObject,
GEOM::GEOM_Object_ptr thePathShape, GEOM::GEOM_Object_ptr thePathShape,
CORBA::Long theNodeStart, SMESH::smIdType theNodeStart,
CORBA::Boolean theHasAngles, CORBA::Boolean theHasAngles,
const SMESH::double_array & theAngles, const SMESH::double_array & theAngles,
CORBA::Boolean theAnglesVariation, CORBA::Boolean theAnglesVariation,
@ -3118,7 +3118,7 @@ SMESH_MeshEditor_i::mirror(TIDSortedElemSet & theElements,
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESH_MeshEditor_i::Mirror(const SMESH::long_array & theIDsOfElements, void SMESH_MeshEditor_i::Mirror(const SMESH::smIdType_array & theIDsOfElements,
const SMESH::AxisStruct & theAxis, const SMESH::AxisStruct & theAxis,
SMESH::SMESH_MeshEditor::MirrorType theMirrorType, SMESH::SMESH_MeshEditor::MirrorType theMirrorType,
CORBA::Boolean theCopy) CORBA::Boolean theCopy)
@ -3170,7 +3170,7 @@ void SMESH_MeshEditor_i::MirrorObject(SMESH::SMESH_IDSource_ptr theObj
//======================================================================= //=======================================================================
SMESH::ListOfGroups* SMESH::ListOfGroups*
SMESH_MeshEditor_i::MirrorMakeGroups(const SMESH::long_array& theIDsOfElements, SMESH_MeshEditor_i::MirrorMakeGroups(const SMESH::smIdType_array& theIDsOfElements,
const SMESH::AxisStruct& theMirror, const SMESH::AxisStruct& theMirror,
SMESH::SMESH_MeshEditor::MirrorType theMirrorType) SMESH::SMESH_MeshEditor::MirrorType theMirrorType)
{ {
@ -3227,7 +3227,7 @@ SMESH_MeshEditor_i::MirrorObjectMakeGroups(SMESH::SMESH_IDSource_ptr t
//======================================================================= //=======================================================================
SMESH::SMESH_Mesh_ptr SMESH::SMESH_Mesh_ptr
SMESH_MeshEditor_i::MirrorMakeMesh(const SMESH::long_array& theIDsOfElements, SMESH_MeshEditor_i::MirrorMakeMesh(const SMESH::smIdType_array& theIDsOfElements,
const SMESH::AxisStruct& theMirror, const SMESH::AxisStruct& theMirror,
SMESH::SMESH_MeshEditor::MirrorType theMirrorType, SMESH::SMESH_MeshEditor::MirrorType theMirrorType,
CORBA::Boolean theCopyGroups, CORBA::Boolean theCopyGroups,
@ -3375,9 +3375,9 @@ SMESH_MeshEditor_i::translate(TIDSortedElemSet & theElements,
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESH_MeshEditor_i::Translate(const SMESH::long_array & theIDsOfElements, void SMESH_MeshEditor_i::Translate(const SMESH::smIdType_array & theIDsOfElements,
const SMESH::DirStruct & theVector, const SMESH::DirStruct & theVector,
CORBA::Boolean theCopy) CORBA::Boolean theCopy)
{ {
if (!myIsPreviewMode) { if (!myIsPreviewMode) {
TPythonDump() << this << ".Translate( " TPythonDump() << this << ".Translate( "
@ -3421,8 +3421,8 @@ void SMESH_MeshEditor_i::TranslateObject(SMESH::SMESH_IDSource_ptr theObject,
//======================================================================= //=======================================================================
SMESH::ListOfGroups* SMESH::ListOfGroups*
SMESH_MeshEditor_i::TranslateMakeGroups(const SMESH::long_array& theIDsOfElements, SMESH_MeshEditor_i::TranslateMakeGroups(const SMESH::smIdType_array& theIDsOfElements,
const SMESH::DirStruct& theVector) const SMESH::DirStruct& theVector)
{ {
TPythonDump aPythonDump; // it is here to prevent dump of GetGroups() TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
@ -3472,10 +3472,10 @@ SMESH_MeshEditor_i::TranslateObjectMakeGroups(SMESH::SMESH_IDSource_ptr theObjec
//======================================================================= //=======================================================================
SMESH::SMESH_Mesh_ptr SMESH::SMESH_Mesh_ptr
SMESH_MeshEditor_i::TranslateMakeMesh(const SMESH::long_array& theIDsOfElements, SMESH_MeshEditor_i::TranslateMakeMesh(const SMESH::smIdType_array& theIDsOfElements,
const SMESH::DirStruct& theVector, const SMESH::DirStruct& theVector,
CORBA::Boolean theCopyGroups, CORBA::Boolean theCopyGroups,
const char* theMeshName) const char* theMeshName)
{ {
SMESH_Mesh_i* mesh_i; SMESH_Mesh_i* mesh_i;
SMESH::SMESH_Mesh_var mesh; SMESH::SMESH_Mesh_var mesh;
@ -3619,10 +3619,10 @@ SMESH_MeshEditor_i::rotate(TIDSortedElemSet & theElements,
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESH_MeshEditor_i::Rotate(const SMESH::long_array & theIDsOfElements, void SMESH_MeshEditor_i::Rotate(const SMESH::smIdType_array & theIDsOfElements,
const SMESH::AxisStruct & theAxis, const SMESH::AxisStruct & theAxis,
CORBA::Double theAngle, CORBA::Double theAngle,
CORBA::Boolean theCopy) CORBA::Boolean theCopy)
{ {
if (!myIsPreviewMode) { if (!myIsPreviewMode) {
TPythonDump() << this << ".Rotate( " TPythonDump() << this << ".Rotate( "
@ -3668,9 +3668,9 @@ void SMESH_MeshEditor_i::RotateObject(SMESH::SMESH_IDSource_ptr theObject,
//======================================================================= //=======================================================================
SMESH::ListOfGroups* SMESH::ListOfGroups*
SMESH_MeshEditor_i::RotateMakeGroups(const SMESH::long_array& theIDsOfElements, SMESH_MeshEditor_i::RotateMakeGroups(const SMESH::smIdType_array& theIDsOfElements,
const SMESH::AxisStruct& theAxis, const SMESH::AxisStruct& theAxis,
CORBA::Double theAngle) CORBA::Double theAngle)
{ {
TPythonDump aPythonDump; // it is here to prevent dump of GetGroups() TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
@ -3724,11 +3724,11 @@ SMESH_MeshEditor_i::RotateObjectMakeGroups(SMESH::SMESH_IDSource_ptr theObject,
//======================================================================= //=======================================================================
SMESH::SMESH_Mesh_ptr SMESH::SMESH_Mesh_ptr
SMESH_MeshEditor_i::RotateMakeMesh(const SMESH::long_array& theIDsOfElements, SMESH_MeshEditor_i::RotateMakeMesh(const SMESH::smIdType_array& theIDsOfElements,
const SMESH::AxisStruct& theAxis, const SMESH::AxisStruct& theAxis,
CORBA::Double theAngleInRadians, CORBA::Double theAngleInRadians,
CORBA::Boolean theCopyGroups, CORBA::Boolean theCopyGroups,
const char* theMeshName) const char* theMeshName)
{ {
SMESH_TRY; SMESH_TRY;
SMESH::SMESH_Mesh_var mesh; SMESH::SMESH_Mesh_var mesh;
@ -4341,8 +4341,8 @@ void SMESH_MeshEditor_i::MergeElements(const SMESH::array_of_long_array& theGrou
SMESH::array_of_ElementType_var elemTypes = theElementsToKeep[i]->GetTypes(); SMESH::array_of_ElementType_var elemTypes = theElementsToKeep[i]->GetTypes();
if ( elemTypes->length() == 1 && elemTypes[0] == SMESH::NODE ) if ( elemTypes->length() == 1 && elemTypes[0] == SMESH::NODE )
continue; continue;
SMESH::long_array_var elementsId = theElementsToKeep[i]->GetIDs(); SMESH::smIdType_array_var elementsId = theElementsToKeep[i]->GetIDs();
for ( CORBA::ULong j = 0; j < elementsId->length(); ++j ) for ( SMESH::smIdType j = 0; j < elementsId->length(); ++j )
idsToKeep.Add( elementsId[ j ]); idsToKeep.Add( elementsId[ j ]);
} }
@ -4399,10 +4399,10 @@ void SMESH_MeshEditor_i::MergeEqualElements()
*/ */
//============================================================================= //=============================================================================
CORBA::Boolean SMESH_MeshEditor_i::MoveNode(CORBA::Long NodeID, CORBA::Boolean SMESH_MeshEditor_i::MoveNode(SMESH::smIdType NodeID,
CORBA::Double x, CORBA::Double x,
CORBA::Double y, CORBA::Double y,
CORBA::Double z) CORBA::Double z)
{ {
SMESH_TRY; SMESH_TRY;
initData(/*deleteSearchers=*/false); initData(/*deleteSearchers=*/false);
@ -4481,10 +4481,10 @@ SMESH::smIdType SMESH_MeshEditor_i::FindNodeClosestTo(CORBA::Double x,
*/ */
//================================================================================ //================================================================================
CORBA::Long SMESH_MeshEditor_i::MoveClosestNodeToPoint(CORBA::Double x, SMESH::smIdType SMESH_MeshEditor_i::MoveClosestNodeToPoint(CORBA::Double x,
CORBA::Double y, CORBA::Double y,
CORBA::Double z, CORBA::Double z,
CORBA::Long theNodeID) SMESH::smIdType theNodeID)
{ {
SMESH_TRY; SMESH_TRY;
// We keep theNodeSearcher until any mesh modification: // We keep theNodeSearcher until any mesh modification:
@ -4495,7 +4495,7 @@ CORBA::Long SMESH_MeshEditor_i::MoveClosestNodeToPoint(CORBA::Double x,
theSearchersDeleter.Set( myMesh ); // remove theNodeSearcher if mesh is other theSearchersDeleter.Set( myMesh ); // remove theNodeSearcher if mesh is other
int nodeID = theNodeID; smIdType nodeID = theNodeID;
const SMDS_MeshNode* node = getMeshDS()->FindNode( nodeID ); const SMDS_MeshNode* node = getMeshDS()->FindNode( nodeID );
if ( !node ) // preview moving node if ( !node ) // preview moving node
{ {
@ -4558,13 +4558,13 @@ CORBA::Long SMESH_MeshEditor_i::MoveClosestNodeToPoint(CORBA::Double x,
*/ */
//======================================================================= //=======================================================================
SMESH::long_array* SMESH_MeshEditor_i::FindElementsByPoint(CORBA::Double x, SMESH::smIdType_array* SMESH_MeshEditor_i::FindElementsByPoint(CORBA::Double x,
CORBA::Double y, CORBA::Double y,
CORBA::Double z, CORBA::Double z,
SMESH::ElementType type) SMESH::ElementType type)
{ {
SMESH_TRY; SMESH_TRY;
SMESH::long_array_var res = new SMESH::long_array; SMESH::smIdType_array_var res = new SMESH::smIdType_array;
vector< const SMDS_MeshElement* > foundElems; vector< const SMDS_MeshElement* > foundElems;
theSearchersDeleter.Set( myMesh ); theSearchersDeleter.Set( myMesh );
@ -4575,7 +4575,7 @@ SMESH::long_array* SMESH_MeshEditor_i::FindElementsByPoint(CORBA::Double x,
SMDSAbs_ElementType( type ), SMDSAbs_ElementType( type ),
foundElems); foundElems);
res->length( foundElems.size() ); res->length( foundElems.size() );
for ( size_t i = 0; i < foundElems.size(); ++i ) for ( smIdType i = 0; i < foundElems.size(); ++i )
res[i] = foundElems[i]->GetID(); res[i] = foundElems[i]->GetID();
return res._retn(); return res._retn();
@ -4591,7 +4591,7 @@ SMESH::long_array* SMESH_MeshEditor_i::FindElementsByPoint(CORBA::Double x,
// 'ALL' type means elements of any type excluding nodes // 'ALL' type means elements of any type excluding nodes
//======================================================================= //=======================================================================
SMESH::long_array* SMESH::smIdType_array*
SMESH_MeshEditor_i::FindAmongElementsByPoint(SMESH::SMESH_IDSource_ptr elementIDs, SMESH_MeshEditor_i::FindAmongElementsByPoint(SMESH::SMESH_IDSource_ptr elementIDs,
CORBA::Double x, CORBA::Double x,
CORBA::Double y, CORBA::Double y,
@ -4599,7 +4599,7 @@ SMESH_MeshEditor_i::FindAmongElementsByPoint(SMESH::SMESH_IDSource_ptr elementID
SMESH::ElementType type) SMESH::ElementType type)
{ {
SMESH_TRY; SMESH_TRY;
SMESH::long_array_var res = new SMESH::long_array; SMESH::smIdType_array_var res = new SMESH::smIdType_array;
prepareIdSource( elementIDs ); prepareIdSource( elementIDs );
if ( type != SMESH::NODE ) if ( type != SMESH::NODE )
@ -4646,7 +4646,7 @@ SMESH_MeshEditor_i::FindAmongElementsByPoint(SMESH::SMESH_IDSource_ptr elementID
SMDSAbs_ElementType( type ), SMDSAbs_ElementType( type ),
foundElems); foundElems);
res->length( foundElems.size() ); res->length( foundElems.size() );
for ( size_t i = 0; i < foundElems.size(); ++i ) for ( smIdType i = 0; i < foundElems.size(); ++i )
res[i] = foundElems[i]->GetID(); res[i] = foundElems[i]->GetID();
return res._retn(); return res._retn();
@ -4793,7 +4793,7 @@ CORBA::Boolean SMESH_MeshEditor_i::IsCoherentOrientation2D()
SMESH::array_of_long_array* SMESH::array_of_long_array*
SMESH_MeshEditor_i::Get1DBranches( SMESH::SMESH_IDSource_ptr theEdges, SMESH_MeshEditor_i::Get1DBranches( SMESH::SMESH_IDSource_ptr theEdges,
CORBA::Long theStartNode, SMESH::smIdType theStartNode,
SMESH::array_of_long_array_out theNodeGroups ) SMESH::array_of_long_array_out theNodeGroups )
{ {
if ( CORBA::is_nil( theEdges )) if ( CORBA::is_nil( theEdges ))
@ -5276,14 +5276,14 @@ SewCoincidentFreeBorders(const SMESH::CoincidentFreeBorders& freeBorders,
//======================================================================= //=======================================================================
SMESH::SMESH_MeshEditor::Sew_Error SMESH::SMESH_MeshEditor::Sew_Error
SMESH_MeshEditor_i::SewFreeBorders(CORBA::Long FirstNodeID1, SMESH_MeshEditor_i::SewFreeBorders(SMESH::smIdType FirstNodeID1,
CORBA::Long SecondNodeID1, SMESH::smIdType SecondNodeID1,
CORBA::Long LastNodeID1, SMESH::smIdType LastNodeID1,
CORBA::Long FirstNodeID2, SMESH::smIdType FirstNodeID2,
CORBA::Long SecondNodeID2, SMESH::smIdType SecondNodeID2,
CORBA::Long LastNodeID2, SMESH::smIdType LastNodeID2,
CORBA::Boolean CreatePolygons, CORBA::Boolean CreatePolygons,
CORBA::Boolean CreatePolyedrs) CORBA::Boolean CreatePolyedrs)
{ {
SMESH_TRY; SMESH_TRY;
initData(); initData();
@ -5342,11 +5342,11 @@ SMESH_MeshEditor_i::SewFreeBorders(CORBA::Long FirstNodeID1,
//======================================================================= //=======================================================================
SMESH::SMESH_MeshEditor::Sew_Error SMESH::SMESH_MeshEditor::Sew_Error
SMESH_MeshEditor_i::SewConformFreeBorders(CORBA::Long FirstNodeID1, SMESH_MeshEditor_i::SewConformFreeBorders(SMESH::smIdType FirstNodeID1,
CORBA::Long SecondNodeID1, SMESH::smIdType SecondNodeID1,
CORBA::Long LastNodeID1, SMESH::smIdType LastNodeID1,
CORBA::Long FirstNodeID2, SMESH::smIdType FirstNodeID2,
CORBA::Long SecondNodeID2) SMESH::smIdType SecondNodeID2)
{ {
SMESH_TRY; SMESH_TRY;
initData(); initData();
@ -5399,13 +5399,13 @@ SMESH_MeshEditor_i::SewConformFreeBorders(CORBA::Long FirstNodeID1,
//======================================================================= //=======================================================================
SMESH::SMESH_MeshEditor::Sew_Error SMESH::SMESH_MeshEditor::Sew_Error
SMESH_MeshEditor_i::SewBorderToSide(CORBA::Long FirstNodeIDOnFreeBorder, SMESH_MeshEditor_i::SewBorderToSide(SMESH::smIdType FirstNodeIDOnFreeBorder,
CORBA::Long SecondNodeIDOnFreeBorder, SMESH::smIdType SecondNodeIDOnFreeBorder,
CORBA::Long LastNodeIDOnFreeBorder, SMESH::smIdType LastNodeIDOnFreeBorder,
CORBA::Long FirstNodeIDOnSide, SMESH::smIdType FirstNodeIDOnSide,
CORBA::Long LastNodeIDOnSide, SMESH::smIdType LastNodeIDOnSide,
CORBA::Boolean CreatePolygons, CORBA::Boolean CreatePolygons,
CORBA::Boolean CreatePolyedrs) CORBA::Boolean CreatePolyedrs)
{ {
SMESH_TRY; SMESH_TRY;
initData(); initData();
@ -5461,12 +5461,12 @@ SMESH_MeshEditor_i::SewBorderToSide(CORBA::Long FirstNodeIDOnFreeBorder,
//======================================================================= //=======================================================================
SMESH::SMESH_MeshEditor::Sew_Error SMESH::SMESH_MeshEditor::Sew_Error
SMESH_MeshEditor_i::SewSideElements(const SMESH::long_array& IDsOfSide1Elements, SMESH_MeshEditor_i::SewSideElements(const SMESH::smIdType_array& IDsOfSide1Elements,
const SMESH::long_array& IDsOfSide2Elements, const SMESH::smIdType_array& IDsOfSide2Elements,
CORBA::Long NodeID1OfSide1ToMerge, SMESH::smIdType NodeID1OfSide1ToMerge,
CORBA::Long NodeID1OfSide2ToMerge, SMESH::smIdType NodeID1OfSide2ToMerge,
CORBA::Long NodeID2OfSide1ToMerge, SMESH::smIdType NodeID2OfSide1ToMerge,
CORBA::Long NodeID2OfSide2ToMerge) SMESH::smIdType NodeID2OfSide2ToMerge)
{ {
SMESH_TRY; SMESH_TRY;
initData(); initData();
@ -5520,8 +5520,8 @@ SMESH_MeshEditor_i::SewSideElements(const SMESH::long_array& IDsOfSide1Elements,
*/ */
//================================================================================ //================================================================================
CORBA::Boolean SMESH_MeshEditor_i::ChangeElemNodes(CORBA::Long ide, CORBA::Boolean SMESH_MeshEditor_i::ChangeElemNodes(SMESH::smIdType ide,
const SMESH::long_array& newIDs) const SMESH::smIdType_array& newIDs)
{ {
SMESH_TRY; SMESH_TRY;
initData(); initData();
@ -5791,7 +5791,7 @@ bool SMESH_MeshEditor_i::idSourceToSet(SMESH::SMESH_IDSource_ptr theIDSource,
} }
} }
prepareIdSource( theIDSource ); prepareIdSource( theIDSource );
SMESH::long_array_var anIDs = theIDSource->GetIDs(); SMESH::smIdType_array_var anIDs = theIDSource->GetIDs();
if ( anIDs->length() == 0 ) if ( anIDs->length() == 0 )
{ {
if ( error ) *error = IDSource_EMPTY; if ( error ) *error = IDSource_EMPTY;
@ -5905,8 +5905,8 @@ SMESH_MeshEditor_i::DoubleElements(SMESH::SMESH_IDSource_ptr theElements,
*/ */
//================================================================================ //================================================================================
CORBA::Boolean SMESH_MeshEditor_i::DoubleNodes( const SMESH::long_array& theNodes, CORBA::Boolean SMESH_MeshEditor_i::DoubleNodes( const SMESH::smIdType_array& theNodes,
const SMESH::long_array& theModifiedElems ) const SMESH::smIdType_array& theModifiedElems )
{ {
SMESH_TRY; SMESH_TRY;
initData(); initData();
@ -5944,11 +5944,11 @@ CORBA::Boolean SMESH_MeshEditor_i::DoubleNodes( const SMESH::long_array& theNode
*/ */
//================================================================================ //================================================================================
CORBA::Boolean SMESH_MeshEditor_i::DoubleNode( CORBA::Long theNodeId, CORBA::Boolean SMESH_MeshEditor_i::DoubleNode( SMESH::smIdType theNodeId,
const SMESH::long_array& theModifiedElems ) const SMESH::smIdType_array& theModifiedElems )
{ {
SMESH_TRY; SMESH_TRY;
SMESH::long_array_var aNodes = new SMESH::long_array; SMESH::smIdType_array_var aNodes = new SMESH::smIdType_array;
aNodes->length( 1 ); aNodes->length( 1 );
aNodes[ 0 ] = theNodeId; aNodes[ 0 ] = theNodeId;
@ -5982,12 +5982,12 @@ CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeGroup(SMESH::SMESH_GroupBase_ptr th
if ( CORBA::is_nil( theNodes ) && theNodes->GetType() != SMESH::NODE ) if ( CORBA::is_nil( theNodes ) && theNodes->GetType() != SMESH::NODE )
return false; return false;
SMESH::long_array_var aNodes = theNodes->GetListOfID(); SMESH::smIdType_array_var aNodes = theNodes->GetListOfID();
SMESH::long_array_var aModifiedElems; SMESH::smIdType_array_var aModifiedElems;
if ( !CORBA::is_nil( theModifiedElems ) ) if ( !CORBA::is_nil( theModifiedElems ) )
aModifiedElems = theModifiedElems->GetListOfID(); aModifiedElems = theModifiedElems->GetListOfID();
else else
aModifiedElems = new SMESH::long_array; aModifiedElems = new SMESH::smIdType_array;
TPythonDump pyDump; // suppress dump by the next line TPythonDump pyDump; // suppress dump by the next line
@ -6023,12 +6023,12 @@ SMESH_MeshEditor_i::DoubleNodeGroupNew( SMESH::SMESH_GroupBase_ptr theNodes,
return aNewGroup._retn(); return aNewGroup._retn();
// Duplicate nodes // Duplicate nodes
SMESH::long_array_var aNodes = theNodes->GetListOfID(); SMESH::smIdType_array_var aNodes = theNodes->GetListOfID();
SMESH::long_array_var aModifiedElems; SMESH::smIdType_array_var aModifiedElems;
if ( !CORBA::is_nil( theModifiedElems ) ) if ( !CORBA::is_nil( theModifiedElems ) )
aModifiedElems = theModifiedElems->GetListOfID(); aModifiedElems = theModifiedElems->GetListOfID();
else { else {
aModifiedElems = new SMESH::long_array; aModifiedElems = new SMESH::smIdType_array;
aModifiedElems->length( 0 ); aModifiedElems->length( 0 );
} }
@ -6038,7 +6038,7 @@ SMESH_MeshEditor_i::DoubleNodeGroupNew( SMESH::SMESH_GroupBase_ptr theNodes,
if ( aResult ) if ( aResult )
{ {
// Create group with newly created nodes // Create group with newly created nodes
SMESH::long_array_var anIds = GetLastCreatedNodes(); SMESH::smIdType_array_var anIds = GetLastCreatedNodes();
if (anIds->length() > 0) { if (anIds->length() > 0) {
std::string anUnindexedName (theNodes->GetName()); std::string anUnindexedName (theNodes->GetName());
std::string aNewName = GenerateGroupName(anUnindexedName + "_double"); std::string aNewName = GenerateGroupName(anUnindexedName + "_double");
@ -6075,13 +6075,13 @@ CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeGroups(const SMESH::ListOfGroups& t
initData(); initData();
std::list< int > aNodes; std::list< int > aNodes;
int i, n, j, m; smIdType i, n, j, m;
for ( i = 0, n = theNodes.length(); i < n; i++ ) for ( i = 0, n = theNodes.length(); i < n; i++ )
{ {
SMESH::SMESH_GroupBase_var aGrp = theNodes[ i ]; SMESH::SMESH_GroupBase_var aGrp = theNodes[ i ];
if ( !CORBA::is_nil( aGrp ) && aGrp->GetType() == SMESH::NODE ) if ( !CORBA::is_nil( aGrp ) && aGrp->GetType() == SMESH::NODE )
{ {
SMESH::long_array_var aCurr = aGrp->GetListOfID(); SMESH::smIdType_array_var aCurr = aGrp->GetListOfID();
for ( j = 0, m = aCurr->length(); j < m; j++ ) for ( j = 0, m = aCurr->length(); j < m; j++ )
aNodes.push_back( aCurr[ j ] ); aNodes.push_back( aCurr[ j ] );
} }
@ -6093,7 +6093,7 @@ CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeGroups(const SMESH::ListOfGroups& t
SMESH::SMESH_GroupBase_var aGrp = theModifiedElems[ i ]; SMESH::SMESH_GroupBase_var aGrp = theModifiedElems[ i ];
if ( !CORBA::is_nil( aGrp ) && aGrp->GetType() != SMESH::NODE ) if ( !CORBA::is_nil( aGrp ) && aGrp->GetType() != SMESH::NODE )
{ {
SMESH::long_array_var aCurr = aGrp->GetListOfID(); SMESH::smIdType_array_var aCurr = aGrp->GetListOfID();
for ( j = 0, m = aCurr->length(); j < m; j++ ) for ( j = 0, m = aCurr->length(); j < m; j++ )
anElems.push_back( aCurr[ j ] ); anElems.push_back( aCurr[ j ] );
} }
@ -6135,7 +6135,7 @@ SMESH_MeshEditor_i::DoubleNodeGroupsNew( const SMESH::ListOfGroups& theNodes,
if ( aResult ) if ( aResult )
{ {
// Create group with newly created nodes // Create group with newly created nodes
SMESH::long_array_var anIds = GetLastCreatedNodes(); SMESH::smIdType_array_var anIds = GetLastCreatedNodes();
if (anIds->length() > 0) { if (anIds->length() > 0) {
std::string anUnindexedName (theNodes[0]->GetName()); std::string anUnindexedName (theNodes[0]->GetName());
std::string aNewName = GenerateGroupName(anUnindexedName + "_double"); std::string aNewName = GenerateGroupName(anUnindexedName + "_double");
@ -6165,9 +6165,9 @@ SMESH_MeshEditor_i::DoubleNodeGroupsNew( const SMESH::ListOfGroups& theNodes,
*/ */
//================================================================================ //================================================================================
CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeElem( const SMESH::long_array& theElems, CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeElem( const SMESH::smIdType_array& theElems,
const SMESH::long_array& theNodesNot, const SMESH::smIdType_array& theNodesNot,
const SMESH::long_array& theAffectedElems ) const SMESH::smIdType_array& theAffectedElems )
{ {
SMESH_TRY; SMESH_TRY;
initData(); initData();
@ -6205,9 +6205,9 @@ CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeElem( const SMESH::long_array& theE
*/ */
//================================================================================ //================================================================================
CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeElemInRegion ( const SMESH::long_array& theElems, CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeElemInRegion ( const SMESH::smIdType_array& theElems,
const SMESH::long_array& theNodesNot, const SMESH::smIdType_array& theNodesNot,
GEOM::GEOM_Object_ptr theShape ) GEOM::GEOM_Object_ptr theShape )
{ {
SMESH_TRY; SMESH_TRY;
initData(); initData();
@ -6360,14 +6360,14 @@ SMESH_MeshEditor_i::DoubleNodeElemGroup2New(SMESH::SMESH_GroupBase_ptr theElems,
std::string aNewName = GenerateGroupName( std::string(elemGroupName.in()) + "_double"); std::string aNewName = GenerateGroupName( std::string(elemGroupName.in()) + "_double");
if ( !getEditor().GetLastCreatedElems().empty() && theElemGroupNeeded ) if ( !getEditor().GetLastCreatedElems().empty() && theElemGroupNeeded )
{ {
SMESH::long_array_var anIds = GetLastCreatedElems(); SMESH::smIdType_array_var anIds = GetLastCreatedElems();
SMESH::ElementType aGroupType = myMesh_i->GetElementType(anIds[0], true); SMESH::ElementType aGroupType = myMesh_i->GetElementType(anIds[0], true);
aNewElemGroup = myMesh_i->CreateGroup(aGroupType, aNewName.c_str()); aNewElemGroup = myMesh_i->CreateGroup(aGroupType, aNewName.c_str());
aNewElemGroup->Add(anIds); aNewElemGroup->Add(anIds);
} }
if ( !getEditor().GetLastCreatedNodes().empty() && theNodeGroupNeeded ) if ( !getEditor().GetLastCreatedNodes().empty() && theNodeGroupNeeded )
{ {
SMESH::long_array_var anIds = GetLastCreatedNodes(); SMESH::smIdType_array_var anIds = GetLastCreatedNodes();
aNewNodeGroup = myMesh_i->CreateGroup(SMESH::NODE, aNewName.c_str()); aNewNodeGroup = myMesh_i->CreateGroup(SMESH::NODE, aNewName.c_str());
aNewNodeGroup->Add(anIds); aNewNodeGroup->Add(anIds);
} }
@ -6461,7 +6461,7 @@ static void listOfGroupToSet(const SMESH::ListOfGroups& theGrpList,
if ( !CORBA::is_nil( aGrp ) && (theIsNodeGrp ? aGrp->GetType() == SMESH::NODE if ( !CORBA::is_nil( aGrp ) && (theIsNodeGrp ? aGrp->GetType() == SMESH::NODE
: aGrp->GetType() != SMESH::NODE ) ) : aGrp->GetType() != SMESH::NODE ) )
{ {
SMESH::long_array_var anIDs = aGrp->GetIDs(); SMESH::smIdType_array_var anIDs = aGrp->GetIDs();
arrayToSet( anIDs, theMeshDS, theElemSet, theIsNodeGrp ? SMDSAbs_Node : SMDSAbs_All ); arrayToSet( anIDs, theMeshDS, theElemSet, theIsNodeGrp ? SMDSAbs_Node : SMDSAbs_All );
} }
} }
@ -6588,14 +6588,14 @@ SMESH_MeshEditor_i::DoubleNodeElemGroups2New(const SMESH::ListOfGroups& theElems
std::string aNewName = GenerateGroupName( std::string(elemGroupName.in()) + "_double"); std::string aNewName = GenerateGroupName( std::string(elemGroupName.in()) + "_double");
if ( !getEditor().GetLastCreatedElems().empty() && theElemGroupNeeded ) if ( !getEditor().GetLastCreatedElems().empty() && theElemGroupNeeded )
{ {
SMESH::long_array_var anIds = GetLastCreatedElems(); SMESH::smIdType_array_var anIds = GetLastCreatedElems();
SMESH::ElementType aGroupType = myMesh_i->GetElementType(anIds[0], true); SMESH::ElementType aGroupType = myMesh_i->GetElementType(anIds[0], true);
aNewElemGroup = myMesh_i->CreateGroup(aGroupType, aNewName.c_str()); aNewElemGroup = myMesh_i->CreateGroup(aGroupType, aNewName.c_str());
aNewElemGroup->Add(anIds); aNewElemGroup->Add(anIds);
} }
if ( !getEditor().GetLastCreatedNodes().empty() && theNodeGroupNeeded ) if ( !getEditor().GetLastCreatedNodes().empty() && theNodeGroupNeeded )
{ {
SMESH::long_array_var anIds = GetLastCreatedNodes(); SMESH::smIdType_array_var anIds = GetLastCreatedNodes();
aNewNodeGroup = myMesh_i->CreateGroup(SMESH::NODE, aNewName.c_str()); aNewNodeGroup = myMesh_i->CreateGroup(SMESH::NODE, aNewName.c_str());
aNewNodeGroup->Add(anIds); aNewNodeGroup->Add(anIds);
} }
@ -6709,9 +6709,9 @@ SMESH_MeshEditor_i::AffectedElemGroupsInRegion( const SMESH::ListOfGroups& theEl
TPythonDump pyDump; TPythonDump pyDump;
if ( aResult && anAffected.size() > 0 ) if ( aResult && anAffected.size() > 0 )
{ {
SMESH::long_array_var volumeIds = new SMESH::long_array; SMESH::smIdType_array_var volumeIds = new SMESH::smIdType_array;
SMESH::long_array_var faceIds = new SMESH::long_array; SMESH::smIdType_array_var faceIds = new SMESH::smIdType_array;
SMESH::long_array_var edgeIds = new SMESH::long_array; SMESH::smIdType_array_var edgeIds = new SMESH::smIdType_array;
volumeIds->length( anAffected.size() ); volumeIds->length( anAffected.size() );
faceIds ->length( anAffected.size() ); faceIds ->length( anAffected.size() );
edgeIds ->length( anAffected.size() ); edgeIds ->length( anAffected.size() );
@ -6845,7 +6845,7 @@ SMESH_MeshEditor_i::DoubleNodesOnGroupBoundaries( const SMESH::ListOfGroups& the
{ {
// if ( aGrp->GetType() != SMESH::VOLUME ) // if ( aGrp->GetType() != SMESH::VOLUME )
// THROW_SALOME_CORBA_EXCEPTION("Not a volume group", SALOME::BAD_PARAM); // THROW_SALOME_CORBA_EXCEPTION("Not a volume group", SALOME::BAD_PARAM);
SMESH::long_array_var anIDs = aGrp->GetIDs(); SMESH::smIdType_array_var anIDs = aGrp->GetIDs();
arrayToSet( anIDs, aMeshDS, domains[ i ], SMDSAbs_All ); arrayToSet( anIDs, aMeshDS, domains[ i ], SMDSAbs_All );
} }
} }
@ -6897,7 +6897,7 @@ SMESH_MeshEditor_i::CreateFlatElementsOnFacesGroups( const SMESH::ListOfGroups&
TIDSortedElemSet faceGroup; TIDSortedElemSet faceGroup;
faceGroup.clear(); faceGroup.clear();
faceGroups.push_back(faceGroup); faceGroups.push_back(faceGroup);
SMESH::long_array_var anIDs = aGrp->GetIDs(); SMESH::smIdType_array_var anIDs = aGrp->GetIDs();
arrayToSet( anIDs, aMeshDS, faceGroups[ i ], SMDSAbs_All ); arrayToSet( anIDs, aMeshDS, faceGroups[ i ], SMDSAbs_All );
} }
} }
@ -7088,7 +7088,7 @@ SMESH_MeshEditor_i::MakeBoundaryMesh(SMESH::SMESH_IDSource_ptr idSource,
*/ */
//================================================================================ //================================================================================
SMESH::smIdType SMESH_MeshEditor_i::MakeBoundaryElements(SMESH::Bnd_Dimension dim, CORBA::Long SMESH_MeshEditor_i::MakeBoundaryElements(SMESH::Bnd_Dimension dim,
const char* groupName, const char* groupName,
const char* meshName, const char* meshName,
CORBA::Boolean toCopyAll, CORBA::Boolean toCopyAll,

View File

@ -71,13 +71,13 @@ public:
* created this method returns list of their IDs, if new nodes * created this method returns list of their IDs, if new nodes
* not created - returns an empty list * not created - returns an empty list
*/ */
SMESH::long_array* GetLastCreatedNodes(); SMESH::smIdType_array* GetLastCreatedNodes();
/*! /*!
* If during last operation of MeshEditor some elements were * If during last operation of MeshEditor some elements were
* created this method returns list of their IDs, if new elements * created this method returns list of their IDs, if new elements
* not created - returns an empty list * not created - returns an empty list
*/ */
SMESH::long_array* GetLastCreatedElems(); SMESH::smIdType_array* GetLastCreatedElems();
/*! /*!
* \brief Clears sequences of last created elements and nodes * \brief Clears sequences of last created elements and nodes
*/ */
@ -90,8 +90,8 @@ public:
/*! /*!
* \brief Wrap a sequence of ids in a SMESH_IDSource * \brief Wrap a sequence of ids in a SMESH_IDSource
*/ */
SMESH::SMESH_IDSource_ptr MakeIDSource(const SMESH::long_array& IDsOfElements, SMESH::SMESH_IDSource_ptr MakeIDSource(const SMESH::smIdType_array& IDsOfElements,
SMESH::ElementType type); SMESH::ElementType type);
static bool IsTemporaryIDSource( SMESH::SMESH_IDSource_ptr& idSource ); static bool IsTemporaryIDSource( SMESH::SMESH_IDSource_ptr& idSource );
static SMESH::smIdType* GetTemporaryIDs( SMESH::SMESH_IDSource_ptr& idSource, int& nbIds ); static SMESH::smIdType* GetTemporaryIDs( SMESH::SMESH_IDSource_ptr& idSource, int& nbIds );
@ -100,8 +100,8 @@ public:
*/ */
std::string GenerateGroupName(const std::string& thePrefix); std::string GenerateGroupName(const std::string& thePrefix);
CORBA::Boolean RemoveElements(const SMESH::long_array & IDsOfElements); CORBA::Boolean RemoveElements(const SMESH::smIdType_array & IDsOfElements);
CORBA::Boolean RemoveNodes (const SMESH::long_array & IDsOfNodes); CORBA::Boolean RemoveNodes (const SMESH::smIdType_array & IDsOfNodes);
SMESH::smIdType RemoveOrphanNodes(); SMESH::smIdType RemoveOrphanNodes();
/*! /*!
@ -109,16 +109,16 @@ public:
* Returns ID of created element or 0 if element not created * Returns ID of created element or 0 if element not created
*/ */
SMESH::smIdType AddNode(CORBA::Double x, CORBA::Double y, CORBA::Double z); SMESH::smIdType AddNode(CORBA::Double x, CORBA::Double y, CORBA::Double z);
SMESH::smIdType Add0DElement(CORBA::Long IDOfNode, CORBA::Boolean DuplicateElements); SMESH::smIdType Add0DElement(SMESH::smIdType IDOfNode, CORBA::Boolean DuplicateElements);
SMESH::smIdType AddBall(CORBA::Long IDOfNodem, CORBA::Double diameter); SMESH::smIdType AddBall(SMESH::smIdType IDOfNodem, CORBA::Double diameter);
SMESH::smIdType AddEdge(const SMESH::long_array & IDsOfNodes); SMESH::smIdType AddEdge(const SMESH::smIdType_array & IDsOfNodes);
SMESH::smIdType AddFace(const SMESH::long_array & IDsOfNodes); SMESH::smIdType AddFace(const SMESH::smIdType_array & IDsOfNodes);
SMESH::smIdType AddPolygonalFace(const SMESH::long_array & IDsOfNodes); SMESH::smIdType AddPolygonalFace(const SMESH::smIdType_array & IDsOfNodes);
SMESH::smIdType AddQuadPolygonalFace(const SMESH::long_array & IDsOfNodes); SMESH::smIdType AddQuadPolygonalFace(const SMESH::smIdType_array & IDsOfNodes);
SMESH::smIdType AddVolume(const SMESH::long_array & IDsOfNodes); SMESH::smIdType AddVolume(const SMESH::smIdType_array & IDsOfNodes);
SMESH::smIdType AddPolyhedralVolume(const SMESH::long_array & IDsOfNodes, SMESH::smIdType AddPolyhedralVolume(const SMESH::smIdType_array & IDsOfNodes,
const SMESH::long_array & Quantities); const SMESH::long_array & Quantities);
SMESH::smIdType AddPolyhedralVolumeByFaces(const SMESH::long_array & IdsOfFaces); SMESH::smIdType AddPolyhedralVolumeByFaces(const SMESH::smIdType_array & IdsOfFaces);
/*! /*!
* \brief Create 0D elements on all nodes of the given object except those * \brief Create 0D elements on all nodes of the given object except those
@ -139,14 +139,14 @@ public:
* \param NodeID - node ID * \param NodeID - node ID
* \param VertexID - vertex ID available through GEOM_Object.GetSubShapeIndices()[0] * \param VertexID - vertex ID available through GEOM_Object.GetSubShapeIndices()[0]
*/ */
void SetNodeOnVertex(CORBA::Long NodeID, CORBA::Long VertexID); void SetNodeOnVertex(SMESH::smIdType NodeID, CORBA::Long VertexID);
/*! /*!
* \brief Store node position on an edge * \brief Store node position on an edge
* \param NodeID - node ID * \param NodeID - node ID
* \param EdgeID - edge ID available through GEOM_Object.GetSubShapeIndices()[0] * \param EdgeID - edge ID available through GEOM_Object.GetSubShapeIndices()[0]
* \param paramOnEdge - parameter on edge where the node is located * \param paramOnEdge - parameter on edge where the node is located
*/ */
void SetNodeOnEdge(CORBA::Long NodeID, CORBA::Long EdgeID, void SetNodeOnEdge(SMESH::smIdType NodeID, CORBA::Long EdgeID,
CORBA::Double paramOnEdge); CORBA::Double paramOnEdge);
/*! /*!
* \brief Store node position on a face * \brief Store node position on a face
@ -155,28 +155,28 @@ public:
* \param u - U parameter on face where the node is located * \param u - U parameter on face where the node is located
* \param v - V parameter on face where the node is located * \param v - V parameter on face where the node is located
*/ */
void SetNodeOnFace(CORBA::Long NodeID, CORBA::Long FaceID, void SetNodeOnFace(SMESH::smIdType NodeID, CORBA::Long FaceID,
CORBA::Double u, CORBA::Double v); CORBA::Double u, CORBA::Double v);
/*! /*!
* \brief Bind a node to a solid * \brief Bind a node to a solid
* \param NodeID - node ID * \param NodeID - node ID
* \param SolidID - vertex ID available through GEOM_Object.GetSubShapeIndices()[0] * \param SolidID - vertex ID available through GEOM_Object.GetSubShapeIndices()[0]
*/ */
void SetNodeInVolume(CORBA::Long NodeID, CORBA::Long SolidID); void SetNodeInVolume(SMESH::smIdType NodeID, CORBA::Long SolidID);
/*! /*!
* \brief Bind an element to a shape * \brief Bind an element to a shape
* \param ElementID - element ID * \param ElementID - element ID
* \param ShapeID - shape ID available through GEOM_Object.GetSubShapeIndices()[0] * \param ShapeID - shape ID available through GEOM_Object.GetSubShapeIndices()[0]
*/ */
void SetMeshElementOnShape(CORBA::Long ElementID, CORBA::Long ShapeID); void SetMeshElementOnShape(SMESH::smIdType ElementID, CORBA::Long ShapeID);
CORBA::Boolean MoveNode(CORBA::Long NodeID, CORBA::Boolean MoveNode(SMESH::smIdType NodeID,
CORBA::Double x, CORBA::Double y, CORBA::Double z); CORBA::Double x, CORBA::Double y, CORBA::Double z);
CORBA::Boolean InverseDiag(CORBA::Long NodeID1, CORBA::Long NodeID2); CORBA::Boolean InverseDiag(SMESH::smIdType NodeID1, SMESH::smIdType NodeID2);
CORBA::Boolean DeleteDiag(CORBA::Long NodeID1, CORBA::Long NodeID2); CORBA::Boolean DeleteDiag(SMESH::smIdType NodeID1, SMESH::smIdType NodeID2);
CORBA::Boolean Reorient(const SMESH::long_array & IDsOfElements); CORBA::Boolean Reorient(const SMESH::smIdType_array & IDsOfElements);
CORBA::Boolean ReorientObject(SMESH::SMESH_IDSource_ptr theObject); CORBA::Boolean ReorientObject(SMESH::SMESH_IDSource_ptr theObject);
/*! /*!
@ -200,28 +200,28 @@ public:
* pointing either \a outside or \a inside the adjacent volumes. * pointing either \a outside or \a inside the adjacent volumes.
* \return number of reoriented faces. * \return number of reoriented faces.
*/ */
SMESH::smIdType Reorient2DBy3D(const SMESH::ListOfIDSources & faces, CORBA::Long Reorient2DBy3D(const SMESH::ListOfIDSources & faces,
SMESH::SMESH_IDSource_ptr volumes, SMESH::SMESH_IDSource_ptr volumes,
CORBA::Boolean outsideNormal); CORBA::Boolean outsideNormal);
// Split/Join // Split/Join
CORBA::Boolean TriToQuad (const SMESH::long_array & IDsOfElements, CORBA::Boolean TriToQuad (const SMESH::smIdType_array & IDsOfElements,
SMESH::NumericalFunctor_ptr Criterion, SMESH::NumericalFunctor_ptr Criterion,
CORBA::Double MaxAngle); CORBA::Double MaxAngle);
CORBA::Boolean TriToQuadObject (SMESH::SMESH_IDSource_ptr theObject, CORBA::Boolean TriToQuadObject (SMESH::SMESH_IDSource_ptr theObject,
SMESH::NumericalFunctor_ptr Criterion, SMESH::NumericalFunctor_ptr Criterion,
CORBA::Double MaxAngle); CORBA::Double MaxAngle);
CORBA::Boolean QuadToTri (const SMESH::long_array & IDsOfElements, CORBA::Boolean QuadToTri (const SMESH::smIdType_array & IDsOfElements,
SMESH::NumericalFunctor_ptr Criterion); SMESH::NumericalFunctor_ptr Criterion);
CORBA::Boolean QuadToTriObject (SMESH::SMESH_IDSource_ptr theObject, CORBA::Boolean QuadToTriObject (SMESH::SMESH_IDSource_ptr theObject,
SMESH::NumericalFunctor_ptr Criterion); SMESH::NumericalFunctor_ptr Criterion);
void QuadTo4Tri (SMESH::SMESH_IDSource_ptr theObject); void QuadTo4Tri (SMESH::SMESH_IDSource_ptr theObject);
CORBA::Boolean SplitQuad (const SMESH::long_array & IDsOfElements, CORBA::Boolean SplitQuad (const SMESH::smIdType_array & IDsOfElements,
CORBA::Boolean Diag13); CORBA::Boolean Diag13);
CORBA::Boolean SplitQuadObject (SMESH::SMESH_IDSource_ptr theObject, CORBA::Boolean SplitQuadObject (SMESH::SMESH_IDSource_ptr theObject,
CORBA::Boolean Diag13); CORBA::Boolean Diag13);
CORBA::Long BestSplit (CORBA::Long IDOfQuad, CORBA::Long BestSplit (CORBA::Long IDOfQuad,
SMESH::NumericalFunctor_ptr Criterion); SMESH::NumericalFunctor_ptr Criterion);
void SplitVolumesIntoTetra(SMESH::SMESH_IDSource_ptr elems, void SplitVolumesIntoTetra(SMESH::SMESH_IDSource_ptr elems,
CORBA::Short methodFlags); CORBA::Short methodFlags);
void SplitHexahedraIntoPrisms(SMESH::SMESH_IDSource_ptr elems, void SplitHexahedraIntoPrisms(SMESH::SMESH_IDSource_ptr elems,
@ -231,35 +231,35 @@ public:
CORBA::Boolean allDomains); CORBA::Boolean allDomains);
void SplitBiQuadraticIntoLinear(const SMESH::ListOfIDSources& elems); void SplitBiQuadraticIntoLinear(const SMESH::ListOfIDSources& elems);
CORBA::Boolean Smooth(const SMESH::long_array & IDsOfElements, CORBA::Boolean Smooth(const SMESH::smIdType_array & IDsOfElements,
const SMESH::long_array & IDsOfFixedNodes, const SMESH::smIdType_array & IDsOfFixedNodes,
CORBA::Long MaxNbOfIterations, CORBA::Short MaxNbOfIterations,
CORBA::Double MaxAspectRatio, CORBA::Double MaxAspectRatio,
SMESH::SMESH_MeshEditor::Smooth_Method Method); SMESH::SMESH_MeshEditor::Smooth_Method Method);
CORBA::Boolean SmoothObject(SMESH::SMESH_IDSource_ptr theObject, CORBA::Boolean SmoothObject(SMESH::SMESH_IDSource_ptr theObject,
const SMESH::long_array & IDsOfFixedNodes, const SMESH::smIdType_array & IDsOfFixedNodes,
CORBA::Long MaxNbOfIterations, CORBA::Short MaxNbOfIterations,
CORBA::Double MaxAspectRatio, CORBA::Double MaxAspectRatio,
SMESH::SMESH_MeshEditor::Smooth_Method Method); SMESH::SMESH_MeshEditor::Smooth_Method Method);
CORBA::Boolean SmoothParametric(const SMESH::long_array & IDsOfElements, CORBA::Boolean SmoothParametric(const SMESH::smIdType_array & IDsOfElements,
const SMESH::long_array & IDsOfFixedNodes, const SMESH::smIdType_array & IDsOfFixedNodes,
CORBA::Long MaxNbOfIterations, CORBA::Short MaxNbOfIterations,
CORBA::Double MaxAspectRatio, CORBA::Double MaxAspectRatio,
SMESH::SMESH_MeshEditor::Smooth_Method Method) ; SMESH::SMESH_MeshEditor::Smooth_Method Method) ;
CORBA::Boolean SmoothParametricObject(SMESH::SMESH_IDSource_ptr theObject, CORBA::Boolean SmoothParametricObject(SMESH::SMESH_IDSource_ptr theObject,
const SMESH::long_array & IDsOfFixedNodes, const SMESH::smIdType_array & IDsOfFixedNodes,
CORBA::Long MaxNbOfIterations, CORBA::Short MaxNbOfIterations,
CORBA::Double MaxAspectRatio, CORBA::Double MaxAspectRatio,
SMESH::SMESH_MeshEditor::Smooth_Method Method); SMESH::SMESH_MeshEditor::Smooth_Method Method);
CORBA::Boolean smooth(const SMESH::long_array & IDsOfElements, CORBA::Boolean smooth(const SMESH::smIdType_array & IDsOfElements,
const SMESH::long_array & IDsOfFixedNodes, const SMESH::smIdType_array & IDsOfFixedNodes,
CORBA::Long MaxNbOfIterations, CORBA::Short MaxNbOfIterations,
CORBA::Double MaxAspectRatio, CORBA::Double MaxAspectRatio,
SMESH::SMESH_MeshEditor::Smooth_Method Method, SMESH::SMESH_MeshEditor::Smooth_Method Method,
bool IsParametric); bool IsParametric);
CORBA::Boolean smoothObject(SMESH::SMESH_IDSource_ptr theObject, CORBA::Boolean smoothObject(SMESH::SMESH_IDSource_ptr theObject,
const SMESH::long_array & IDsOfFixedNodes, const SMESH::smIdType_array & IDsOfFixedNodes,
CORBA::Long MaxNbOfIterations, CORBA::Short MaxNbOfIterations,
CORBA::Double MaxAspectRatio, CORBA::Double MaxAspectRatio,
SMESH::SMESH_MeshEditor::Smooth_Method Method, SMESH::SMESH_MeshEditor::Smooth_Method Method,
bool IsParametric); bool IsParametric);
@ -303,12 +303,12 @@ public:
CORBA::Boolean useInputElemsOnly, CORBA::Boolean useInputElemsOnly,
CORBA::Boolean makeGroups, CORBA::Boolean makeGroups,
CORBA::Short dim); CORBA::Short dim);
SMESH::ListOfGroups* AdvancedExtrusion(const SMESH::long_array & theIDsOfElements, SMESH::ListOfGroups* AdvancedExtrusion(const SMESH::smIdType_array & theIDsOfElements,
const SMESH::DirStruct & theStepVector, const SMESH::DirStruct & theStepVector,
CORBA::Long theNbOfSteps, CORBA::Long theNbOfSteps,
CORBA::Long theExtrFlags, CORBA::Long theExtrFlags,
CORBA::Double theSewTolerance, CORBA::Double theSewTolerance,
CORBA::Boolean theMakeGroups); CORBA::Boolean theMakeGroups);
SMESH::ListOfGroups* SMESH::ListOfGroups*
ExtrusionAlongPathObjects(const SMESH::ListOfIDSources & Nodes, ExtrusionAlongPathObjects(const SMESH::ListOfIDSources & Nodes,
@ -316,7 +316,7 @@ public:
const SMESH::ListOfIDSources & Faces, const SMESH::ListOfIDSources & Faces,
SMESH::SMESH_IDSource_ptr PathMesh, SMESH::SMESH_IDSource_ptr PathMesh,
GEOM::GEOM_Object_ptr PathShape, GEOM::GEOM_Object_ptr PathShape,
CORBA::Long NodeStart, SMESH::smIdType NodeStart,
CORBA::Boolean HasAngles, CORBA::Boolean HasAngles,
const SMESH::double_array & Angles, const SMESH::double_array & Angles,
CORBA::Boolean AnglesVariation, CORBA::Boolean AnglesVariation,
@ -331,7 +331,7 @@ public:
GEOM::GEOM_Object_ptr PathShape, GEOM::GEOM_Object_ptr PathShape,
const SMESH::double_array & Angles); const SMESH::double_array & Angles);
void Mirror(const SMESH::long_array & IDsOfElements, void Mirror(const SMESH::smIdType_array & IDsOfElements,
const SMESH::AxisStruct & Axis, const SMESH::AxisStruct & Axis,
SMESH::SMESH_MeshEditor::MirrorType MirrorType, SMESH::SMESH_MeshEditor::MirrorType MirrorType,
CORBA::Boolean Copy); CORBA::Boolean Copy);
@ -339,39 +339,39 @@ public:
const SMESH::AxisStruct & Axis, const SMESH::AxisStruct & Axis,
SMESH::SMESH_MeshEditor::MirrorType MirrorType, SMESH::SMESH_MeshEditor::MirrorType MirrorType,
CORBA::Boolean Copy); CORBA::Boolean Copy);
void Translate(const SMESH::long_array & IDsOfElements, void Translate(const SMESH::smIdType_array & IDsOfElements,
const SMESH::DirStruct & Vector, const SMESH::DirStruct & Vector,
CORBA::Boolean Copy); CORBA::Boolean Copy);
void TranslateObject(SMESH::SMESH_IDSource_ptr theObject, void TranslateObject(SMESH::SMESH_IDSource_ptr theObject,
const SMESH::DirStruct & Vector, const SMESH::DirStruct & Vector,
CORBA::Boolean Copy); CORBA::Boolean Copy);
void Rotate(const SMESH::long_array & IDsOfElements, void Rotate(const SMESH::smIdType_array & IDsOfElements,
const SMESH::AxisStruct & Axis, const SMESH::AxisStruct & Axis,
CORBA::Double Angle, CORBA::Double Angle,
CORBA::Boolean Copy); CORBA::Boolean Copy);
void RotateObject(SMESH::SMESH_IDSource_ptr theObject, void RotateObject(SMESH::SMESH_IDSource_ptr theObject,
const SMESH::AxisStruct & Axis, const SMESH::AxisStruct & Axis,
CORBA::Double Angle, CORBA::Double Angle,
CORBA::Boolean Copy); CORBA::Boolean Copy);
SMESH::ListOfGroups* MirrorMakeGroups(const SMESH::long_array& IDsOfElements, SMESH::ListOfGroups* MirrorMakeGroups(const SMESH::smIdType_array& IDsOfElements,
const SMESH::AxisStruct& Mirror, const SMESH::AxisStruct& Mirror,
SMESH::SMESH_MeshEditor::MirrorType MirrorType); SMESH::SMESH_MeshEditor::MirrorType MirrorType);
SMESH::ListOfGroups* MirrorObjectMakeGroups(SMESH::SMESH_IDSource_ptr Object, SMESH::ListOfGroups* MirrorObjectMakeGroups(SMESH::SMESH_IDSource_ptr Object,
const SMESH::AxisStruct& Mirror, const SMESH::AxisStruct& Mirror,
SMESH::SMESH_MeshEditor::MirrorType MirrorType); SMESH::SMESH_MeshEditor::MirrorType MirrorType);
SMESH::ListOfGroups* TranslateMakeGroups(const SMESH::long_array& IDsOfElements, SMESH::ListOfGroups* TranslateMakeGroups(const SMESH::smIdType_array& IDsOfElements,
const SMESH::DirStruct& Vector); const SMESH::DirStruct& Vector);
SMESH::ListOfGroups* TranslateObjectMakeGroups(SMESH::SMESH_IDSource_ptr Object, SMESH::ListOfGroups* TranslateObjectMakeGroups(SMESH::SMESH_IDSource_ptr Object,
const SMESH::DirStruct& Vector); const SMESH::DirStruct& Vector);
SMESH::ListOfGroups* RotateMakeGroups(const SMESH::long_array& IDsOfElements, SMESH::ListOfGroups* RotateMakeGroups(const SMESH::smIdType_array& IDsOfElements,
const SMESH::AxisStruct& Axis, const SMESH::AxisStruct& Axis,
CORBA::Double AngleInRadians); CORBA::Double AngleInRadians);
SMESH::ListOfGroups* RotateObjectMakeGroups(SMESH::SMESH_IDSource_ptr Object, SMESH::ListOfGroups* RotateObjectMakeGroups(SMESH::SMESH_IDSource_ptr Object,
const SMESH::AxisStruct& Axis, const SMESH::AxisStruct& Axis,
CORBA::Double AngleInRadians); CORBA::Double AngleInRadians);
SMESH::SMESH_Mesh_ptr MirrorMakeMesh(const SMESH::long_array& IDsOfElements, SMESH::SMESH_Mesh_ptr MirrorMakeMesh(const SMESH::smIdType_array& IDsOfElements,
const SMESH::AxisStruct& Mirror, const SMESH::AxisStruct& Mirror,
SMESH::SMESH_MeshEditor::MirrorType MirrorType, SMESH::SMESH_MeshEditor::MirrorType MirrorType,
CORBA::Boolean CopyGroups, CORBA::Boolean CopyGroups,
@ -381,19 +381,19 @@ public:
SMESH::SMESH_MeshEditor::MirrorType MirrorType, SMESH::SMESH_MeshEditor::MirrorType MirrorType,
CORBA::Boolean CopyGroups, CORBA::Boolean CopyGroups,
const char* MeshName); const char* MeshName);
SMESH::SMESH_Mesh_ptr TranslateMakeMesh(const SMESH::long_array& IDsOfElements, SMESH::SMESH_Mesh_ptr TranslateMakeMesh(const SMESH::smIdType_array& IDsOfElements,
const SMESH::DirStruct& Vector, const SMESH::DirStruct& Vector,
CORBA::Boolean CopyGroups, CORBA::Boolean CopyGroups,
const char* MeshName); const char* MeshName);
SMESH::SMESH_Mesh_ptr TranslateObjectMakeMesh(SMESH::SMESH_IDSource_ptr Object, SMESH::SMESH_Mesh_ptr TranslateObjectMakeMesh(SMESH::SMESH_IDSource_ptr Object,
const SMESH::DirStruct& Vector, const SMESH::DirStruct& Vector,
CORBA::Boolean CopyGroups, CORBA::Boolean CopyGroups,
const char* MeshName); const char* MeshName);
SMESH::SMESH_Mesh_ptr RotateMakeMesh(const SMESH::long_array& IDsOfElements, SMESH::SMESH_Mesh_ptr RotateMakeMesh(const SMESH::smIdType_array& IDsOfElements,
const SMESH::AxisStruct& Axis, const SMESH::AxisStruct& Axis,
CORBA::Double AngleInRadians, CORBA::Double AngleInRadians,
CORBA::Boolean CopyGroups, CORBA::Boolean CopyGroups,
const char* MeshName); const char* MeshName);
SMESH::SMESH_Mesh_ptr RotateObjectMakeMesh(SMESH::SMESH_IDSource_ptr Object, SMESH::SMESH_Mesh_ptr RotateObjectMakeMesh(SMESH::SMESH_IDSource_ptr Object,
const SMESH::AxisStruct& Axis, const SMESH::AxisStruct& Axis,
CORBA::Double AngleInRadians, CORBA::Double AngleInRadians,
@ -443,10 +443,10 @@ public:
void MergeElements(const SMESH::array_of_long_array& GroupsOfElementsID, void MergeElements(const SMESH::array_of_long_array& GroupsOfElementsID,
const SMESH::ListOfIDSources& ElementsToKeep); const SMESH::ListOfIDSources& ElementsToKeep);
void MergeEqualElements(); void MergeEqualElements();
CORBA::Long MoveClosestNodeToPoint(CORBA::Double x, SMESH::smIdType MoveClosestNodeToPoint(CORBA::Double x,
CORBA::Double y, CORBA::Double y,
CORBA::Double z, CORBA::Double z,
CORBA::Long nodeID); SMESH::smIdType nodeID);
/*! /*!
* \brief Return ID of node closest to a given point * \brief Return ID of node closest to a given point
*/ */
@ -457,7 +457,7 @@ public:
* Return elements of given type where the given point is IN or ON. * Return elements of given type where the given point is IN or ON.
* 'ALL' type means elements of any type excluding nodes * 'ALL' type means elements of any type excluding nodes
*/ */
SMESH::long_array* FindElementsByPoint(CORBA::Double x, SMESH::smIdType_array* FindElementsByPoint(CORBA::Double x,
CORBA::Double y, CORBA::Double y,
CORBA::Double z, CORBA::Double z,
SMESH::ElementType type); SMESH::ElementType type);
@ -466,7 +466,7 @@ public:
* where the given point is IN or ON. * where the given point is IN or ON.
* 'ALL' type means elements of any type excluding nodes * 'ALL' type means elements of any type excluding nodes
*/ */
SMESH::long_array* FindAmongElementsByPoint(SMESH::SMESH_IDSource_ptr elements, SMESH::smIdType_array* FindAmongElementsByPoint(SMESH::SMESH_IDSource_ptr elements,
CORBA::Double x, CORBA::Double x,
CORBA::Double y, CORBA::Double y,
CORBA::Double z, CORBA::Double z,
@ -509,7 +509,7 @@ public:
* If a group is closed, the first and last nodes of the group are same. * If a group is closed, the first and last nodes of the group are same.
*/ */
SMESH::array_of_long_array* Get1DBranches( SMESH::SMESH_IDSource_ptr edges, SMESH::array_of_long_array* Get1DBranches( SMESH::SMESH_IDSource_ptr edges,
CORBA::Long startNode, SMESH::smIdType startNode,
SMESH::array_of_long_array_out nodeGroups); SMESH::array_of_long_array_out nodeGroups);
/*! /*!
@ -535,51 +535,51 @@ public:
CORBA::Boolean createPolyedrs); CORBA::Boolean createPolyedrs);
SMESH::SMESH_MeshEditor::Sew_Error SMESH::SMESH_MeshEditor::Sew_Error
SewFreeBorders(CORBA::Long FirstNodeID1, SewFreeBorders(SMESH::smIdType FirstNodeID1,
CORBA::Long SecondNodeID1, SMESH::smIdType SecondNodeID1,
CORBA::Long LastNodeID1, SMESH::smIdType LastNodeID1,
CORBA::Long FirstNodeID2, SMESH::smIdType FirstNodeID2,
CORBA::Long SecondNodeID2, SMESH::smIdType SecondNodeID2,
CORBA::Long LastNodeID2, SMESH::smIdType LastNodeID2,
CORBA::Boolean CreatePolygons, CORBA::Boolean CreatePolygons,
CORBA::Boolean CreatePolyedrs); CORBA::Boolean CreatePolyedrs);
SMESH::SMESH_MeshEditor::Sew_Error SMESH::SMESH_MeshEditor::Sew_Error
SewConformFreeBorders(CORBA::Long FirstNodeID1, SewConformFreeBorders(SMESH::smIdType FirstNodeID1,
CORBA::Long SecondNodeID1, SMESH::smIdType SecondNodeID1,
CORBA::Long LastNodeID1, SMESH::smIdType LastNodeID1,
CORBA::Long FirstNodeID2, SMESH::smIdType FirstNodeID2,
CORBA::Long SecondNodeID2); SMESH::smIdType SecondNodeID2);
SMESH::SMESH_MeshEditor::Sew_Error SMESH::SMESH_MeshEditor::Sew_Error
SewBorderToSide(CORBA::Long FirstNodeIDOnFreeBorder, SewBorderToSide(SMESH::smIdType FirstNodeIDOnFreeBorder,
CORBA::Long SecondNodeIDOnFreeBorder, SMESH::smIdType SecondNodeIDOnFreeBorder,
CORBA::Long LastNodeIDOnFreeBorder, SMESH::smIdType LastNodeIDOnFreeBorder,
CORBA::Long FirstNodeIDOnSide, SMESH::smIdType FirstNodeIDOnSide,
CORBA::Long LastNodeIDOnSide, SMESH::smIdType LastNodeIDOnSide,
CORBA::Boolean CreatePolygons, CORBA::Boolean CreatePolygons,
CORBA::Boolean CreatePolyedrs); CORBA::Boolean CreatePolyedrs);
SMESH::SMESH_MeshEditor::Sew_Error SMESH::SMESH_MeshEditor::Sew_Error
SewSideElements(const SMESH::long_array& IDsOfSide1Elements, SewSideElements(const SMESH::smIdType_array& IDsOfSide1Elements,
const SMESH::long_array& IDsOfSide2Elements, const SMESH::smIdType_array& IDsOfSide2Elements,
CORBA::Long NodeID1OfSide1ToMerge, SMESH::smIdType NodeID1OfSide1ToMerge,
CORBA::Long NodeID1OfSide2ToMerge, SMESH::smIdType NodeID1OfSide2ToMerge,
CORBA::Long NodeID2OfSide1ToMerge, SMESH::smIdType NodeID2OfSide1ToMerge,
CORBA::Long NodeID2OfSide2ToMerge); SMESH::smIdType NodeID2OfSide2ToMerge);
/*! /*!
* Set new nodes for given element. * Set new nodes for given element.
* If number of nodes is not corresponded to type of * If number of nodes is not corresponded to type of
* element - returns false * element - returns false
*/ */
CORBA::Boolean ChangeElemNodes(CORBA::Long ide, const SMESH::long_array& newIDs); CORBA::Boolean ChangeElemNodes(SMESH::smIdType ide, const SMESH::smIdType_array& newIDs);
SMESH::SMESH_Group_ptr DoubleElements(SMESH::SMESH_IDSource_ptr theElements, SMESH::SMESH_Group_ptr DoubleElements(SMESH::SMESH_IDSource_ptr theElements,
const char* theGroupName); const char* theGroupName);
CORBA::Boolean DoubleNodes( const SMESH::long_array& theNodes, CORBA::Boolean DoubleNodes( const SMESH::smIdType_array& theNodes,
const SMESH::long_array& theModifiedElems ); const SMESH::smIdType_array& theModifiedElems );
CORBA::Boolean DoubleNode( CORBA::Long theNodeId, CORBA::Boolean DoubleNode( SMESH::smIdType theNodeId,
const SMESH::long_array& theModifiedElems ); const SMESH::smIdType_array& theModifiedElems );
CORBA::Boolean DoubleNodeGroup( SMESH::SMESH_GroupBase_ptr theNodes, CORBA::Boolean DoubleNodeGroup( SMESH::SMESH_GroupBase_ptr theNodes,
SMESH::SMESH_GroupBase_ptr theModifiedElems ); SMESH::SMESH_GroupBase_ptr theModifiedElems );
@ -611,9 +611,9 @@ public:
* \return TRUE if operation has been completed successfully, FALSE otherwise * \return TRUE if operation has been completed successfully, FALSE otherwise
* \sa DoubleNodeGroup(), DoubleNodeGroups() * \sa DoubleNodeGroup(), DoubleNodeGroups()
*/ */
CORBA::Boolean DoubleNodeElem( const SMESH::long_array& theElems, CORBA::Boolean DoubleNodeElem( const SMESH::smIdType_array& theElems,
const SMESH::long_array& theNodesNot, const SMESH::smIdType_array& theNodesNot,
const SMESH::long_array& theAffectedElems ); const SMESH::smIdType_array& theAffectedElems );
/*! /*!
* \brief Creates a hole in a mesh by doubling the nodes of some particular elements * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
@ -626,9 +626,9 @@ public:
* \return TRUE if operation has been completed successfully, FALSE otherwise * \return TRUE if operation has been completed successfully, FALSE otherwise
* \sa DoubleNodeGroupInRegion(), DoubleNodeGroupsInRegion() * \sa DoubleNodeGroupInRegion(), DoubleNodeGroupsInRegion()
*/ */
CORBA::Boolean DoubleNodeElemInRegion( const SMESH::long_array& theElems, CORBA::Boolean DoubleNodeElemInRegion( const SMESH::smIdType_array& theElems,
const SMESH::long_array& theNodesNot, const SMESH::smIdType_array& theNodesNot,
GEOM::GEOM_Object_ptr theShape ); GEOM::GEOM_Object_ptr theShape );
/*! /*!
* \brief Creates a hole in a mesh by doubling the nodes of some particular elements * \brief Creates a hole in a mesh by doubling the nodes of some particular elements
@ -794,7 +794,7 @@ public:
CORBA::Boolean toCopyMissingBondary, CORBA::Boolean toCopyMissingBondary,
SMESH::SMESH_Group_out group); SMESH::SMESH_Group_out group);
SMESH::smIdType MakeBoundaryElements(SMESH::Bnd_Dimension dimension, CORBA::Long MakeBoundaryElements(SMESH::Bnd_Dimension dimension,
const char* groupName, const char* groupName,
const char* meshName, const char* meshName,
CORBA::Boolean toCopyAll, CORBA::Boolean toCopyAll,

View File

@ -1250,7 +1250,7 @@ SMESH::ListOfGroups * SMESH_Mesh_i::GetGroups()
*/ */
//============================================================================= //=============================================================================
SMESH::smIdType SMESH_Mesh_i::NbGroups() CORBA::Long SMESH_Mesh_i::NbGroups()
{ {
Unexpect aCatch(SALOME_SalomeException); Unexpect aCatch(SALOME_SalomeException);
return _mapGroups.size(); return _mapGroups.size();
@ -3391,7 +3391,7 @@ void SMESH_Mesh_i::ClearLog()
*/ */
//================================================================================ //================================================================================
SMESH::smIdType SMESH_Mesh_i::GetId() CORBA::Long SMESH_Mesh_i::GetId()
{ {
return _id; return _id;
} }
@ -4738,7 +4738,7 @@ char* SMESH_Mesh_i::Dump()
*/ */
//============================================================================= //=============================================================================
SMESH::long_array* SMESH_Mesh_i::GetIDs() SMESH::smIdType_array* SMESH_Mesh_i::GetIDs()
{ {
return GetElementsId(); return GetElementsId();
} }
@ -4749,22 +4749,22 @@ SMESH::long_array* SMESH_Mesh_i::GetIDs()
*/ */
//============================================================================= //=============================================================================
SMESH::long_array* SMESH_Mesh_i::GetElementsId() SMESH::smIdType_array* SMESH_Mesh_i::GetElementsId()
{ {
Unexpect aCatch(SALOME_SalomeException); Unexpect aCatch(SALOME_SalomeException);
if ( _preMeshInfo ) if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile(); _preMeshInfo->FullLoadFromFile();
SMESH::long_array_var aResult = new SMESH::long_array(); SMESH::smIdType_array_var aResult = new SMESH::smIdType_array();
SMESHDS_Mesh* aSMESHDS_Mesh = _impl->GetMeshDS(); SMESHDS_Mesh* aSMESHDS_Mesh = _impl->GetMeshDS();
if ( aSMESHDS_Mesh == NULL ) if ( aSMESHDS_Mesh == NULL )
return aResult._retn(); return aResult._retn();
long nbElements = NbElements(); smIdType nbElements = NbElements();
aResult->length( nbElements ); aResult->length( nbElements );
SMDS_ElemIteratorPtr anIt = aSMESHDS_Mesh->elementsIterator(); SMDS_ElemIteratorPtr anIt = aSMESHDS_Mesh->elementsIterator();
for ( int i = 0, n = nbElements; i < n && anIt->more(); i++ ) for ( smIdType i = 0, n = nbElements; i < n && anIt->more(); i++ )
aResult[i] = anIt->next()->GetID(); aResult[i] = anIt->next()->GetID();
return aResult._retn(); return aResult._retn();
@ -4777,19 +4777,19 @@ SMESH::long_array* SMESH_Mesh_i::GetElementsId()
*/ */
//============================================================================= //=============================================================================
SMESH::long_array* SMESH_Mesh_i::GetElementsByType( SMESH::ElementType theElemType ) SMESH::smIdType_array* SMESH_Mesh_i::GetElementsByType( SMESH::ElementType theElemType )
{ {
Unexpect aCatch(SALOME_SalomeException); Unexpect aCatch(SALOME_SalomeException);
if ( _preMeshInfo ) if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile(); _preMeshInfo->FullLoadFromFile();
SMESH::long_array_var aResult = new SMESH::long_array(); SMESH::smIdType_array_var aResult = new SMESH::smIdType_array();
SMESHDS_Mesh* aSMESHDS_Mesh = _impl->GetMeshDS(); SMESHDS_Mesh* aSMESHDS_Mesh = _impl->GetMeshDS();
if ( aSMESHDS_Mesh == NULL ) if ( aSMESHDS_Mesh == NULL )
return aResult._retn(); return aResult._retn();
long nbElements = NbElements(); smIdType nbElements = NbElements();
// No sense in returning ids of elements along with ids of nodes: // No sense in returning ids of elements along with ids of nodes:
// when theElemType == SMESH::ALL, return node ids only if // when theElemType == SMESH::ALL, return node ids only if
@ -4799,7 +4799,7 @@ SMESH::long_array* SMESH_Mesh_i::GetElementsByType( SMESH::ElementType theElemTy
aResult->length( nbElements ); aResult->length( nbElements );
int i = 0; smIdType i = 0;
SMDS_ElemIteratorPtr anIt = aSMESHDS_Mesh->elementsIterator( (SMDSAbs_ElementType)theElemType ); SMDS_ElemIteratorPtr anIt = aSMESHDS_Mesh->elementsIterator( (SMDSAbs_ElementType)theElemType );
while ( i < nbElements && anIt->more() ) while ( i < nbElements && anIt->more() )
@ -4816,22 +4816,22 @@ SMESH::long_array* SMESH_Mesh_i::GetElementsByType( SMESH::ElementType theElemTy
*/ */
//============================================================================= //=============================================================================
SMESH::long_array* SMESH_Mesh_i::GetNodesId() SMESH::smIdType_array* SMESH_Mesh_i::GetNodesId()
{ {
Unexpect aCatch(SALOME_SalomeException); Unexpect aCatch(SALOME_SalomeException);
if ( _preMeshInfo ) if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile(); _preMeshInfo->FullLoadFromFile();
SMESH::long_array_var aResult = new SMESH::long_array(); SMESH::smIdType_array_var aResult = new SMESH::smIdType_array();
SMESHDS_Mesh* aMeshDS = _impl->GetMeshDS(); SMESHDS_Mesh* aMeshDS = _impl->GetMeshDS();
if ( aMeshDS == NULL ) if ( aMeshDS == NULL )
return aResult._retn(); return aResult._retn();
long nbNodes = NbNodes(); smIdType nbNodes = NbNodes();
aResult->length( nbNodes ); aResult->length( nbNodes );
SMDS_NodeIteratorPtr anIt = aMeshDS->nodesIterator(); SMDS_NodeIteratorPtr anIt = aMeshDS->nodesIterator();
for ( int i = 0, n = nbNodes; i < n && anIt->more(); i++ ) for ( smIdType i = 0, n = nbNodes; i < n && anIt->more(); i++ )
aResult[i] = anIt->next()->GetID(); aResult[i] = anIt->next()->GetID();
return aResult._retn(); return aResult._retn();
@ -4843,7 +4843,7 @@ SMESH::long_array* SMESH_Mesh_i::GetNodesId()
*/ */
//============================================================================= //=============================================================================
SMESH::ElementType SMESH_Mesh_i::GetElementType( const CORBA::Long id, const bool iselem ) SMESH::ElementType SMESH_Mesh_i::GetElementType( const SMESH::smIdType id, const bool iselem )
{ {
SMESH::ElementType type = SMESH::ALL; SMESH::ElementType type = SMESH::ALL;
SMESH_TRY; SMESH_TRY;
@ -4864,7 +4864,7 @@ SMESH::ElementType SMESH_Mesh_i::GetElementType( const CORBA::Long id, const boo
*/ */
//============================================================================= //=============================================================================
SMESH::EntityType SMESH_Mesh_i::GetElementGeomType( const CORBA::Long id ) SMESH::EntityType SMESH_Mesh_i::GetElementGeomType( const SMESH::smIdType id )
{ {
if ( _preMeshInfo ) if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile(); _preMeshInfo->FullLoadFromFile();
@ -4882,7 +4882,7 @@ SMESH::EntityType SMESH_Mesh_i::GetElementGeomType( const CORBA::Long id )
*/ */
//============================================================================= //=============================================================================
SMESH::GeometryType SMESH_Mesh_i::GetElementShape( const CORBA::Long id ) SMESH::GeometryType SMESH_Mesh_i::GetElementShape( const SMESH::smIdType id )
{ {
if ( _preMeshInfo ) if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile(); _preMeshInfo->FullLoadFromFile();
@ -4900,9 +4900,9 @@ SMESH::GeometryType SMESH_Mesh_i::GetElementShape( const CORBA::Long id )
*/ */
//============================================================================= //=============================================================================
SMESH::long_array* SMESH_Mesh_i::GetSubMeshElementsId(const CORBA::Long ShapeID) SMESH::smIdType_array* SMESH_Mesh_i::GetSubMeshElementsId(const CORBA::Long ShapeID)
{ {
SMESH::long_array_var aResult = new SMESH::long_array(); SMESH::smIdType_array_var aResult = new SMESH::smIdType_array();
SMESH_TRY; SMESH_TRY;
if ( _preMeshInfo ) if ( _preMeshInfo )
@ -4917,7 +4917,7 @@ SMESH::long_array* SMESH_Mesh_i::GetSubMeshElementsId(const CORBA::Long ShapeID)
aResult->length(SDSM->NbElements()); aResult->length(SDSM->NbElements());
SMDS_ElemIteratorPtr eIt = SDSM->GetElements(); SMDS_ElemIteratorPtr eIt = SDSM->GetElements();
int i = 0; smIdType i = 0;
while ( eIt->more() ) { while ( eIt->more() ) {
aResult[i++] = eIt->next()->GetID(); aResult[i++] = eIt->next()->GetID();
} }
@ -4935,10 +4935,10 @@ SMESH::long_array* SMESH_Mesh_i::GetSubMeshElementsId(const CORBA::Long ShapeID)
*/ */
//============================================================================= //=============================================================================
SMESH::long_array* SMESH_Mesh_i::GetSubMeshNodesId(const CORBA::Long ShapeID, SMESH::smIdType_array* SMESH_Mesh_i::GetSubMeshNodesId(const CORBA::Long ShapeID,
CORBA::Boolean all) CORBA::Boolean all)
{ {
SMESH::long_array_var aResult = new SMESH::long_array(); SMESH::smIdType_array_var aResult = new SMESH::smIdType_array();
SMESH_TRY; SMESH_TRY;
if ( _preMeshInfo ) if ( _preMeshInfo )
@ -4950,7 +4950,7 @@ SMESH::long_array* SMESH_Mesh_i::GetSubMeshNodesId(const CORBA::Long ShapeID,
SMESHDS_SubMesh* SDSM = SM->GetSubMeshDS(); SMESHDS_SubMesh* SDSM = SM->GetSubMeshDS();
if(!SDSM) return aResult._retn(); if(!SDSM) return aResult._retn();
set<int> theElems; set<smIdType> theElems;
if( !all || (SDSM->NbElements()==0) ) { // internal nodes or vertex submesh if( !all || (SDSM->NbElements()==0) ) { // internal nodes or vertex submesh
SMDS_NodeIteratorPtr nIt = SDSM->GetNodes(); SMDS_NodeIteratorPtr nIt = SDSM->GetNodes();
while ( nIt->more() ) { while ( nIt->more() ) {
@ -4971,8 +4971,8 @@ SMESH::long_array* SMESH_Mesh_i::GetSubMeshNodesId(const CORBA::Long ShapeID,
} }
aResult->length(theElems.size()); aResult->length(theElems.size());
set<int>::iterator itElem; set<smIdType>::iterator itElem;
int i = 0; smIdType i = 0;
for ( itElem = theElems.begin(); itElem != theElems.end(); itElem++ ) for ( itElem = theElems.begin(); itElem != theElems.end(); itElem++ )
aResult[i++] = *itElem; aResult[i++] = *itElem;
@ -5039,7 +5039,7 @@ CORBA::LongLong SMESH_Mesh_i::GetMeshPtr()
*/ */
//============================================================================= //=============================================================================
SMESH::double_array* SMESH_Mesh_i::GetNodeXYZ(const CORBA::Long id) SMESH::double_array* SMESH_Mesh_i::GetNodeXYZ(const SMESH::smIdType id)
{ {
if ( _preMeshInfo ) if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile(); _preMeshInfo->FullLoadFromFile();
@ -5070,13 +5070,13 @@ SMESH::double_array* SMESH_Mesh_i::GetNodeXYZ(const CORBA::Long id)
*/ */
//============================================================================= //=============================================================================
SMESH::long_array* SMESH_Mesh_i::GetNodeInverseElements(const CORBA::Long id, SMESH::smIdType_array* SMESH_Mesh_i::GetNodeInverseElements(const SMESH::smIdType id,
SMESH::ElementType elemType) SMESH::ElementType elemType)
{ {
if ( _preMeshInfo ) if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile(); _preMeshInfo->FullLoadFromFile();
SMESH::long_array_var aResult = new SMESH::long_array(); SMESH::smIdType_array_var aResult = new SMESH::smIdType_array();
SMESHDS_Mesh* aMeshDS = _impl->GetMeshDS(); SMESHDS_Mesh* aMeshDS = _impl->GetMeshDS();
if ( aMeshDS == NULL ) if ( aMeshDS == NULL )
return aResult._retn(); return aResult._retn();
@ -5090,7 +5090,7 @@ SMESH::long_array* SMESH_Mesh_i::GetNodeInverseElements(const CORBA::Long id,
SMDSAbs_ElementType type = SMDSAbs_ElementType( elemType ); SMDSAbs_ElementType type = SMDSAbs_ElementType( elemType );
SMDS_ElemIteratorPtr eIt = aNode->GetInverseElementIterator( type ); SMDS_ElemIteratorPtr eIt = aNode->GetInverseElementIterator( type );
aResult->length( aNode->NbInverseElements( type )); aResult->length( aNode->NbInverseElements( type ));
for( int i = 0; eIt->more(); ++i ) for( smIdType i = 0; eIt->more(); ++i )
{ {
const SMDS_MeshElement* elem = eIt->next(); const SMDS_MeshElement* elem = eIt->next();
aResult[ i ] = elem->GetID(); aResult[ i ] = elem->GetID();
@ -5104,7 +5104,7 @@ SMESH::long_array* SMESH_Mesh_i::GetNodeInverseElements(const CORBA::Long id,
*/ */
//============================================================================= //=============================================================================
SMESH::NodePosition* SMESH_Mesh_i::GetNodePosition(CORBA::Long NodeID) SMESH::NodePosition* SMESH_Mesh_i::GetNodePosition(SMESH::smIdType NodeID)
{ {
if ( _preMeshInfo ) if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile(); _preMeshInfo->FullLoadFromFile();
@ -5157,7 +5157,7 @@ SMESH::NodePosition* SMESH_Mesh_i::GetNodePosition(CORBA::Long NodeID)
*/ */
//============================================================================= //=============================================================================
SMESH::ElementPosition SMESH_Mesh_i::GetElementPosition(CORBA::Long ElemID) SMESH::ElementPosition SMESH_Mesh_i::GetElementPosition(SMESH::smIdType ElemID)
{ {
if ( _preMeshInfo ) if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile(); _preMeshInfo->FullLoadFromFile();
@ -5204,7 +5204,7 @@ SMESH::ElementPosition SMESH_Mesh_i::GetElementPosition(CORBA::Long ElemID)
*/ */
//============================================================================= //=============================================================================
CORBA::Long SMESH_Mesh_i::GetShapeID(const CORBA::Long id) CORBA::Long SMESH_Mesh_i::GetShapeID(const SMESH::smIdType id)
{ {
if ( _preMeshInfo ) if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile(); _preMeshInfo->FullLoadFromFile();
@ -5231,7 +5231,7 @@ CORBA::Long SMESH_Mesh_i::GetShapeID(const CORBA::Long id)
*/ */
//============================================================================= //=============================================================================
CORBA::Long SMESH_Mesh_i::GetShapeIDForElem(const CORBA::Long id) CORBA::Long SMESH_Mesh_i::GetShapeIDForElem(const SMESH::smIdType id)
{ {
if ( _preMeshInfo ) if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile(); _preMeshInfo->FullLoadFromFile();
@ -5261,7 +5261,7 @@ CORBA::Long SMESH_Mesh_i::GetShapeIDForElem(const CORBA::Long id)
*/ */
//============================================================================= //=============================================================================
CORBA::Long SMESH_Mesh_i::GetElemNbNodes(const CORBA::Long id) CORBA::Short SMESH_Mesh_i::GetElemNbNodes(const SMESH::smIdType id)
{ {
if ( _preMeshInfo ) if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile(); _preMeshInfo->FullLoadFromFile();
@ -5283,7 +5283,7 @@ CORBA::Long SMESH_Mesh_i::GetElemNbNodes(const CORBA::Long id)
*/ */
//============================================================================= //=============================================================================
CORBA::Long SMESH_Mesh_i::GetElemNode(const CORBA::Long id, const CORBA::Long index) SMESH::smIdType SMESH_Mesh_i::GetElemNode(const SMESH::smIdType id, const CORBA::Short index)
{ {
if ( _preMeshInfo ) if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile(); _preMeshInfo->FullLoadFromFile();
@ -5302,18 +5302,18 @@ CORBA::Long SMESH_Mesh_i::GetElemNode(const CORBA::Long id, const CORBA::Long in
*/ */
//============================================================================= //=============================================================================
SMESH::long_array* SMESH_Mesh_i::GetElemNodes(const CORBA::Long id) SMESH::smIdType_array* SMESH_Mesh_i::GetElemNodes(const SMESH::smIdType id)
{ {
if ( _preMeshInfo ) if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile(); _preMeshInfo->FullLoadFromFile();
SMESH::long_array_var aResult = new SMESH::long_array(); SMESH::smIdType_array_var aResult = new SMESH::smIdType_array();
if ( SMESHDS_Mesh* aMeshDS = _impl->GetMeshDS() ) if ( SMESHDS_Mesh* aMeshDS = _impl->GetMeshDS() )
{ {
if ( const SMDS_MeshElement* elem = aMeshDS->FindElement(id) ) if ( const SMDS_MeshElement* elem = aMeshDS->FindElement(id) )
{ {
aResult->length( elem->NbNodes() ); aResult->length( elem->NbNodes() );
for ( CORBA::ULong i = 0; i < aResult->length(); ++i ) for ( SMESH::smIdType i = 0; i < aResult->length(); ++i )
if ( const SMDS_MeshNode* n = elem->GetNode( i )) if ( const SMDS_MeshNode* n = elem->GetNode( i ))
aResult[ i ] = n->GetID(); aResult[ i ] = n->GetID();
} }
@ -5328,7 +5328,7 @@ SMESH::long_array* SMESH_Mesh_i::GetElemNodes(const CORBA::Long id)
*/ */
//============================================================================= //=============================================================================
CORBA::Boolean SMESH_Mesh_i::IsMediumNode(const CORBA::Long ide, const CORBA::Long idn) CORBA::Boolean SMESH_Mesh_i::IsMediumNode(const SMESH::smIdType ide, const SMESH::smIdType idn)
{ {
if ( _preMeshInfo ) if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile(); _preMeshInfo->FullLoadFromFile();
@ -5353,7 +5353,7 @@ CORBA::Boolean SMESH_Mesh_i::IsMediumNode(const CORBA::Long ide, const CORBA::Lo
*/ */
//============================================================================= //=============================================================================
CORBA::Boolean SMESH_Mesh_i::IsMediumNodeOfAnyElem(const CORBA::Long idn, CORBA::Boolean SMESH_Mesh_i::IsMediumNodeOfAnyElem(const SMESH::smIdType idn,
SMESH::ElementType theElemType) SMESH::ElementType theElemType)
{ {
if ( _preMeshInfo ) if ( _preMeshInfo )
@ -5384,7 +5384,7 @@ CORBA::Boolean SMESH_Mesh_i::IsMediumNodeOfAnyElem(const CORBA::Long idn,
*/ */
//============================================================================= //=============================================================================
CORBA::Long SMESH_Mesh_i::ElemNbEdges(const CORBA::Long id) CORBA::Long SMESH_Mesh_i::ElemNbEdges(const SMESH::smIdType id)
{ {
if ( _preMeshInfo ) if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile(); _preMeshInfo->FullLoadFromFile();
@ -5403,7 +5403,7 @@ CORBA::Long SMESH_Mesh_i::ElemNbEdges(const CORBA::Long id)
*/ */
//============================================================================= //=============================================================================
CORBA::Long SMESH_Mesh_i::ElemNbFaces(const CORBA::Long id) CORBA::Long SMESH_Mesh_i::ElemNbFaces(const SMESH::smIdType id)
{ {
if ( _preMeshInfo ) if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile(); _preMeshInfo->FullLoadFromFile();
@ -5421,13 +5421,13 @@ CORBA::Long SMESH_Mesh_i::ElemNbFaces(const CORBA::Long id)
*/ */
//================================================================================ //================================================================================
SMESH::long_array* SMESH_Mesh_i::GetElemFaceNodes(CORBA::Long elemId, SMESH::smIdType_array* SMESH_Mesh_i::GetElemFaceNodes(SMESH::smIdType elemId,
CORBA::Short faceIndex) CORBA::Short faceIndex)
{ {
if ( _preMeshInfo ) if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile(); _preMeshInfo->FullLoadFromFile();
SMESH::long_array_var aResult = new SMESH::long_array(); SMESH::smIdType_array_var aResult = new SMESH::smIdType_array();
if ( SMESHDS_Mesh* aMeshDS = _impl->GetMeshDS() ) if ( SMESHDS_Mesh* aMeshDS = _impl->GetMeshDS() )
{ {
if ( const SMDS_MeshElement* elem = aMeshDS->FindElement(elemId) ) if ( const SMDS_MeshElement* elem = aMeshDS->FindElement(elemId) )
@ -5437,7 +5437,7 @@ SMESH::long_array* SMESH_Mesh_i::GetElemFaceNodes(CORBA::Long elemId,
{ {
aResult->length( vtool.NbFaceNodes( faceIndex )); aResult->length( vtool.NbFaceNodes( faceIndex ));
const SMDS_MeshNode** nn = vtool.GetFaceNodes( faceIndex ); const SMDS_MeshNode** nn = vtool.GetFaceNodes( faceIndex );
for ( CORBA::ULong i = 0; i < aResult->length(); ++i ) for ( SMESH::smIdType i = 0; i < aResult->length(); ++i )
aResult[ i ] = nn[ i ]->GetID(); aResult[ i ] = nn[ i ]->GetID();
} }
} }
@ -5479,7 +5479,7 @@ SMESH::double_array* SMESH_Mesh_i::GetFaceNormal(CORBA::Long elemId,
*/ */
//================================================================================ //================================================================================
SMESH::smIdType SMESH_Mesh_i::FindElementByNodes(const SMESH::long_array& nodes) SMESH::smIdType SMESH_Mesh_i::FindElementByNodes(const SMESH::smIdType_array& nodes)
{ {
if ( _preMeshInfo ) if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile(); _preMeshInfo->FullLoadFromFile();
@ -5509,24 +5509,24 @@ SMESH::smIdType SMESH_Mesh_i::FindElementByNodes(const SMESH::long_array& nodes)
*/ */
//================================================================================ //================================================================================
SMESH::long_array* SMESH_Mesh_i::GetElementsByNodes(const SMESH::long_array& nodes, SMESH::smIdType_array* SMESH_Mesh_i::GetElementsByNodes(const SMESH::smIdType_array& nodes,
SMESH::ElementType elemType) SMESH::ElementType elemType)
{ {
if ( _preMeshInfo ) if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile(); _preMeshInfo->FullLoadFromFile();
SMESH::long_array_var result = new SMESH::long_array(); SMESH::smIdType_array_var result = new SMESH::smIdType_array();
if ( SMESHDS_Mesh* mesh = _impl->GetMeshDS() ) if ( SMESHDS_Mesh* mesh = _impl->GetMeshDS() )
{ {
vector< const SMDS_MeshNode * > nn( nodes.length() ); vector< const SMDS_MeshNode * > nn( nodes.length() );
for ( CORBA::ULong i = 0; i < nodes.length(); ++i ) for ( SMESH::smIdType i = 0; i < nodes.length(); ++i )
nn[i] = mesh->FindNode( nodes[i] ); nn[i] = mesh->FindNode( nodes[i] );
std::vector<const SMDS_MeshElement *> elems; std::vector<const SMDS_MeshElement *> elems;
mesh->GetElementsByNodes( nn, elems, (SMDSAbs_ElementType) elemType ); mesh->GetElementsByNodes( nn, elems, (SMDSAbs_ElementType) elemType );
result->length( elems.size() ); result->length( elems.size() );
for ( size_t i = 0; i < elems.size(); ++i ) for ( smIdType i = 0; i < elems.size(); ++i )
result[i] = elems[i]->GetID(); result[i] = elems[i]->GetID();
} }
return result._retn(); return result._retn();
@ -5538,7 +5538,7 @@ SMESH::long_array* SMESH_Mesh_i::GetElementsByNodes(const SMESH::long_array& nod
*/ */
//============================================================================= //=============================================================================
CORBA::Boolean SMESH_Mesh_i::IsPoly(const CORBA::Long id) CORBA::Boolean SMESH_Mesh_i::IsPoly(const SMESH::smIdType id)
{ {
if ( _preMeshInfo ) if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile(); _preMeshInfo->FullLoadFromFile();
@ -5557,7 +5557,7 @@ CORBA::Boolean SMESH_Mesh_i::IsPoly(const CORBA::Long id)
*/ */
//============================================================================= //=============================================================================
CORBA::Boolean SMESH_Mesh_i::IsQuadratic(const CORBA::Long id) CORBA::Boolean SMESH_Mesh_i::IsQuadratic(const SMESH::smIdType id)
{ {
if ( _preMeshInfo ) if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile(); _preMeshInfo->FullLoadFromFile();
@ -5575,7 +5575,7 @@ CORBA::Boolean SMESH_Mesh_i::IsQuadratic(const CORBA::Long id)
*/ */
//============================================================================= //=============================================================================
CORBA::Double SMESH_Mesh_i::GetBallDiameter(CORBA::Long id) CORBA::Double SMESH_Mesh_i::GetBallDiameter(SMESH::smIdType id)
{ {
if ( _preMeshInfo ) if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile(); _preMeshInfo->FullLoadFromFile();
@ -5593,7 +5593,7 @@ CORBA::Double SMESH_Mesh_i::GetBallDiameter(CORBA::Long id)
*/ */
//============================================================================= //=============================================================================
SMESH::double_array* SMESH_Mesh_i::BaryCenter(const CORBA::Long id) SMESH::double_array* SMESH_Mesh_i::BaryCenter(const SMESH::smIdType id)
{ {
if ( _preMeshInfo ) if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile(); _preMeshInfo->FullLoadFromFile();
@ -6024,12 +6024,12 @@ bool SMESH_Mesh_i::IsMeshInfoCorrect()
*/ */
//============================================================================= //=============================================================================
SMESH::long_array* SMESH_Mesh_i::GetMeshInfo() SMESH::smIdType_array* SMESH_Mesh_i::GetMeshInfo()
{ {
if ( _preMeshInfo ) if ( _preMeshInfo )
return _preMeshInfo->GetMeshInfo(); return _preMeshInfo->GetMeshInfo();
SMESH::long_array_var aRes = new SMESH::long_array(); SMESH::smIdType_array_var aRes = new SMESH::smIdType_array();
aRes->length(SMESH::Entity_Last); aRes->length(SMESH::Entity_Last);
for (int i = SMESH::Entity_Node; i < SMESH::Entity_Last; i++) for (int i = SMESH::Entity_Node; i < SMESH::Entity_Last; i++)
aRes[i] = 0; aRes[i] = 0;
@ -6048,11 +6048,11 @@ SMESH::long_array* SMESH_Mesh_i::GetMeshInfo()
*/ */
//============================================================================= //=============================================================================
SMESH::long_array* SMESH_Mesh_i::GetNbElementsByType() SMESH::smIdType_array* SMESH_Mesh_i::GetNbElementsByType()
{ {
SMESH::long_array_var aRes = new SMESH::long_array(); SMESH::smIdType_array_var aRes = new SMESH::smIdType_array();
aRes->length(SMESH::NB_ELEMENT_TYPES); aRes->length(SMESH::NB_ELEMENT_TYPES);
for (int i = 0; i < SMESH::NB_ELEMENT_TYPES; i++) for (smIdType i = 0; i < SMESH::NB_ELEMENT_TYPES; i++)
aRes[ i ] = 0; aRes[ i ] = 0;
const SMDS_MeshInfo* meshInfo = 0; const SMDS_MeshInfo* meshInfo = 0;
@ -6062,7 +6062,7 @@ SMESH::long_array* SMESH_Mesh_i::GetNbElementsByType()
meshInfo = & meshDS->GetMeshInfo(); meshInfo = & meshDS->GetMeshInfo();
if (meshInfo) if (meshInfo)
for (int i = 0; i < SMESH::NB_ELEMENT_TYPES; i++) for (smIdType i = 0; i < SMESH::NB_ELEMENT_TYPES; i++)
aRes[i] = meshInfo->NbElements((SMDSAbs_ElementType)i); aRes[i] = meshInfo->NbElements((SMDSAbs_ElementType)i);
return aRes._retn(); return aRes._retn();
@ -6075,7 +6075,7 @@ SMESH::long_array* SMESH_Mesh_i::GetNbElementsByType()
//============================================================================= //=============================================================================
void SMESH_Mesh_i::CollectMeshInfo(const SMDS_ElemIteratorPtr theItr, void SMESH_Mesh_i::CollectMeshInfo(const SMDS_ElemIteratorPtr theItr,
SMESH::long_array& theInfo) SMESH::smIdType_array& theInfo)
{ {
if (!theItr) return; if (!theItr) return;
while (theItr->more()) while (theItr->more())
@ -6155,25 +6155,25 @@ namespace /* Iterators used in SMESH_Mesh_i::GetElements(SMESH::SMESH_IDSource_v
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
struct IDSourceIterator : public SMDS_ElemIterator struct IDSourceIterator : public SMDS_ElemIterator
{ {
const SMESH::smIdType* _idPtr; const SMESH::smIdType* _idPtr;
const CORBA::Long* _idEndPtr; const SMESH::smIdType* _idEndPtr;
SMESH::long_array_var _idArray; SMESH::smIdType_array_var _idArray;
const SMDS_Mesh* _mesh; const SMDS_Mesh* _mesh;
const SMDSAbs_ElementType _type; const SMDSAbs_ElementType _type;
const SMDS_MeshElement* _elem; const SMDS_MeshElement* _elem;
IDSourceIterator( const SMDS_Mesh* mesh, IDSourceIterator( const SMDS_Mesh* mesh,
const CORBA::Long* ids, const SMESH::smIdType* ids,
const int nbIds, const smIdType nbIds,
SMDSAbs_ElementType type): SMDSAbs_ElementType type):
_idPtr( ids ), _idEndPtr( ids + nbIds ), _mesh( mesh ), _type( type ), _elem( 0 ) _idPtr( ids ), _idEndPtr( ids + nbIds ), _mesh( mesh ), _type( type ), _elem( 0 )
{ {
if ( _idPtr && nbIds && _mesh ) if ( _idPtr && nbIds && _mesh )
next(); next();
} }
IDSourceIterator( const SMDS_Mesh* mesh, IDSourceIterator( const SMDS_Mesh* mesh,
SMESH::long_array* idArray, SMESH::smIdType_array* idArray,
SMDSAbs_ElementType type): SMDSAbs_ElementType type):
_idPtr( 0 ), _idEndPtr( 0 ), _idArray( idArray), _mesh( mesh ), _type( type ), _elem( 0 ) _idPtr( 0 ), _idEndPtr( 0 ), _idArray( idArray), _mesh( mesh ), _type( type ), _elem( 0 )
{ {
if ( idArray && _mesh ) if ( idArray && _mesh )
@ -6330,7 +6330,7 @@ SMDS_ElemIteratorPtr SMESH_Mesh_i::GetElements(SMESH::SMESH_IDSource_ptr theObje
} }
else else
{ {
SMESH::long_array_var ids = theObject->GetIDs(); SMESH::smIdType_array_var ids = theObject->GetIDs();
elemIt = SMDS_ElemIteratorPtr( new IDSourceIterator( meshDS, ids._retn(), iterType )); elemIt = SMDS_ElemIteratorPtr( new IDSourceIterator( meshDS, ids._retn(), iterType ));
} }
typeOK = ( isNodes == ( elemType == SMDSAbs_Node )) || ( elemType == SMDSAbs_All ); typeOK = ( isNodes == ( elemType == SMDSAbs_Node )) || ( elemType == SMDSAbs_All );
@ -6978,7 +6978,7 @@ SMESH_MeshPartDS::SMESH_MeshPartDS(SMESH::SMESH_IDSource_ptr meshPart):
else else
{ {
TMeshInfo tmpInfo; TMeshInfo tmpInfo;
SMESH::long_array_var anIDs = meshPart->GetIDs(); SMESH::smIdType_array_var anIDs = meshPart->GetIDs();
SMESH::array_of_ElementType_var types = meshPart->GetTypes(); SMESH::array_of_ElementType_var types = meshPart->GetTypes();
if ( types->length() == 1 && types[0] == SMESH::NODE ) // group of nodes if ( types->length() == 1 && types[0] == SMESH::NODE ) // group of nodes
{ {

View File

@ -112,7 +112,7 @@ public:
SMESH::ListOfGroups* GetGroups(); SMESH::ListOfGroups* GetGroups();
SMESH::smIdType NbGroups(); CORBA::Long NbGroups();
SMESH::SMESH_Group_ptr UnionGroups( SMESH::SMESH_GroupBase_ptr theGroup1, SMESH::SMESH_Group_ptr UnionGroups( SMESH::SMESH_GroupBase_ptr theGroup1,
SMESH::SMESH_GroupBase_ptr theGroup2, SMESH::SMESH_GroupBase_ptr theGroup2,
@ -158,7 +158,7 @@ public:
void ClearLog(); void ClearLog();
SMESH::smIdType GetId(); CORBA::Long GetId();
// --- C++ interface // --- C++ interface
@ -304,29 +304,29 @@ public:
SMESH::smIdType NbSubMesh(); SMESH::smIdType NbSubMesh();
SMESH::long_array* GetElementsId(); SMESH::smIdType_array* GetElementsId();
SMESH::long_array* GetElementsByType( SMESH::ElementType theElemType ); SMESH::smIdType_array* GetElementsByType( SMESH::ElementType theElemType );
SMESH::long_array* GetNodesId(); SMESH::smIdType_array* GetNodesId();
SMESH::ElementType GetElementType( CORBA::Long id, bool iselem ); SMESH::ElementType GetElementType( SMESH::smIdType id, bool iselem );
SMESH::EntityType GetElementGeomType( CORBA::Long id ); SMESH::EntityType GetElementGeomType( SMESH::smIdType id );
SMESH::GeometryType GetElementShape( CORBA::Long id ); SMESH::GeometryType GetElementShape( SMESH::smIdType id );
/*! /*!
* Returns ID of elements for given submesh * Returns ID of elements for given submesh
*/ */
SMESH::long_array* GetSubMeshElementsId(CORBA::Long ShapeID); SMESH::smIdType_array* GetSubMeshElementsId(CORBA::Long ShapeID);
/*! /*!
* Returns ID of nodes for given submesh * Returns ID of nodes for given submesh
* If param all==true - returns all nodes, else - * If param all==true - returns all nodes, else -
* returns only nodes on shapes. * returns only nodes on shapes.
*/ */
SMESH::long_array* GetSubMeshNodesId(CORBA::Long ShapeID, CORBA::Boolean all); SMESH::smIdType_array* GetSubMeshNodesId(CORBA::Long ShapeID, CORBA::Boolean all);
/*! /*!
* Returns type of elements for given submesh * Returns type of elements for given submesh
@ -419,82 +419,82 @@ public:
* Get XYZ coordinates of node as list of double * Get XYZ coordinates of node as list of double
* If there is not node for given ID - returns empty list * If there is not node for given ID - returns empty list
*/ */
SMESH::double_array* GetNodeXYZ(CORBA::Long id); SMESH::double_array* GetNodeXYZ(SMESH::smIdType id);
/*! /*!
* For given node returns list of IDs of inverse elements * For given node returns list of IDs of inverse elements
* If there is not node for given ID - returns empty list * If there is not node for given ID - returns empty list
*/ */
SMESH::long_array* GetNodeInverseElements(CORBA::Long id, SMESH::smIdType_array* GetNodeInverseElements(SMESH::smIdType id,
SMESH::ElementType elemType); SMESH::ElementType elemType);
/*! /*!
* \brief Return position of a node on shape * \brief Return position of a node on shape
*/ */
SMESH::NodePosition* GetNodePosition(CORBA::Long NodeID); SMESH::NodePosition* GetNodePosition(SMESH::smIdType NodeID);
/*! /*!
* \brief Return position of an element on shape * \brief Return position of an element on shape
*/ */
SMESH::ElementPosition GetElementPosition(CORBA::Long ElemID); SMESH::ElementPosition GetElementPosition(SMESH::smIdType ElemID);
/*! /*!
* If given element is node returns IDs of shape from position * If given element is node returns IDs of shape from position
* If there is not node for given ID - returns -1 * If there is not node for given ID - returns -1
*/ */
CORBA::Long GetShapeID(CORBA::Long id); CORBA::Long GetShapeID(SMESH::smIdType id);
/*! /*!
* For given element returns ID of result shape after * For given element returns ID of result shape after
* ::FindShape() from SMESH_MeshEditor * ::FindShape() from SMESH_MeshEditor
* If there is not element for given ID - returns -1 * If there is not element for given ID - returns -1
*/ */
CORBA::Long GetShapeIDForElem(CORBA::Long id); CORBA::Long GetShapeIDForElem(SMESH::smIdType id);
/*! /*!
* Returns number of nodes for given element * Returns number of nodes for given element
* If there is not element for given ID - returns -1 * If there is not element for given ID - returns -1
*/ */
CORBA::Long GetElemNbNodes(CORBA::Long id); CORBA::Short GetElemNbNodes(SMESH::smIdType id);
/*! /*!
* Returns IDs of nodes of given element * Returns IDs of nodes of given element
*/ */
SMESH::long_array* GetElemNodes(CORBA::Long id); SMESH::smIdType_array* GetElemNodes(SMESH::smIdType id);
/*! /*!
* Returns ID of node by given index for given element * Returns ID of node by given index for given element
* If there is not element for given ID - returns -1 * If there is not element for given ID - returns -1
* If there is not node for given index - returns -2 * If there is not node for given index - returns -2
*/ */
CORBA::Long GetElemNode(CORBA::Long id, CORBA::Long index); SMESH::smIdType GetElemNode(SMESH::smIdType id, CORBA::Short index);
/*! /*!
* Returns true if given node is medium node * Returns true if given node is medium node
* in given quadratic element * in given quadratic element
*/ */
CORBA::Boolean IsMediumNode(CORBA::Long ide, CORBA::Long idn); CORBA::Boolean IsMediumNode(SMESH::smIdType ide, SMESH::smIdType idn);
/*! /*!
* Returns true if given node is medium node * Returns true if given node is medium node
* in one of quadratic elements * in one of quadratic elements
*/ */
CORBA::Boolean IsMediumNodeOfAnyElem(CORBA::Long idn, CORBA::Boolean IsMediumNodeOfAnyElem(SMESH::smIdType idn,
SMESH::ElementType elemType); SMESH::ElementType elemType);
/*! /*!
* Returns number of edges for given element * Returns number of edges for given element
*/ */
CORBA::Long ElemNbEdges(CORBA::Long id); CORBA::Long ElemNbEdges(SMESH::smIdType id);
/*! /*!
* Returns number of faces for given element * Returns number of faces for given element
*/ */
CORBA::Long ElemNbFaces(CORBA::Long id); CORBA::Long ElemNbFaces(SMESH::smIdType id);
/*! /*!
* Returns nodes of given face (counted from zero) for given element. * Returns nodes of given face (counted from zero) for given element.
*/ */
SMESH::long_array* GetElemFaceNodes(CORBA::Long elemId, CORBA::Short faceIndex); SMESH::smIdType_array* GetElemFaceNodes(SMESH::smIdType elemId, CORBA::Short faceIndex);
/*! /*!
* Returns three components of normal of given mesh face (or an empty array in KO case) * Returns three components of normal of given mesh face (or an empty array in KO case)
@ -504,33 +504,33 @@ public:
/*! /*!
* Returns an element based on all given nodes. * Returns an element based on all given nodes.
*/ */
SMESH::smIdType FindElementByNodes(const SMESH::long_array& nodes); SMESH::smIdType FindElementByNodes(const SMESH::smIdType_array& nodes);
/*! /*!
* Return elements including all given nodes. * Return elements including all given nodes.
*/ */
SMESH::long_array* GetElementsByNodes(const SMESH::long_array& nodes, SMESH::smIdType_array* GetElementsByNodes(const SMESH::smIdType_array& nodes,
SMESH::ElementType elemType); SMESH::ElementType elemType);
/*! /*!
* Returns true if given element is polygon * Returns true if given element is polygon
*/ */
CORBA::Boolean IsPoly(CORBA::Long id); CORBA::Boolean IsPoly(SMESH::smIdType id);
/*! /*!
* Returns true if given element is quadratic * Returns true if given element is quadratic
*/ */
CORBA::Boolean IsQuadratic(CORBA::Long id); CORBA::Boolean IsQuadratic(SMESH::smIdType id);
/*! /*!
* Returns diameter of ball discrete element or zero in case of an invalid \a id * Returns diameter of ball discrete element or zero in case of an invalid \a id
*/ */
CORBA::Double GetBallDiameter(CORBA::Long id); CORBA::Double GetBallDiameter(SMESH::smIdType id);
/*! /*!
* Returns bary center for given element * Returns bary center for given element
*/ */
SMESH::double_array* BaryCenter(CORBA::Long id); SMESH::double_array* BaryCenter(SMESH::smIdType id);
/*! /*!
* Returns information about imported MED file * Returns information about imported MED file
@ -582,7 +582,7 @@ public:
* Collect statistic of mesh elements given by iterator * Collect statistic of mesh elements given by iterator
*/ */
static void CollectMeshInfo(const SMDS_ElemIteratorPtr theItr, static void CollectMeshInfo(const SMDS_ElemIteratorPtr theItr,
SMESH::long_array& theInfo); SMESH::smIdType_array& theInfo);
/*! /*!
* \brief Return iterator on elements of given type in given object * \brief Return iterator on elements of given type in given object
*/ */
@ -593,17 +593,17 @@ public:
// SMESH_IDSource interface // SMESH_IDSource interface
// ========================= // =========================
virtual SMESH::long_array* GetIDs(); virtual SMESH::smIdType_array* GetIDs();
/*! /*!
* Returns number of mesh elements of each \a EntityType * Returns number of mesh elements of each \a EntityType
* Result array of number of elements per \a EntityType * Result array of number of elements per \a EntityType
* Inherited from SMESH_IDSource * Inherited from SMESH_IDSource
*/ */
virtual SMESH::long_array* GetMeshInfo(); virtual SMESH::smIdType_array* GetMeshInfo();
/*! /*!
* Returns number of mesh elements of each \a ElementType * Returns number of mesh elements of each \a ElementType
*/ */
virtual SMESH::long_array* GetNbElementsByType(); virtual SMESH::smIdType_array* GetNbElementsByType();
/*! /*!
* Returns types of elements it contains * Returns types of elements it contains
*/ */

View File

@ -273,10 +273,10 @@ SMESH::point_array* SMESH_Pattern_i::ApplyTo3DBlock(GEOM::GEOM_Object_ptr theBlo
//======================================================================= //=======================================================================
SMESH::point_array* SMESH::point_array*
SMESH_Pattern_i::ApplyToMeshFaces(SMESH::SMESH_Mesh_ptr theMesh, SMESH_Pattern_i::ApplyToMeshFaces(SMESH::SMESH_Mesh_ptr theMesh,
const SMESH::long_array& theFacesIDs, const SMESH::smIdType_array& theFacesIDs,
CORBA::Long theNodeIndexOnKeyPoint1, CORBA::Short theNodeIndexOnKeyPoint1,
CORBA::Boolean theReverse) CORBA::Boolean theReverse)
{ {
SMESH::point_array_var points = new SMESH::point_array; SMESH::point_array_var points = new SMESH::point_array;
@ -332,10 +332,10 @@ SMESH::point_array*
//======================================================================= //=======================================================================
SMESH::point_array* SMESH::point_array*
SMESH_Pattern_i::ApplyToHexahedrons(SMESH::SMESH_Mesh_ptr theMesh, SMESH_Pattern_i::ApplyToHexahedrons(SMESH::SMESH_Mesh_ptr theMesh,
const SMESH::long_array& theVolumesIDs, const SMESH::smIdType_array& theVolumesIDs,
CORBA::Long theNode000Index, CORBA::Short theNode000Index,
CORBA::Long theNode001Index) CORBA::Short theNode001Index)
{ {
SMESH::point_array_var points = new SMESH::point_array; SMESH::point_array_var points = new SMESH::point_array;

View File

@ -66,15 +66,15 @@ class SMESH_I_EXPORT SMESH_Pattern_i:
GEOM::GEOM_Object_ptr theVertex000, GEOM::GEOM_Object_ptr theVertex000,
GEOM::GEOM_Object_ptr theVertex001); GEOM::GEOM_Object_ptr theVertex001);
SMESH::point_array* ApplyToMeshFaces(SMESH::SMESH_Mesh_ptr theMesh, SMESH::point_array* ApplyToMeshFaces(SMESH::SMESH_Mesh_ptr theMesh,
const SMESH::long_array& theFacesIDs, const SMESH::smIdType_array& theFacesIDs,
CORBA::Long theNodeIndexOnKeyPoint1, CORBA::Short theNodeIndexOnKeyPoint1,
CORBA::Boolean theReverse); CORBA::Boolean theReverse);
SMESH::point_array* ApplyToHexahedrons(SMESH::SMESH_Mesh_ptr theMesh, SMESH::point_array* ApplyToHexahedrons(SMESH::SMESH_Mesh_ptr theMesh,
const SMESH::long_array& theVolumesIDs, const SMESH::smIdType_array& theVolumesIDs,
CORBA::Long theNode000Index, CORBA::Short theNode000Index,
CORBA::Long theNode001Index); CORBA::Short theNode001Index);
//for omniORB conflict compilation //for omniORB conflict compilation
/*CORBA::Boolean MakeMesh (SMESH::SMESH_Mesh_ptr theMesh, /*CORBA::Boolean MakeMesh (SMESH::SMESH_Mesh_ptr theMesh,

View File

@ -242,9 +242,9 @@ namespace
*/ */
//================================================================================ //================================================================================
void meshInfo2hdf( SMESH::long_array_var meshInfo, void meshInfo2hdf( SMESH::smIdType_array_var meshInfo,
const std::string& name, const std::string& name,
HDFgroup* hdfGroup) HDFgroup* hdfGroup)
{ {
// we use med identification of element (MED::EGeometrieElement) types // we use med identification of element (MED::EGeometrieElement) types
// but not enum SMDSAbs_EntityType because values of SMDSAbs_EntityType may // but not enum SMDSAbs_EntityType because values of SMDSAbs_EntityType may
@ -1198,9 +1198,9 @@ SMESH::array_of_ElementType* SMESH_PreMeshInfo::GetTypes() const
*/ */
//================================================================================ //================================================================================
SMESH::long_array* SMESH_PreMeshInfo::GetMeshInfo() const SMESH::smIdType_array* SMESH_PreMeshInfo::GetMeshInfo() const
{ {
SMESH::long_array_var aRes = new SMESH::long_array(); SMESH::smIdType_array_var aRes = new SMESH::smIdType_array();
aRes->length(SMESH::Entity_Last); aRes->length(SMESH::Entity_Last);
for (int i = SMESH::Entity_Node; i < SMESH::Entity_Last; i++) for (int i = SMESH::Entity_Node; i < SMESH::Entity_Last; i++)
aRes[i] = 0; aRes[i] = 0;

View File

@ -80,7 +80,7 @@ public:
// meshods of SMESH_IDSource interface // meshods of SMESH_IDSource interface
SMESH::array_of_ElementType* GetTypes() const; SMESH::array_of_ElementType* GetTypes() const;
SMESH::long_array* GetMeshInfo() const; SMESH::smIdType_array* GetMeshInfo() const;
bool IsMeshInfoCorrect() const; bool IsMeshInfoCorrect() const;
~SMESH_PreMeshInfo(); ~SMESH_PreMeshInfo();

View File

@ -258,6 +258,13 @@ namespace SMESH
return *this; return *this;
} }
TPythonDump&
TPythonDump::operator<<(const SMESH::smIdType_array& theArg)
{
DumpArray( theArg, *this );
return *this;
}
TPythonDump& TPythonDump&
TPythonDump::operator<<(const SMESH::double_array& theArg) TPythonDump::operator<<(const SMESH::double_array& theArg)
{ {
@ -348,11 +355,11 @@ namespace SMESH
} }
if ( SMESH_MeshEditor_i::IsTemporaryIDSource( theArg )) if ( SMESH_MeshEditor_i::IsTemporaryIDSource( theArg ))
{ {
SMESH::SMESH_Mesh_var mesh = theArg->GetMesh(); SMESH::SMESH_Mesh_var mesh = theArg->GetMesh();
SMESH::long_array_var anElementsId = theArg->GetIDs(); SMESH::smIdType_array_var anElementsId = theArg->GetIDs();
SMESH::array_of_ElementType_var types = theArg->GetTypes(); SMESH::array_of_ElementType_var types = theArg->GetTypes();
SMESH::ElementType type = types->length() ? types[0] : SMESH::ALL; SMESH::ElementType type = types->length() ? types[0] : SMESH::ALL;
SALOMEDS::SObject_wrap meshSO = SMESH_Gen_i::ObjectToSObject(mesh); SALOMEDS::SObject_wrap meshSO = SMESH_Gen_i::ObjectToSObject(mesh);
if ( meshSO->_is_nil() ) // don't waste memory for dumping not published objects if ( meshSO->_is_nil() ) // don't waste memory for dumping not published objects
return *this << mesh << ".GetIDSource([], " << type << ")"; return *this << mesh << ".GetIDSource([], " << type << ")";
else else

View File

@ -158,6 +158,9 @@ namespace SMESH
TPythonDump& TPythonDump&
operator<<(const SMESH::long_array& theArg); operator<<(const SMESH::long_array& theArg);
TPythonDump&
operator<<(const SMESH::smIdType_array& theArg);
TPythonDump& TPythonDump&
operator<<(const SMESH::double_array& theArg); operator<<(const SMESH::double_array& theArg);

View File

@ -217,11 +217,11 @@ SMESH::smIdType SMESH_subMesh_i::GetNumberOfNodes(CORBA::Boolean all)
*/ */
//============================================================================= //=============================================================================
SMESH::long_array* SMESH_subMesh_i::GetElementsId() SMESH::smIdType_array* SMESH_subMesh_i::GetElementsId()
{ {
Unexpect aCatch(SALOME_SalomeException); Unexpect aCatch(SALOME_SalomeException);
SMESH::long_array_var aResult = new SMESH::long_array(); SMESH::smIdType_array_var aResult = new SMESH::smIdType_array();
if ( _mesh_i->_mapSubMesh.find( _localId ) == _mesh_i->_mapSubMesh.end() ) if ( _mesh_i->_mapSubMesh.find( _localId ) == _mesh_i->_mapSubMesh.end() )
return aResult._retn(); return aResult._retn();
@ -261,11 +261,11 @@ SMESH::long_array* SMESH_subMesh_i::GetElementsId()
*/ */
//============================================================================= //=============================================================================
SMESH::long_array* SMESH_subMesh_i::GetElementsByType( SMESH::ElementType theElemType ) SMESH::smIdType_array* SMESH_subMesh_i::GetElementsByType( SMESH::ElementType theElemType )
{ {
Unexpect aCatch(SALOME_SalomeException); Unexpect aCatch(SALOME_SalomeException);
SMESH::long_array_var aResult = new SMESH::long_array(); SMESH::smIdType_array_var aResult = new SMESH::smIdType_array();
if ( _mesh_i->_mapSubMesh.find( _localId ) == _mesh_i->_mapSubMesh.end() ) if ( _mesh_i->_mapSubMesh.find( _localId ) == _mesh_i->_mapSubMesh.end() )
return aResult._retn(); return aResult._retn();
@ -276,8 +276,8 @@ SMESH::long_array* SMESH_subMesh_i::GetElementsByType( SMESH::ElementType theEle
::SMESH_subMesh* aSubMesh = _mesh_i->_mapSubMesh[_localId]; ::SMESH_subMesh* aSubMesh = _mesh_i->_mapSubMesh[_localId];
// PAL5440, return all nodes belonging to elements of the sub-mesh // PAL5440, return all nodes belonging to elements of the sub-mesh
set<int> nodeIds; set<smIdType> nodeIds;
int nbElems = 0; smIdType nbElems = 0;
// volumes may be bound to shell instead of solid // volumes may be bound to shell instead of solid
TListOfSubMeshes smList; TListOfSubMeshes smList;
@ -317,7 +317,7 @@ SMESH::long_array* SMESH_subMesh_i::GetElementsByType( SMESH::ElementType theEle
int i = 0, n = aResult->length(); int i = 0, n = aResult->length();
if ( theElemType == SMESH::NODE && !nodeIds.empty() ) { if ( theElemType == SMESH::NODE && !nodeIds.empty() ) {
set<int>::iterator idIt = nodeIds.begin(); set<smIdType>::iterator idIt = nodeIds.begin();
for ( ; i < n && idIt != nodeIds.end() ; i++, idIt++ ) for ( ; i < n && idIt != nodeIds.end() ; i++, idIt++ )
aResult[i] = *idIt; aResult[i] = *idIt;
} }
@ -346,11 +346,11 @@ SMESH::long_array* SMESH_subMesh_i::GetElementsByType( SMESH::ElementType theEle
*/ */
//============================================================================= //=============================================================================
SMESH::long_array* SMESH_subMesh_i::GetNodesId() SMESH::smIdType_array* SMESH_subMesh_i::GetNodesId()
{ {
Unexpect aCatch(SALOME_SalomeException); Unexpect aCatch(SALOME_SalomeException);
SMESH::long_array_var aResult = GetElementsByType( SMESH::NODE ); SMESH::smIdType_array_var aResult = GetElementsByType( SMESH::NODE );
return aResult._retn(); return aResult._retn();
} }
@ -358,7 +358,7 @@ SMESH::long_array* SMESH_subMesh_i::GetNodesId()
/*! /*!
* *
*/ */
//============================================================================= //========error:=====================================================================
SMESH::SMESH_Mesh_ptr SMESH_subMesh_i::GetFather() SMESH::SMESH_Mesh_ptr SMESH_subMesh_i::GetFather()
{ {
@ -372,7 +372,7 @@ SMESH::SMESH_Mesh_ptr SMESH_subMesh_i::GetFather()
*/ */
//============================================================================= //=============================================================================
SMESH::smIdType SMESH_subMesh_i::GetId() CORBA::Long SMESH_subMesh_i::GetId()
{ {
return _localId; return _localId;
} }
@ -410,7 +410,7 @@ GEOM::GEOM_Object_ptr SMESH_subMesh_i::GetSubShape()
* *
*/ */
//============================================================================= //=============================================================================
SMESH::long_array* SMESH_subMesh_i::GetIDs() SMESH::smIdType_array* SMESH_subMesh_i::GetIDs()
{ {
return GetElementsId(); return GetElementsId();
} }
@ -420,7 +420,7 @@ SMESH::long_array* SMESH_subMesh_i::GetIDs()
* *
*/ */
//============================================================================= //=============================================================================
SMESH::ElementType SMESH_subMesh_i::GetElementType( const CORBA::Long id, const bool iselem ) SMESH::ElementType SMESH_subMesh_i::GetElementType( const SMESH::smIdType id, const bool iselem )
{ {
if ( _preMeshInfo ) if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile(); _preMeshInfo->FullLoadFromFile();
@ -434,12 +434,12 @@ SMESH::ElementType SMESH_subMesh_i::GetElementType( const CORBA::Long id, const
*/ */
//============================================================================= //=============================================================================
SMESH::long_array* SMESH_subMesh_i::GetMeshInfo() SMESH::smIdType_array* SMESH_subMesh_i::GetMeshInfo()
{ {
if ( _preMeshInfo ) if ( _preMeshInfo )
return _preMeshInfo->GetMeshInfo(); return _preMeshInfo->GetMeshInfo();
SMESH::long_array_var aRes = new SMESH::long_array(); SMESH::smIdType_array_var aRes = new SMESH::smIdType_array();
aRes->length(SMESH::Entity_Last); aRes->length(SMESH::Entity_Last);
for (int i = SMESH::Entity_Node; i < SMESH::Entity_Last; i++) for (int i = SMESH::Entity_Node; i < SMESH::Entity_Last; i++)
aRes[i] = 0; aRes[i] = 0;
@ -464,9 +464,9 @@ SMESH::long_array* SMESH_subMesh_i::GetMeshInfo()
*/ */
//======================================================================= //=======================================================================
SMESH::long_array* SMESH_subMesh_i::GetNbElementsByType() SMESH::smIdType_array* SMESH_subMesh_i::GetNbElementsByType()
{ {
SMESH::long_array_var aRes = new SMESH::long_array(); SMESH::smIdType_array_var aRes = new SMESH::smIdType_array();
aRes->length(SMESH::NB_ELEMENT_TYPES); aRes->length(SMESH::NB_ELEMENT_TYPES);
for (int i = 0; i < SMESH::NB_ELEMENT_TYPES; i++) for (int i = 0; i < SMESH::NB_ELEMENT_TYPES; i++)
if ( _preMeshInfo ) if ( _preMeshInfo )

View File

@ -57,19 +57,19 @@ public:
SMESH::smIdType GetNumberOfNodes( CORBA::Boolean all ); SMESH::smIdType GetNumberOfNodes( CORBA::Boolean all );
SMESH::long_array* GetElementsId(); SMESH::smIdType_array* GetElementsId();
SMESH::long_array* GetElementsByType( SMESH::ElementType theElemType ); SMESH::smIdType_array* GetElementsByType( SMESH::ElementType theElemType );
SMESH::ElementType GetElementType( CORBA::Long id, bool iselem ); SMESH::ElementType GetElementType( SMESH::smIdType id, bool iselem );
SMESH::long_array* GetNodesId(); SMESH::smIdType_array* GetNodesId();
SMESH::SMESH_Mesh_ptr GetFather(); SMESH::SMESH_Mesh_ptr GetFather();
GEOM::GEOM_Object_ptr GetSubShape(); GEOM::GEOM_Object_ptr GetSubShape();
SMESH::smIdType GetId(); CORBA::Long GetId();
// ========================= // =========================
@ -78,17 +78,17 @@ public:
/*! /*!
* Returns a sequence of all element IDs * Returns a sequence of all element IDs
*/ */
virtual SMESH::long_array* GetIDs(); virtual SMESH::smIdType_array* GetIDs();
/*! /*!
* Returns number of mesh elements of each \a EntityType * Returns number of mesh elements of each \a EntityType
* Result array of number of elements per \a EntityType * Result array of number of elements per \a EntityType
* Inherited from SMESH_IDSource * Inherited from SMESH_IDSource
*/ */
virtual SMESH::long_array* GetMeshInfo(); virtual SMESH::smIdType_array* GetMeshInfo();
/*! /*!
* Returns number of mesh elements of each \a ElementType * Returns number of mesh elements of each \a ElementType
*/ */
virtual SMESH::long_array* GetNbElementsByType(); virtual SMESH::smIdType_array* GetNbElementsByType();
/*! /*!
* Returns types of elements it contains * Returns types of elements it contains
*/ */

View File

@ -83,6 +83,7 @@
#include <gp_Ax1.hxx> #include <gp_Ax1.hxx>
#include <gp_Vec.hxx> #include <gp_Vec.hxx>
#include <gp_XY.hxx> #include <gp_XY.hxx>
#include <smIdType.hxx>
#include <list> #include <list>
#include <string> #include <string>
@ -113,7 +114,7 @@ namespace VISCOUS_2D
{ {
_EdgeSubMesh(const SMDS_Mesh* mesh, int index=0): SubMesh(mesh,index) {} _EdgeSubMesh(const SMDS_Mesh* mesh, int index=0): SubMesh(mesh,index) {}
//virtual int NbElements() const { return _elements.size()+1; } //virtual int NbElements() const { return _elements.size()+1; }
virtual int NbNodes() const { return Max( 0, _uvPtStructVec.size()-2 ); } virtual smIdType NbNodes() const { return Max( 0, _uvPtStructVec.size()-2 ); }
void SetUVPtStructVec(UVPtStructVec& vec) { _uvPtStructVec.swap( vec ); } void SetUVPtStructVec(UVPtStructVec& vec) { _uvPtStructVec.swap( vec ); }
UVPtStructVec& GetUVPtStructVec() { return _uvPtStructVec; } UVPtStructVec& GetUVPtStructVec() { return _uvPtStructVec; }
}; };