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
// 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,
std::list<const SMDS_MeshElement*>& theResList )
{
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 ] );
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
//=================================================================================
static int getPointers( const SMDSAbs_ElementType theRequestType,
SMESH::long_array_var& theElemIds,
SMESH::smIdType_array_var& theElemIds,
const SMDS_Mesh* theMesh,
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
? 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 )
return 0;
SMESH::long_array_var anIds = myGroupServer->GetListOfID();
SMESH::smIdType_array_var anIds = myGroupServer->GetListOfID();
if ( anIds->length() == 0 )
return 0;
@ -1043,7 +1043,7 @@ int SMESH_subMeshObj::GetNbEntities( const SMDSAbs_ElementType theType) const
case SMDSAbs_Face:
case SMDSAbs_Volume:
{
SMESH::long_array_var anIds =
SMESH::smIdType_array_var anIds =
mySubMeshServer->GetElementsByType( SMESH::ElementType(theType) );
return anIds->length();
}
@ -1067,7 +1067,7 @@ int SMESH_subMeshObj::GetEntities( const SMDSAbs_ElementType theType, TEntityLis
{
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 );
}
}
@ -1075,12 +1075,12 @@ int SMESH_subMeshObj::GetEntities( const SMDSAbs_ElementType theType, TEntityLis
{
if ( theType == SMDSAbs_Node )
{
SMESH::long_array_var anIds = mySubMeshServer->GetElementsId();
SMESH::smIdType_array_var anIds = mySubMeshServer->GetElementsId();
return getNodesFromElems( anIds, aMesh, theResList );
}
else
{
SMESH::long_array_var anIds =
SMESH::smIdType_array_var anIds =
mySubMeshServer->GetElementsByType( SMESH::ElementType(theType) );
return getPointers( theType, anIds, aMesh, theResList );
}

View File

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

View File

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

View File

@ -130,8 +130,8 @@ public:
virtual smIdType GetID() const;
virtual vtkIdType GetVtkID() const;
virtual smIdType getshapeId() const { return GetShapeID(); }
virtual smIdType GetShapeID() const;
virtual int getshapeId() const { return GetShapeID(); }
virtual int GetShapeID() const;
// mark this element; to be used in algos
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->SetNumberOfPoints( FromIdType<int>(newNodeSize) );
int vtkIdType = 0, alreadyCopied = 0;
vtkIdType i = 0, alreadyCopied = 0;
while ( i < oldNodeSize )
{
// skip a hole if any
@ -239,15 +239,15 @@ void SMDS_UnstructuredGrid::compactGrid(std::vector<smIdType>& idNodesOldToNew,
if ((vtkIdType) idNodesOldToNew.size() < oldNodeSize )
{
idNodesOldToNew.reserve( oldNodeSize );
for ( vvtkIdType i = idNodesOldToNew.size(); i < oldNodeSize; ++i )
for ( vtkIdType i = idNodesOldToNew.size(); i < oldNodeSize; ++i )
idNodesOldToNew.push_back( i );
}
// --- create new compacted Connectivity, Locations and Types
vvtkIdType newConnectivitySize = this->Connectivity->GetNumberOfConnectivityEntries();
vtkIdType newConnectivitySize = this->Connectivity->GetNumberOfConnectivityEntries();
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 )
newConnectivitySize -= this->Connectivity->GetCellSize( i );
@ -273,11 +273,11 @@ void SMDS_UnstructuredGrid::compactGrid(std::vector<smIdType>& idNodesOldToNew,
{
vtkDoubleArray* newDiameters = vtkDoubleArray::New();
newDiameters->SetNumberOfComponents(1);
for ( vvtkIdType newCellID = 0; newCellID < newCellSize; newCellID++ )
for ( vtkIdType newCellID = 0; newCellID < newCellSize; newCellID++ )
{
if ( newTypes->GetValue( newCellID ) == VTK_POLY_VERTEX )
{
vvtkIdType oldCellID = idCellsNewToOld[ newCellID ];
vtkIdType oldCellID = idCellsNewToOld[ newCellID ];
newDiameters->InsertValue( newCellID, diameters->GetValue( oldCellID ));
}
vtkDataSet::CellData->SetScalars( newDiameters );
@ -292,7 +292,7 @@ void SMDS_UnstructuredGrid::compactGrid(std::vector<smIdType>& idNodesOldToNew,
vtkIdTypeArray *newFaces = vtkIdTypeArray::New();
newFaces->Initialize();
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 )
{
@ -337,13 +337,13 @@ void SMDS_UnstructuredGrid::compactGrid(std::vector<smIdType>& idNodesOldToNew,
void SMDS_UnstructuredGrid::copyNodes(vtkPoints * newPoints,
std::vector<smIdType>& /*idNodesOldToNew*/,
vvtkIdType& alreadyCopied,
vvtkIdType start,
vvtkIdType end)
vtkIdType& alreadyCopied,
vtkIdType start,
vtkIdType end)
{
void *target = newPoints->GetVoidPointer(3 * alreadyCopied);
void *source = this->Points->GetVoidPointer(3 * start);
vvtkIdType nbPoints = end - start;
vtkIdType nbPoints = end - start;
if (nbPoints > 0)
{
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++ )
{
vvtkIdType iOld = idCellsNewToOld[ iNew ];
vtkIdType iOld = idCellsNewToOld[ iNew ];
newTypes->SetValue( iNew, this->Types->GetValue( iOld ));
vtkIdType oldLoc = ((vtkIdTypeArray *)(this->Connectivity->GetOffsetsArray()))->GetValue( iOld );
@ -371,25 +371,25 @@ void SMDS_UnstructuredGrid::copyBloc(vtkUnsignedCharArray * newTypes,
pointsCell.resize( nbpts );
for ( int l = 0; l < nbpts; l++ )
{
vvtkIdType oldval = oldPtsCell[l];
vtkIdType oldval = oldPtsCell[l];
pointsCell[l] = idNodesOldToNew[oldval];
}
/*vvtkIdType newcnt = */newConnectivity->InsertNextCell( nbpts, pointsCell.data() );
vvtkIdType newLoc = newConnectivity->GetInsertLocation( nbpts );
/*vtkIdType newcnt = */newConnectivity->InsertNextCell( nbpts, pointsCell.data() );
vtkIdType newLoc = newConnectivity->GetInsertLocation( nbpts );
newLocations->SetValue( iNew, newLoc );
}
}
int SMDS_UnstructuredGrid::CellIdToDownId(vtkIdType vtkCellId)
{
if ((vtkCellId < 0) || (vtkCellId >= (vvtkIdType)_cellIdToDownId.size()))
if ((vtkCellId < 0) || (vtkCellId >= (vtkIdType)_cellIdToDownId.size()))
{
return -1;
}
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()));
_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;
}
@ -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();
}

View File

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

View File

@ -273,7 +273,7 @@ bool SMESHDS_Mesh
//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.
if ( !this->IsCompacted() )

View File

@ -606,7 +606,7 @@ namespace
}
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 )
if ( nbElems[ notSupportedElemTypes[ iType ]] > 0 )
presentNotSupported.push_back( notSupportedElemTypes[ iType ]);
@ -1223,7 +1223,7 @@ namespace
SMESH::IObjectToInterface<SMESH::SMESH_IDSource>(anIO);
if ( !idSource->_is_nil() )
{
SMESH::long_array_var ids = idSource->GetIDs();
SMESH::smIdType_array_var ids = idSource->GetIDs();
elements.resize( ids->length() );
for ( unsigned i = 0; i < elements.size(); ++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 );
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 nbEdges = info[SMDSEntity_Edge] + info[SMDSEntity_Quad_Edge];
long nbFaces = info[SMDSEntity_Triangle] + info[SMDSEntity_Quad_Triangle] + info[SMDSEntity_BiQuad_Triangle] +
@ -3104,10 +3104,10 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
try {
SMESH::SMESH_Mesh_var aMesh = aSubMesh->GetFather();
// get submesh elements list by types
SMESH::long_array_var aNodes = aSubMesh->GetElementsByType(SMESH::NODE);
SMESH::long_array_var aEdges = aSubMesh->GetElementsByType(SMESH::EDGE);
SMESH::long_array_var aFaces = aSubMesh->GetElementsByType(SMESH::FACE);
SMESH::long_array_var aVolumes = aSubMesh->GetElementsByType(SMESH::VOLUME);
SMESH::smIdType_array_var aNodes = aSubMesh->GetElementsByType(SMESH::NODE);
SMESH::smIdType_array_var aEdges = aSubMesh->GetElementsByType(SMESH::EDGE);
SMESH::smIdType_array_var aFaces = aSubMesh->GetElementsByType(SMESH::FACE);
SMESH::smIdType_array_var aVolumes = aSubMesh->GetElementsByType(SMESH::VOLUME);
// create group for each type o elements
QString aName = IObject->getName();
QStringList anEntryList;

View File

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

View File

@ -553,7 +553,7 @@ void SMESHGUI_AddMeshElementDlg::ClickOnApply()
if (myNbOkNodes && !SMESHGUI::isStudyLocked()) {
myBusy = true;
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());
const std::vector<int>& revIndex = SMDS_MeshCell::reverseSmdsOrder( myGeomType );
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::long_array_var anIdList = new SMESH::long_array;
SMESH::smIdType_array_var anIdList = new SMESH::smIdType_array;
anIdList->length( 1 );
anIdList[0] = -1;
int nbElemsBefore = 0;

View File

@ -741,7 +741,7 @@ bool SMESHGUI_AddQuadraticElementDlg::ClickOnApply()
ReverseConnectivity( anIds, myGeomType, /*toReverse=*/true, /*toVtkOrder=*/false );
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 );
for (int i = 0; i < aNumberOfIds; i++)
@ -841,7 +841,7 @@ bool SMESHGUI_AddQuadraticElementDlg::ClickOnApply()
}
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[0] = anElemId;
aGroupUsed->Add( anIdList.inout() );

View File

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

View File

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

View File

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

View File

@ -439,7 +439,7 @@ bool SMESHGUI_CopyMeshDlg::ClickOnApply()
else
{
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());
for (int i = 0; i < aListElementsId.count(); i++)
anElementsId[i] = aListElementsId[i].toInt();

View File

@ -480,7 +480,7 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::ClickOnApply()
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;
aQuantities->length( myFacesByNodes->count() );
@ -518,7 +518,7 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::ClickOnApply()
}
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 );
anIdsOfFaces->length(aListId.count());
@ -562,7 +562,7 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::ClickOnApply()
}
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[0] = anElemId;
aGroupUsed->Add( anIdList.inout() );

View File

@ -1147,7 +1147,7 @@ bool SMESHGUI_ExtrusionAlongPathDlg::isValuesValid()
}
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 ||
mesh->GetElementType( elems[0], true ) != SMESH::EDGE )
return false;

View File

@ -294,7 +294,7 @@ void SMESHGUI_3TypesSelector::selectionIntoArgument()
int nbElements = aMapIndex.Extent();
if ( nbElements > 0 )
{
SMESH::long_array_var ids = new SMESH::long_array;
SMESH::smIdType_array_var ids = new SMESH::smIdType_array;
ids->length( nbElements );
for ( int i = 0; i < nbElements; ++i )
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 );
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() );
TColStd_MapOfInteger newIndices;
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_IDSource_var idSrc =

View File

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

View File

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

View File

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

View File

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

View File

@ -546,7 +546,7 @@ void SMESHGUI_MinDistance::compute()
SMESH::SMESH_Mesh_var m = myFirstSrc->GetMesh();
long id = myFirstTgt->text().toLong();
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[0] = id;
SMESH::SMESH_MeshEditor_var me = m->GetMeshEditor();
@ -565,7 +565,7 @@ void SMESHGUI_MinDistance::compute()
SMESH::SMESH_Mesh_var m = mySecondSrc->GetMesh();
long id = mySecondTgt->text().toLong();
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[0] = id;
SMESH::SMESH_MeshEditor_var me = m->GetMeshEditor();
@ -1047,7 +1047,7 @@ void SMESHGUI_BoundingBox::compute()
SMESH::SMESH_Mesh_var m = mySrc[0]->GetMesh();
QStringList ids = myIDs.split( " ", QString::SkipEmptyParts );
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() );
for( int i = 0; i < ids.count(); i++ )
ids_in[i] = ids[i].trimmed().toLong();

