From: mpv Date: Mon, 30 Dec 2019 14:13:14 +0000 (+0300) Subject: Implementation of Groups support by the SHAPER-STUDY module X-Git-Tag: V9_5_0a1~5^2~19 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2b3c553f4facafcea7cb1b2f23ab4b91b64771df;p=modules%2Fsmesh.git Implementation of Groups support by the SHAPER-STUDY module --- diff --git a/src/PluginUtils/GeomSelectionTools.cxx b/src/PluginUtils/GeomSelectionTools.cxx index 936afcb31..ddf87e5ea 100644 --- a/src/PluginUtils/GeomSelectionTools.cxx +++ b/src/PluginUtils/GeomSelectionTools.cxx @@ -213,7 +213,7 @@ TopAbs_ShapeEnum GeomSelectionTools::entryToShapeType(std::string entry){ // if the Geom Object is a group if (aShape->GetType() == GEOM_GROUP){ // MESSAGE("It's a group"); - GEOM::GEOM_IGroupOperations_wrap aGroupOp = + GEOM::GEOM_IGroupOperations_ptr aGroupOp = _geomEngine->GetIGroupOperations(); ShapeType= (TopAbs_ShapeEnum)aGroupOp->GetType(aShape); } diff --git a/src/SMESHGUI/SMESHGUI_GroupDlg.cxx b/src/SMESHGUI/SMESHGUI_GroupDlg.cxx index eb3ad132b..ad5bddd51 100644 --- a/src/SMESHGUI/SMESHGUI_GroupDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_GroupDlg.cxx @@ -1064,7 +1064,7 @@ bool SMESHGUI_GroupDlg::onApply() if (geomGen->_is_nil()) return false; - GEOM::GEOM_IGroupOperations_wrap op = geomGen->GetIGroupOperations(); + GEOM::GEOM_IGroupOperations_ptr op = geomGen->GetIGroupOperations(); if (op->_is_nil()) return false; @@ -1411,7 +1411,7 @@ void SMESHGUI_GroupDlg::onObjectSelectionChanged() // The main shape of the group GEOM::GEOM_Object_var aGroupMainShape; if (aGeomGroup->GetType() == 37) { - GEOM::GEOM_IGroupOperations_wrap anOp = + GEOM::GEOM_IGroupOperations_ptr anOp = SMESH::GetGEOMGen()->GetIGroupOperations(); aGroupMainShape = anOp->GetMainShape(aGeomGroup); // aGroupMainShape is an existing servant => GEOM_Object_var not GEOM_Object_wrap @@ -2001,7 +2001,7 @@ void SMESHGUI_GroupDlg::onAdd() onListSelectionChanged(); } else if (myCurrentLineEdit == myGeomGroupLine && myGeomObjects->length() == 1) { - GEOM::GEOM_IGroupOperations_wrap aGroupOp = + GEOM::GEOM_IGroupOperations_ptr aGroupOp = SMESH::GetGEOMGen()->GetIGroupOperations(); SMESH::ElementType aGroupType = SMESH::ALL; diff --git a/src/SMESHGUI/SMESHGUI_GroupOnShapeDlg.cxx b/src/SMESHGUI/SMESHGUI_GroupOnShapeDlg.cxx index 6a0f17d33..be3d90ff4 100644 --- a/src/SMESHGUI/SMESHGUI_GroupOnShapeDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_GroupOnShapeDlg.cxx @@ -224,7 +224,7 @@ static SMESH::ElementType elementType(GEOM::GEOM_Object_var geom) SMESH::GetGEOMGen()->GetIShapesOperations(); if ( geom->GetType() == 37 ) { // geom group - GEOM::GEOM_IGroupOperations_wrap aGroupOp = + GEOM::GEOM_IGroupOperations_ptr aGroupOp = SMESH::GetGEOMGen()->GetIGroupOperations(); if ( !aGroupOp->_is_nil() ) { // mainShape is an existing servant => GEOM_Object_var not GEOM_Object_wrap diff --git a/src/SMESHGUI/SMESHGUI_MeshOp.cxx b/src/SMESHGUI/SMESHGUI_MeshOp.cxx index 443a8a86f..9e30fe25a 100644 --- a/src/SMESHGUI/SMESHGUI_MeshOp.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshOp.cxx @@ -338,10 +338,10 @@ bool SMESHGUI_MeshOp::isSubshapeOk() const myDlg->selectedObject(SMESHGUI_MeshDlg::Geom, aGEOMs); if (aGEOMs.count() > 0) { - GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen(); + GEOM::GEOM_Gen_var geomGen = mainGeom->GetGen(); if (geomGen->_is_nil()) return false; - GEOM::GEOM_IGroupOperations_wrap op = geomGen->GetIGroupOperations(); + GEOM::GEOM_IGroupOperations_ptr op = geomGen->GetIGroupOperations(); if (op->_is_nil()) return false; // check all selected shapes @@ -1856,7 +1856,7 @@ bool SMESHGUI_MeshOp::createSubMesh( QString& theMess, QStringList& theEntryList // create a GEOM group GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen(); if (!geomGen->_is_nil()) { - GEOM::GEOM_IGroupOperations_wrap op = + GEOM::GEOM_IGroupOperations_ptr op = geomGen->GetIGroupOperations(); if (!op->_is_nil()) { // check and add all selected GEOM objects: they must be diff --git a/src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.cxx b/src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.cxx index 6647f4cdc..4ce31d65b 100644 --- a/src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.cxx @@ -362,7 +362,7 @@ void SMESHGUI_ShapeByMeshOp::commitOperation() } else if (aNumberOfGO > 1) { - GEOM::GEOM_IGroupOperations_wrap aGroupOp = + GEOM::GEOM_IGroupOperations_ptr aGroupOp = geomGen->GetIGroupOperations(); if(aGroupOp->_is_nil()) return; diff --git a/src/SMESH_I/SMESH_Gen_i.cxx b/src/SMESH_I/SMESH_Gen_i.cxx index 3003a0a52..2255f5823 100644 --- a/src/SMESH_I/SMESH_Gen_i.cxx +++ b/src/SMESH_I/SMESH_Gen_i.cxx @@ -3190,7 +3190,7 @@ namespace // utils for CopyMeshWithGeom() { int groupType = getShapeType( myNewMesh_i, newIndices[0] ); - GEOM::GEOM_IGroupOperations_wrap grOp = geomGen->GetIGroupOperations(); + GEOM::GEOM_IGroupOperations_ptr grOp = geomGen->GetIGroupOperations(); newShape = grOp->CreateGroup( mainShapeNew, groupType ); GEOM::ListOfLong_var newIndicesList = new GEOM::ListOfLong(); diff --git a/src/SMESH_I/SMESH_Mesh_i.cxx b/src/SMESH_I/SMESH_Mesh_i.cxx index 0f7ce9646..cb57e77f4 100644 --- a/src/SMESH_I/SMESH_Mesh_i.cxx +++ b/src/SMESH_I/SMESH_Mesh_i.cxx @@ -1999,7 +1999,7 @@ void SMESH_Mesh_i::addGeomGroupData(GEOM::GEOM_Object_ptr theGeomObj, return; // group indices GEOM::GEOM_Gen_var geomGen = _gen_i->GetGeomEngine( theGeomObj ); - GEOM::GEOM_IGroupOperations_wrap groupOp = + GEOM::GEOM_IGroupOperations_ptr groupOp = geomGen->GetIGroupOperations(); GEOM::ListOfLong_var ids = groupOp->GetObjects( theGeomObj ); @@ -2058,7 +2058,7 @@ TopoDS_Shape SMESH_Mesh_i::newGroupShape( TGeomGroupData & groupData) // get indices of group items set curIndices; GEOM::GEOM_Gen_var geomGen = _gen_i->GetGeomEngine( geomGroup ); - GEOM::GEOM_IGroupOperations_wrap groupOp = + GEOM::GEOM_IGroupOperations_ptr groupOp = geomGen->GetIGroupOperations(); GEOM::ListOfLong_var ids = groupOp->GetObjects( geomGroup ); for ( CORBA::ULong i = 0; i < ids->length(); ++i )