mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-06 23:00:34 +05:00
466cf8703a
Sprout from V3_2_0_maintainance 2006-09-08 11:18:59 UTC jfa <jfa@opencascade.com> 'PAL13409: EDF282 SMESH: Tetrahedron is added if we specify Mefisto.' Cherrypick from V3_2_0_maintainance 2007-01-22 15:14:46 UTC admin <salome-admin@opencascade.com> 'This commit was generated by cvs2git to create branch 'V3_2_0_maintainance'.': src/SMESH/SMESH_Octree.cxx src/SMESH/SMESH_Octree.hxx src/SMESH/SMESH_OctreeNode.cxx src/SMESH/SMESH_OctreeNode.hxx Cherrypick from V3_2_0_maintainance 2006-06-08 14:05:10 UTC admin <salome-admin@opencascade.com> 'This commit was generated by cvs2git to create branch 'V3_2_0_maintainance'.': doc/salome/gui/SMESH/pics/a-extusionalongapath2.png doc/salome/tui/SMESH/sources/bg_salome.gif
113 lines
4.2 KiB
C++
113 lines
4.2 KiB
C++
// SMESH SMESH_OctreeNode : Octree with Nodes set
|
|
// inherites global class SMESH_Octree
|
|
//
|
|
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
|
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
|
//
|
|
// This library is free software; you can redistribute it and/or
|
|
// modify it under the terms of the GNU Lesser General Public
|
|
// License as published by the Free Software Foundation; either
|
|
// version 2.1 of the License.
|
|
//
|
|
// This library is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
// Lesser General Public License for more details.
|
|
//
|
|
// You should have received a copy of the GNU Lesser General Public
|
|
// 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.com
|
|
//
|
|
//
|
|
//
|
|
// File : SMESH_OctreeNode.hxx
|
|
// Created : Tue Jan 16 16:00:00 2007
|
|
// Author : Nicolas Geimer & Aurélien Motteux (OCC)
|
|
// Module : SMESH
|
|
|
|
#ifndef _SMESH_OCTREENODE_HXX_
|
|
#define _SMESH_OCTREENODE_HXX_
|
|
|
|
#include "SMESH_Octree.hxx"
|
|
|
|
//forward declaration
|
|
class SMDS_MeshNode;
|
|
|
|
#include <list>
|
|
#include <set>
|
|
|
|
class SMESH_OctreeNode : public SMESH_Octree{
|
|
|
|
public:
|
|
|
|
// Constructor
|
|
SMESH_OctreeNode (set<const SMDS_MeshNode*> theNodes, const int maxLevel = -1,
|
|
const int maxNbNodes = 5 , const double minBoxSize = 0.);
|
|
|
|
//=============================
|
|
/*!
|
|
* \brief Empty destructor
|
|
*/
|
|
//=============================
|
|
virtual ~SMESH_OctreeNode () {};
|
|
|
|
// Tells us if SMESH_OctreeNode is a leaf or not (-1 = not initialiazed)
|
|
virtual const bool isLeaf();
|
|
|
|
// Tells us if Node is inside the current box with the precision "precision"
|
|
virtual const bool isInside(const SMDS_MeshNode * Node, const double precision = 0. );
|
|
|
|
// Return in Result a list of Nodes potentials to be near Node
|
|
void NodesAround( const SMDS_MeshNode * Node , list<const SMDS_MeshNode*>* Result,
|
|
const double precision = 0. );
|
|
|
|
// Return in theGroupsOfNodes a list of group of nodes close to each other within theTolerance
|
|
// Search for all the nodes in nodes
|
|
void FindCoincidentNodes ( set<const SMDS_MeshNode*>* nodes,
|
|
const double theTolerance,
|
|
list< list< const SMDS_MeshNode*> >* theGroupsOfNodes);
|
|
|
|
// Static method that return in theGroupsOfNodes a list of group of nodes close to each other within
|
|
// theTolerance search for all the nodes in nodes
|
|
static void FindCoincidentNodes ( set<const SMDS_MeshNode*> nodes,
|
|
list< list< const SMDS_MeshNode*> >* theGroupsOfNodes,
|
|
const double theTolerance = 0.00001, const int maxLevel = -1,
|
|
const int maxNbNodes = 5);
|
|
|
|
protected:
|
|
|
|
//=============================
|
|
/*!
|
|
* \brief Empty constructor
|
|
*/
|
|
//=============================
|
|
SMESH_OctreeNode (){};
|
|
|
|
// Shares the father's data with each of his child
|
|
virtual void buildChildrenData();
|
|
|
|
// Compute the bounding box of the whole set of nodes myNodes (only used for OctreeNode level 0)
|
|
void computeBoxForFather();
|
|
|
|
// Construct an empty SMESH_OctreeNode used by SMESH_Octree::buildChildren()
|
|
virtual SMESH_Octree* allocateOctreeChild();
|
|
|
|
// Return in result a list of nodes closed to Node and remove it from SetOfNodes
|
|
void FindCoincidentNodes( const SMDS_MeshNode * Node,
|
|
set<const SMDS_MeshNode*>* SetOfNodes,
|
|
list<const SMDS_MeshNode*>* Result,
|
|
const double precision);
|
|
|
|
// The max number of nodes a leaf box can contain
|
|
int myMaxNbNodes;
|
|
|
|
// The set of nodes inside the box of the Octree (Empty if Octree is not a leaf)
|
|
set<const SMDS_MeshNode*> myNodes;
|
|
|
|
// The number of nodes I have inside the box
|
|
int myNbNodes;
|
|
};
|
|
#endif
|