View File

@ -556,7 +556,7 @@ bool SMESHGUI_MergeDlg::ClickOnApply()
int i, nb = KeepList->count();
if ( isKeepIDsSelection() )
{
SMESH::long_array_var anIdList = new SMESH::long_array();
SMESH::smIdType_array_var anIdList = new SMESH::smIdType_array();
anIdList->length(nb);
for (i = 0; i < nb; i++)
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 )
myButtons[i]->setEnabled( true );
SMESH::long_array_var nbElemsByType = obj->GetNbElementsByType();
SMESH::smIdType_array_var nbElemsByType = obj->GetNbElementsByType();
if ( ! &nbElemsByType.in() ) return;
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
myNbNode ->setText( QString("%1").arg( theInfo[SMDSEntity_Node] ));

View File

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

View File

@ -479,9 +479,9 @@ bool SMESHGUI_MeshPatternDlg::onApply()
}
QList<int> 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());
int i = 0;
smIdType i = 0;
for (QList<int>::iterator it = ids.begin(); it != ids.end(); ++it)
varIds[i++] = *it;
myType == Type_2d
@ -1258,9 +1258,9 @@ vtkUnstructuredGrid* SMESHGUI_MeshPatternDlg::getGrid()
SMESH::point_array_var pnts;
QList<int> 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());
int i = 0;
smIdType i = 0;
for (QList<int>::iterator it = ids.begin(); it != ids.end(); ++it)
varIds[i++] = *it;
pnts = myType == Type_2d

View File

@ -437,9 +437,9 @@ void SMESHGUI_MultiEditDlg::onOk()
// 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())
{
@ -709,7 +709,7 @@ void SMESHGUI_MultiEditDlg::onAddBtn()
SMESH::IObjectToInterface<SMESH::SMESH_subMesh>(anIter.Value());
if (!aSubMesh->_is_nil()) {
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++) {
if (isIdValid(anIds[ i ]))
toBeAdded.Add(anIds[ i ]);
@ -725,7 +725,7 @@ void SMESHGUI_MultiEditDlg::onAddBtn()
if (!aGroup->_is_nil() && ((aGroup->GetType() == SMESH::FACE && entityType() == 0) ||
(aGroup->GetType() == SMESH::VOLUME && entityType() == 1))) {
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++) {
if (isIdValid(anIds[ i ]))
toBeAdded.Add(anIds[ i ]);
@ -1008,7 +1008,7 @@ bool SMESHGUI_MultiEditDlg::onApply()
SUIT_OverrideCursor aWaitCursor;
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);
if (aResult) {
@ -1100,7 +1100,7 @@ SMESHGUI_ChangeOrientationDlg::~SMESHGUI_ChangeOrientationDlg()
}
bool SMESHGUI_ChangeOrientationDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor,
const SMESH::long_array& theIds,
const SMESH::smIdType_array& theIds,
SMESH::SMESH_IDSource_ptr obj)
{
if ( CORBA::is_nil( obj ))
@ -1189,7 +1189,7 @@ bool SMESHGUI_UnionOfTrianglesDlg::isValid (const bool theMess)
}
bool SMESHGUI_UnionOfTrianglesDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor,
const SMESH::long_array& theIds,
const SMESH::smIdType_array& theIds,
SMESH::SMESH_IDSource_ptr obj)
{
{
@ -1220,7 +1220,7 @@ void SMESHGUI_UnionOfTrianglesDlg::onDisplaySimulation( bool toDisplayPreview )
SUIT_OverrideCursor aWaitCursor;
// get Ids of elements
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::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditPreviewer();
@ -1302,7 +1302,7 @@ void SMESHGUI_CuttingOfQuadsDlg::reject()
}
bool SMESHGUI_CuttingOfQuadsDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor,
const SMESH::long_array& theIds,
const SMESH::smIdType_array& theIds,
SMESH::SMESH_IDSource_ptr obj)
{
bool hasObj = (! CORBA::is_nil( obj ));
@ -1382,7 +1382,7 @@ void SMESHGUI_CuttingOfQuadsDlg::displayPreview()
SUIT_OverrideCursor aWaitCursor;
// get Ids of elements
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() )
return;
@ -1648,7 +1648,7 @@ SMESHGUI_SplitVolumesDlg::~SMESHGUI_SplitVolumesDlg()
}
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::IDSource_wrap obj = theObj;

View File

@ -113,12 +113,12 @@ protected:
QWidget* createButtonFrame( QWidget* );
QWidget* createMainFrame( QWidget*, 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();
virtual void setSelectionMode();
virtual bool isIdValid( const int ) const;
virtual bool process( SMESH::SMESH_MeshEditor_ptr,
const SMESH::long_array& ,
const SMESH::smIdType_array& ,
SMESH::SMESH_IDSource_ptr obj) = 0;
virtual int nbElemsInMesh() = 0;
int entityType();
@ -182,7 +182,7 @@ public:
protected:
virtual bool process( SMESH::SMESH_MeshEditor_ptr,
const SMESH::long_array& ,
const SMESH::smIdType_array& ,
SMESH::SMESH_IDSource_ptr obj);
virtual int nbElemsInMesh();
};
@ -202,7 +202,7 @@ public:
protected:
virtual bool isValid( const bool );
virtual bool process( SMESH::SMESH_MeshEditor_ptr,
const SMESH::long_array&,
const SMESH::smIdType_array&,
SMESH::SMESH_IDSource_ptr obj );
virtual int nbElemsInMesh();
@ -227,7 +227,7 @@ public:
protected:
virtual bool process( SMESH::SMESH_MeshEditor_ptr,
const SMESH::long_array& ,
const SMESH::smIdType_array& ,
SMESH::SMESH_IDSource_ptr obj);
virtual int nbElemsInMesh();
@ -269,7 +269,7 @@ protected slots:
protected:
virtual bool process( SMESH::SMESH_MeshEditor_ptr,
const SMESH::long_array&,
const SMESH::smIdType_array&,
SMESH::SMESH_IDSource_ptr obj );
virtual int nbElemsInMesh();

View File

@ -497,7 +497,7 @@ bool SMESHGUI_NodesDlg::ClickOnApply()
}
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[0] = aNodeId;
aGroupUsed->Add( anIdList.inout() );

View File

@ -340,7 +340,7 @@ bool SMESHGUI_OffsetDlg::ClickOnApply()
{
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());
for (int i = 0; i < aListElementsId.count(); i++)
anElementsId[i] = aListElementsId[i].toInt();
@ -918,7 +918,7 @@ void SMESHGUI_OffsetDlg::onDisplaySimulation( bool toDisplayPreview )
}
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);
anElementsId->length(aListElementsId.count());
for (int i = 0; i < aListElementsId.count(); i++)

View File

@ -231,7 +231,7 @@ void SMESHGUI_RemoveElementsDlg::ClickOnApply()
SUIT_OverrideCursor wc;
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());
for (int i = 0; i < aListId.count(); i++)
anArrayOfIdeces[i] = aListId[ i ].toInt();

View File

@ -234,7 +234,7 @@ void SMESHGUI_RemoveNodesDlg::ClickOnApply()
if (myNbOkNodes) {
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());
for (int i = 0; i < aListId.count(); i++)
anArrayOfIdeces[i] = aListId[ i ].toInt();

View File

