X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESH%2FSMESH_Group.cxx;h=49cade1223924104ee1c0c85f9a352a78249b56e;hb=2850e5f7ba27175aaa4af13a3f5d268b40c6d53f;hp=da29a298927caec6fc3f566d1e9ca7a668e1195f;hpb=bc37f0b49f9713347749b6325e1c7062de8857ae;p=modules%2Fsmesh.git diff --git a/src/SMESH/SMESH_Group.cxx b/src/SMESH/SMESH_Group.cxx index da29a2989..49cade122 100644 --- a/src/SMESH/SMESH_Group.cxx +++ b/src/SMESH/SMESH_Group.cxx @@ -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); } //=============================================================================