Salome HOME
PAL13460 (force the mesh to go through a point)
authoreap <eap@opencascade.com>
Wed, 28 Feb 2007 09:39:33 +0000 (09:39 +0000)
committereap <eap@opencascade.com>
Wed, 28 Feb 2007 09:39:33 +0000 (09:39 +0000)
   improve getBox() and setBox()

src/SMESH/SMESH_Octree.cxx

index eb8a7ec826477d63a2dfb81df52d0421a7182f9d..93d241c7e3232ec29be81313474a3c444e08ec34 100644 (file)
@@ -71,8 +71,9 @@ SMESH_Octree::~SMESH_Octree ()
 //===========================================================================
 void SMESH_Octree::setBox(const Bnd_B3d* box)
 {
-  delete myBox;
-  myBox=new Bnd_B3d(*box);
+//   delete myBox;
+//   myBox=new Bnd_B3d(*box);
+  *myBox = *box;
 }
 
 //===========================================================================
@@ -81,11 +82,12 @@ void SMESH_Octree::setBox(const Bnd_B3d* box)
  * \param box          - Set box to the 3d Bounding Box of the Octree
  */
 //===========================================================================
-void SMESH_Octree::getBox(Bnd_B3d* box)
+void SMESH_Octree::getBox(Bnd_B3d& box)
 {
-  if(box != NULL)
-    delete box;
-  box = new Bnd_B3d (*myBox);
+//   if(box != NULL)
+//     delete box;
+//   box = new Bnd_B3d (*myBox);
+  box = *myBox;
 }
 
 //===========================================================================