@ -409,7 +409,7 @@ bool SMESHGUI_RotationDlg::ClickOnApply()
if (myNbOkElements && IsAxisOk()) {
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());
for (int i = 0; i < aListElementsId.count(); i++)
@ -1135,7 +1135,7 @@ void SMESHGUI_RotationDlg::onDisplaySimulation( bool toDisplayPreview ) {
if (myPreviewCheckBox->isChecked() && toDisplayPreview) {
if(myNbOkElements && isValid() && IsAxisOk()) {
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());
for (int i = 0; i < aListElementsId.count(); i++)

View File

@ -448,7 +448,7 @@ bool SMESHGUI_ScaleDlg::ClickOnApply()
if (myNbOkElements) {
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());
for (int i = 0; i < aListElementsId.count(); i++)
@ -1145,7 +1145,7 @@ void SMESHGUI_ScaleDlg::onDisplaySimulation( bool toDisplayPreview ) {
if ( myNbOkElements && isValid() ) {
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());
for (int i = 0; i < aListElementsId.count(); i++)

View File

@ -276,7 +276,7 @@ SMESH::MeshInfo SMESH::SelectionProxy::meshInfo() const
SMESH::MeshInfo info;
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++ )
{
if ( type < data->length() )
@ -494,7 +494,7 @@ bool SMESH::SelectionProxy::nodeConnectivity( int id, SMESH::Connectivity& conne
SMESH::SMESH_Mesh_var mesh = myObject->GetMesh();
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++ )
{
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();
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;
}
}
@ -693,7 +693,7 @@ bool SMESH::SelectionProxy::elementConnectivity( int id, Connectivity& connectiv
SMESH::SMESH_Mesh_var mesh = myObject->GetMesh();
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++ )
{
if ( !nodes.contains( nn[i] ))
@ -751,7 +751,7 @@ bool SMESH::SelectionProxy::perFaceConnectivity( int id, Connectivity& connectiv
CORBA::Long nbFaces = mesh->ElemNbFaces( id );
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 )
{
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();
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++ )
{
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 );
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++ )
result << (uint)seq[i];
}

View File

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

View File

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

View File

@ -483,7 +483,7 @@ bool SMESHGUI_SymmetryDlg::ClickOnApply()
if (myNbOkElements && IsMirrorOk()) {
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());
for (int i = 0; i < aListElementsId.count(); i++)
@ -1202,7 +1202,7 @@ void SMESHGUI_SymmetryDlg::onDisplaySimulation( bool toDisplayPreview )
if ( myNbOkElements && isValid() && IsMirrorOk() )
{
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());
for (int i = 0; i < aListElementsId.count(); i++)

View File

@ -484,7 +484,7 @@ bool SMESHGUI_TranslationDlg::ClickOnApply()
if (myNbOkElements) {
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());
for (int i = 0; i < aListElementsId.count(); i++)
@ -1182,7 +1182,7 @@ void SMESHGUI_TranslationDlg::onDisplaySimulation( bool toDisplayPreview )
{
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());
for (int i = 0; i < aListElementsId.count(); i++)

View File

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

View File

@ -98,15 +98,15 @@ namespace SMESH
public virtual Functor_i
{
public:
CORBA::Double GetValue( CORBA::Long theElementId );
CORBA::Boolean IsApplicable( CORBA::Long theElementId );
CORBA::Double GetValue( SMESH::smIdType theElementId );
CORBA::Boolean IsApplicable( SMESH::smIdType theElementId );
SMESH::Histogram* GetHistogram(CORBA::Short nbIntervals,
CORBA::Boolean isLogarithmic);
SMESH::Histogram* GetLocalHistogram(CORBA::Short nbIntervals,
CORBA::Boolean isLogarithmic,
SMESH::SMESH_IDSource_ptr object);
void SetPrecision( CORBA::Long thePrecision );
SMESH::smIdType GetPrecision();
CORBA::Long GetPrecision();
Controls::NumericalFunctorPtr GetNumericalFunctor();
protected:
@ -365,7 +365,7 @@ namespace SMESH
{
public:
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();
protected:
@ -704,7 +704,7 @@ namespace SMESH
{
public:
RangeOfIds_i();
void SetRange( const SMESH::long_array& theIds );
void SetRange( const SMESH::smIdType_array& theIds );
CORBA::Boolean SetRangeStr( const char* theRange );
char* GetRangeStr();
@ -823,7 +823,7 @@ namespace SMESH
void SetElementType( ElementType theType );
void SetPoint( CORBA::Double x, CORBA::Double y, CORBA::Double z );
void SetVertex( GEOM::GEOM_Object_ptr vertex );
void SetNode ( CORBA::Long nodeID );
void SetNode ( SMESH::smIdType nodeID );
void SetThreshold ( const char* threshold,
SMESH::ConnectedElements::ThresholdType type );
char* GetThreshold ( SMESH::ConnectedElements::ThresholdType& type );
@ -1006,11 +1006,11 @@ namespace SMESH
Controls::Filter::TIdSequence& );
virtual
long_array*
smIdType_array*
GetElementsId( SMESH_Mesh_ptr );
virtual
long_array*
smIdType_array*
GetElementsIdFromParts( const ListOfIDSources& theParts );
virtual
@ -1040,9 +1040,9 @@ namespace SMESH
// =========================
// SMESH_IDSource interface
// =========================
virtual SMESH::long_array* GetIDs();
virtual SMESH::long_array* GetMeshInfo();
virtual SMESH::long_array* GetNbElementsByType();
virtual SMESH::smIdType_array* GetIDs();
virtual SMESH::smIdType_array* GetMeshInfo();
virtual SMESH::smIdType_array* GetNbElementsByType();
virtual SMESH::array_of_ElementType* GetTypes();
virtual SMESH::SMESH_Mesh_ptr GetMesh();
virtual bool IsMeshInfoCorrect() { return true; }
@ -1081,7 +1081,7 @@ namespace SMESH
CORBA::Boolean SaveAs( const char* aFileName );
CORBA::Boolean IsPresent( const char* aFilterName );
SMESH::smIdType NbFilters( ElementType );
CORBA::Long NbFilters( ElementType );
string_array* GetNames( ElementType );
string_array* GetAllNames();
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
SMESH_Gen_i::GetGeometryByMeshElement( SMESH::SMESH_Mesh_ptr theMesh,
CORBA::Long theElementID,
SMESH::smIdType theElementID,
const char* theGeomName)
{
Unexpect aCatch(SALOME_SalomeException);
@ -2482,7 +2482,7 @@ SMESH_Gen_i::GetGeometryByMeshElement( SMESH::SMESH_Mesh_ptr theMesh,
GEOM::GEOM_Object_ptr
SMESH_Gen_i::FindGeometryByMeshElement( SMESH::SMESH_Mesh_ptr theMesh,
CORBA::Long theElementID)
SMESH::smIdType theElementID)
{
Unexpect aCatch(SALOME_SalomeException);
if ( CORBA::is_nil( theMesh ) )
@ -2670,7 +2670,7 @@ SMESH_Gen_i::ConcatenateCommon(const SMESH::ListOfIDSources& theMeshesArray,
}
// remember nb of elements before filling in
SMESH::long_array_var prevState = newMesh->GetNbElementsByType();
SMESH::smIdType_array_var prevState = newMesh->GetNbElementsByType();
// 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;
}
SMESH::long_array_var curState = newMesh->GetNbElementsByType();
SMESH::smIdType_array_var curState = newMesh->GetNbElementsByType();
for( groupType = SMESH::NODE;
groupType < SMESH::NB_ELEMENT_TYPES;
@ -2767,7 +2767,7 @@ SMESH_Gen_i::ConcatenateCommon(const SMESH::ListOfIDSources& theMeshesArray,
SMESH::SMESH_GroupBase_ptr group;
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
SMESH::ListOfGroups_var listOfGroups = initImpl->GetGroups();
@ -2932,7 +2932,7 @@ SMESH::SMESH_Mesh_ptr SMESH_Gen_i::CopyMesh(SMESH::SMESH_IDSource_ptr meshPart,
}
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
{
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 )
{
SMESH::long_array_var elemIDs = stdlGroup->GetIDs();
SMESH::smIdType_array_var elemIDs = stdlGroup->GetIDs();
const bool isElem = ( elemType != SMESH::NODE );
CORBA::ULong iE = 0;
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 )) {
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);
if ( !gsource->_is_nil() ) {
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 ) {
if ( const SMDS_MeshNode* node = meshDS->FindNode( nodes[i] )) {
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 ) {
SMESH::long_array_var elems = gsource->GetListOfID();
SMESH::smIdType_array_var elems = gsource->GetListOfID();
for ( CORBA::ULong i = 0; i < elems->length(); ++i ) {
if ( const SMDS_MeshElement* elem = meshDS->FindElement( elems[i] )) {
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);
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 ) {
const SMDS_MeshElement* elem = ( theElemType == SMESH::NODE ) ? meshDS->FindNode( elems[i] ) : meshDS->FindElement( elems[i] );
if (elem) {

View File

@ -322,12 +322,12 @@ public:
// Return geometrical object the given element is built on. Publish it in study.
GEOM::GEOM_Object_ptr GetGeometryByMeshElement( SMESH::SMESH_Mesh_ptr theMesh,
CORBA::Long theElementID,
SMESH::smIdType theElementID,
const char* theGeomName);
// 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,
CORBA::Long theElementID);
SMESH::smIdType theElementID);
// Concatenate the given meshes into one mesh
SMESH::SMESH_Mesh_ptr ConcatenateCommon(const SMESH::ListOfIDSources& meshesArray,
@ -537,7 +537,7 @@ public:
int RegisterObject(CORBA::Object_ptr theObject);
// 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
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!
{
SMESH::long_array_var nbByType = mesh_i->GetNbElementsByType();
SMESH::smIdType_array_var nbByType = mesh_i->GetNbElementsByType();
isEmpty = ( nbByType[ grp->GetType() ] == 0 );
}
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 )
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 )
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 )
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 )
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 )
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 )
myPreMeshInfo->FullLoadFromFile();
SMESH::long_array_var aRes = new SMESH::long_array();
SMESH::smIdType_array_var aRes = new SMESH::smIdType_array();
SMESHDS_GroupBase* aGroupDS = GetGroupDS();
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 )
return GetListOfID();
@ -561,7 +561,7 @@ SMESH::long_array* SMESH_GroupBase_i::GetNodeIDs()
if ( myPreMeshInfo )
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())
{
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();
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 )
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);
for (int i = SMESH::Entity_Node; i < SMESH::Entity_Last; i++)
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);
for (int i = 0; i < SMESH::NB_ELEMENT_TYPES; i++)
aRes[ i ] = 0;
@ -732,7 +732,7 @@ SMESH::long_array* SMESH_GroupBase_i::GetNbElementsByType()
//purpose : Return ids of members
//=======================================================================
SMESH::long_array* SMESH_GroupBase_i::GetIDs()
SMESH::smIdType_array* SMESH_GroupBase_i::GetIDs()
{
return GetListOfID();
}
@ -893,12 +893,12 @@ bool SMESH_GroupOnFilter_i::IsMeshInfoCorrect()
//purpose : Return ids of members
//=======================================================================
SMESH::long_array* SMESH_GroupOnFilter_i::GetListOfID()
SMESH::smIdType_array* SMESH_GroupOnFilter_i::GetListOfID()
{
if ( myPreMeshInfo )
myPreMeshInfo->FullLoadFromFile();
SMESH::long_array_var aRes = new SMESH::long_array();
SMESH::smIdType_array_var aRes = new SMESH::smIdType_array();
SMESHDS_GroupBase* aGroupDS = 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 )
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);
for (int i = SMESH::Entity_Node; i < SMESH::Entity_Last; i++)
aRes[i] = 0;

View File

