-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2014 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
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
#include <Standard_Stream.hxx>
if ( theShapeType != TopAbs_VERTEX && theShapeType != TopAbs_EDGE &&
theShapeType != TopAbs_FACE && theShapeType != TopAbs_SOLID ) {
- SetErrorCode( "Error: You could create group only next type: vertex, edge, face or solid" );
+ SetErrorCode( "Error: You could create group of only next type: vertex, edge, face or solid" );
return NULL;
}
for (i = 1; i <= aLen; i++) {
Handle(GEOM_Object) aGr_i = Handle(GEOM_Object)::DownCast(theGList->Value(i));
if ( aGr_i->GetType() != GEOM_GROUP ) {
- SetErrorCode( "Error: You could perform this operation only with group. Please select a group." );
- return NULL;
+ SetErrorCode( "Error: You could perform this operation only with group. Please select a group." );
+ return NULL;
}
// Get group type
aType_i = GetType(aGr_i);
{
SetErrorCode(KO);
- if(theGroup.IsNull()) return NULL;
- if ( theGroup->GetType() != GEOM_GROUP ) {
- SetErrorCode( "Error: You could perform this operation only with group. Please select a group." );
+ if (theGroup.IsNull()) return NULL;
+ if (theGroup->GetType() != GEOM_GROUP &&
+ theGroup->GetType() != GEOM_SUBSHAPE) {
+ SetErrorCode("Error: You could perform this operation only with a group or a sub-shape.");
return NULL;
}
+
Handle(GEOM_Function) aGroupFunction = theGroup->GetFunction(1);
if (aGroupFunction.IsNull()) return NULL;