From f79cff562c7e4953e4f10a4f2384c77a37f810e0 Mon Sep 17 00:00:00 2001 From: eap Date: Wed, 28 Feb 2007 09:39:33 +0000 Subject: [PATCH] PAL13460 (force the mesh to go through a point) improve getBox() and setBox() --- src/SMESH/SMESH_Octree.cxx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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; } //=========================================================================== -- 2.39.2