From: eap Date: Wed, 28 Feb 2007 09:39:33 +0000 (+0000) Subject: PAL13460 (force the mesh to go through a point) X-Git-Tag: V3_2_6a1~41 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f79cff562c7e4953e4f10a4f2384c77a37f810e0;p=modules%2Fsmesh.git PAL13460 (force the mesh to go through a point) improve getBox() and setBox() --- diff --git a/src/SMESH/SMESH_Octree.cxx b/src/SMESH/SMESH_Octree.cxx index eb8a7ec82..93d241c7e 100644 --- a/src/SMESH/SMESH_Octree.cxx +++ b/src/SMESH/SMESH_Octree.cxx @@ -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; } //===========================================================================