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 #40653][CEA] New mesh import export formats with meshio.
[modules/smesh.git]
/
src
/
SMESHGUI
/
SMESHGUI_MultiEditDlg.cxx
diff --git
a/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx
b/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx
index 10cd338dba7a95903d4be90d7bcc861aafb5aaf1..01cc037717ed5c20474e9f6e538ef14b74626761 100644
(file)
--- a/
src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx
+++ b/
src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-202
1 CEA/DEN, EDF R&D
, OPEN CASCADE
+// Copyright (C) 2007-202
4 CEA, EDF
, 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
@@
-57,7
+57,7
@@
#include <SVTK_Selector.h>
#include <SVTK_ViewWindow.h>
#include <SVTK_Selector.h>
#include <SVTK_ViewWindow.h>
-#include <VTKViewer_CellLocationsArray.h>
+
//
#include <VTKViewer_CellLocationsArray.h>
// OCCT includes
#include <Bnd_B3d.hxx>
// OCCT includes
#include <Bnd_B3d.hxx>
@@
-437,9
+437,9
@@
void SMESHGUI_MultiEditDlg::onOk()
// Purpose : Retrieve identifiers from list box or the whole object
//=======================================================================
// 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())
{
if (myToAllChk->isChecked())
{
@@
-697,7
+697,7
@@
void SMESHGUI_MultiEditDlg::onAddBtn()
if (nbSelected == 0)
return;
if (nbSelected == 0)
return;
-
TColStd_IndexedMapOfInteger
toBeAdded;
+
SVTK_TIndexedMapOfVtkId
toBeAdded;
if (!mySubmeshChk->isChecked() && !myGroupChk->isChecked()) {
if (nbSelected > 0)
if (!mySubmeshChk->isChecked() && !myGroupChk->isChecked()) {
if (nbSelected > 0)
@@
-709,9
+709,9
@@
void SMESHGUI_MultiEditDlg::onAddBtn()
SMESH::IObjectToInterface<SMESH::SMESH_subMesh>(anIter.Value());
if (!aSubMesh->_is_nil()) {
if (aSubMesh->GetFather()->GetId() == myMesh->GetId()) {
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++) {
for (int i = 0, n = anIds->length(); i < n; i++) {
- if (isIdValid(
anIds[ i ]
))
+ if (isIdValid(
FromSmIdType<int>(anIds[ i ])
))
toBeAdded.Add(anIds[ i ]);
}
}
toBeAdded.Add(anIds[ i ]);
}
}
@@
-725,9
+725,9
@@
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()) {
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++) {
for (int i = 0, n = anIds->length(); i < n; i++) {
- if (isIdValid(
anIds[ i ]
))
+ if (isIdValid(
FromSmIdType<int>(anIds[ i ])
))
toBeAdded.Add(anIds[ i ]);
}
}
toBeAdded.Add(anIds[ i ]);
}
}
@@
-875,7
+875,7
@@
void SMESHGUI_MultiEditDlg::onListSelectionChanged()
anActor = myActor;
TVisualObjPtr anObj = anActor->GetObject();
anActor = myActor;
TVisualObjPtr anObj = anActor->GetObject();
-
TColStd_MapOfInteger
anIndexes;
+
SVTK_TVtkIDsMap
anIndexes;
int total = myListBox->count();
for (int i = 0; i < total; i++)
{
int total = myListBox->count();
for (int i = 0; i < total; i++)
{
@@
-1008,7
+1008,7
@@
bool SMESHGUI_MultiEditDlg::onApply()
SUIT_OverrideCursor aWaitCursor;
SMESH::SMESH_IDSource_var obj;
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) {
bool aResult = process(aMeshEditor, anIds.inout(), obj);
if (aResult) {
@@
-1099,9
+1099,9
@@
SMESHGUI_ChangeOrientationDlg::~SMESHGUI_ChangeOrientationDlg()
{
}
{
}
-bool SMESHGUI_ChangeOrientationDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor,
- const SMESH::
long_array&
theIds,
- SMESH::SMESH_IDSource_ptr obj)
+bool SMESHGUI_ChangeOrientationDlg::process (SMESH::SMESH_MeshEditor_ptr
theEditor,
+ const SMESH::
smIdType_array&
theIds,
+ SMESH::SMESH_IDSource_ptr
obj)
{
if ( CORBA::is_nil( obj ))
return theEditor->Reorient(theIds);
{
if ( CORBA::is_nil( obj ))
return theEditor->Reorient(theIds);
@@
-1109,7
+1109,7
@@
bool SMESHGUI_ChangeOrientationDlg::process (SMESH::SMESH_MeshEditor_ptr theEdit
return theEditor->ReorientObject( obj );
}
return theEditor->ReorientObject( obj );
}
-
int
SMESHGUI_ChangeOrientationDlg::nbElemsInMesh()
+
smIdType
SMESHGUI_ChangeOrientationDlg::nbElemsInMesh()
{
return ( myFilterType == SMESH::FaceFilter ) ? myMesh->NbFaces() : myMesh->NbVolumes();
}
{
return ( myFilterType == SMESH::FaceFilter ) ? myMesh->NbFaces() : myMesh->NbVolumes();
}
@@
-1189,7
+1189,7
@@
bool SMESHGUI_UnionOfTrianglesDlg::isValid (const bool theMess)
}
bool SMESHGUI_UnionOfTrianglesDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor,
}
bool SMESHGUI_UnionOfTrianglesDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor,
- const SMESH::
long
_array& theIds,
+ const SMESH::
smIdType
_array& theIds,
SMESH::SMESH_IDSource_ptr obj)
{
{
SMESH::SMESH_IDSource_ptr obj)
{
{
@@
-1207,7
+1207,7
@@
bool SMESHGUI_UnionOfTrianglesDlg::process (SMESH::SMESH_MeshEditor_ptr theEdito
return ok;
}
return ok;
}
-
int
SMESHGUI_UnionOfTrianglesDlg::nbElemsInMesh()
+
smIdType
SMESHGUI_UnionOfTrianglesDlg::nbElemsInMesh()
{
return myMesh->NbTriangles();
}
{
return myMesh->NbTriangles();
}
@@
-1220,7
+1220,7
@@
void SMESHGUI_UnionOfTrianglesDlg::onDisplaySimulation( bool toDisplayPreview )
SUIT_OverrideCursor aWaitCursor;
// get Ids of elements
SMESH::SMESH_IDSource_var obj;
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();
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,
}
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 ));
SMESH::SMESH_IDSource_ptr obj)
{
bool hasObj = (! CORBA::is_nil( obj ));
@@
-1327,7
+1327,7
@@
bool SMESHGUI_CuttingOfQuadsDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor,
return hasObj ? theEditor->QuadToTriObject(obj, aCrit) : theEditor->QuadToTri(theIds, aCrit);
}
return hasObj ? theEditor->QuadToTriObject(obj, aCrit) : theEditor->QuadToTri(theIds, aCrit);
}
-
int
SMESHGUI_CuttingOfQuadsDlg::nbElemsInMesh()
+
smIdType
SMESHGUI_CuttingOfQuadsDlg::nbElemsInMesh()
{
return myMesh->NbQuadrangles();
}
{
return myMesh->NbQuadrangles();
}
@@
-1382,7
+1382,7
@@
void SMESHGUI_CuttingOfQuadsDlg::displayPreview()
SUIT_OverrideCursor aWaitCursor;
// get Ids of elements
SMESH::SMESH_IDSource_var obj;
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;
if (anElemIds->length() == 0 && obj->_is_nil() )
return;
@@
-1439,13
+1439,13
@@
void SMESHGUI_CuttingOfQuadsDlg::displayPreview()
const SMDS_MeshNode* aNode = static_cast<const SMDS_MeshNode*>(anIter->next());
if (aNode)
{
const SMDS_MeshNode* aNode = static_cast<const SMDS_MeshNode*>(anIter->next());
if (aNode)
{
- if (!anIdToVtk.IsBound(
aNode->GetID(
)))
+ if (!anIdToVtk.IsBound(
FromSmIdType<int>(aNode->GetID()
)))
{
aPoints->SetPoint(++nbPoints, aNode->X(), aNode->Y(), aNode->Z());
{
aPoints->SetPoint(++nbPoints, aNode->X(), aNode->Y(), aNode->Z());
- anIdToVtk.Bind(
aNode->GetID(
), nbPoints);
+ anIdToVtk.Bind(
FromSmIdType<int>(aNode->GetID()
), nbPoints);
}
}
- aNodes[ k++ ] =
aNode->GetID(
);
+ aNodes[ k++ ] =
FromSmIdType<int>(aNode->GetID()
);
}
}
}
}
@@
-1464,7
+1464,7
@@
void SMESHGUI_CuttingOfQuadsDlg::displayPreview()
else // use numerical functor
{
// compare two sets of possible triangles
else // use numerical functor
{
// compare two sets of possible triangles
-
int
diag = aMeshEditor->BestSplit(anElemIds[i], aCriterion);
+
smIdType
diag = aMeshEditor->BestSplit(anElemIds[i], aCriterion);
if (diag == 1) // 1-3
isDiag13 = true;
else if (diag == 2) // 2-4
if (diag == 1) // 1-3
isDiag13 = true;
else if (diag == 2) // 2-4
@@
-1503,7
+1503,7
@@
void SMESHGUI_CuttingOfQuadsDlg::displayPreview()
}
}
}
}
-
VTKViewer_CellLocationsArray* aCellLocationsArray = VTKViewer_CellLocations
Array::New();
+
vtkIdTypeArray* aCellLocationsArray = vtkIdType
Array::New();
aCellLocationsArray->SetNumberOfComponents(1);
aCellLocationsArray->SetNumberOfTuples(aNbCells);
aCellLocationsArray->SetNumberOfComponents(1);
aCellLocationsArray->SetNumberOfTuples(aNbCells);
@@
-1648,7
+1648,7
@@
SMESHGUI_SplitVolumesDlg::~SMESHGUI_SplitVolumesDlg()
}
bool SMESHGUI_SplitVolumesDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor,
}
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;
SMESH::SMESH_IDSource_ptr theObj)
{
SMESH::IDSource_wrap obj = theObj;
@@
-1696,7
+1696,7
@@
bool SMESHGUI_SplitVolumesDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor,
return true;
}
return true;
}
-
int
SMESHGUI_SplitVolumesDlg::nbElemsInMesh()
+
smIdType
SMESHGUI_SplitVolumesDlg::nbElemsInMesh()
{
return isIntoPrisms() ? myMesh->NbHexas() : myMesh->NbVolumes() - myMesh->NbTetras();
}
{
return isIntoPrisms() ? myMesh->NbHexas() : myMesh->NbVolumes() - myMesh->NbTetras();
}
@@
-1818,7
+1818,7
@@
void SMESHGUI_SplitVolumesDlg::onSelectionDone()
if (!aSelMesh->_is_nil())
myMesh = aSelMesh;
if (!aSelMesh->_is_nil())
myMesh = aSelMesh;
-
TColStd_IndexedMapOfInteger
aMapIndex;
+
SVTK_TIndexedMapOfVtkId
aMapIndex;
mySelector->GetIndex( anIO, aMapIndex );
if ( !aMapIndex.IsEmpty() )
showFacetByElement( aMapIndex(1) );
mySelector->GetIndex( anIO, aMapIndex );
if ( !aMapIndex.IsEmpty() )
showFacetByElement( aMapIndex(1) );