Salome HOME
Merge with version on tag OCC-V2_1_0d
[modules/smesh.git] / src / SMESH / SMESH_Group.cxx
index da29a298927caec6fc3f566d1e9ca7a668e1195f..49cade1223924104ee1c0c85f9a352a78249b56e 100644 (file)
 //  Module : SMESH
 //  $Header$
 
-#include <SMESH_Group.hxx>
-#include <SMESH_Mesh.hxx>
-#include <SMESHDS_Group.hxx>
+#include "SMESH_Group.hxx"
+#include "SMESH_Mesh.hxx"
+#include "SMESHDS_Group.hxx"
+#include "SMESHDS_GroupOnGeom.hxx"
 
 //=============================================================================
 /*!
  */
 //=============================================================================
 
-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<SMESH_Mesh*>(theMesh)->GetMeshDS(), theType);
+  if ( theShape.IsNull() )
+    myGroupDS = new SMESHDS_Group (theID,
+                                   const_cast<SMESH_Mesh*>(theMesh)->GetMeshDS(),
+                                   theType);
+  else
+    myGroupDS = new SMESHDS_GroupOnGeom (theID,
+                                         const_cast<SMESH_Mesh*>(theMesh)->GetMeshDS(),
+                                         theType,
+                                         theShape);
 }
 
 //=============================================================================