Salome HOME
PAL12789. Add and use COORD_MIN and COORD_MAX macros
[modules/smesh.git] / src / SMESH / SMESH_Group.cxx
index da29a298927caec6fc3f566d1e9ca7a668e1195f..c0a777b61326a6909efff62deb11eea1fbc8b8d0 100644 (file)
@@ -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
 //
 //
 //
 //  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);
 }
 
 //=============================================================================