mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-14 22:30:36 +05:00
fix Group Dialog
This commit is contained in:
parent
b744097301
commit
7745fdb726
@ -2225,7 +2225,7 @@ void SMESH_ActorDef::SetBallScale( double theVal )
|
|||||||
Modified();
|
Modified();
|
||||||
}
|
}
|
||||||
|
|
||||||
int SMESH_ActorDef::GetObjDimension( const int theObjId )
|
int SMESH_ActorDef::GetObjDimension( const vtkIdType theObjId )
|
||||||
{
|
{
|
||||||
return myVisualObj->GetElemDimension( theObjId );
|
return myVisualObj->GetElemDimension( theObjId );
|
||||||
}
|
}
|
||||||
|
@ -151,7 +151,7 @@ class SMESH_ActorDef : public SMESH_Actor
|
|||||||
virtual vtkIdType GetElemObjId(vtkIdType theVtkID);
|
virtual vtkIdType GetElemObjId(vtkIdType theVtkID);
|
||||||
virtual vtkCell* GetElemCell(vtkIdType theObjID);
|
virtual vtkCell* GetElemCell(vtkIdType theObjID);
|
||||||
|
|
||||||
virtual int GetObjDimension( const int theObjId );
|
virtual int GetObjDimension( const vtkIdType theObjId ) override;
|
||||||
|
|
||||||
virtual void SetVisibility(int theMode);
|
virtual void SetVisibility(int theMode);
|
||||||
void SetVisibility(int theMode, bool theIsUpdateRepersentation);
|
void SetVisibility(int theMode, bool theIsUpdateRepersentation);
|
||||||
|
@ -71,7 +71,7 @@ SMESH_CellLabelActor::SMESH_CellLabelActor()
|
|||||||
myClsLabeledDataMapper = vtkLabeledDataMapper::New();
|
myClsLabeledDataMapper = vtkLabeledDataMapper::New();
|
||||||
myClsLabeledDataMapper->SetInputConnection(myClsSelectVisiblePoints->GetOutputPort());
|
myClsLabeledDataMapper->SetInputConnection(myClsSelectVisiblePoints->GetOutputPort());
|
||||||
|
|
||||||
myClsLabeledDataMapper->SetLabelFormat("%d");
|
//myClsLabeledDataMapper->SetLabelFormat("%d");
|
||||||
myClsLabeledDataMapper->SetLabelModeToLabelScalars();
|
myClsLabeledDataMapper->SetLabelModeToLabelScalars();
|
||||||
|
|
||||||
myClsTextProp = vtkTextProperty::New();
|
myClsTextProp = vtkTextProperty::New();
|
||||||
@ -159,9 +159,6 @@ void SMESH_CellLabelActor::SetCellsLabeled(bool theIsCellsLabeled)
|
|||||||
vtkUnstructuredGrid *aDataSet = myCellsNumDataSet;
|
vtkUnstructuredGrid *aDataSet = myCellsNumDataSet;
|
||||||
vtkIdType aNbElem = aDataSet->GetNumberOfCells();
|
vtkIdType aNbElem = aDataSet->GetNumberOfCells();
|
||||||
vtkIdTypeArray *anArray = vtkIdTypeArray::New();
|
vtkIdTypeArray *anArray = vtkIdTypeArray::New();
|
||||||
//
|
|
||||||
std::cout << "\n\n\n***********\nSizeof vtkIdType: " << sizeof(vtkIdType) << "\nSizeof smIdType: " << sizeof(smIdType) << "\n";
|
|
||||||
//
|
|
||||||
anArray->SetNumberOfValues(aNbElem);
|
anArray->SetNumberOfValues(aNbElem);
|
||||||
myExtractUnstructuredGrid->BuildOut2InMap();
|
myExtractUnstructuredGrid->BuildOut2InMap();
|
||||||
for(vtkIdType anId = 0; anId < aNbElem; anId++)
|
for(vtkIdType anId = 0; anId < aNbElem; anId++)
|
||||||
|
@ -61,7 +61,7 @@ SMESH_NodeLabelActor::SMESH_NodeLabelActor()
|
|||||||
|
|
||||||
myPtsLabeledDataMapper = vtkLabeledDataMapper::New();
|
myPtsLabeledDataMapper = vtkLabeledDataMapper::New();
|
||||||
myPtsLabeledDataMapper->SetInputConnection(myPtsSelectVisiblePoints->GetOutputPort());
|
myPtsLabeledDataMapper->SetInputConnection(myPtsSelectVisiblePoints->GetOutputPort());
|
||||||
myPtsLabeledDataMapper->SetLabelFormat("%d");
|
//myPtsLabeledDataMapper->SetLabelFormat("%d");
|
||||||
myPtsLabeledDataMapper->SetLabelModeToLabelScalars();
|
myPtsLabeledDataMapper->SetLabelModeToLabelScalars();
|
||||||
|
|
||||||
myPtsTextProp = vtkTextProperty::New();
|
myPtsTextProp = vtkTextProperty::New();
|
||||||
|
@ -124,7 +124,7 @@ SMESH_SVTKActor
|
|||||||
myBallGrid->SetPoints( aSourceGrid->GetPoints() );
|
myBallGrid->SetPoints( aSourceGrid->GetPoints() );
|
||||||
my0DGrid->SetPoints( aSourceGrid->GetPoints() );
|
my0DGrid->SetPoints( aSourceGrid->GetPoints() );
|
||||||
|
|
||||||
int aNbOfParts = theMapIndex.Extent();
|
vtkIdType aNbOfParts = theMapIndex.Extent();
|
||||||
|
|
||||||
vtkCellData* cd = 0;
|
vtkCellData* cd = 0;
|
||||||
vtkCellData* outputCD = 0;
|
vtkCellData* outputCD = 0;
|
||||||
@ -134,8 +134,8 @@ SMESH_SVTKActor
|
|||||||
cd = aSourceGrid->GetCellData();
|
cd = aSourceGrid->GetCellData();
|
||||||
}
|
}
|
||||||
outputCD->CopyAllocate(cd,aNbOfParts,aNbOfParts/2);
|
outputCD->CopyAllocate(cd,aNbOfParts,aNbOfParts/2);
|
||||||
for(int ind = 1; ind <= aNbOfParts; ind++){
|
for(vtkIdType ind = 1; ind <= aNbOfParts; ind++){
|
||||||
int aPartId = theMapIndex( ind );
|
vtkIdType aPartId = theMapIndex( ind );
|
||||||
if(vtkCell* aCell = theMapActor->GetElemCell(aPartId))
|
if(vtkCell* aCell = theMapActor->GetElemCell(aPartId))
|
||||||
{
|
{
|
||||||
if (aCell->GetCellType() != VTK_POLYHEDRON)
|
if (aCell->GetCellType() != VTK_POLYHEDRON)
|
||||||
|
@ -2213,15 +2213,19 @@ void SMESHGUI_GroupDlg::onSort()
|
|||||||
// PAL5412: sorts items in ascending by "string" value
|
// PAL5412: sorts items in ascending by "string" value
|
||||||
// myElements->sort(true);
|
// myElements->sort(true);
|
||||||
// myElements->update();
|
// myElements->update();
|
||||||
int i, k = myElements->count();
|
vtkIdType i, k = myElements->count();
|
||||||
if (k > 0) {
|
if (k > 0) {
|
||||||
myIsBusy = true;
|
myIsBusy = true;
|
||||||
QList<int> aSelected;
|
QList<vtkIdType> aSelected;
|
||||||
std::vector<int> anArray(k);
|
std::vector<vtkIdType> anArray(k);
|
||||||
// QMemArray<int> anArray(k);
|
// QMemArray<int> anArray(k);
|
||||||
// fill the array
|
// fill the array
|
||||||
for (i = 0; i < k; i++) {
|
for (i = 0; i < k; i++) {
|
||||||
int id = myElements->item(i)->text().toInt();
|
vtkIdType id;
|
||||||
|
if (sizeof(vtkIdType)==8)
|
||||||
|
id = myElements->item(i)->text().toLongLong();
|
||||||
|
else
|
||||||
|
id = myElements->item(i)->text().toInt();
|
||||||
anArray[i] = id;
|
anArray[i] = id;
|
||||||
if (myElements->item(i)->isSelected())
|
if (myElements->item(i)->isSelected())
|
||||||
aSelected.append(id);
|
aSelected.append(id);
|
||||||
|
@ -1211,7 +1211,7 @@ namespace SMESH
|
|||||||
SVTK_TIndexedMapOfVtkId aMapIndex;
|
SVTK_TIndexedMapOfVtkId aMapIndex;
|
||||||
theSelector->GetIndex(theIO,aMapIndex);
|
theSelector->GetIndex(theIO,aMapIndex);
|
||||||
|
|
||||||
typedef std::set<int> TIdContainer;
|
typedef std::set<vtkIdType> TIdContainer;
|
||||||
TIdContainer anIdContainer;
|
TIdContainer anIdContainer;
|
||||||
for( int i = 1; i <= aMapIndex.Extent(); i++)
|
for( int i = 1; i <= aMapIndex.Extent(); i++)
|
||||||
anIdContainer.insert(aMapIndex(i));
|
anIdContainer.insert(aMapIndex(i));
|
||||||
|
Loading…
Reference in New Issue
Block a user