-// Copyright (C) 2007-2019 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2020 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
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;
GEOM::GEOM_Object_var aMeshShape = myMesh->GetShapeToMesh();
GEOM::GEOM_Object_wrap aGroupVar = op->CreateGroup(aMeshShape, aGroupType);
+ if ( aGroupVar->_is_nil() )
+ return false;
op->UnionList(aGroupVar, myGeomObjects);
if (op->IsDone()) {
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
}
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;