Salome HOME
0020210: EDF SMESH 976: Update of a smesh group after modification of the associated...
authoreap <eap@opencascade.com>
Fri, 3 Apr 2009 14:21:51 +0000 (14:21 +0000)
committereap <eap@opencascade.com>
Fri, 3 Apr 2009 14:21:51 +0000 (14:21 +0000)
+  void SetShape( const TopoDS_Shape& theShape);

src/SMESHDS/SMESHDS_GroupOnGeom.cxx
src/SMESHDS/SMESHDS_GroupOnGeom.hxx

index 73e1654db6e3b7441998f0d86742b504b62ba7ef..5fae9fda2ff724ab00753a9eec05cd07d2d3aae7 100644 (file)
@@ -22,7 +22,6 @@
 //  SMESH SMESHDS : idl implementation based on 'SMESH' unit's classes
 //  File   : SMESHDS_GroupOnGeom.cxx
 //  Module : SMESH
-//  $Header$
 //
 #include "SMESHDS_GroupOnGeom.hxx"
 #include "SMESHDS_Mesh.hxx"
@@ -40,10 +39,16 @@ SMESHDS_GroupOnGeom::SMESHDS_GroupOnGeom (const int                 theID,
                                           const SMESHDS_Mesh*       theMesh,
                                           const SMDSAbs_ElementType theType,
                                           const TopoDS_Shape&       theShape)
-     : SMESHDS_GroupBase(theID,theMesh,theType), myShape(theShape)
+     : SMESHDS_GroupBase(theID,theMesh,theType)
 {
-  SMESHDS_Mesh* aMesh = const_cast<SMESHDS_Mesh*>(theMesh);
+  SetShape( theShape );
+}
+
+void SMESHDS_GroupOnGeom::SetShape( const TopoDS_Shape& theShape)
+{
+  SMESHDS_Mesh* aMesh = const_cast<SMESHDS_Mesh*>( GetMesh() );
   mySubMesh = aMesh->MeshElements( aMesh->AddCompoundSubmesh( theShape ));
+  myShape   = theShape;
 }
 
 // =====================
index a1fa3cb269aa69083ed43bd2b3ac5887a5c32904..ed01df758b7c61858ee91f37a0f2ef0d3eb4ea12 100644 (file)
@@ -22,7 +22,6 @@
 //  SMESH SMESHDS : management of mesh data and SMESH document
 //  File   : SMESHDS_GroupOnGeom.hxx
 //  Module : SMESH
-//  $Header$
 //
 #ifndef _SMESHDS_GroupOnGeom_HeaderFile
 #define _SMESHDS_GroupOnGeom_HeaderFile
@@ -43,6 +42,8 @@ class SMESHDS_EXPORT SMESHDS_GroupOnGeom: public SMESHDS_GroupBase
                        const SMDSAbs_ElementType theType,
                        const TopoDS_Shape&       theShape);
 
+  void SetShape( const TopoDS_Shape& theShape);
+
   TopoDS_Shape GetShape() const { return myShape; }
 
   virtual bool Contains (const int theID);