@ -61,12 +61,12 @@ class SMESH_I_EXPORT SMESH_GroupBase_i:
void SetName(const char* name);
char* GetName();
SMESH::ElementType GetType();
SMESH::smIdType Size();
CORBA::Long Size();
CORBA::Boolean IsEmpty();
CORBA::Boolean Contains(CORBA::Long elem_id);
SMESH::smIdType GetID(CORBA::Long elem_index);
SMESH::long_array* GetListOfID();
SMESH::long_array* GetNodeIDs();
CORBA::Boolean Contains(SMESH::smIdType elem_id);
SMESH::smIdType GetID(SMESH::smIdType elem_index);
SMESH::smIdType_array* GetListOfID();
SMESH::smIdType_array* GetNodeIDs();
SMESH::smIdType GetNumberOfNodes();
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
* Inherited from SMESH_IDSource
*/
virtual SMESH::long_array* GetMeshInfo();
virtual SMESH::smIdType_array* GetMeshInfo();
/*!
* 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
*/
virtual SMESH::long_array* GetIDs();
virtual SMESH::smIdType_array* GetIDs();
/*!
* Returns types of elements it contains
* Inherited from SMESH_IDSource interface
@ -118,7 +118,7 @@ class SMESH_I_EXPORT SMESH_GroupBase_i:
SALOMEDS::Color GetColor();
void SetColorNumber(CORBA::Long color);
SMESH::smIdType GetColorNumber();
CORBA::Long GetColorNumber();
protected:
@ -150,8 +150,8 @@ class SMESH_I_EXPORT SMESH_Group_i:
const int theLocalID );
// CORBA interface implementation
void Clear();
SMESH::smIdType Add( const SMESH::long_array& theIDs );
SMESH::smIdType Remove( const SMESH::long_array& theIDs );
SMESH::smIdType Add( const SMESH::smIdType_array& theIDs );
SMESH::smIdType Remove( const SMESH::smIdType_array& theIDs );
SMESH::smIdType AddByPredicate( 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);
SMESH::Filter_ptr GetFilter();
virtual CORBA::Boolean IsUpToDate();
virtual SMESH::long_array* GetListOfID();
virtual SMESH::long_array* GetMeshInfo();
virtual SMESH::smIdType_array* GetListOfID();
virtual SMESH::smIdType_array* GetMeshInfo();
//! @return false in two cases: 1) if mesh not loaded and GetMeshInfo() returns
//! incorrect information 2) mesh loaded but group contents is not computed.
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();
}

View File

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

View File

@ -174,7 +174,7 @@ static double getNumericalValue(SMESH::SMESH_IDSource_ptr theSource,
if ( 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++) {
value += theFunctor->GetValue( anElementsId[i] );
}
@ -209,8 +209,8 @@ SMESH::Measure Measurements_i::MinDistance
bool isNode1 = isNodeType(types1);
bool isNode2 = isOrigin || isNodeType(types2);
SMESH::long_array_var aElementsId1 = theSource1->GetIDs();
SMESH::long_array_var aElementsId2;
SMESH::smIdType_array_var aElementsId1 = theSource1->GetIDs();
SMESH::smIdType_array_var aElementsId2;
// compute distance between two entities
/* NOTE: currently only node-to-node case is implemented
@ -297,7 +297,7 @@ static void enlargeBoundingBox(const SMESH::SMESH_IDSource_ptr theObject,
else
{
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
const bool isNode = isNodeType( types );
for(int i = 0, n = aElementsId->length(); i < n; i++)

View File

@ -264,7 +264,7 @@ namespace MeshEditor_I {
*/
//================================================================================
void arrayToSet(const SMESH::long_array & IDs,
void arrayToSet(const SMESH::smIdType_array & IDs,
const SMESHDS_Mesh* aMesh,
TIDSortedElemSet& aMap,
const SMDSAbs_ElementType aType = SMDSAbs_All,
@ -279,13 +279,13 @@ namespace MeshEditor_I {
SMDS_MeshElement::Filter & filter = *aFilter;
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] );
if ( filter( elem ))
aMap.insert( aMap.end(), elem );
}
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] );
if ( filter( elem ))
aMap.insert( aMap.end(), elem );
@ -314,7 +314,7 @@ namespace MeshEditor_I {
else
{
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)
{
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::long_array_var myLastCreatedNodes = new SMESH::long_array();
SMESH::smIdType_array_var myLastCreatedNodes = new SMESH::smIdType_array();
const SMESH_SequenceOfElemPtr& aSeq = getEditor().GetLastCreatedNodes();
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();
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::long_array_var myLastCreatedElems = new SMESH::long_array();
SMESH::smIdType_array_var myLastCreatedElems = new SMESH::smIdType_array();
const SMESH_SequenceOfElemPtr& aSeq = getEditor().GetLastCreatedElems();
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();
return myLastCreatedElems._retn();
@ -704,16 +704,16 @@ SMESH::ComputeError* SMESH_MeshEditor_i::GetLastError()
struct SMESH_MeshEditor_i::_IDSource : public virtual POA_SMESH::SMESH_IDSource,
public virtual SALOME::GenericObj_i
{
SMESH::long_array _ids;
SMESH::smIdType_array _ids;
SMESH::ElementType _type;
SMESH::SMESH_Mesh_ptr _mesh;
SMESH::long_array* GetIDs() { return new SMESH::long_array( _ids ); }
SMESH::long_array* GetMeshInfo() { return 0; }
SMESH::long_array* GetNbElementsByType()
SMESH::smIdType_array* GetIDs() { return new SMESH::smIdType_array( _ids ); }
SMESH::smIdType_array* GetMeshInfo() { return 0; }
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);
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;
return aRes._retn();
}
@ -735,7 +735,7 @@ 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)
{
_IDSource* idSrc = new _IDSource;
@ -782,7 +782,7 @@ SMESH::smIdType* SMESH_MeshEditor_i::GetTemporaryIDs( SMESH::SMESH_IDSource_ptr&
//=============================================================================
CORBA::Boolean
SMESH_MeshEditor_i::RemoveElements(const SMESH::long_array & IDsOfElements)
SMESH_MeshEditor_i::RemoveElements(const SMESH::smIdType_array & IDsOfElements)
{
SMESH_TRY;
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;
initData();
@ -895,7 +895,7 @@ 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)
{
SMESH_TRY;
@ -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;
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;
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;
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;
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;
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;
initData();
@ -1174,7 +1174,7 @@ SMESH::smIdType SMESH_MeshEditor_i::AddVolume(const SMESH::long_array & IDsOfNod
* 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)
{
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;
initData();
@ -1272,10 +1272,10 @@ SMESH_MeshEditor_i::Create0DElementsOnAllNodes(SMESH::SMESH_IDSource_ptr theObje
if ( idSourceToSet( theObject, getMeshDS(), elements, SMDSAbs_All, /*emptyIfIsMesh=*/1))
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() );
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();
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;
@ -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)
{
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)
{
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;
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)
{
SMESH_TRY;
@ -1511,8 +1511,8 @@ void SMESH_MeshEditor_i::SetMeshElementOnShape(CORBA::Long ElementID,
*/
//=============================================================================
CORBA::Boolean SMESH_MeshEditor_i::InverseDiag(CORBA::Long NodeID1,
CORBA::Long NodeID2)
CORBA::Boolean SMESH_MeshEditor_i::InverseDiag(SMESH::smIdType NodeID1,
SMESH::smIdType NodeID2)
{
SMESH_TRY;
initData();
@ -1541,8 +1541,8 @@ CORBA::Boolean SMESH_MeshEditor_i::InverseDiag(CORBA::Long NodeID1,
*/
//=============================================================================
CORBA::Boolean SMESH_MeshEditor_i::DeleteDiag(CORBA::Long NodeID1,
CORBA::Long NodeID2)
CORBA::Boolean SMESH_MeshEditor_i::DeleteDiag(SMESH::smIdType NodeID1,
SMESH::smIdType NodeID2)
{
SMESH_TRY;
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;
initData();
@ -1610,7 +1610,7 @@ CORBA::Boolean SMESH_MeshEditor_i::ReorientObject(SMESH::SMESH_IDSource_ptr theO
prepareIdSource( theObject );
SMESH::long_array_var anElementsId = theObject->GetIDs();
SMESH::smIdType_array_var anElementsId = theObject->GetIDs();
CORBA::Boolean isDone = Reorient(anElementsId);
// 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.
//=======================================================================
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,
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,
CORBA::Double MaxAngle)
{
@ -1826,7 +1826,7 @@ CORBA::Boolean SMESH_MeshEditor_i::TriToQuadObject (SMESH::SMESH_IDSource_ptr
TPythonDump aTPythonDump; // suppress dump in TriToQuad()
prepareIdSource( theObject );
SMESH::long_array_var anElementsId = theObject->GetIDs();
SMESH::smIdType_array_var anElementsId = theObject->GetIDs();
CORBA::Boolean isDone = TriToQuad(anElementsId, Criterion, MaxAngle);
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_TRY;
@ -1896,7 +1896,7 @@ CORBA::Boolean SMESH_MeshEditor_i::QuadToTriObject (SMESH::SMESH_IDSource_ptr
TPythonDump aTPythonDump; // suppress dump in QuadToTri()
prepareIdSource( theObject );
SMESH::long_array_var anElementsId = theObject->GetIDs();
SMESH::smIdType_array_var anElementsId = theObject->GetIDs();
CORBA::Boolean isDone = QuadToTri(anElementsId, Criterion);
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)
{
SMESH_TRY;
@ -1981,7 +1981,7 @@ CORBA::Boolean SMESH_MeshEditor_i::SplitQuadObject (SMESH::SMESH_IDSource_ptr th
TPythonDump aTPythonDump; // suppress dump in SplitQuad()
prepareIdSource( theObject );
SMESH::long_array_var anElementsId = theObject->GetIDs();
SMESH::smIdType_array_var anElementsId = theObject->GetIDs();
CORBA::Boolean isDone = SplitQuad(anElementsId, Diag13);
// Update Python script
@ -2090,7 +2090,7 @@ void SMESH_MeshEditor_i::SplitHexahedraIntoPrisms( SMESH::SMESH_IDSource_ptr el
facetToSplitNormal.PS.z ));
TIDSortedElemSet elemSet;
prepareIdSource( elems );
SMESH::long_array_var anElementsId = elems->GetIDs();
SMESH::smIdType_array_var anElementsId = elems->GetIDs();
SMDS_MeshElement::GeomFilter filter( SMDSGeom_HEXA );
arrayToSet( anElementsId, getMeshDS(), elemSet, SMDSAbs_Volume, &filter );
@ -2167,9 +2167,9 @@ void SMESH_MeshEditor_i::SplitBiQuadraticIntoLinear(const SMESH::ListOfIDSources
//=======================================================================
CORBA::Boolean
SMESH_MeshEditor_i::Smooth(const SMESH::long_array & IDsOfElements,
const SMESH::long_array & IDsOfFixedNodes,
CORBA::Long MaxNbOfIterations,
SMESH_MeshEditor_i::Smooth(const SMESH::smIdType_array & IDsOfElements,
const SMESH::smIdType_array & IDsOfFixedNodes,
CORBA::Short MaxNbOfIterations,
CORBA::Double MaxAspectRatio,
SMESH::SMESH_MeshEditor::Smooth_Method Method)
{
@ -2184,9 +2184,9 @@ SMESH_MeshEditor_i::Smooth(const SMESH::long_array & IDsOfElements,
//=======================================================================
CORBA::Boolean
SMESH_MeshEditor_i::SmoothParametric(const SMESH::long_array & IDsOfElements,
const SMESH::long_array & IDsOfFixedNodes,
CORBA::Long MaxNbOfIterations,
SMESH_MeshEditor_i::SmoothParametric(const SMESH::smIdType_array & IDsOfElements,
const SMESH::smIdType_array & IDsOfFixedNodes,
CORBA::Short MaxNbOfIterations,
CORBA::Double MaxAspectRatio,
SMESH::SMESH_MeshEditor::Smooth_Method Method)
{
@ -2202,8 +2202,8 @@ SMESH_MeshEditor_i::SmoothParametric(const SMESH::long_array & IDsO
CORBA::Boolean
SMESH_MeshEditor_i::SmoothObject(SMESH::SMESH_IDSource_ptr theObject,
const SMESH::long_array & IDsOfFixedNodes,
CORBA::Long MaxNbOfIterations,
const SMESH::smIdType_array & IDsOfFixedNodes,
CORBA::Short MaxNbOfIterations,
CORBA::Double MaxAspectRatio,
SMESH::SMESH_MeshEditor::Smooth_Method Method)
{
@ -2219,8 +2219,8 @@ SMESH_MeshEditor_i::SmoothObject(SMESH::SMESH_IDSource_ptr theObjec
CORBA::Boolean
SMESH_MeshEditor_i::SmoothParametricObject(SMESH::SMESH_IDSource_ptr theObject,
const SMESH::long_array & IDsOfFixedNodes,
CORBA::Long MaxNbOfIterations,
const SMESH::smIdType_array & IDsOfFixedNodes,
CORBA::Short MaxNbOfIterations,
CORBA::Double MaxAspectRatio,
SMESH::SMESH_MeshEditor::Smooth_Method Method)
{
@ -2236,9 +2236,9 @@ SMESH_MeshEditor_i::SmoothParametricObject(SMESH::SMESH_IDSource_ptr
//=============================================================================
CORBA::Boolean
SMESH_MeshEditor_i::smooth(const SMESH::long_array & IDsOfElements,
const SMESH::long_array & IDsOfFixedNodes,
CORBA::Long MaxNbOfIterations,
SMESH_MeshEditor_i::smooth(const SMESH::smIdType_array & IDsOfElements,
const SMESH::smIdType_array & IDsOfFixedNodes,
CORBA::Short MaxNbOfIterations,
CORBA::Double MaxAspectRatio,
SMESH::SMESH_MeshEditor::Smooth_Method Method,
bool IsParametric)
@ -2252,8 +2252,8 @@ SMESH_MeshEditor_i::smooth(const SMESH::long_array & IDsOfElements,
arrayToSet(IDsOfElements, aMesh, elements, SMDSAbs_Face);
set<const SMDS_MeshNode*> fixedNodes;
for ( CORBA::ULong i = 0; i < IDsOfFixedNodes.length(); i++) {
CORBA::Long index = IDsOfFixedNodes[i];
for ( SMESH::smIdType i = 0; i < IDsOfFixedNodes.length(); i++) {
SMESH::smIdType index = IDsOfFixedNodes[i];
const SMDS_MeshNode * node = aMesh->FindNode(index);
if ( node )
fixedNodes.insert( node );
@ -2290,8 +2290,8 @@ SMESH_MeshEditor_i::smooth(const SMESH::long_array & IDsOfElements,
CORBA::Boolean
SMESH_MeshEditor_i::smoothObject(SMESH::SMESH_IDSource_ptr theObject,
const SMESH::long_array & IDsOfFixedNodes,
CORBA::Long MaxNbOfIterations,
const SMESH::smIdType_array & IDsOfFixedNodes,
CORBA::Short MaxNbOfIterations,
CORBA::Double MaxAspectRatio,
SMESH::SMESH_MeshEditor::Smooth_Method Method,
bool IsParametric)
@ -2302,7 +2302,7 @@ SMESH_MeshEditor_i::smoothObject(SMESH::SMESH_IDSource_ptr theObjec
TPythonDump aTPythonDump; // suppress dump in smooth()
prepareIdSource( theObject );
SMESH::long_array_var anElementsId = theObject->GetIDs();
SMESH::smIdType_array_var anElementsId = theObject->GetIDs();
CORBA::Boolean isDone = smooth (anElementsId, IDsOfFixedNodes, MaxNbOfIterations,
MaxAspectRatio, Method, IsParametric);
@ -2741,7 +2741,7 @@ SMESH_MeshEditor_i::ExtrusionByNormal(const SMESH::ListOfIDSources& objects,
//=======================================================================
SMESH::ListOfGroups*
SMESH_MeshEditor_i::AdvancedExtrusion(const SMESH::long_array & theIDsOfElements,
SMESH_MeshEditor_i::AdvancedExtrusion(const SMESH::smIdType_array & theIDsOfElements,
const SMESH::DirStruct & theStepVector,
CORBA::Long theNbOfSteps,
CORBA::Long theExtrFlags,
@ -2823,7 +2823,7 @@ SMESH_MeshEditor_i::ExtrusionAlongPathObjects(const SMESH::ListOfIDSources & the
const SMESH::ListOfIDSources & theFaces,
SMESH::SMESH_IDSource_ptr thePathObject,
GEOM::GEOM_Object_ptr thePathShape,
CORBA::Long theNodeStart,
SMESH::smIdType theNodeStart,
CORBA::Boolean theHasAngles,
const SMESH::double_array & theAngles,
CORBA::Boolean theAnglesVariation,
@ -3118,7 +3118,7 @@ SMESH_MeshEditor_i::mirror(TIDSortedElemSet & theElements,
//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,
SMESH::SMESH_MeshEditor::MirrorType theMirrorType,
CORBA::Boolean theCopy)
@ -3170,7 +3170,7 @@ void SMESH_MeshEditor_i::MirrorObject(SMESH::SMESH_IDSource_ptr theObj
//=======================================================================
SMESH::ListOfGroups*
SMESH_MeshEditor_i::MirrorMakeGroups(const SMESH::long_array& theIDsOfElements,
SMESH_MeshEditor_i::MirrorMakeGroups(const SMESH::smIdType_array& theIDsOfElements,
const SMESH::AxisStruct& theMirror,
SMESH::SMESH_MeshEditor::MirrorType theMirrorType)
{
@ -3227,7 +3227,7 @@ SMESH_MeshEditor_i::MirrorObjectMakeGroups(SMESH::SMESH_IDSource_ptr t
//=======================================================================
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,
SMESH::SMESH_MeshEditor::MirrorType theMirrorType,
CORBA::Boolean theCopyGroups,
@ -3375,7 +3375,7 @@ SMESH_MeshEditor_i::translate(TIDSortedElemSet & theElements,
//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,
CORBA::Boolean theCopy)
{
@ -3421,7 +3421,7 @@ void SMESH_MeshEditor_i::TranslateObject(SMESH::SMESH_IDSource_ptr theObject,
//=======================================================================
SMESH::ListOfGroups*
SMESH_MeshEditor_i::TranslateMakeGroups(const SMESH::long_array& theIDsOfElements,
SMESH_MeshEditor_i::TranslateMakeGroups(const SMESH::smIdType_array& theIDsOfElements,
const SMESH::DirStruct& theVector)
{
TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
@ -3472,7 +3472,7 @@ SMESH_MeshEditor_i::TranslateObjectMakeGroups(SMESH::SMESH_IDSource_ptr theObjec
//=======================================================================
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,
CORBA::Boolean theCopyGroups,
const char* theMeshName)
@ -3619,7 +3619,7 @@ SMESH_MeshEditor_i::rotate(TIDSortedElemSet & theElements,
//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,
CORBA::Double theAngle,
CORBA::Boolean theCopy)
@ -3668,7 +3668,7 @@ void SMESH_MeshEditor_i::RotateObject(SMESH::SMESH_IDSource_ptr theObject,
//=======================================================================
SMESH::ListOfGroups*
SMESH_MeshEditor_i::RotateMakeGroups(const SMESH::long_array& theIDsOfElements,
SMESH_MeshEditor_i::RotateMakeGroups(const SMESH::smIdType_array& theIDsOfElements,
const SMESH::AxisStruct& theAxis,
CORBA::Double theAngle)
{
@ -3724,7 +3724,7 @@ SMESH_MeshEditor_i::RotateObjectMakeGroups(SMESH::SMESH_IDSource_ptr theObject,
//=======================================================================
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,
CORBA::Double theAngleInRadians,
CORBA::Boolean theCopyGroups,
@ -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();
if ( elemTypes->length() == 1 && elemTypes[0] == SMESH::NODE )
continue;
SMESH::long_array_var elementsId = theElementsToKeep[i]->GetIDs();
for ( CORBA::ULong j = 0; j < elementsId->length(); ++j )
SMESH::smIdType_array_var elementsId = theElementsToKeep[i]->GetIDs();
for ( SMESH::smIdType j = 0; j < elementsId->length(); ++j )
idsToKeep.Add( elementsId[ j ]);
}
@ -4399,7 +4399,7 @@ 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 y,
CORBA::Double z)
@ -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 z,
CORBA::Long theNodeID)
SMESH::smIdType theNodeID)
{
SMESH_TRY;
// 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
int nodeID = theNodeID;
smIdType nodeID = theNodeID;
const SMDS_MeshNode* node = getMeshDS()->FindNode( nodeID );
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 z,
SMESH::ElementType type)
{
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;
theSearchersDeleter.Set( myMesh );
@ -4575,7 +4575,7 @@ SMESH::long_array* SMESH_MeshEditor_i::FindElementsByPoint(CORBA::Double x,
SMDSAbs_ElementType( type ),
foundElems);
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();
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
//=======================================================================
SMESH::long_array*
SMESH::smIdType_array*
SMESH_MeshEditor_i::FindAmongElementsByPoint(SMESH::SMESH_IDSource_ptr elementIDs,
CORBA::Double x,
CORBA::Double y,
@ -4599,7 +4599,7 @@ SMESH_MeshEditor_i::FindAmongElementsByPoint(SMESH::SMESH_IDSource_ptr elementID
SMESH::ElementType type)
{
SMESH_TRY;
SMESH::long_array_var res = new SMESH::long_array;
SMESH::smIdType_array_var res = new SMESH::smIdType_array;
prepareIdSource( elementIDs );
if ( type != SMESH::NODE )
@ -4646,7 +4646,7 @@ SMESH_MeshEditor_i::FindAmongElementsByPoint(SMESH::SMESH_IDSource_ptr elementID
SMDSAbs_ElementType( type ),
foundElems);
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();
return res._retn();
@ -4793,7 +4793,7 @@ CORBA::Boolean SMESH_MeshEditor_i::IsCoherentOrientation2D()
SMESH::array_of_long_array*
SMESH_MeshEditor_i::Get1DBranches( SMESH::SMESH_IDSource_ptr theEdges,
CORBA::Long theStartNode,
SMESH::smIdType theStartNode,
SMESH::array_of_long_array_out theNodeGroups )
{
if ( CORBA::is_nil( theEdges ))
@ -5276,12 +5276,12 @@ SewCoincidentFreeBorders(const SMESH::CoincidentFreeBorders& freeBorders,
//=======================================================================
SMESH::SMESH_MeshEditor::Sew_Error
SMESH_MeshEditor_i::SewFreeBorders(CORBA::Long FirstNodeID1,
CORBA::Long SecondNodeID1,
CORBA::Long LastNodeID1,
CORBA::Long FirstNodeID2,
CORBA::Long SecondNodeID2,
CORBA::Long LastNodeID2,
SMESH_MeshEditor_i::SewFreeBorders(SMESH::smIdType FirstNodeID1,
SMESH::smIdType SecondNodeID1,
SMESH::smIdType LastNodeID1,
SMESH::smIdType FirstNodeID2,
SMESH::smIdType SecondNodeID2,
SMESH::smIdType LastNodeID2,
CORBA::Boolean CreatePolygons,
CORBA::Boolean CreatePolyedrs)
{
@ -5342,11 +5342,11 @@ SMESH_MeshEditor_i::SewFreeBorders(CORBA::Long FirstNodeID1,
//=======================================================================
SMESH::SMESH_MeshEditor::Sew_Error
SMESH_MeshEditor_i::SewConformFreeBorders(CORBA::Long FirstNodeID1,
CORBA::Long SecondNodeID1,
CORBA::Long LastNodeID1,
CORBA::Long FirstNodeID2,
CORBA::Long SecondNodeID2)
SMESH_MeshEditor_i::SewConformFreeBorders(SMESH::smIdType FirstNodeID1,
SMESH::smIdType SecondNodeID1,
SMESH::smIdType LastNodeID1,
SMESH::smIdType FirstNodeID2,
SMESH::smIdType SecondNodeID2)
{
SMESH_TRY;
initData();
@ -5399,11 +5399,11 @@ SMESH_MeshEditor_i::SewConformFreeBorders(CORBA::Long FirstNodeID1,
//=======================================================================
SMESH::SMESH_MeshEditor::Sew_Error
SMESH_MeshEditor_i::SewBorderToSide(CORBA::Long FirstNodeIDOnFreeBorder,
CORBA::Long SecondNodeIDOnFreeBorder,
CORBA::Long LastNodeIDOnFreeBorder,
CORBA::Long FirstNodeIDOnSide,
CORBA::Long LastNodeIDOnSide,
SMESH_MeshEditor_i::SewBorderToSide(SMESH::smIdType FirstNodeIDOnFreeBorder,
SMESH::smIdType SecondNodeIDOnFreeBorder,
SMESH::smIdType LastNodeIDOnFreeBorder,
SMESH::smIdType FirstNodeIDOnSide,
SMESH::smIdType LastNodeIDOnSide,
CORBA::Boolean CreatePolygons,
CORBA::Boolean CreatePolyedrs)
{
@ -5461,12 +5461,12 @@ SMESH_MeshEditor_i::SewBorderToSide(CORBA::Long FirstNodeIDOnFreeBorder,
//=======================================================================
SMESH::SMESH_MeshEditor::Sew_Error
SMESH_MeshEditor_i::SewSideElements(const SMESH::long_array& IDsOfSide1Elements,
const SMESH::long_array& IDsOfSide2Elements,
CORBA::Long NodeID1OfSide1ToMerge,
CORBA::Long NodeID1OfSide2ToMerge,
CORBA::Long NodeID2OfSide1ToMerge,
CORBA::Long NodeID2OfSide2ToMerge)
SMESH_MeshEditor_i::SewSideElements(const SMESH::smIdType_array& IDsOfSide1Elements,
const SMESH::smIdType_array& IDsOfSide2Elements,
SMESH::smIdType NodeID1OfSide1ToMerge,
SMESH::smIdType NodeID1OfSide2ToMerge,
SMESH::smIdType NodeID2OfSide1ToMerge,
SMESH::smIdType NodeID2OfSide2ToMerge)
{
SMESH_TRY;
initData();
@ -5520,8 +5520,8 @@ SMESH_MeshEditor_i::SewSideElements(const SMESH::long_array& IDsOfSide1Elements,
*/
//================================================================================
CORBA::Boolean SMESH_MeshEditor_i::ChangeElemNodes(CORBA::Long ide,
const SMESH::long_array& newIDs)
CORBA::Boolean SMESH_MeshEditor_i::ChangeElemNodes(SMESH::smIdType ide,
const SMESH::smIdType_array& newIDs)
{
SMESH_TRY;
initData();
@ -5791,7 +5791,7 @@ bool SMESH_MeshEditor_i::idSourceToSet(SMESH::SMESH_IDSource_ptr theIDSource,
}
}
prepareIdSource( theIDSource );
SMESH::long_array_var anIDs = theIDSource->GetIDs();
SMESH::smIdType_array_var anIDs = theIDSource->GetIDs();
if ( anIDs->length() == 0 )
{
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,
const SMESH::long_array& theModifiedElems )
CORBA::Boolean SMESH_MeshEditor_i::DoubleNodes( const SMESH::smIdType_array& theNodes,
const SMESH::smIdType_array& theModifiedElems )
{
SMESH_TRY;
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,
const SMESH::long_array& theModifiedElems )
CORBA::Boolean SMESH_MeshEditor_i::DoubleNode( SMESH::smIdType theNodeId,
const SMESH::smIdType_array& theModifiedElems )
{
SMESH_TRY;
SMESH::long_array_var aNodes = new SMESH::long_array;
SMESH::smIdType_array_var aNodes = new SMESH::smIdType_array;
aNodes->length( 1 );
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 )
return false;
SMESH::long_array_var aNodes = theNodes->GetListOfID();
SMESH::long_array_var aModifiedElems;
SMESH::smIdType_array_var aNodes = theNodes->GetListOfID();
SMESH::smIdType_array_var aModifiedElems;
if ( !CORBA::is_nil( theModifiedElems ) )
aModifiedElems = theModifiedElems->GetListOfID();
else
aModifiedElems = new SMESH::long_array;
aModifiedElems = new SMESH::smIdType_array;
TPythonDump pyDump; // suppress dump by the next line
@ -6023,12 +6023,12 @@ SMESH_MeshEditor_i::DoubleNodeGroupNew( SMESH::SMESH_GroupBase_ptr theNodes,
return aNewGroup._retn();
// Duplicate nodes
SMESH::long_array_var aNodes = theNodes->GetListOfID();
SMESH::long_array_var aModifiedElems;
SMESH::smIdType_array_var aNodes = theNodes->GetListOfID();
SMESH::smIdType_array_var aModifiedElems;
if ( !CORBA::is_nil( theModifiedElems ) )
aModifiedElems = theModifiedElems->GetListOfID();
else {
aModifiedElems = new SMESH::long_array;
aModifiedElems = new SMESH::smIdType_array;
aModifiedElems->length( 0 );
}
@ -6038,7 +6038,7 @@ SMESH_MeshEditor_i::DoubleNodeGroupNew( SMESH::SMESH_GroupBase_ptr theNodes,
if ( aResult )
{
// Create group with newly created nodes
SMESH::long_array_var anIds = GetLastCreatedNodes();
SMESH::smIdType_array_var anIds = GetLastCreatedNodes();
if (anIds->length() > 0) {
std::string anUnindexedName (theNodes->GetName());
std::string aNewName = GenerateGroupName(anUnindexedName + "_double");
@ -6075,13 +6075,13 @@ CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeGroups(const SMESH::ListOfGroups& t
initData();
std::list< int > aNodes;
int i, n, j, m;
smIdType i, n, j, m;
for ( i = 0, n = theNodes.length(); i < n; i++ )
{
SMESH::SMESH_GroupBase_var aGrp = theNodes[ i ];
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++ )
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 ];
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++ )
anElems.push_back( aCurr[ j ] );
}
@ -6135,7 +6135,7 @@ SMESH_MeshEditor_i::DoubleNodeGroupsNew( const SMESH::ListOfGroups& theNodes,
if ( aResult )
{
// Create group with newly created nodes
SMESH::long_array_var anIds = GetLastCreatedNodes();
SMESH::smIdType_array_var anIds = GetLastCreatedNodes();
if (anIds->length() > 0) {
std::string anUnindexedName (theNodes[0]->GetName());
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,
const SMESH::long_array& theNodesNot,
const SMESH::long_array& theAffectedElems )
CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeElem( const SMESH::smIdType_array& theElems,
const SMESH::smIdType_array& theNodesNot,
const SMESH::smIdType_array& theAffectedElems )
{
SMESH_TRY;
initData();
@ -6205,8 +6205,8 @@ CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeElem( const SMESH::long_array& theE
*/
//================================================================================
CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeElemInRegion ( const SMESH::long_array& theElems,
const SMESH::long_array& theNodesNot,
CORBA::Boolean SMESH_MeshEditor_i::DoubleNodeElemInRegion ( const SMESH::smIdType_array& theElems,
const SMESH::smIdType_array& theNodesNot,
GEOM::GEOM_Object_ptr theShape )
{
SMESH_TRY;
@ -6360,14 +6360,14 @@ SMESH_MeshEditor_i::DoubleNodeElemGroup2New(SMESH::SMESH_GroupBase_ptr theElems,
std::string aNewName = GenerateGroupName( std::string(elemGroupName.in()) + "_double");
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);
aNewElemGroup = myMesh_i->CreateGroup(aGroupType, aNewName.c_str());
aNewElemGroup->Add(anIds);
}
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->Add(anIds);
}
@ -6461,7 +6461,7 @@ static void listOfGroupToSet(const SMESH::ListOfGroups& theGrpList,
if ( !CORBA::is_nil( aGrp ) && (theIsNodeGrp ? 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 );
}
}
@ -6588,14 +6588,14 @@ SMESH_MeshEditor_i::DoubleNodeElemGroups2New(const SMESH::ListOfGroups& theElems
std::string aNewName = GenerateGroupName( std::string(elemGroupName.in()) + "_double");
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);
aNewElemGroup = myMesh_i->CreateGroup(aGroupType, aNewName.c_str());
aNewElemGroup->Add(anIds);
}
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->Add(anIds);
}
@ -6709,9 +6709,9 @@ SMESH_MeshEditor_i::AffectedElemGroupsInRegion( const SMESH::ListOfGroups& theEl
TPythonDump pyDump;
if ( aResult && anAffected.size() > 0 )
{
SMESH::long_array_var volumeIds = new SMESH::long_array;
SMESH::long_array_var faceIds = new SMESH::long_array;
SMESH::long_array_var edgeIds = new SMESH::long_array;
SMESH::smIdType_array_var volumeIds = new SMESH::smIdType_array;
SMESH::smIdType_array_var faceIds = new SMESH::smIdType_array;
SMESH::smIdType_array_var edgeIds = new SMESH::smIdType_array;
volumeIds->length( anAffected.size() );
faceIds ->length( anAffected.size() );
edgeIds ->length( anAffected.size() );
@ -6845,7 +6845,7 @@ SMESH_MeshEditor_i::DoubleNodesOnGroupBoundaries( const SMESH::ListOfGroups& the
{
// if ( aGrp->GetType() != SMESH::VOLUME )
// 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 );
}
}
@ -6897,7 +6897,7 @@ SMESH_MeshEditor_i::CreateFlatElementsOnFacesGroups( const SMESH::ListOfGroups&
TIDSortedElemSet faceGroup;
faceGroup.clear();
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 );
}
}
@ -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* meshName,
CORBA::Boolean toCopyAll,

View File

@ -71,13 +71,13 @@ public:
* created this method returns list of their IDs, if new nodes
* not created - returns an empty list
*/
SMESH::long_array* GetLastCreatedNodes();
SMESH::smIdType_array* GetLastCreatedNodes();
/*!
* If during last operation of MeshEditor some elements were
* created this method returns list of their IDs, if new elements
* not created - returns an empty list
*/
SMESH::long_array* GetLastCreatedElems();
SMESH::smIdType_array* GetLastCreatedElems();
/*!
* \brief Clears sequences of last created elements and nodes
*/
@ -90,7 +90,7 @@ public:
/*!
* \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);
static bool IsTemporaryIDSource( SMESH::SMESH_IDSource_ptr& idSource );
static SMESH::smIdType* GetTemporaryIDs( SMESH::SMESH_IDSource_ptr& idSource, int& nbIds );
@ -100,8 +100,8 @@ public:
*/
std::string GenerateGroupName(const std::string& thePrefix);
CORBA::Boolean RemoveElements(const SMESH::long_array & IDsOfElements);
CORBA::Boolean RemoveNodes (const SMESH::long_array & IDsOfNodes);
CORBA::Boolean RemoveElements(const SMESH::smIdType_array & IDsOfElements);
CORBA::Boolean RemoveNodes (const SMESH::smIdType_array & IDsOfNodes);
SMESH::smIdType RemoveOrphanNodes();
/*!
@ -109,16 +109,16 @@ public:
* 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 Add0DElement(CORBA::Long IDOfNode, CORBA::Boolean DuplicateElements);
SMESH::smIdType AddBall(CORBA::Long IDOfNodem, CORBA::Double diameter);
SMESH::smIdType AddEdge(const SMESH::long_array & IDsOfNodes);
SMESH::smIdType AddFace(const SMESH::long_array & IDsOfNodes);
SMESH::smIdType AddPolygonalFace(const SMESH::long_array & IDsOfNodes);
SMESH::smIdType AddQuadPolygonalFace(const SMESH::long_array & IDsOfNodes);
SMESH::smIdType AddVolume(const SMESH::long_array & IDsOfNodes);
SMESH::smIdType AddPolyhedralVolume(const SMESH::long_array & IDsOfNodes,
SMESH::smIdType Add0DElement(SMESH::smIdType IDOfNode, CORBA::Boolean DuplicateElements);
SMESH::smIdType AddBall(SMESH::smIdType IDOfNodem, CORBA::Double diameter);
SMESH::smIdType AddEdge(const SMESH::smIdType_array & IDsOfNodes);
SMESH::smIdType AddFace(const SMESH::smIdType_array & IDsOfNodes);
SMESH::smIdType AddPolygonalFace(const SMESH::smIdType_array & IDsOfNodes);
SMESH::smIdType AddQuadPolygonalFace(const SMESH::smIdType_array & IDsOfNodes);
SMESH::smIdType AddVolume(const SMESH::smIdType_array & IDsOfNodes);
SMESH::smIdType AddPolyhedralVolume(const SMESH::smIdType_array & IDsOfNodes,
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
@ -139,14 +139,14 @@ public:
* \param NodeID - node ID
* \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
* \param NodeID - node ID
* \param EdgeID - edge ID available through GEOM_Object.GetSubShapeIndices()[0]
* \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);
/*!
* \brief Store node position on a face
@ -155,28 +155,28 @@ public:
* \param u - U 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);
/*!
* \brief Bind a node to a solid
* \param NodeID - node ID
* \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
* \param ElementID - element ID
* \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::Boolean InverseDiag(CORBA::Long NodeID1, CORBA::Long NodeID2);
CORBA::Boolean DeleteDiag(CORBA::Long NodeID1, CORBA::Long NodeID2);
CORBA::Boolean Reorient(const SMESH::long_array & IDsOfElements);
CORBA::Boolean InverseDiag(SMESH::smIdType NodeID1, SMESH::smIdType NodeID2);
CORBA::Boolean DeleteDiag(SMESH::smIdType NodeID1, SMESH::smIdType NodeID2);
CORBA::Boolean Reorient(const SMESH::smIdType_array & IDsOfElements);
CORBA::Boolean ReorientObject(SMESH::SMESH_IDSource_ptr theObject);
/*!
@ -200,23 +200,23 @@ public:
* pointing either \a outside or \a inside the adjacent volumes.
* \return number of reoriented faces.
*/
SMESH::smIdType Reorient2DBy3D(const SMESH::ListOfIDSources & faces,
CORBA::Long Reorient2DBy3D(const SMESH::ListOfIDSources & faces,
SMESH::SMESH_IDSource_ptr volumes,
CORBA::Boolean outsideNormal);
// Split/Join
CORBA::Boolean TriToQuad (const SMESH::long_array & IDsOfElements,
CORBA::Boolean TriToQuad (const SMESH::smIdType_array & IDsOfElements,
SMESH::NumericalFunctor_ptr Criterion,
CORBA::Double MaxAngle);
CORBA::Boolean TriToQuadObject (SMESH::SMESH_IDSource_ptr theObject,
SMESH::NumericalFunctor_ptr Criterion,
CORBA::Double MaxAngle);
CORBA::Boolean QuadToTri (const SMESH::long_array & IDsOfElements,
CORBA::Boolean QuadToTri (const SMESH::smIdType_array & IDsOfElements,
SMESH::NumericalFunctor_ptr Criterion);
CORBA::Boolean QuadToTriObject (SMESH::SMESH_IDSource_ptr theObject,
SMESH::NumericalFunctor_ptr Criterion);
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 SplitQuadObject (SMESH::SMESH_IDSource_ptr theObject,
CORBA::Boolean Diag13);
@ -231,35 +231,35 @@ public:
CORBA::Boolean allDomains);
void SplitBiQuadraticIntoLinear(const SMESH::ListOfIDSources& elems);
CORBA::Boolean Smooth(const SMESH::long_array & IDsOfElements,
const SMESH::long_array & IDsOfFixedNodes,
CORBA::Long MaxNbOfIterations,
CORBA::Boolean Smooth(const SMESH::smIdType_array & IDsOfElements,
const SMESH::smIdType_array & IDsOfFixedNodes,
CORBA::Short MaxNbOfIterations,
CORBA::Double MaxAspectRatio,
SMESH::SMESH_MeshEditor::Smooth_Method Method);
CORBA::Boolean SmoothObject(SMESH::SMESH_IDSource_ptr theObject,
const SMESH::long_array & IDsOfFixedNodes,
CORBA::Long MaxNbOfIterations,
const SMESH::smIdType_array & IDsOfFixedNodes,
CORBA::Short MaxNbOfIterations,
CORBA::Double MaxAspectRatio,
SMESH::SMESH_MeshEditor::Smooth_Method Method);
CORBA::Boolean SmoothParametric(const SMESH::long_array & IDsOfElements,
const SMESH::long_array & IDsOfFixedNodes,
CORBA::Long MaxNbOfIterations,
CORBA::Boolean SmoothParametric(const SMESH::smIdType_array & IDsOfElements,
const SMESH::smIdType_array & IDsOfFixedNodes,
CORBA::Short MaxNbOfIterations,
CORBA::Double MaxAspectRatio,
SMESH::SMESH_MeshEditor::Smooth_Method Method) ;
CORBA::Boolean SmoothParametricObject(SMESH::SMESH_IDSource_ptr theObject,
const SMESH::long_array & IDsOfFixedNodes,
CORBA::Long MaxNbOfIterations,
const SMESH::smIdType_array & IDsOfFixedNodes,
CORBA::Short MaxNbOfIterations,
CORBA::Double MaxAspectRatio,
SMESH::SMESH_MeshEditor::Smooth_Method Method);
CORBA::Boolean smooth(const SMESH::long_array & IDsOfElements,
const SMESH::long_array & IDsOfFixedNodes,
CORBA::Long MaxNbOfIterations,
CORBA::Boolean smooth(const SMESH::smIdType_array & IDsOfElements,
const SMESH::smIdType_array & IDsOfFixedNodes,
CORBA::Short MaxNbOfIterations,
CORBA::Double MaxAspectRatio,
SMESH::SMESH_MeshEditor::Smooth_Method Method,
bool IsParametric);
CORBA::Boolean smoothObject(SMESH::SMESH_IDSource_ptr theObject,
const SMESH::long_array & IDsOfFixedNodes,
CORBA::Long MaxNbOfIterations,
const SMESH::smIdType_array & IDsOfFixedNodes,
CORBA::Short MaxNbOfIterations,
CORBA::Double MaxAspectRatio,
SMESH::SMESH_MeshEditor::Smooth_Method Method,
bool IsParametric);
@ -303,7 +303,7 @@ public:
CORBA::Boolean useInputElemsOnly,
CORBA::Boolean makeGroups,
CORBA::Short dim);
SMESH::ListOfGroups* AdvancedExtrusion(const SMESH::long_array & theIDsOfElements,
SMESH::ListOfGroups* AdvancedExtrusion(const SMESH::smIdType_array & theIDsOfElements,
const SMESH::DirStruct & theStepVector,
CORBA::Long theNbOfSteps,
CORBA::Long theExtrFlags,
@ -316,7 +316,7 @@ public:
const SMESH::ListOfIDSources & Faces,
SMESH::SMESH_IDSource_ptr PathMesh,
GEOM::GEOM_Object_ptr PathShape,
CORBA::Long NodeStart,
SMESH::smIdType NodeStart,
CORBA::Boolean HasAngles,
const SMESH::double_array & Angles,
CORBA::Boolean AnglesVariation,
@ -331,7 +331,7 @@ public:
GEOM::GEOM_Object_ptr PathShape,
const SMESH::double_array & Angles);
void Mirror(const SMESH::long_array & IDsOfElements,
void Mirror(const SMESH::smIdType_array & IDsOfElements,
const SMESH::AxisStruct & Axis,
SMESH::SMESH_MeshEditor::MirrorType MirrorType,
CORBA::Boolean Copy);
@ -339,13 +339,13 @@ public:
const SMESH::AxisStruct & Axis,
SMESH::SMESH_MeshEditor::MirrorType MirrorType,
CORBA::Boolean Copy);
void Translate(const SMESH::long_array & IDsOfElements,
void Translate(const SMESH::smIdType_array & IDsOfElements,
const SMESH::DirStruct & Vector,
CORBA::Boolean Copy);
void TranslateObject(SMESH::SMESH_IDSource_ptr theObject,
const SMESH::DirStruct & Vector,
CORBA::Boolean Copy);
void Rotate(const SMESH::long_array & IDsOfElements,
void Rotate(const SMESH::smIdType_array & IDsOfElements,
const SMESH::AxisStruct & Axis,
CORBA::Double Angle,
CORBA::Boolean Copy);
@ -354,24 +354,24 @@ public:
CORBA::Double Angle,
CORBA::Boolean Copy);
SMESH::ListOfGroups* MirrorMakeGroups(const SMESH::long_array& IDsOfElements,
SMESH::ListOfGroups* MirrorMakeGroups(const SMESH::smIdType_array& IDsOfElements,
const SMESH::AxisStruct& Mirror,
SMESH::SMESH_MeshEditor::MirrorType MirrorType);
SMESH::ListOfGroups* MirrorObjectMakeGroups(SMESH::SMESH_IDSource_ptr Object,
const SMESH::AxisStruct& Mirror,
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);
SMESH::ListOfGroups* TranslateObjectMakeGroups(SMESH::SMESH_IDSource_ptr Object,
const SMESH::DirStruct& Vector);
SMESH::ListOfGroups* RotateMakeGroups(const SMESH::long_array& IDsOfElements,
SMESH::ListOfGroups* RotateMakeGroups(const SMESH::smIdType_array& IDsOfElements,
const SMESH::AxisStruct& Axis,
CORBA::Double AngleInRadians);
SMESH::ListOfGroups* RotateObjectMakeGroups(SMESH::SMESH_IDSource_ptr Object,
const SMESH::AxisStruct& Axis,
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,
SMESH::SMESH_MeshEditor::MirrorType MirrorType,
CORBA::Boolean CopyGroups,
@ -381,7 +381,7 @@ public:
SMESH::SMESH_MeshEditor::MirrorType MirrorType,
CORBA::Boolean CopyGroups,
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,
CORBA::Boolean CopyGroups,
const char* MeshName);
@ -389,7 +389,7 @@ public:
const SMESH::DirStruct& Vector,
CORBA::Boolean CopyGroups,
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,
CORBA::Double AngleInRadians,
CORBA::Boolean CopyGroups,
@ -443,10 +443,10 @@ public:
void MergeElements(const SMESH::array_of_long_array& GroupsOfElementsID,
const SMESH::ListOfIDSources& ElementsToKeep);
void MergeEqualElements();
CORBA::Long MoveClosestNodeToPoint(CORBA::Double x,
SMESH::smIdType MoveClosestNodeToPoint(CORBA::Double x,
CORBA::Double y,
CORBA::Double z,
CORBA::Long nodeID);
SMESH::smIdType nodeID);
/*!
* \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.
* '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 z,
SMESH::ElementType type);
@ -466,7 +466,7 @@ public:
* where the given point is IN or ON.
* '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 y,
CORBA::Double z,
@ -509,7 +509,7 @@ public:
* 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,
CORBA::Long startNode,
SMESH::smIdType startNode,
SMESH::array_of_long_array_out nodeGroups);
/*!
@ -535,51 +535,51 @@ public:
CORBA::Boolean createPolyedrs);
SMESH::SMESH_MeshEditor::Sew_Error
SewFreeBorders(CORBA::Long FirstNodeID1,
CORBA::Long SecondNodeID1,
CORBA::Long LastNodeID1,
CORBA::Long FirstNodeID2,
CORBA::Long SecondNodeID2,
CORBA::Long LastNodeID2,
SewFreeBorders(SMESH::smIdType FirstNodeID1,
SMESH::smIdType SecondNodeID1,
SMESH::smIdType LastNodeID1,
SMESH::smIdType FirstNodeID2,
SMESH::smIdType SecondNodeID2,
SMESH::smIdType LastNodeID2,
CORBA::Boolean CreatePolygons,
CORBA::Boolean CreatePolyedrs);
SMESH::SMESH_MeshEditor::Sew_Error
SewConformFreeBorders(CORBA::Long FirstNodeID1,
CORBA::Long SecondNodeID1,
CORBA::Long LastNodeID1,
CORBA::Long FirstNodeID2,
CORBA::Long SecondNodeID2);
SewConformFreeBorders(SMESH::smIdType FirstNodeID1,
SMESH::smIdType SecondNodeID1,
SMESH::smIdType LastNodeID1,
SMESH::smIdType FirstNodeID2,
SMESH::smIdType SecondNodeID2);
SMESH::SMESH_MeshEditor::Sew_Error
SewBorderToSide(CORBA::Long FirstNodeIDOnFreeBorder,
CORBA::Long SecondNodeIDOnFreeBorder,
CORBA::Long LastNodeIDOnFreeBorder,
CORBA::Long FirstNodeIDOnSide,
CORBA::Long LastNodeIDOnSide,
SewBorderToSide(SMESH::smIdType FirstNodeIDOnFreeBorder,
SMESH::smIdType SecondNodeIDOnFreeBorder,
SMESH::smIdType LastNodeIDOnFreeBorder,
SMESH::smIdType FirstNodeIDOnSide,
SMESH::smIdType LastNodeIDOnSide,
CORBA::Boolean CreatePolygons,
CORBA::Boolean CreatePolyedrs);
SMESH::SMESH_MeshEditor::Sew_Error
SewSideElements(const SMESH::long_array& IDsOfSide1Elements,
const SMESH::long_array& IDsOfSide2Elements,
CORBA::Long NodeID1OfSide1ToMerge,
CORBA::Long NodeID1OfSide2ToMerge,
CORBA::Long NodeID2OfSide1ToMerge,
CORBA::Long NodeID2OfSide2ToMerge);
SewSideElements(const SMESH::smIdType_array& IDsOfSide1Elements,
const SMESH::smIdType_array& IDsOfSide2Elements,
SMESH::smIdType NodeID1OfSide1ToMerge,
SMESH::smIdType NodeID1OfSide2ToMerge,
SMESH::smIdType NodeID2OfSide1ToMerge,
SMESH::smIdType NodeID2OfSide2ToMerge);
/*!
* Set new nodes for given element.
* If number of nodes is not corresponded to type of
* 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,
const char* theGroupName);
CORBA::Boolean DoubleNodes( const SMESH::long_array& theNodes,
const SMESH::long_array& theModifiedElems );
CORBA::Boolean DoubleNodes( const SMESH::smIdType_array& theNodes,
const SMESH::smIdType_array& theModifiedElems );
CORBA::Boolean DoubleNode( CORBA::Long theNodeId,
const SMESH::long_array& theModifiedElems );
CORBA::Boolean DoubleNode( SMESH::smIdType theNodeId,
const SMESH::smIdType_array& theModifiedElems );
CORBA::Boolean DoubleNodeGroup( SMESH::SMESH_GroupBase_ptr theNodes,
SMESH::SMESH_GroupBase_ptr theModifiedElems );
@ -611,9 +611,9 @@ public:
* \return TRUE if operation has been completed successfully, FALSE otherwise
* \sa DoubleNodeGroup(), DoubleNodeGroups()
*/
CORBA::Boolean DoubleNodeElem( const SMESH::long_array& theElems,
const SMESH::long_array& theNodesNot,
const SMESH::long_array& theAffectedElems );
CORBA::Boolean DoubleNodeElem( const SMESH::smIdType_array& theElems,
const SMESH::smIdType_array& theNodesNot,
const SMESH::smIdType_array& theAffectedElems );
/*!
* \brief Creates a hole in a mesh by doubling the nodes of some particular elements
@ -626,8 +626,8 @@ public:
* \return TRUE if operation has been completed successfully, FALSE otherwise
* \sa DoubleNodeGroupInRegion(), DoubleNodeGroupsInRegion()
*/
CORBA::Boolean DoubleNodeElemInRegion( const SMESH::long_array& theElems,
const SMESH::long_array& theNodesNot,
CORBA::Boolean DoubleNodeElemInRegion( const SMESH::smIdType_array& theElems,
const SMESH::smIdType_array& theNodesNot,
GEOM::GEOM_Object_ptr theShape );
/*!
@ -794,7 +794,7 @@ public:
CORBA::Boolean toCopyMissingBondary,
SMESH::SMESH_Group_out group);
SMESH::smIdType MakeBoundaryElements(SMESH::Bnd_Dimension dimension,
CORBA::Long MakeBoundaryElements(SMESH::Bnd_Dimension dimension,
const char* groupName,
const char* meshName,
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);
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;
}
@ -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();
}
@ -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);
if ( _preMeshInfo )
_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();
if ( aSMESHDS_Mesh == NULL )
return aResult._retn();
long nbElements = NbElements();
smIdType nbElements = NbElements();
aResult->length( nbElements );
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();
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);
if ( _preMeshInfo )
_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();
if ( aSMESHDS_Mesh == NULL )
return aResult._retn();
long nbElements = NbElements();
smIdType nbElements = NbElements();
// No sense in returning ids of elements along with ids of nodes:
// 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 );
int i = 0;
smIdType i = 0;
SMDS_ElemIteratorPtr anIt = aSMESHDS_Mesh->elementsIterator( (SMDSAbs_ElementType)theElemType );
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);
if ( _preMeshInfo )
_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();
if ( aMeshDS == NULL )
return aResult._retn();
long nbNodes = NbNodes();
smIdType nbNodes = NbNodes();
aResult->length( nbNodes );
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();
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_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 )
_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 )
_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;
if ( _preMeshInfo )
@ -4917,7 +4917,7 @@ SMESH::long_array* SMESH_Mesh_i::GetSubMeshElementsId(const CORBA::Long ShapeID)
aResult->length(SDSM->NbElements());
SMDS_ElemIteratorPtr eIt = SDSM->GetElements();
int i = 0;
smIdType i = 0;
while ( eIt->more() ) {
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)
{
SMESH::long_array_var aResult = new SMESH::long_array();
SMESH::smIdType_array_var aResult = new SMESH::smIdType_array();
SMESH_TRY;
if ( _preMeshInfo )
@ -4950,7 +4950,7 @@ SMESH::long_array* SMESH_Mesh_i::GetSubMeshNodesId(const CORBA::Long ShapeID,
SMESHDS_SubMesh* SDSM = SM->GetSubMeshDS();
if(!SDSM) return aResult._retn();
set<int> theElems;
set<smIdType> theElems;
if( !all || (SDSM->NbElements()==0) ) { // internal nodes or vertex submesh
SMDS_NodeIteratorPtr nIt = SDSM->GetNodes();
while ( nIt->more() ) {
@ -4971,8 +4971,8 @@ SMESH::long_array* SMESH_Mesh_i::GetSubMeshNodesId(const CORBA::Long ShapeID,
}
aResult->length(theElems.size());
set<int>::iterator itElem;
int i = 0;
set<smIdType>::iterator itElem;
smIdType i = 0;
for ( itElem = theElems.begin(); itElem != theElems.end(); 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 )
_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)
{
if ( _preMeshInfo )
_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();
if ( aMeshDS == NULL )
return aResult._retn();
@ -5090,7 +5090,7 @@ SMESH::long_array* SMESH_Mesh_i::GetNodeInverseElements(const CORBA::Long id,
SMDSAbs_ElementType type = SMDSAbs_ElementType( elemType );
SMDS_ElemIteratorPtr eIt = aNode->GetInverseElementIterator( 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();
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 )
_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 )
_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 )
_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 )
_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 )
_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 )
_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 )
_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 ( const SMDS_MeshElement* elem = aMeshDS->FindElement(id) )
{
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 ))
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 )
_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)
{
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 )
_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 )
_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)
{
if ( _preMeshInfo )
_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 ( 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 ));
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();
}
}
@ -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 )
_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)
{
if ( _preMeshInfo )
_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() )
{
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] );
std::vector<const SMDS_MeshElement *> elems;
mesh->GetElementsByNodes( nn, elems, (SMDSAbs_ElementType) elemType );
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();
}
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 )
_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 )
_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 )
_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 )
_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 )
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);
for (int i = SMESH::Entity_Node; i < SMESH::Entity_Last; i++)
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);
for (int i = 0; i < SMESH::NB_ELEMENT_TYPES; i++)
for (smIdType i = 0; i < SMESH::NB_ELEMENT_TYPES; i++)
aRes[ i ] = 0;
const SMDS_MeshInfo* meshInfo = 0;
@ -6062,7 +6062,7 @@ SMESH::long_array* SMESH_Mesh_i::GetNbElementsByType()
meshInfo = & meshDS->GetMeshInfo();
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);
return aRes._retn();
@ -6075,7 +6075,7 @@ SMESH::long_array* SMESH_Mesh_i::GetNbElementsByType()
//=============================================================================
void SMESH_Mesh_i::CollectMeshInfo(const SMDS_ElemIteratorPtr theItr,
SMESH::long_array& theInfo)
SMESH::smIdType_array& theInfo)
{
if (!theItr) return;
while (theItr->more())
@ -6156,15 +6156,15 @@ namespace /* Iterators used in SMESH_Mesh_i::GetElements(SMESH::SMESH_IDSource_v
struct IDSourceIterator : public SMDS_ElemIterator
{
const SMESH::smIdType* _idPtr;
const CORBA::Long* _idEndPtr;
SMESH::long_array_var _idArray;
const SMESH::smIdType* _idEndPtr;
SMESH::smIdType_array_var _idArray;
const SMDS_Mesh* _mesh;
const SMDSAbs_ElementType _type;
const SMDS_MeshElement* _elem;
IDSourceIterator( const SMDS_Mesh* mesh,
const CORBA::Long* ids,
const int nbIds,
const SMESH::smIdType* ids,
const smIdType nbIds,
SMDSAbs_ElementType type):
_idPtr( ids ), _idEndPtr( ids + nbIds ), _mesh( mesh ), _type( type ), _elem( 0 )
{
@ -6172,7 +6172,7 @@ namespace /* Iterators used in SMESH_Mesh_i::GetElements(SMESH::SMESH_IDSource_v
next();
}
IDSourceIterator( const SMDS_Mesh* mesh,
SMESH::long_array* idArray,
SMESH::smIdType_array* idArray,
SMDSAbs_ElementType type):
_idPtr( 0 ), _idEndPtr( 0 ), _idArray( idArray), _mesh( mesh ), _type( type ), _elem( 0 )
{
@ -6330,7 +6330,7 @@ SMDS_ElemIteratorPtr SMESH_Mesh_i::GetElements(SMESH::SMESH_IDSource_ptr theObje
}
else
{
SMESH::long_array_var ids = theObject->GetIDs();
SMESH::smIdType_array_var ids = theObject->GetIDs();
elemIt = SMDS_ElemIteratorPtr( new IDSourceIterator( meshDS, ids._retn(), iterType ));
}
typeOK = ( isNodes == ( elemType == SMDSAbs_Node )) || ( elemType == SMDSAbs_All );
@ -6978,7 +6978,7 @@ SMESH_MeshPartDS::SMESH_MeshPartDS(SMESH::SMESH_IDSource_ptr meshPart):
else
{
TMeshInfo tmpInfo;
SMESH::long_array_var anIDs = meshPart->GetIDs();
SMESH::smIdType_array_var anIDs = meshPart->GetIDs();
SMESH::array_of_ElementType_var types = meshPart->GetTypes();
if ( types->length() == 1 && types[0] == SMESH::NODE ) // group of nodes
{

View File

@ -112,7 +112,7 @@ public:
SMESH::ListOfGroups* GetGroups();
SMESH::smIdType NbGroups();
CORBA::Long NbGroups();
SMESH::SMESH_Group_ptr UnionGroups( SMESH::SMESH_GroupBase_ptr theGroup1,
SMESH::SMESH_GroupBase_ptr theGroup2,
@ -158,7 +158,7 @@ public:
void ClearLog();
SMESH::smIdType GetId();
CORBA::Long GetId();
// --- C++ interface
@ -304,29 +304,29 @@ public:
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
*/
SMESH::long_array* GetSubMeshElementsId(CORBA::Long ShapeID);
SMESH::smIdType_array* GetSubMeshElementsId(CORBA::Long ShapeID);
/*!
* Returns ID of nodes for given submesh
* If param all==true - returns all nodes, else -
* 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
@ -419,82 +419,82 @@ public:
* Get XYZ coordinates of node as list of double
* 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
* 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);
/*!
* \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
*/
SMESH::ElementPosition GetElementPosition(CORBA::Long ElemID);
SMESH::ElementPosition GetElementPosition(SMESH::smIdType ElemID);
/*!
* If given element is node returns IDs of shape from position
* 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
* ::FindShape() from SMESH_MeshEditor
* 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
* 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
*/
SMESH::long_array* GetElemNodes(CORBA::Long id);
SMESH::smIdType_array* GetElemNodes(SMESH::smIdType id);
/*!
* Returns ID of node by given index for given element
* If there is not element for given ID - returns -1
* 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
* 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
* in one of quadratic elements
*/
CORBA::Boolean IsMediumNodeOfAnyElem(CORBA::Long idn,
CORBA::Boolean IsMediumNodeOfAnyElem(SMESH::smIdType idn,
SMESH::ElementType elemType);
/*!
* 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
*/
CORBA::Long ElemNbFaces(CORBA::Long id);
CORBA::Long ElemNbFaces(SMESH::smIdType id);
/*!
* 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)
@ -504,33 +504,33 @@ public:
/*!
* 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.
*/
SMESH::long_array* GetElementsByNodes(const SMESH::long_array& nodes,
SMESH::smIdType_array* GetElementsByNodes(const SMESH::smIdType_array& nodes,
SMESH::ElementType elemType);
/*!
* 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
*/
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
*/
CORBA::Double GetBallDiameter(CORBA::Long id);
CORBA::Double GetBallDiameter(SMESH::smIdType id);
/*!
* 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
@ -582,7 +582,7 @@ public:
* Collect statistic of mesh elements given by iterator
*/
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
*/
@ -593,17 +593,17 @@ public:
// SMESH_IDSource interface
// =========================
virtual SMESH::long_array* GetIDs();
virtual SMESH::smIdType_array* GetIDs();
/*!
* Returns number of mesh elements of each \a EntityType
* Result array of number of elements per \a EntityType
* Inherited from SMESH_IDSource
*/
virtual SMESH::long_array* GetMeshInfo();
virtual SMESH::smIdType_array* GetMeshInfo();
/*!
* 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
*/

View File

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

View File

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

View File

@ -242,7 +242,7 @@ namespace
*/
//================================================================================
void meshInfo2hdf( SMESH::long_array_var meshInfo,
void meshInfo2hdf( SMESH::smIdType_array_var meshInfo,
const std::string& name,
HDFgroup* hdfGroup)
{
@ -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);
for (int i = SMESH::Entity_Node; i < SMESH::Entity_Last; i++)
aRes[i] = 0;

View File

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

View File

@ -258,6 +258,13 @@ namespace SMESH
return *this;
}
TPythonDump&
TPythonDump::operator<<(const SMESH::smIdType_array& theArg)
{
DumpArray( theArg, *this );
return *this;
}
TPythonDump&
TPythonDump::operator<<(const SMESH::double_array& theArg)
{
@ -349,7 +356,7 @@ namespace SMESH
if ( SMESH_MeshEditor_i::IsTemporaryIDSource( theArg ))
{
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::ElementType type = types->length() ? types[0] : SMESH::ALL;
SALOMEDS::SObject_wrap meshSO = SMESH_Gen_i::ObjectToSObject(mesh);

View File

@ -158,6 +158,9 @@ namespace SMESH
TPythonDump&
operator<<(const SMESH::long_array& theArg);
TPythonDump&
operator<<(const SMESH::smIdType_array& theArg);
TPythonDump&
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);
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() )
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);
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() )
return aResult._retn();
@ -276,8 +276,8 @@ SMESH::long_array* SMESH_subMesh_i::GetElementsByType( SMESH::ElementType theEle
::SMESH_subMesh* aSubMesh = _mesh_i->_mapSubMesh[_localId];
// PAL5440, return all nodes belonging to elements of the sub-mesh
set<int> nodeIds;
int nbElems = 0;
set<smIdType> nodeIds;
smIdType nbElems = 0;
// volumes may be bound to shell instead of solid
TListOfSubMeshes smList;
@ -317,7 +317,7 @@ SMESH::long_array* SMESH_subMesh_i::GetElementsByType( SMESH::ElementType theEle
int i = 0, n = aResult->length();
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++ )
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);
SMESH::long_array_var aResult = GetElementsByType( SMESH::NODE );
SMESH::smIdType_array_var aResult = GetElementsByType( SMESH::NODE );
return aResult._retn();
}
@ -358,7 +358,7 @@ SMESH::long_array* SMESH_subMesh_i::GetNodesId()
/*!
*
*/
//=============================================================================
//========error:=====================================================================
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;
}
@ -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();
}
@ -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 )
_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 )
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);
for (int i = SMESH::Entity_Node; i < SMESH::Entity_Last; i++)
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);
for (int i = 0; i < SMESH::NB_ELEMENT_TYPES; i++)
if ( _preMeshInfo )

View File

@ -57,19 +57,19 @@ public:
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();
GEOM::GEOM_Object_ptr GetSubShape();
SMESH::smIdType GetId();
CORBA::Long GetId();
// =========================
@ -78,17 +78,17 @@ public:
/*!
* 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
* Result array of number of elements per \a EntityType
* Inherited from SMESH_IDSource
*/
virtual SMESH::long_array* GetMeshInfo();
virtual SMESH::smIdType_array* GetMeshInfo();
/*!
* 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
*/

View File

@ -83,6 +83,7 @@
#include <gp_Ax1.hxx>
#include <gp_Vec.hxx>
#include <gp_XY.hxx>
#include <smIdType.hxx>
#include <list>
#include <string>
@ -113,7 +114,7 @@ namespace VISCOUS_2D
{
_EdgeSubMesh(const SMDS_Mesh* mesh, int index=0): SubMesh(mesh,index) {}
//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 ); }
UVPtStructVec& GetUVPtStructVec() { return _uvPtStructVec; }
};