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
Fix Python dump of ExportPartToMED()
[modules/smesh.git]
/
src
/
SMESHGUI
/
SMESHGUI_ShapeByMeshDlg.cxx
diff --git
a/src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.cxx
b/src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.cxx
index 511d0d5fa446b4be88354d55dda8202c341c082f..409c700b7a8b552be6d80a140812573166e0c068 100644
(file)
--- a/
src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.cxx
+++ b/
src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-201
2
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-201
6
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
@@
-6,7
+6,7
@@
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License
, or (at your option) any later version
.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
@@
-287,7
+287,7
@@
void SMESHGUI_ShapeByMeshOp::SetMesh (SMESH::SMESH_Mesh_ptr thePtr)
myHasSolids = nbShapes[ TopAbs_SOLID ];
}
myHasSolids = nbShapes[ TopAbs_SOLID ];
}
- // disable inexist
a
nt elem types
+ // disable inexist
e
nt elem types
for ( int i = 0; i < myDlg->myElemTypeGroup->buttons().count(); ++i ) {
if ( QAbstractButton* button = myDlg->myElemTypeGroup->button( i ) )
button->setEnabled( hasElement[ i ] );
for ( int i = 0; i < myDlg->myElemTypeGroup->buttons().count(); ++i ) {
if ( QAbstractButton* button = myDlg->myElemTypeGroup->button( i ) )
button->setEnabled( hasElement[ i ] );
@@
-314,24
+314,23
@@
void SMESHGUI_ShapeByMeshOp::commitOperation()
// GEOM_Object is published -> no need to UnRegister()
myGeomObj = GEOM::GEOM_Object::_duplicate
(SMESHGUI::GetSMESHGen()->GetGeometryByMeshElement
// GEOM_Object is published -> no need to UnRegister()
myGeomObj = GEOM::GEOM_Object::_duplicate
(SMESHGUI::GetSMESHGen()->GetGeometryByMeshElement
- ( myMesh.in(), elemID, myDlg->myGeomName->text().to
Latin1
().constData()) );
+ ( myMesh.in(), elemID, myDlg->myGeomName->text().to
Utf8
().constData()) );
}
else
{
GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen();
}
else
{
GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen();
- _PTR(Study) aStudy = SMESH::GetActiveStudyDocument();
- if (geomGen->_is_nil()
|| !aStudy
)
+ if (geomGen->_is_nil())
return;
GEOM::GEOM_IShapesOperations_wrap aShapesOp =
return;
GEOM::GEOM_IShapesOperations_wrap aShapesOp =
- geomGen->GetIShapesOperations(
aStudy->StudyId()
);
+ geomGen->GetIShapesOperations();
if (aShapesOp->_is_nil() )
return;
TopAbs_ShapeEnum aGroupType = TopAbs_SHAPE;
if (aShapesOp->_is_nil() )
return;
TopAbs_ShapeEnum aGroupType = TopAbs_SHAPE;
- std::map<
double
, GEOM::GEOM_Object_wrap> aGeomObjectsMap;
+ std::map<
int
, GEOM::GEOM_Object_wrap> aGeomObjectsMap;
GEOM::GEOM_Object_wrap aGeomObject;
GEOM::GEOM_Object_var aMeshShape = myMesh->GetShapeToMesh();
GEOM::GEOM_Object_wrap aGeomObject;
GEOM::GEOM_Object_var aMeshShape = myMesh->GetShapeToMesh();
@@
-343,7
+342,7
@@
void SMESHGUI_ShapeByMeshOp::commitOperation()
if (aGeomObject->_is_nil()) continue;
if (aGeomObject->_is_nil()) continue;
-
double
anId = aShapesOp->GetSubShapeIndex(aMeshShape, aGeomObject);
+
int
anId = aShapesOp->GetSubShapeIndex(aMeshShape, aGeomObject);
if (aShapesOp->IsDone() && !aGeomObjectsMap.count(anId) )
{
aGeomObjectsMap[anId] = aGeomObject;
if (aShapesOp->IsDone() && !aGeomObjectsMap.count(anId) )
{
aGeomObjectsMap[anId] = aGeomObject;
@@
-364,7
+363,7
@@
void SMESHGUI_ShapeByMeshOp::commitOperation()
else if (aNumberOfGO > 1)
{
GEOM::GEOM_IGroupOperations_wrap aGroupOp =
else if (aNumberOfGO > 1)
{
GEOM::GEOM_IGroupOperations_wrap aGroupOp =
- geomGen->GetIGroupOperations(
aStudy->StudyId()
);
+ geomGen->GetIGroupOperations();
if(aGroupOp->_is_nil())
return;
if(aGroupOp->_is_nil())
return;
@@
-372,13
+371,13
@@
void SMESHGUI_ShapeByMeshOp::commitOperation()
aGeomObjects->length( aNumberOfGO );
int i = 0;
aGeomObjects->length( aNumberOfGO );
int i = 0;
- std::map<
double
, GEOM::GEOM_Object_wrap>::iterator anIter;
+ std::map<
int
, GEOM::GEOM_Object_wrap>::iterator anIter;
for (anIter = aGeomObjectsMap.begin(); anIter!=aGeomObjectsMap.end(); anIter++)
for (anIter = aGeomObjectsMap.begin(); anIter!=aGeomObjectsMap.end(); anIter++)
- aGeomObjects[i++] =
(*anIter).second.in(
);
+ aGeomObjects[i++] =
GEOM::GEOM_Object::_duplicate( (*anIter).second.in()
);
//create geometry group
aGeomObject = aGroupOp->CreateGroup(aMeshShape, aGroupType);
//create geometry group
aGeomObject = aGroupOp->CreateGroup(aMeshShape, aGroupType);
- aGroupOp->UnionList(
myGeomObj
, aGeomObjects);
+ aGroupOp->UnionList(
aGeomObject
, aGeomObjects);
if (!aGroupOp->IsDone())
return;
if (!aGroupOp->IsDone())
return;
@@
-386,10
+385,9
@@
void SMESHGUI_ShapeByMeshOp::commitOperation()
// publish the GEOM object in study
QString aNewGeomGroupName ( myDlg->myGeomName->text() );
// publish the GEOM object in study
QString aNewGeomGroupName ( myDlg->myGeomName->text() );
- SALOMEDS::Study_var aStudyVar = _CAST(Study,aStudy)->GetStudy();
SALOMEDS::SObject_wrap aNewGroupSO =
SALOMEDS::SObject_wrap aNewGroupSO =
- geomGen->AddInStudy( a
StudyVar, aGeomObject,
- aNewGeomGroupName.to
Latin1
().data(), aMeshShape);
+ geomGen->AddInStudy( a
GeomObject,
+ aNewGeomGroupName.to
Utf8
().data(), aMeshShape);
// get a GEOM_Object already published, which doesn't need UnRegister()
CORBA::Object_var obj = aNewGroupSO->GetObject();
// get a GEOM_Object already published, which doesn't need UnRegister()
CORBA::Object_var obj = aNewGroupSO->GetObject();
@@
-420,7
+418,7
@@
void SMESHGUI_ShapeByMeshOp::onSelectionDone()
try {
SALOME_ListIO aList;
try {
SALOME_ListIO aList;
- selectionMgr()->selectedObjects(aList
, SVTK_Viewer::Type()
);
+ selectionMgr()->selectedObjects(aList);
if (!myIsMultipleAllowed && aList.Extent() != 1)
return;
if (!myIsMultipleAllowed && aList.Extent() != 1)
return;