Restore usage of GenericObject wraper ( _wrap )

This commit is contained in:
eap 2020-02-21 21:19:12 +03:00
parent dfcc0eb72b
commit afef8ccaa7
7 changed files with 15 additions and 15 deletions

View File

@ -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_ptr aGroupOp =
GEOM::GEOM_IGroupOperations_wrap aGroupOp =
_geomEngine->GetIGroupOperations();
ShapeType= (TopAbs_ShapeEnum)aGroupOp->GetType(aShape);
}

View File

@ -1063,7 +1063,7 @@ bool SMESHGUI_GroupDlg::onApply()
if (geomGen->_is_nil())
return false;
GEOM::GEOM_IGroupOperations_ptr op = geomGen->GetIGroupOperations();
GEOM::GEOM_IGroupOperations_wrap op = geomGen->GetIGroupOperations();
if (op->_is_nil())
return false;
@ -1414,7 +1414,7 @@ void SMESHGUI_GroupDlg::onObjectSelectionChanged()
GEOM::GEOM_Object_var aGroupMainShape;
if (aGeomGroup->GetType() == 37)
{
GEOM::GEOM_IGroupOperations_ptr anOp =
GEOM::GEOM_IGroupOperations_wrap anOp =
SMESH::GetGEOMGen( aGeomGroup )->GetIGroupOperations();
aGroupMainShape = anOp->GetMainShape( aGeomGroup );
// aGroupMainShape is an existing servant => GEOM_Object_var not GEOM_Object_wrap
@ -2012,7 +2012,7 @@ void SMESHGUI_GroupDlg::onAdd()
}
else if ( myCurrentLineEdit == myGeomGroupLine && myGeomObjects->length() == 1 )
{
GEOM::GEOM_IGroupOperations_ptr aGroupOp =
GEOM::GEOM_IGroupOperations_wrap aGroupOp =
SMESH::GetGEOMGen( myGeomObjects[0] )->GetIGroupOperations();
SMESH::ElementType aGroupType = SMESH::ALL;

View File

@ -225,7 +225,7 @@ SMESH::ElementType SMESHGUI_GroupOnShapeOp::ElementType(GEOM::GEOM_Object_var ge
if ( geom->GetType() == 37 ) // geom group
{
GEOM::GEOM_IGroupOperations_ptr aGroupOp = geomGen->GetIGroupOperations();
GEOM::GEOM_IGroupOperations_wrap aGroupOp = geomGen->GetIGroupOperations();
if ( !aGroupOp->_is_nil() ) {
// mainShape is an existing servant => GEOM_Object_var not GEOM_Object_wrap
GEOM::GEOM_Object_var mainShape = aGroupOp->GetMainShape( geom );

View File

@ -349,7 +349,7 @@ bool SMESHGUI_MeshOp::isSubshapeOk() const
GEOM::GEOM_Gen_var geomGen = mainGeom->GetGen();
if (geomGen->_is_nil()) return false;
GEOM::GEOM_IGroupOperations_ptr op = geomGen->GetIGroupOperations();
GEOM::GEOM_IGroupOperations_wrap op = geomGen->GetIGroupOperations();
if (op->_is_nil()) return false;
// check all selected shapes
@ -2140,7 +2140,7 @@ bool SMESHGUI_MeshOp::createSubMesh( QString& theMess, QStringList& theEntryList
// create a GEOM group
GEOM::GEOM_Gen_var geomGen = mainGeom->GetGen();
if ( !geomGen->_is_nil() ) {
GEOM::GEOM_IGroupOperations_ptr op = geomGen->GetIGroupOperations();
GEOM::GEOM_IGroupOperations_wrap op = geomGen->GetIGroupOperations();
if ( !op->_is_nil() )
{
// check and add all selected GEOM objects: they must be

View File

@ -360,7 +360,7 @@ void SMESHGUI_ShapeByMeshOp::commitOperation()
}
else if (aNumberOfGO > 1)
{
GEOM::GEOM_IGroupOperations_ptr aGroupOp = geomGen->GetIGroupOperations();
GEOM::GEOM_IGroupOperations_wrap aGroupOp = geomGen->GetIGroupOperations();
if ( aGroupOp->_is_nil() )
return;

View File

@ -3296,7 +3296,7 @@ namespace // utils for CopyMeshWithGeom()
{
int groupType = getShapeType( myNewMesh_i, newIndices[0] );
GEOM::GEOM_IGroupOperations_ptr grOp = geomGen->GetIGroupOperations();
GEOM::GEOM_IGroupOperations_wrap grOp = geomGen->GetIGroupOperations();
newShape = grOp->CreateGroup( mainShapeNew, groupType );
GEOM::ListOfLong_var newIndicesList = new GEOM::ListOfLong();

View File

@ -2028,9 +2028,9 @@ void SMESH_Mesh_i::addGeomGroupData(GEOM::GEOM_Object_ptr theGeomObj,
if ( groupSO->_is_nil() )
return;
// group indices
GEOM::GEOM_Gen_var geomGen = _gen_i->GetGeomEngine( theGeomObj );
GEOM::GEOM_IGroupOperations_ptr groupOp = geomGen->GetIGroupOperations();
GEOM::ListOfLong_var ids = groupOp->GetObjects( theGeomObj );
GEOM::GEOM_Gen_var geomGen = _gen_i->GetGeomEngine( theGeomObj );
GEOM::GEOM_IGroupOperations_wrap groupOp = geomGen->GetIGroupOperations();
GEOM::ListOfLong_var ids = groupOp->GetObjects( theGeomObj );
// store data
_geomGroupData.push_back( TGeomGroupData() );
@ -2104,9 +2104,9 @@ TopoDS_Shape SMESH_Mesh_i::newGroupShape( TGeomGroupData & groupData, int how )
// get indices of group items
set<int> curIndices;
GEOM::GEOM_Gen_var geomGen = _gen_i->GetGeomEngine( geomGroup );
GEOM::GEOM_IGroupOperations_ptr groupOp = geomGen->GetIGroupOperations();
GEOM::ListOfLong_var ids = groupOp->GetObjects( geomGroup );
GEOM::GEOM_Gen_var geomGen = _gen_i->GetGeomEngine( geomGroup );
GEOM::GEOM_IGroupOperations_wrap groupOp = geomGen->GetIGroupOperations();
GEOM::ListOfLong_var ids = groupOp->GetObjects( geomGroup );
for ( CORBA::ULong i = 0; i < ids->length(); ++i )
curIndices.insert( ids[i] );