void
SMESH_SVTKActor
::MapCells(SALOME_Actor* theMapActor,
- const TColStd_IndexedMapOfInteger& theMapIndex)
+ const SVTK_TIndexedMapOfVtkId& theMapIndex)
{
myUnstructuredGrid->Initialize();
myUnstructuredGrid->Allocate();
//! Allow to recostruct selected cells from source SALOME_Actor and map of subindexes
virtual void
MapCells(SALOME_Actor* theMapActor,
- const TColStd_IndexedMapOfInteger& theMapIndex);
+ const SVTK_TIndexedMapOfVtkId& theMapIndex);
//! To remove the actor an all its internal devices
aMesh = myActor->GetObject()->GetMesh();
if (aMesh) {
- TColStd_MapOfInteger newIndices;
+ SVTK_TVtkIDsMap newIndices;
QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts);
bool allOk = true;
myCurrentLineEdit = send;
if (aMesh) {
- TColStd_MapOfInteger newIndices;
+ SVTK_TVtkIDsMap newIndices;
QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts);
bool allOk = true;
for (int i = 0; i < aListId.count(); i++) {
if ( const SMDS_MeshNode * n = aMesh->FindNode( aListId[ i ].toInt() ) )
{
- newIndices.Add( FromIdType<int>(n->GetID()) );
+ newIndices.Add( n->GetID() );
}
else
{
QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts);
if (myActor && aMesh)
{
- TColStd_MapOfInteger newIndices;
+ SVTK_TVtkIDsMap newIndices;
if (send == myLineEditElements) {
for (int i = 0; i < aListId.count(); i++)
if ( const SMDS_MeshElement * e = aMesh->FindElement(aListId[ i ].toInt()))
{
- newIndices.Add(FromIdType<int>(e->GetID()));
+ newIndices.Add(e->GetID());
}
}
myNbOkElements = newIndices.Extent();
if (GetConstructorId() == 0)
{
if ( aMesh ) {
- TColStd_MapOfInteger newIndices;
+ SVTK_TVtkIDsMap newIndices;
QStringList aListId = theNewText.split( " ", QString::SkipEmptyParts );
for ( int i = 0; i < aListId.count(); i++ ) {
const SMDS_MeshNode * n = aMesh->FindNode( aListId[ i ].toInt() );
if ( n ) {
- newIndices.Add(FromIdType<int>(n->GetID()));
+ newIndices.Add(n->GetID());
myNbOkElements++;
}
}
// check entered ids of faces and highlight them
QStringList aListId;
if ( aMesh ) {
- TColStd_MapOfInteger newIndices;
+ SVTK_TVtkIDsMap newIndices;
aListId = theNewText.split( " ", QString::SkipEmptyParts );
for ( int i = 0; i < aListId.count(); i++ ) {
const SMDS_MeshElement * e = aMesh->FindElement( aListId[ i ].toInt() );
if ( e ) {
- newIndices.Add(FromIdType<int>(e->GetID()));
+ newIndices.Add(e->GetID());
myNbOkElements++;
}
}
SALOME_ListIO aList;
mySelectionMgr->setSelectedObjects( aList );
- TColStd_MapOfInteger aIndexes;
+ SVTK_TVtkIDsMap aIndexes;
QList<QListWidgetItem*> selItems = myFacesByNodes->selectedItems();
QListWidgetItem* anItem;
if (bOk) {
const SMDS_MeshNode* n = aMesh->FindNode(ind);
if (n) {
- TColStd_MapOfInteger newIndices;
- newIndices.Add(FromIdType<int>(n->GetID()));
+ SVTK_TVtkIDsMap newIndices;
+ newIndices.Add(n->GetID());
mySelector->AddOrRemoveIndex( aPathActor->getIO(), newIndices, false );
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->highlight( aPathActor->getIO(), true, true );
}
else // get indices of selected elements
{
- TColStd_IndexedMapOfInteger aMapIndex;
+ SVTK_TIndexedMapOfVtkId aMapIndex;
mySelector->GetIndex(IO,aMapIndex);
int nbElements = aMapIndex.Extent();
if ( nbElements > 0 )
SMESH::smIdType_array_var ids = new SMESH::smIdType_array;
ids->length( aListId.count() );
- TColStd_MapOfInteger newIndices;
+ SVTK_TVtkIDsMap newIndices;
for (int i = 0; i < aListId.count(); i++) {
int id = aListId[ i ].toInt();
bool validId = false;
if ( SelectVectorButton->isChecked() )
{
Handle(SALOME_InteractiveObject) IO = aList.First();
- TColStd_IndexedMapOfInteger aMapIndex;
+ SVTK_TIndexedMapOfVtkId aMapIndex;
mySelector->GetIndex(IO,aMapIndex);
if ( aMapIndex.Extent() != 1 )
return;
SALOME_ListIO aList;
mySelectionMgr->clearFilters();
mySelectionMgr->clearSelected();
- SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger anIter (myIObjects);
+ SALOME_DataMapIteratorOfIOMapOfVtk anIter (myIObjects);
for ( ; anIter.More(); anIter.Next())
{
aList.Append(anIter.Key());
- TColStd_MapOfInteger aResMap;
- const TColStd_IndexedMapOfInteger& anIndMap = anIter.Value();
+ SVTK_TVtkIDsMap aResMap;
+ const SVTK_TIndexedMapOfVtkId& anIndMap = anIter.Value();
for (int i = 1, n = anIndMap.Extent(); i <= n; i++)
aResMap.Add(anIndMap(i));
const SALOME_ListIO& anObjs = mySelector->StoredIObjects();
SALOME_ListIteratorOfListIO anIter (anObjs);
for ( ; anIter.More(); anIter.Next()) {
- TColStd_IndexedMapOfInteger aMap;
+ SVTK_TIndexedMapOfVtkId aMap;
mySelector->GetIndex(anIter.Value(), aMap);
myIObjects.Bind(anIter.Value(), aMap);
}
// Create map of entities to be filtered
TColStd_MapOfInteger aToBeFiltered;
- SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger anIter(myIObjects);
+ SALOME_DataMapIteratorOfIOMapOfVtk anIter(myIObjects);
for ( ; anIter.More(); anIter.Next())
{
SMESH::SMESH_Mesh_var aMeshPtr = SMESH::IObjectToInterface<SMESH::SMESH_Mesh>(anIter.Key());
if (!aMeshPtr->_is_nil() && aMeshPtr->GetId() == myMesh->GetId())
{
- const TColStd_IndexedMapOfInteger& aSelMap = anIter.Value();
+ const SVTK_TIndexedMapOfVtkId& aSelMap = anIter.Value();
if (aSelMap.Extent() > 0)
{
if ( meshActor && meshActor->GetVisibility() )
return meshActor;
- SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger anIter(myIObjects);
+ SALOME_DataMapIteratorOfIOMapOfVtk anIter(myIObjects);
for ( ; anIter.More(); anIter.Next())
{
Handle(SALOME_InteractiveObject) io = anIter.Key();
SMESH::RemoveFilter(aFilterId);
// get vtk ids
- TColStd_MapOfInteger aMap;
+ SVTK_TVtkIDsMap aMap;
QList<int>::const_iterator anIter;
for (anIter = theIds.begin(); anIter != theIds.end(); ++anIter) {
aMap.Add(*anIter);
// SALOME GUI includes
#include <SALOME_DataMapOfIOMapOfInteger.hxx>
#include <SVTK_Selection.h>
+#include <SVTK_Hash.h>
// IDL includes
#include <SALOMEconfig.h>
class SMESH_Actor;
class SVTK_Selector;
+typedef NCollection_DataMap<Handle(SALOME_InteractiveObject), SVTK_TIndexedMapOfVtkId> SALOME_DataMapOfIOMapOfVtk;
+typedef SALOME_DataMapOfIOMapOfVtk::Iterator SALOME_DataMapIteratorOfIOMapOfVtk;
+
/*!
* Class : SMESHGUI_FilterTable
* Description : Frame containing
bool myDiffSourcesEnabled;
QWidget* mySourceWg;
- SALOME_DataMapOfIOMapOfInteger myIObjects;
+ SALOME_DataMapOfIOMapOfVtk myIObjects;
bool myIsSelectionChanged;
QMap< int, SMESH::Filter_var > myFilter;
QMap< int, bool > myInsertState;
QList<QListWidgetItem *> ids = myDlg->myFoundList->selectedItems();
QList<QListWidgetItem*>::iterator id = ids.begin();
- TColStd_MapOfInteger idMap;
+ SVTK_TVtkIDsMap idMap;
for ( ; id != ids.end(); ++id )
idMap.Add( (*id)->text().toInt() );
if (myCurrentLineEdit == 0) {
mySelectionMgr->clearSelected();
- TColStd_MapOfInteger aIndexes;
+ SVTK_TVtkIDsMap aIndexes;
QList<QListWidgetItem*> selItems = myElements->selectedItems();
QListWidgetItem* anItem;
foreach(anItem, selItems) aIndexes.Add(anItem->text().toInt());
}
void SMESHGUI_IdPreview::SetPointsData ( SMDS_Mesh* theMesh,
- const TColStd_MapOfInteger & theNodesIdMap )
+ const SVTK_TVtkIDsMap & theNodesIdMap )
{
vtkPoints* aPoints = vtkPoints::New();
aPoints->SetNumberOfPoints(theNodesIdMap.Extent());
myIDs.clear();
- TColStd_MapIteratorOfMapOfInteger idIter( theNodesIdMap );
+ SVTK_TVtkIDsMapIterator idIter( theNodesIdMap );
for( int i = 0; idIter.More(); idIter.Next(), i++ )
{
const SMDS_MeshNode* aNode = theMesh->FindNode(idIter.Key());
#include <vector>
#include <TColStd_MapOfInteger.hxx>
+#include <SVTK_Hash.h>
#include <gp_XYZ.hxx>
SMESHGUI_IdPreview(SVTK_ViewWindow* theViewWindow);
~SMESHGUI_IdPreview();
- void SetPointsData( SMDS_Mesh* theMesh, const TColStd_MapOfInteger & theNodesIdMap );
+ void SetPointsData( SMDS_Mesh* theMesh, const SVTK_TVtkIDsMap & theNodesIdMap );
void SetElemsData ( const std::vector<int> & theElemsIdMap,
const std::list<gp_XYZ> & theGrCentersXYZ );
template< class INT_ITER, class XYZ_ITER >
if( const SMDS_MeshNode* aNode = aMesh->FindNode( theText.toInt() ) )
{
- TColStd_MapOfInteger aListInd;
+ SVTK_TVtkIDsMap aListInd;
aListInd.Add( FromIdType<int>(aNode->GetID()) );
selector()->AddOrRemoveIndex( anIO, aListInd, false );
if( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( SMESHGUI::GetSMESHGUI() ) )
if ( myFirstActor && selector ) {
Handle(SALOME_InteractiveObject) IO = myFirstActor->getIO();
if ( myFirst->checkedId() == NodeTgt || myFirst->checkedId() == ElementTgt ) {
- TColStd_MapOfInteger ID;
+ SVTK_TVtkIDsMap ID;
ID.Add( myFirstTgt->text().toLong() );
selector->AddOrRemoveIndex( IO, ID, false );
}
Handle(SALOME_InteractiveObject) IO = mySecondActor->getIO();
if ( mySecond->checkedId() == NodeTgt || mySecond->checkedId() == ElementTgt ) {
if ( !text.isEmpty() ) {
- TColStd_MapOfInteger ID;
+ SVTK_TVtkIDsMap ID;
ID.Add( text.toLong() );
selector->AddOrRemoveIndex( IO, ID, false );
}
if ( myActor && selector ) {
Handle(SALOME_InteractiveObject) IO = myActor->getIO();
if ( mySourceMode->checkedId() == NodesSrc || mySourceMode->checkedId() == ElementsSrc ) {
- TColStd_MapOfInteger ID;
+ SVTK_TVtkIDsMap ID;
if ( !mySource->isReadOnly() )
myIDs = mySource->text();
QStringList ids = myIDs.split( " ", QString::SkipEmptyParts );
clear();
QString nodesString;
- TColStd_IndexedMapOfInteger idsMap;
+ SVTK_TIndexedMapOfVtkId idsMap;
SALOME_ListIO selected;
SMESHGUI::selectionMgr()->selectedObjects( selected );
selected.Reverse(); // to keep order of selection
{
clear();
- TColStd_MapOfInteger ID;
+ SVTK_TVtkIDsMap ID;
QStringList ids = myNodes->text().split( " ", QString::SkipEmptyParts );
foreach ( QString idStr, ids )
{
// function : FindGravityCenter()
// purpose :
//=================================================================================
-void SMESHGUI_MergeDlg::FindGravityCenter(TColStd_MapOfInteger & theElemsIdMap,
+void SMESHGUI_MergeDlg::FindGravityCenter(SVTK_TVtkIDsMap & theElemsIdMap,
std::vector<int>& theIDs,
std::list< gp_XYZ > & theGrCentersXYZ)
{
int nbNodes;
theIDs.reserve( theElemsIdMap.Extent() );
- TColStd_MapIteratorOfMapOfInteger idIter( theElemsIdMap );
+ SVTK_TVtkIDsMapIterator idIter( theElemsIdMap );
for( ; idIter.More(); idIter.Next() ) {
const SMDS_MeshElement* anElem = aMesh->FindElement(idIter.Key());
if ( !anElem )
myIsBusy = true;
ListEdit->clear();
- TColStd_MapOfInteger anIndices;
+ SVTK_TVtkIDsMap anIndices;
QList<QListWidgetItem*> selItems = ListCoincident->selectedItems();
QListWidgetItem* anItem;
QStringList aListIds;
if (myIsBusy || !myActor)
return;
- TColStd_MapOfInteger anIndices;
+ SVTK_TVtkIDsMap anIndices;
QList<QListWidgetItem*> selItems = ListEdit->selectedItems();
QListWidgetItem* anItem;
if ( myActor )
{
mySelectionMgr->clearSelected();
- TColStd_MapOfInteger aIndexes;
+ SVTK_TVtkIDsMap aIndexes;
QList<QListWidgetItem*> selItems = KeepList->selectedItems();
QListWidgetItem* anItem;
foreach(anItem, selItems) aIndexes.Add(anItem->text().toInt());
// SMESH includes
#include "SMESH_SMESHGUI.hxx"
-// Qt includes
+// GUI and Qt includes
#include <QDialog>
+#include <SVTK_Hash.h>
// OCCT includes
#include <gp_XYZ.hxx>
bool isKeepIDsSelection();
bool isNewKeepGroup( const char* entry );
- void FindGravityCenter( TColStd_MapOfInteger&,
+ void FindGravityCenter( SVTK_TVtkIDsMap&,
std::vector<int>& ,
std::list<gp_XYZ>& );
// add the centers of gravity of ElemsIdMap elements to the GrCentersXYZ list
myIDPreview->SetPointsLabeled( false );
if ( myProxy ) {
- TColStd_MapOfInteger ID;
+ SVTK_TVtkIDsMap ID;
QSet<uint> ids;
std::vector<int> idVec;
std::list< gp_XYZ > aGrCentersXYZ;
if (aMesh) {
QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts);
- TColStd_MapOfInteger newIndices;
+ SVTK_TVtkIDsMap newIndices;
for (int i = 0; i < aListId.count(); i++) {
const SMDS_MeshElement * e = aMesh->FindElement(aListId[ i ].toInt());
if (nbSelected == 0)
return;
- TColStd_IndexedMapOfInteger toBeAdded;
+ SVTK_TIndexedMapOfVtkId toBeAdded;
if (!mySubmeshChk->isChecked() && !myGroupChk->isChecked()) {
if (nbSelected > 0)
SMESH::smIdType_array_var anIds = aSubMesh->GetElementsId();
for (int i = 0, n = anIds->length(); i < n; i++) {
if (isIdValid(FromIdType<int>(anIds[ i ])))
- toBeAdded.Add(FromIdType<int>(anIds[ i ]));
+ toBeAdded.Add(anIds[ i ]);
}
}
}
SMESH::smIdType_array_var anIds = aGroup->GetListOfID();
for (int i = 0, n = anIds->length(); i < n; i++) {
if (isIdValid(FromIdType<int>(anIds[ i ])))
- toBeAdded.Add(FromIdType<int>(anIds[ i ]));
+ toBeAdded.Add(anIds[ i ]);
}
}
}
anActor = myActor;
TVisualObjPtr anObj = anActor->GetObject();
- TColStd_MapOfInteger anIndexes;
+ SVTK_TVtkIDsMap anIndexes;
int total = myListBox->count();
for (int i = 0; i < total; i++)
{
if (!aSelMesh->_is_nil())
myMesh = aSelMesh;
- TColStd_IndexedMapOfInteger aMapIndex;
+ SVTK_TIndexedMapOfVtkId aMapIndex;
mySelector->GetIndex( anIO, aMapIndex );
if ( !aMapIndex.IsEmpty() )
showFacetByElement( aMapIndex(1) );
if (aMesh) {
Handle(SALOME_InteractiveObject) anIO = myActor->getIO();
- TColStd_MapOfInteger newIndices;
+ SVTK_TVtkIDsMap newIndices;
QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts);
for (int i = 0; i < aListId.count(); i++)
{
if ( const SMDS_MeshElement * e = aMesh->FindElement(aListId[ i ].toInt()))
- newIndices.Add( FromIdType<int>(e->GetID()) );
+ newIndices.Add( e->GetID() );
myNbOkElements++;
}
if(SMDS_Mesh* aMesh = myActor->GetObject()->GetMesh()){
Handle(SALOME_InteractiveObject) anIO = myActor->getIO();
- TColStd_MapOfInteger newIndices;
+ SVTK_TVtkIDsMap newIndices;
QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts);
for (int i = 0; i < aListId.count(); i++) {
if(SMDS_Mesh* aMesh = myActor->GetObject()->GetMesh()){
Handle(SALOME_InteractiveObject) anIO = myActor->getIO();
- TColStd_MapOfInteger newIndices;
+ SVTK_TVtkIDsMap newIndices;
QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts);
for (int i = 0; i < aListId.count(); i++) {
if ( nbSelected == 1 )
{
- TColStd_IndexedMapOfInteger faceIndices;
+ SVTK_TIndexedMapOfVtkId faceIndices;
selector()->GetIndex( anIO, faceIndices );
if ( faceIndices.Extent() == 1 )
{
}
else
{
- TColStd_IndexedMapOfInteger nodeIndices;
+ SVTK_TIndexedMapOfVtkId nodeIndices;
selector()->GetIndex( anIO, nodeIndices );
if ( nodeIndices.Extent() > 0 && nodeIndices.Extent() <=2 )
{
myDlg->activateObject( EFace );
myDlg->setObjectText( EFace, theText );
}
- TColStd_MapOfInteger ids;
+ SVTK_TVtkIDsMap ids;
if ( !theText.isEmpty() && theText.toInt() > 0 )
ids.Add( theText.toInt() );
return;
Handle(SALOME_InteractiveObject) IO = aList.First();
- TColStd_IndexedMapOfInteger aMapIndex;
+ SVTK_TIndexedMapOfVtkId aMapIndex;
mySelector->GetIndex(IO,aMapIndex);
if ( aMapIndex.Extent() != 1 )
return;
if (send == LineEditElements) {
Handle(SALOME_InteractiveObject) anIO = myActor->getIO();
- TColStd_MapOfInteger newIndices;
+ SVTK_TVtkIDsMap newIndices;
QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts);
for (int i = 0; i < aListId.count(); i++) {
const SMDS_MeshElement * e = aMesh->FindElement(aListId[ i ].toInt());
if (e)
- newIndices.Add(FromIdType<int>(e->GetID()));
+ newIndices.Add(e->GetID());
myNbOkElements++;
}
if (aMesh) {
Handle(SALOME_InteractiveObject) anIO = myActor->getIO();
- TColStd_MapOfInteger newIndices;
+ SVTK_TVtkIDsMap newIndices;
QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts);
for (int i = 0; i < aListId.count(); i++) {
const SMDS_MeshElement * e = aMesh->FindElement(aListId[ i ].toInt());
if (e)
- newIndices.Add(FromIdType<int>(e->GetID()));
+ newIndices.Add(e->GetID());
myNbOkElements++;
}
}
// Purpose : Select/deselect cells of mesh
//=======================================================================
void SMESHGUI_SelectionOp::addOrRemoveIndex( const Handle( SALOME_InteractiveObject )& obj,
- const TColStd_MapOfInteger& indices,
+ const SVTK_TVtkIDsMap& indices,
const bool isModeShift )
{
SVTK_Selector* sel = selector();
if( !dlg() )
return;
- TColStd_MapOfInteger newIndices;
+ SVTK_TVtkIDsMap newIndices;
SALOME_ListIO sel; selectionMgr()->selectedObjects( sel );
SMESH_Actor* anActor = actor();
if ( selectionMode() == NodeSelection )
for( ; anIt!=aLast; anIt++ ) {
if( const SMDS_MeshNode * n = aMesh->FindNode( *anIt ) )
- newIndices.Add( FromIdType<int>(n->GetID()) );
+ newIndices.Add( n->GetID() );
}
else
for( ; anIt!=aLast; anIt++ ) {
if( const SMDS_MeshElement* e = aMesh->FindElement( *anIt ) )
- newIndices.Add( FromIdType<int>(e->GetID()) );
+ newIndices.Add( e->GetID() );
}
selector()->AddOrRemoveIndex( sel.First(), newIndices, false );
// SALOME GUI includes
#include <SVTK_Selection.h>
+#include <SVTK_Hash.h>
#include <SALOME_InteractiveObject.hxx>
// IDL includes
//! Select some nodes or elements in VTK
void addOrRemoveIndex( const Handle( SALOME_InteractiveObject )&,
- const TColStd_MapOfInteger&, const bool isModeShift);
+ const SVTK_TVtkIDsMap&, const bool isModeShift);
SVTK_ViewWindow* viewWindow() const;
SVTK_Selector* selector() const;
send->clear();
if (aMesh) {
- TColStd_MapOfInteger newIndices;
+ SVTK_TVtkIDsMap newIndices;
if (GetConstructorId() != 3 || (send != LineEdit1 && send != LineEdit4)) {
SMESH::SetPointRepresentation(true);
const SMDS_MeshNode * n = aMesh->FindNode(theNewText.toInt());
if (n) {
- newIndices.Add(FromIdType<int>(n->GetID()));
+ newIndices.Add(n->GetID());
mySelector->AddOrRemoveIndex(myActor->getIO(), newIndices, false);
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->highlight( myActor->getIO(), true, true );
const SMDS_MeshElement * e = aMesh->FindElement(aListId[ i ].toInt());
if (e)
{
- newIndices.Add(FromIdType<int>(e->GetID()));
+ newIndices.Add(e->GetID());
atLeastOneExists = true;
}
}
case VOLUME: type = SMDSAbs_Volume; break;
default: return;
}
- TColStd_MapOfInteger newIndices;
+ SVTK_TVtkIDsMap newIndices;
QStringList aListId = theNewText.split( " ", QString::SkipEmptyParts);
for ( int i = 0; i < aListId.count(); i++ ) {
if ( const SMDS_MeshElement * e = aMesh->FindElement( aListId[ i ].toInt() ))
if ( e->GetType() == type )
- newIndices.Add( FromIdType<int>(e->GetID()) );
+ newIndices.Add( e->GetID() );
}
if ( !newIndices.IsEmpty() )
QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts);
if (send == LineEditElements) {
- TColStd_MapOfInteger newIndices;
+ SVTK_TVtkIDsMap newIndices;
for (int i = 0; i < aListId.count(); i++) {
int id = aListId[ i ].toInt();
if ( id > 0 ) {
}
}
else if (send == LineEditNodes) {
- TColStd_MapOfInteger newIndices;
+ SVTK_TVtkIDsMap newIndices;
for (int i = 0; i < aListId.count(); i++) {
int id = aListId[ i ].toInt();
if ( id > 0 ) {
myNbOkElements = true;
} else {
// get indices of selected elements
- TColStd_IndexedMapOfInteger aMapIndex;
+ SVTK_TIndexedMapOfVtkId aMapIndex;
mySelector->GetIndex(IO,aMapIndex);
myNbOkElements = aMapIndex.Extent();
if (aMesh) {
Handle(SALOME_InteractiveObject) anIO = myActor->getIO();
- TColStd_MapOfInteger newIndices;
+ SVTK_TVtkIDsMap newIndices;
QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts);
for (int i = 0; i < aListId.count(); i++) {
const SMDS_MeshElement * e = aMesh->FindElement(aListId[ i ].toInt());
if (e)
- newIndices.Add(FromIdType<int>(e->GetID()));
+ newIndices.Add(e->GetID());
myNbOkElements++;
}
if (aMesh) {
Handle(SALOME_InteractiveObject) anIO = myActor->getIO();
- TColStd_MapOfInteger newIndices;
+ SVTK_TVtkIDsMap newIndices;
QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts);
for (int i = 0; i < aListId.count(); i++) {
const SMDS_MeshElement * e = aMesh->FindElement(aListId[ i ].toInt());
if (e)
- newIndices.Add(FromIdType<int>(e->GetID()));
+ newIndices.Add(e->GetID());
myNbOkElements++;
}
}
QString& theName)
{
theName = "";
- TColStd_IndexedMapOfInteger aMapIndex;
+ SVTK_TIndexedMapOfVtkId aMapIndex;
theSelector->GetIndex(theIO,aMapIndex);
for(int i = 1; i <= aMapIndex.Extent(); i++)
QString& theName)
{
theName = "";
- TColStd_IndexedMapOfInteger aMapIndex;
+ SVTK_TIndexedMapOfVtkId aMapIndex;
theSelector->GetIndex(theIO,aMapIndex);
typedef std::set<int> TIdContainer;
if ( anIO.IsNull() || !anIO->hasEntry() )
return -1;
- TColStd_IndexedMapOfInteger aMapIndex;
+ SVTK_TIndexedMapOfVtkId aMapIndex;
theSelector->GetIndex( anIO, aMapIndex );
if ( aMapIndex.Extent() != 2 )
return -1;
if ( vw->SelectionMode() == ActorSelection )
return;
- TColStd_MapOfInteger idMap;
+ SVTK_TVtkIDsMap idMap;
std::vector<int>::const_iterator it;
for ( it = myIds.begin(); it != myIds.end(); ++it )
{
if ( !actor || !actor->hasIO() )
return;
- TColStd_IndexedMapOfInteger idMap;
+ SVTK_TIndexedMapOfVtkId idMap;
selector->GetIndex( actor->getIO(), idMap );
for ( int i = 1; i <= idMap.Extent(); i++ )
*/
//=============================================================================
-void StdMeshers_NumberOfSegments::SetNumberOfSegments(int segmentsNumber)
+void StdMeshers_NumberOfSegments::SetNumberOfSegments(smIdType segmentsNumber)
{
- int oldNumberOfSegments = _numberOfSegments;
+ smIdType oldNumberOfSegments = _numberOfSegments;
if (segmentsNumber <= 0)
throw SALOME_Exception(LOCALIZED("number of segments must be positive"));
_numberOfSegments = segmentsNumber;
*/
//=============================================================================
-int StdMeshers_NumberOfSegments::GetNumberOfSegments() const
+smIdType StdMeshers_NumberOfSegments::GetNumberOfSegments() const
{
return _numberOfSegments;
}
* \brief Set the number of segments
* \param segmentsNumber - must be greater than zero
*/
- void SetNumberOfSegments(int segmentsNumber);
+ void SetNumberOfSegments(smIdType segmentsNumber);
/*!
* \brief Get the number of segments
*/
- int GetNumberOfSegments() const;
+ smIdType GetNumberOfSegments() const;
/*!
* \brief This enumeration presents available types of distribution