X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESH%2FSMESH_Group.cxx;h=c0a777b61326a6909efff62deb11eea1fbc8b8d0;hb=9d574375eec11986641d605770b5bf64dec9a7ed;hp=da29a298927caec6fc3f566d1e9ca7a668e1195f;hpb=bc37f0b49f9713347749b6325e1c7062de8857ae;p=modules%2Fsmesh.git diff --git a/src/SMESH/SMESH_Group.cxx b/src/SMESH/SMESH_Group.cxx index da29a2989..c0a777b61 100644 --- a/src/SMESH/SMESH_Group.cxx +++ b/src/SMESH/SMESH_Group.cxx @@ -16,7 +16,7 @@ // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org or email : webmaster.salome@opencascade.org +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // // @@ -25,9 +25,10 @@ // Module : SMESH // $Header$ -#include -#include -#include +#include "SMESH_Group.hxx" +#include "SMESH_Mesh.hxx" +#include "SMESHDS_Group.hxx" +#include "SMESHDS_GroupOnGeom.hxx" //============================================================================= /*! @@ -35,12 +36,22 @@ */ //============================================================================= -SMESH_Group::SMESH_Group (const SMESH_Mesh* theMesh, +SMESH_Group::SMESH_Group (int theID, + const SMESH_Mesh* theMesh, const SMDSAbs_ElementType theType, - const char* theName) + const char* theName, + const TopoDS_Shape& theShape) : myName(theName) { - myGroupDS = new SMESHDS_Group (const_cast(theMesh)->GetMeshDS(), theType); + if ( theShape.IsNull() ) + myGroupDS = new SMESHDS_Group (theID, + const_cast(theMesh)->GetMeshDS(), + theType); + else + myGroupDS = new SMESHDS_GroupOnGeom (theID, + const_cast(theMesh)->GetMeshDS(), + theType, + theShape); } //=============================================================================