-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2015 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
// 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
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();
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;
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++)
- aGeomObjects[i++] = (*anIter).second.in();
+ aGeomObjects[i++] = GEOM::GEOM_Object::_duplicate( (*anIter).second.in() );
//create geometry group
aGeomObject = aGroupOp->CreateGroup(aMeshShape, aGroupType);
- aGroupOp->UnionList(myGeomObj, aGeomObjects);
+ aGroupOp->UnionList(aGeomObject, aGeomObjects);
if (!aGroupOp->IsDone())
return;
try {
SALOME_ListIO aList;
- selectionMgr()->selectedObjects(aList, SVTK_Viewer::Type());
+ selectionMgr()->selectedObjects(aList);
if (!myIsMultipleAllowed && aList.Extent() != 1)
return;