Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bos #20256: [CEA 18523] Porting SMESH to int 64 bits
[modules/smesh.git]
/
src
/
SMESHGUI
/
SMESHGUI_Measurements.cxx
diff --git
a/src/SMESHGUI/SMESHGUI_Measurements.cxx
b/src/SMESHGUI/SMESHGUI_Measurements.cxx
index 8e19cddcaa8afff01f0893db9d55cfd7885da656..c20c5404a02b30a7ea70cff200cd8e3fce034cda 100644
(file)
--- a/
src/SMESHGUI/SMESHGUI_Measurements.cxx
+++ b/
src/SMESHGUI/SMESHGUI_Measurements.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-20
16
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-20
21
CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-60,7
+60,7
@@
#include <vtkCellArray.h>
#include <vtkUnsignedCharArray.h>
#include <vtkDataSetMapper.h>
#include <vtkCellArray.h>
#include <vtkUnsignedCharArray.h>
#include <vtkDataSetMapper.h>
-#include <VTKViewer_CellLocationsArray.h>
+
//
#include <VTKViewer_CellLocationsArray.h>
#include <vtkProperty.h>
#include <ElCLib.hxx>
#include <vtkProperty.h>
#include <ElCLib.hxx>
@@
-173,11
+173,11
@@
SMESHGUI_MinDistance::SMESHGUI_MinDistance( QWidget* parent )
aSOrigin->setChecked( true );
#ifndef MINDIST_ENABLE_ELEMENT
aFElem->setEnabled( false ); // NOT AVAILABLE YET
aSOrigin->setChecked( true );
#ifndef MINDIST_ENABLE_ELEMENT
aFElem->setEnabled( false ); // NOT AVAILABLE YET
- aSElem->setEnabled( false ); // NOT AVAILABLE YET
+
//
aSElem->setEnabled( false ); // NOT AVAILABLE YET
#endif
#ifndef MINDIST_ENABLE_OBJECT
aFObject->setEnabled( false ); // NOT AVAILABLE YET
#endif
#ifndef MINDIST_ENABLE_OBJECT
aFObject->setEnabled( false ); // NOT AVAILABLE YET
- aSObject->setEnabled( false ); // NOT AVAILABLE YET
+
//
aSObject->setEnabled( false ); // NOT AVAILABLE YET
#endif
myDX->setReadOnly( true );
myDY->setReadOnly( true );
#endif
myDX->setReadOnly( true );
myDY->setReadOnly( true );
@@
-357,11
+357,12
@@
void SMESHGUI_MinDistance::createPreview( double x1, double y1, double z1, doubl
aCells->InsertNextCell( anIdList );
aCellTypesArray->InsertNextValue( VTK_LINE );
anIdList->Delete();
aCells->InsertNextCell( anIdList );
aCellTypesArray->InsertNextValue( VTK_LINE );
anIdList->Delete();
-
VTKViewer_CellLocationsArray* aCellLocationsArray = VTKViewer_CellLocations
Array::New();
+
vtkIdTypeArray* aCellLocationsArray = vtkIdType
Array::New();
aCellLocationsArray->SetNumberOfComponents( 1 );
aCellLocationsArray->SetNumberOfTuples( 1 );
aCells->InitTraversal();
aCellLocationsArray->SetNumberOfComponents( 1 );
aCellLocationsArray->SetNumberOfTuples( 1 );
aCells->InitTraversal();
- for( vtkIdType idType = 0, *pts, npts; aCells->GetNextCell( npts, pts ); idType++ )
+ vtkIdType const *pts(nullptr);
+ for( vtkIdType idType = 0, npts; aCells->GetNextCell( npts, pts ); idType++ )
aCellLocationsArray->SetValue( idType, aCells->GetTraversalLocation( npts ) );
aGrid->SetCells( aCellTypesArray, aCellLocationsArray, aCells );
aCellLocationsArray->Delete();
aCellLocationsArray->SetValue( idType, aCells->GetTraversalLocation( npts ) );
aGrid->SetCells( aCellTypesArray, aCellLocationsArray, aCells );
aCellLocationsArray->Delete();
@@
-491,7
+492,7
@@
void SMESHGUI_MinDistance::firstEdited()
if ( myFirstActor && selector ) {
Handle(SALOME_InteractiveObject) IO = myFirstActor->getIO();
if ( myFirst->checkedId() == NodeTgt || myFirst->checkedId() == ElementTgt ) {
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 );
}
ID.Add( myFirstTgt->text().toLong() );
selector->AddOrRemoveIndex( IO, ID, false );
}
@@
-519,7
+520,7
@@
void SMESHGUI_MinDistance::secondEdited()
Handle(SALOME_InteractiveObject) IO = mySecondActor->getIO();
if ( mySecond->checkedId() == NodeTgt || mySecond->checkedId() == ElementTgt ) {
if ( !text.isEmpty() ) {
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 );
}
ID.Add( text.toLong() );
selector->AddOrRemoveIndex( IO, ID, false );
}
@@
-545,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::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();
ids->length( 1 );
ids[0] = id;
SMESH::SMESH_MeshEditor_var me = m->GetMeshEditor();
@@
-564,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::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();
ids->length( 1 );
ids[0] = id;
SMESH::SMESH_MeshEditor_var me = m->GetMeshEditor();
@@
-595,10
+596,14
@@
void SMESHGUI_MinDistance::compute()
if ( isOrigin ) {
x2 = y2 = z2 = 0.;
}
if ( isOrigin ) {
x2 = y2 = z2 = 0.;
}
- else {
+ else
if ( mySecond->checkedId() == NodeTgt )
{
coord = s2->GetMesh()->GetNodeXYZ( result.node2 );
x2 = coord[0]; y2 = coord[1]; z2 = coord[2];
}
coord = s2->GetMesh()->GetNodeXYZ( result.node2 );
x2 = coord[0]; y2 = coord[1]; z2 = coord[2];
}
+ else
+ {
+ x2 = result.maxX; y2 = result.maxY; z2 = result.maxZ;
+ }
createPreview( x1, y1, z1, x2, y2, z2 );
displayPreview();
}
createPreview( x1, y1, z1, x2, y2, z2 );
displayPreview();
}
@@
-886,11
+891,12
@@
void SMESHGUI_BoundingBox::createPreview( double minX, double maxX, double minY,
aCells->InsertNextCell( anIdList );
aCellTypesArray->InsertNextValue( VTK_LINE );
anIdList->Delete();
aCells->InsertNextCell( anIdList );
aCellTypesArray->InsertNextValue( VTK_LINE );
anIdList->Delete();
-
VTKViewer_CellLocationsArray* aCellLocationsArray = VTKViewer_CellLocations
Array::New();
+
vtkIdTypeArray* aCellLocationsArray = vtkIdType
Array::New();
aCellLocationsArray->SetNumberOfComponents( 1 );
aCellLocationsArray->SetNumberOfTuples( 12 );
aCells->InitTraversal();
aCellLocationsArray->SetNumberOfComponents( 1 );
aCellLocationsArray->SetNumberOfTuples( 12 );
aCells->InitTraversal();
- for( vtkIdType idType = 0, *pts, npts; aCells->GetNextCell( npts, pts ); idType++ )
+ vtkIdType const *pts(nullptr);
+ for( vtkIdType idType = 0, npts; aCells->GetNextCell( npts, pts ); idType++ )
aCellLocationsArray->SetValue( idType, aCells->GetTraversalLocation( npts ) );
aGrid->SetCells( aCellTypesArray, aCellLocationsArray, aCells );
aCellLocationsArray->Delete();
aCellLocationsArray->SetValue( idType, aCells->GetTraversalLocation( npts ) );
aGrid->SetCells( aCellTypesArray, aCellLocationsArray, aCells );
aCellLocationsArray->Delete();
@@
-1016,7
+1022,7
@@
void SMESHGUI_BoundingBox::sourceEdited()
if ( myActor && selector ) {
Handle(SALOME_InteractiveObject) IO = myActor->getIO();
if ( mySourceMode->checkedId() == NodesSrc || mySourceMode->checkedId() == ElementsSrc ) {
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 );
if ( !mySource->isReadOnly() )
myIDs = mySource->text();
QStringList ids = myIDs.split( " ", QString::SkipEmptyParts );
@@
-1041,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::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();
ids_in->length( ids.count() );
for( int i = 0; i < ids.count(); i++ )
ids_in[i] = ids[i].trimmed().toLong();
@@
-1414,7
+1420,7
@@
void SMESHGUI_Angle::selectionChanged()
clear();
QString nodesString;
clear();
QString nodesString;
-
TColStd_IndexedMapOfInteger
idsMap;
+
SVTK_TIndexedMapOfVtkId
idsMap;
SALOME_ListIO selected;
SMESHGUI::selectionMgr()->selectedObjects( selected );
selected.Reverse(); // to keep order of selection
SALOME_ListIO selected;
SMESHGUI::selectionMgr()->selectedObjects( selected );
selected.Reverse(); // to keep order of selection
@@
-1522,7
+1528,7
@@
void SMESHGUI_Angle::nodesEdited()
{
clear();
{
clear();
-
TColStd_MapOfInteger
ID;
+
SVTK_TVtkIDsMap
ID;
QStringList ids = myNodes->text().split( " ", QString::SkipEmptyParts );
foreach ( QString idStr, ids )
{
QStringList ids = myNodes->text().split( " ", QString::SkipEmptyParts );
foreach ( QString idStr, ids )
{