mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-28 02:10:35 +05:00
fix after GUI changes. Build completed
This commit is contained in:
parent
442b3d1c8b
commit
a72d53be4f
@ -108,7 +108,7 @@ SMESH_SVTKActor
|
||||
void
|
||||
SMESH_SVTKActor
|
||||
::MapCells(SALOME_Actor* theMapActor,
|
||||
const TColStd_IndexedMapOfInteger& theMapIndex)
|
||||
const SVTK_TIndexedMapOfVtkId& theMapIndex)
|
||||
{
|
||||
myUnstructuredGrid->Initialize();
|
||||
myUnstructuredGrid->Allocate();
|
||||
|
@ -61,7 +61,7 @@ public:
|
||||
//! 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
|
||||
|
@ -784,7 +784,7 @@ void SMESHGUI_AddMeshElementDlg::onTextChange (const QString& theNewText)
|
||||
aMesh = myActor->GetObject()->GetMesh();
|
||||
|
||||
if (aMesh) {
|
||||
TColStd_MapOfInteger newIndices;
|
||||
SVTK_TVtkIDsMap newIndices;
|
||||
|
||||
QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts);
|
||||
bool allOk = true;
|
||||
|
@ -989,14 +989,14 @@ void SMESHGUI_AddQuadraticElementDlg::onTextChange (const QString& theNewText)
|
||||
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
|
||||
{
|
||||
|
@ -614,12 +614,12 @@ void SMESHGUI_CopyMeshDlg::onTextChange (const QString& theNewText)
|
||||
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();
|
||||
|
@ -688,13 +688,13 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::onTextChange(const QString& theNewText)
|
||||
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++;
|
||||
}
|
||||
}
|
||||
@ -720,14 +720,14 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::onTextChange(const QString& theNewText)
|
||||
// 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++;
|
||||
}
|
||||
}
|
||||
@ -1147,7 +1147,7 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::onListSelectionChanged()
|
||||
|
||||
SALOME_ListIO aList;
|
||||
mySelectionMgr->setSelectedObjects( aList );
|
||||
TColStd_MapOfInteger aIndexes;
|
||||
SVTK_TVtkIDsMap aIndexes;
|
||||
|
||||
QList<QListWidgetItem*> selItems = myFacesByNodes->selectedItems();
|
||||
QListWidgetItem* anItem;
|
||||
|
@ -688,8 +688,8 @@ void SMESHGUI_ExtrusionAlongPathDlg::onTextChange (const QString& theNewText)
|
||||
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 );
|
||||
|
@ -289,7 +289,7 @@ void SMESHGUI_3TypesSelector::selectionIntoArgument()
|
||||
}
|
||||
else // get indices of selected elements
|
||||
{
|
||||
TColStd_IndexedMapOfInteger aMapIndex;
|
||||
SVTK_TIndexedMapOfVtkId aMapIndex;
|
||||
mySelector->GetIndex(IO,aMapIndex);
|
||||
int nbElements = aMapIndex.Extent();
|
||||
if ( nbElements > 0 )
|
||||
@ -354,7 +354,7 @@ void SMESHGUI_3TypesSelector::onTextChange( const QString& theNewText )
|
||||
|
||||
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;
|
||||
@ -1368,7 +1368,7 @@ void SMESHGUI_ExtrusionDlg::SelectionIntoArgument()
|
||||
if ( SelectVectorButton->isChecked() )
|
||||
{
|
||||
Handle(SALOME_InteractiveObject) IO = aList.First();
|
||||
TColStd_IndexedMapOfInteger aMapIndex;
|
||||
SVTK_TIndexedMapOfVtkId aMapIndex;
|
||||
mySelector->GetIndex(IO,aMapIndex);
|
||||
if ( aMapIndex.Extent() != 1 )
|
||||
return;
|
||||
|
@ -3006,13 +3006,13 @@ void SMESHGUI_FilterDlg::reject()
|
||||
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));
|
||||
|
||||
@ -3343,7 +3343,7 @@ void SMESHGUI_FilterDlg::SetSelection()
|
||||
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);
|
||||
}
|
||||
@ -3580,7 +3580,7 @@ void SMESHGUI_FilterDlg::filterSelectionSource (const int theType,
|
||||
|
||||
// Create map of entities to be filtered
|
||||
TColStd_MapOfInteger aToBeFiltered;
|
||||
SALOME_DataMapIteratorOfDataMapOfIOMapOfInteger anIter(myIObjects);
|
||||
SALOME_DataMapIteratorOfIOMapOfVtk anIter(myIObjects);
|
||||
|
||||
for ( ; anIter.More(); anIter.Next())
|
||||
{
|
||||
@ -3614,7 +3614,7 @@ void SMESHGUI_FilterDlg::filterSelectionSource (const int theType,
|
||||
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)
|
||||
{
|
||||
@ -3647,7 +3647,7 @@ SMESH_Actor* SMESHGUI_FilterDlg::getActor()
|
||||
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();
|
||||
@ -3707,7 +3707,7 @@ void SMESHGUI_FilterDlg::selectInViewer (const int theType, const QList<int>& th
|
||||
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);
|
||||
|
@ -39,6 +39,7 @@
|
||||
// SALOME GUI includes
|
||||
#include <SALOME_DataMapOfIOMapOfInteger.hxx>
|
||||
#include <SVTK_Selection.h>
|
||||
#include <SVTK_Hash.h>
|
||||
|
||||
// IDL includes
|
||||
#include <SALOMEconfig.h>
|
||||
@ -59,6 +60,9 @@ class SMESHGUI_FilterLibraryDlg;
|
||||
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
|
||||
@ -308,7 +312,7 @@ private:
|
||||
bool myDiffSourcesEnabled;
|
||||
QWidget* mySourceWg;
|
||||
|
||||
SALOME_DataMapOfIOMapOfInteger myIObjects;
|
||||
SALOME_DataMapOfIOMapOfVtk myIObjects;
|
||||
bool myIsSelectionChanged;
|
||||
QMap< int, SMESH::Filter_var > myFilter;
|
||||
QMap< int, bool > myInsertState;
|
||||
|
@ -361,7 +361,7 @@ void SMESHGUI_FindElemByPointOp::onElemSelected()
|
||||
|
||||
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() );
|
||||
|
||||
|
@ -1263,7 +1263,7 @@ void SMESHGUI_GroupDlg::onListSelectionChanged()
|
||||
|
||||
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());
|
||||
|
@ -97,13 +97,13 @@ SMESHGUI_IdPreview::SMESHGUI_IdPreview(SVTK_ViewWindow* theViewWindow):
|
||||
}
|
||||
|
||||
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());
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include <TColStd_MapOfInteger.hxx>
|
||||
#include <SVTK_Hash.h>
|
||||
|
||||
#include <gp_XYZ.hxx>
|
||||
|
||||
@ -52,7 +53,7 @@ public:
|
||||
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 >
|
||||
|
@ -869,7 +869,7 @@ void SMESHGUI_MakeNodeAtPointOp::onTextChange( const QString& theText )
|
||||
|
||||
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() ) )
|
||||
|
@ -492,7 +492,7 @@ void SMESHGUI_MinDistance::firstEdited()
|
||||
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 );
|
||||
}
|
||||
@ -520,7 +520,7 @@ void SMESHGUI_MinDistance::secondEdited()
|
||||
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 );
|
||||
}
|
||||
@ -1022,7 +1022,7 @@ void SMESHGUI_BoundingBox::sourceEdited()
|
||||
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 );
|
||||
@ -1420,7 +1420,7 @@ void SMESHGUI_Angle::selectionChanged()
|
||||
clear();
|
||||
QString nodesString;
|
||||
|
||||
TColStd_IndexedMapOfInteger idsMap;
|
||||
SVTK_TIndexedMapOfVtkId idsMap;
|
||||
SALOME_ListIO selected;
|
||||
SMESHGUI::selectionMgr()->selectedObjects( selected );
|
||||
selected.Reverse(); // to keep order of selection
|
||||
@ -1528,7 +1528,7 @@ void SMESHGUI_Angle::nodesEdited()
|
||||
{
|
||||
clear();
|
||||
|
||||
TColStd_MapOfInteger ID;
|
||||
SVTK_TVtkIDsMap ID;
|
||||
QStringList ids = myNodes->text().split( " ", QString::SkipEmptyParts );
|
||||
foreach ( QString idStr, ids )
|
||||
{
|
||||
|
@ -469,7 +469,7 @@ void SMESHGUI_MergeDlg::Init()
|
||||
// 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)
|
||||
{
|
||||
@ -484,7 +484,7 @@ void SMESHGUI_MergeDlg::FindGravityCenter(TColStd_MapOfInteger & theElemsIdMap,
|
||||
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 )
|
||||
@ -845,7 +845,7 @@ void SMESHGUI_MergeDlg::onSelectGroup()
|
||||
myIsBusy = true;
|
||||
ListEdit->clear();
|
||||
|
||||
TColStd_MapOfInteger anIndices;
|
||||
SVTK_TVtkIDsMap anIndices;
|
||||
QList<QListWidgetItem*> selItems = ListCoincident->selectedItems();
|
||||
QListWidgetItem* anItem;
|
||||
QStringList aListIds;
|
||||
@ -908,7 +908,7 @@ void SMESHGUI_MergeDlg::onSelectElementFromGroup()
|
||||
if (myIsBusy || !myActor)
|
||||
return;
|
||||
|
||||
TColStd_MapOfInteger anIndices;
|
||||
SVTK_TVtkIDsMap anIndices;
|
||||
QList<QListWidgetItem*> selItems = ListEdit->selectedItems();
|
||||
QListWidgetItem* anItem;
|
||||
|
||||
@ -1595,7 +1595,7 @@ void SMESHGUI_MergeDlg::onSelectKeep()
|
||||
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());
|
||||
|
@ -30,8 +30,9 @@
|
||||
// SMESH includes
|
||||
#include "SMESH_SMESHGUI.hxx"
|
||||
|
||||
// Qt includes
|
||||
// GUI and Qt includes
|
||||
#include <QDialog>
|
||||
#include <SVTK_Hash.h>
|
||||
|
||||
// OCCT includes
|
||||
#include <gp_XYZ.hxx>
|
||||
@ -88,7 +89,7 @@ private:
|
||||
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
|
||||
|
@ -3315,7 +3315,7 @@ void SMESHGUI_MeshInfoDlg::idChanged()
|
||||
myIDPreview->SetPointsLabeled( false );
|
||||
|
||||
if ( myProxy ) {
|
||||
TColStd_MapOfInteger ID;
|
||||
SVTK_TVtkIDsMap ID;
|
||||
QSet<uint> ids;
|
||||
std::vector<int> idVec;
|
||||
std::list< gp_XYZ > aGrCentersXYZ;
|
||||
|
@ -1411,7 +1411,7 @@ void SMESHGUI_MeshPatternDlg::onTextChanged (const QString& theNewText)
|
||||
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());
|
||||
|
@ -697,7 +697,7 @@ void SMESHGUI_MultiEditDlg::onAddBtn()
|
||||
if (nbSelected == 0)
|
||||
return;
|
||||
|
||||
TColStd_IndexedMapOfInteger toBeAdded;
|
||||
SVTK_TIndexedMapOfVtkId toBeAdded;
|
||||
|
||||
if (!mySubmeshChk->isChecked() && !myGroupChk->isChecked()) {
|
||||
if (nbSelected > 0)
|
||||
@ -712,7 +712,7 @@ void SMESHGUI_MultiEditDlg::onAddBtn()
|
||||
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 ]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -728,7 +728,7 @@ void SMESHGUI_MultiEditDlg::onAddBtn()
|
||||
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 ]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -875,7 +875,7 @@ void SMESHGUI_MultiEditDlg::onListSelectionChanged()
|
||||
anActor = myActor;
|
||||
TVisualObjPtr anObj = anActor->GetObject();
|
||||
|
||||
TColStd_MapOfInteger anIndexes;
|
||||
SVTK_TVtkIDsMap anIndexes;
|
||||
int total = myListBox->count();
|
||||
for (int i = 0; i < total; i++)
|
||||
{
|
||||
@ -1818,7 +1818,7 @@ void SMESHGUI_SplitVolumesDlg::onSelectionDone()
|
||||
if (!aSelMesh->_is_nil())
|
||||
myMesh = aSelMesh;
|
||||
|
||||
TColStd_IndexedMapOfInteger aMapIndex;
|
||||
SVTK_TIndexedMapOfVtkId aMapIndex;
|
||||
mySelector->GetIndex( anIO, aMapIndex );
|
||||
if ( !aMapIndex.IsEmpty() )
|
||||
showFacetByElement( aMapIndex(1) );
|
||||
|
@ -552,13 +552,13 @@ void SMESHGUI_OffsetDlg::onTextChange (const QString& theNewText)
|
||||
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++;
|
||||
}
|
||||
|
||||
|
@ -348,7 +348,7 @@ void SMESHGUI_RemoveElementsDlg::onTextChange(const QString& theNewText)
|
||||
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++) {
|
||||
|
@ -356,7 +356,7 @@ void SMESHGUI_RemoveNodesDlg::onTextChange(const QString& theNewText)
|
||||
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++) {
|
||||
|
@ -518,7 +518,7 @@ void SMESHGUI_ReorientFacesOp::selectionDone()
|
||||
|
||||
if ( nbSelected == 1 )
|
||||
{
|
||||
TColStd_IndexedMapOfInteger faceIndices;
|
||||
SVTK_TIndexedMapOfVtkId faceIndices;
|
||||
selector()->GetIndex( anIO, faceIndices );
|
||||
if ( faceIndices.Extent() == 1 )
|
||||
{
|
||||
@ -558,7 +558,7 @@ void SMESHGUI_ReorientFacesOp::selectionDone()
|
||||
}
|
||||
else
|
||||
{
|
||||
TColStd_IndexedMapOfInteger nodeIndices;
|
||||
SVTK_TIndexedMapOfVtkId nodeIndices;
|
||||
selector()->GetIndex( anIO, nodeIndices );
|
||||
if ( nodeIndices.Extent() > 0 && nodeIndices.Extent() <=2 )
|
||||
{
|
||||
@ -620,7 +620,7 @@ void SMESHGUI_ReorientFacesOp::onTextChange( const QString& theText )
|
||||
myDlg->activateObject( EFace );
|
||||
myDlg->setObjectText( EFace, theText );
|
||||
}
|
||||
TColStd_MapOfInteger ids;
|
||||
SVTK_TVtkIDsMap ids;
|
||||
if ( !theText.isEmpty() && theText.toInt() > 0 )
|
||||
ids.Add( theText.toInt() );
|
||||
|
||||
|
@ -602,7 +602,7 @@ void SMESHGUI_RevolutionDlg::SelectionIntoArgument()
|
||||
return;
|
||||
|
||||
Handle(SALOME_InteractiveObject) IO = aList.First();
|
||||
TColStd_IndexedMapOfInteger aMapIndex;
|
||||
SVTK_TIndexedMapOfVtkId aMapIndex;
|
||||
mySelector->GetIndex(IO,aMapIndex);
|
||||
if ( aMapIndex.Extent() != 1 )
|
||||
return;
|
||||
|
@ -644,13 +644,13 @@ void SMESHGUI_RotationDlg::onTextChange (const QString& theNewText)
|
||||
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++;
|
||||
}
|
||||
|
||||
|
@ -682,7 +682,7 @@ void SMESHGUI_ScaleDlg::onTextChange (const QString& theNewText)
|
||||
if (aMesh) {
|
||||
Handle(SALOME_InteractiveObject) anIO = myActor->getIO();
|
||||
|
||||
TColStd_MapOfInteger newIndices;
|
||||
SVTK_TVtkIDsMap newIndices;
|
||||
|
||||
QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts);
|
||||
|
||||
@ -690,7 +690,7 @@ void SMESHGUI_ScaleDlg::onTextChange (const QString& theNewText)
|
||||
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++;
|
||||
}
|
||||
}
|
||||
|
@ -262,7 +262,7 @@ void SMESHGUI_SelectionOp::highlight( const Handle( SALOME_InteractiveObject )&
|
||||
// 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();
|
||||
@ -468,7 +468,7 @@ void SMESHGUI_SelectionOp::onTextChanged( int, const QStringList& list )
|
||||
if( !dlg() )
|
||||
return;
|
||||
|
||||
TColStd_MapOfInteger newIndices;
|
||||
SVTK_TVtkIDsMap newIndices;
|
||||
|
||||
SALOME_ListIO sel; selectionMgr()->selectedObjects( sel );
|
||||
SMESH_Actor* anActor = actor();
|
||||
@ -483,12 +483,12 @@ void SMESHGUI_SelectionOp::onTextChanged( int, const QStringList& list )
|
||||
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 );
|
||||
|
@ -34,6 +34,7 @@
|
||||
|
||||
// SALOME GUI includes
|
||||
#include <SVTK_Selection.h>
|
||||
#include <SVTK_Hash.h>
|
||||
#include <SALOME_InteractiveObject.hxx>
|
||||
|
||||
// IDL includes
|
||||
@ -110,7 +111,7 @@ protected:
|
||||
|
||||
//! 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;
|
||||
|
@ -1541,7 +1541,7 @@ void SMESHGUI_SewingDlg::onTextChange (const QString& theNewText)
|
||||
send->clear();
|
||||
|
||||
if (aMesh) {
|
||||
TColStd_MapOfInteger newIndices;
|
||||
SVTK_TVtkIDsMap newIndices;
|
||||
|
||||
if (GetConstructorId() != 3 || (send != LineEdit1 && send != LineEdit4)) {
|
||||
SMESH::SetPointRepresentation(true);
|
||||
@ -1551,7 +1551,7 @@ void SMESHGUI_SewingDlg::onTextChange (const QString& theNewText)
|
||||
|
||||
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 );
|
||||
@ -1583,7 +1583,7 @@ void SMESHGUI_SewingDlg::onTextChange (const QString& theNewText)
|
||||
const SMDS_MeshElement * e = aMesh->FindElement(aListId[ i ].toInt());
|
||||
if (e)
|
||||
{
|
||||
newIndices.Add(FromIdType<int>(e->GetID()));
|
||||
newIndices.Add(e->GetID());
|
||||
atLeastOneExists = true;
|
||||
}
|
||||
}
|
||||
|
@ -498,12 +498,12 @@ void SMESHGUI_ShapeByMeshOp::onElemIdChanged(const QString& theNewText)
|
||||
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() )
|
||||
|
@ -523,7 +523,7 @@ void SMESHGUI_SmoothingDlg::onTextChange (const QString& theNewText)
|
||||
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 ) {
|
||||
@ -538,7 +538,7 @@ void SMESHGUI_SmoothingDlg::onTextChange (const QString& theNewText)
|
||||
}
|
||||
}
|
||||
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 ) {
|
||||
@ -619,7 +619,7 @@ void SMESHGUI_SmoothingDlg::SelectionIntoArgument()
|
||||
myNbOkElements = true;
|
||||
} else {
|
||||
// get indices of selected elements
|
||||
TColStd_IndexedMapOfInteger aMapIndex;
|
||||
SVTK_TIndexedMapOfVtkId aMapIndex;
|
||||
mySelector->GetIndex(IO,aMapIndex);
|
||||
myNbOkElements = aMapIndex.Extent();
|
||||
|
||||
|
@ -701,7 +701,7 @@ void SMESHGUI_SymmetryDlg::onTextChange (const QString& theNewText)
|
||||
if (aMesh) {
|
||||
Handle(SALOME_InteractiveObject) anIO = myActor->getIO();
|
||||
|
||||
TColStd_MapOfInteger newIndices;
|
||||
SVTK_TVtkIDsMap newIndices;
|
||||
|
||||
QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts);
|
||||
|
||||
@ -709,7 +709,7 @@ void SMESHGUI_SymmetryDlg::onTextChange (const QString& theNewText)
|
||||
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++;
|
||||
}
|
||||
|
||||
|
@ -713,7 +713,7 @@ void SMESHGUI_TranslationDlg::onTextChange (const QString& theNewText)
|
||||
if (aMesh) {
|
||||
Handle(SALOME_InteractiveObject) anIO = myActor->getIO();
|
||||
|
||||
TColStd_MapOfInteger newIndices;
|
||||
SVTK_TVtkIDsMap newIndices;
|
||||
|
||||
QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts);
|
||||
|
||||
@ -721,7 +721,7 @@ void SMESHGUI_TranslationDlg::onTextChange (const QString& theNewText)
|
||||
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++;
|
||||
}
|
||||
}
|
||||
|
@ -1194,7 +1194,7 @@ namespace SMESH
|
||||
QString& theName)
|
||||
{
|
||||
theName = "";
|
||||
TColStd_IndexedMapOfInteger aMapIndex;
|
||||
SVTK_TIndexedMapOfVtkId aMapIndex;
|
||||
theSelector->GetIndex(theIO,aMapIndex);
|
||||
|
||||
for(int i = 1; i <= aMapIndex.Extent(); i++)
|
||||
@ -1208,7 +1208,7 @@ namespace SMESH
|
||||
QString& theName)
|
||||
{
|
||||
theName = "";
|
||||
TColStd_IndexedMapOfInteger aMapIndex;
|
||||
SVTK_TIndexedMapOfVtkId aMapIndex;
|
||||
theSelector->GetIndex(theIO,aMapIndex);
|
||||
|
||||
typedef std::set<int> TIdContainer;
|
||||
@ -1238,7 +1238,7 @@ namespace SMESH
|
||||
if ( anIO.IsNull() || !anIO->hasEntry() )
|
||||
return -1;
|
||||
|
||||
TColStd_IndexedMapOfInteger aMapIndex;
|
||||
SVTK_TIndexedMapOfVtkId aMapIndex;
|
||||
theSelector->GetIndex( anIO, aMapIndex );
|
||||
if ( aMapIndex.Extent() != 2 )
|
||||
return -1;
|
||||
|
@ -1739,7 +1739,7 @@ public:
|
||||
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 )
|
||||
{
|
||||
@ -1991,7 +1991,7 @@ public:
|
||||
if ( !actor || !actor->hasIO() )
|
||||
return;
|
||||
|
||||
TColStd_IndexedMapOfInteger idMap;
|
||||
SVTK_TIndexedMapOfVtkId idMap;
|
||||
selector->GetIndex( actor->getIO(), idMap );
|
||||
|
||||
for ( int i = 1; i <= idMap.Extent(); i++ )
|
||||
|
@ -109,9 +109,9 @@ StdMeshers_NumberOfSegments::BuildDistributionTab( const vector<double>& tab,
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
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;
|
||||
@ -126,7 +126,7 @@ void StdMeshers_NumberOfSegments::SetNumberOfSegments(int segmentsNumber)
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
int StdMeshers_NumberOfSegments::GetNumberOfSegments() const
|
||||
smIdType StdMeshers_NumberOfSegments::GetNumberOfSegments() const
|
||||
{
|
||||
return _numberOfSegments;
|
||||
}
|
||||
|
@ -57,12 +57,12 @@ public:
|
||||
* \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
|
||||
|
Loading…
Reference in New Issue
Block a user