Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
23179: EDF 11603 - Problem with extrusion when path is not well oriented
[modules/smesh.git]
/
src
/
SMESHUtils
/
SMESH_OctreeNode.hxx
diff --git
a/src/SMESHUtils/SMESH_OctreeNode.hxx
b/src/SMESHUtils/SMESH_OctreeNode.hxx
index cc66a275b12fa8a7f85ec97a1d7d45ceff5dd559..2cd22a3c544d7230435f3c2184a447dc1bbed89e 100644
(file)
--- a/
src/SMESHUtils/SMESH_OctreeNode.hxx
+++ b/
src/SMESHUtils/SMESH_OctreeNode.hxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-201
2
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-201
5
CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-6,7
+6,7
@@
// 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
// 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.
+// version 2.1 of the License
, or (at your option) any later version
.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
@@
-30,16
+30,17
@@
#ifndef _SMESH_OCTREENODE_HXX_
#define _SMESH_OCTREENODE_HXX_
#ifndef _SMESH_OCTREENODE_HXX_
#define _SMESH_OCTREENODE_HXX_
-#include "SMESH_Utils.hxx"
+#include "SMDS_ElemIterator.hxx"
+#include "SMDS_MeshNode.hxx"
#include "SMESH_Octree.hxx"
#include "SMESH_Octree.hxx"
+#include "SMESH_Utils.hxx"
+
#include <gp_Pnt.hxx>
#include <gp_Pnt.hxx>
-#include "SMDS_MeshNode.hxx"
#include <list>
#include <set>
#include <map>
#include <list>
#include <set>
#include <map>
-
-#include "SMDS_ElemIterator.hxx"
+#include <vector>
//forward declaration
class SMDS_MeshNode;
//forward declaration
class SMDS_MeshNode;
@@
-49,34
+50,35
@@
typedef SMDS_Iterator<SMESH_OctreeNode*> SMESH_OctreeNodeIterator;
typedef boost::shared_ptr<SMESH_OctreeNodeIterator> SMESH_OctreeNodeIteratorPtr;
typedef std::set< const SMDS_MeshNode*, TIDCompare > TIDSortedNodeSet;
typedef boost::shared_ptr<SMESH_OctreeNodeIterator> SMESH_OctreeNodeIteratorPtr;
typedef std::set< const SMDS_MeshNode*, TIDCompare > TIDSortedNodeSet;
-class SMESHUtils_EXPORT SMESH_OctreeNode : public SMESH_Octree
{
-
-public:
+class SMESHUtils_EXPORT SMESH_OctreeNode : public SMESH_Octree
+{
+
public:
// Constructor
SMESH_OctreeNode (const TIDSortedNodeSet& theNodes, const int maxLevel = 8,
const int maxNbNodes = 5, const double minBoxSize = 0.);
// Constructor
SMESH_OctreeNode (const TIDSortedNodeSet& theNodes, const int maxLevel = 8,
const int maxNbNodes = 5, const double minBoxSize = 0.);
-//=============================
-/*!
- * \brief Empty destructor
- */
-//=============================
+ // destructor
virtual ~SMESH_OctreeNode () {};
// Tells us if Node is inside the current box with the precision "precision"
virtual const bool isInside(const gp_XYZ& p, const double precision = 0.);
// Return in Result a list of Nodes potentials to be near Node
virtual ~SMESH_OctreeNode () {};
// Tells us if Node is inside the current box with the precision "precision"
virtual const bool isInside(const gp_XYZ& p, const double precision = 0.);
// Return in Result a list of Nodes potentials to be near Node
- void NodesAround(const SMDS_MeshNode *
N
ode,
- std::list<const SMDS_MeshNode*>*
R
esult,
+ void NodesAround(const SMDS_MeshNode *
n
ode,
+ std::list<const SMDS_MeshNode*>*
r
esult,
const double precision = 0.);
// Return in dist2Nodes nodes mapped to their square distance from Node
const double precision = 0.);
// Return in dist2Nodes nodes mapped to their square distance from Node
- bool NodesAround(const gp_XYZ&
node
,
+ bool NodesAround(const gp_XYZ&
point
,
std::map<double, const SMDS_MeshNode*>& dist2Nodes,
double precision);
std::map<double, const SMDS_MeshNode*>& dist2Nodes,
double precision);
+ // Return a list of Nodes close to a point
+ void NodesAround(const gp_XYZ& point,
+ std::vector<const SMDS_MeshNode*>& nodes,
+ double precision);
+
// Return in theGroupsOfNodes a list of group of nodes close to each other within theTolerance
// Search for all the nodes in nodes
void FindCoincidentNodes ( TIDSortedNodeSet* nodes,
// Return in theGroupsOfNodes a list of group of nodes close to each other within theTolerance
// Search for all the nodes in nodes
void FindCoincidentNodes ( TIDSortedNodeSet* nodes,
@@
-109,7
+111,16
@@
public:
protected:
protected:
- SMESH_OctreeNode (int maxNbNodes );
+ struct Limit : public SMESH_TreeLimit
+ {
+ int myMaxNbNodes;
+ Limit(int maxLevel, double minSize, int maxNbNodes)
+ :SMESH_TreeLimit(maxLevel, minSize), myMaxNbNodes(maxNbNodes) {}
+ };
+
+ int getMaxNbNodes() const;
+
+ SMESH_OctreeNode();
// Compute the bounding box of the whole set of nodes myNodes
virtual Bnd_B3d* buildRootBox();
// Compute the bounding box of the whole set of nodes myNodes
virtual Bnd_B3d* buildRootBox();
@@
-118,7
+129,7
@@
protected:
virtual void buildChildrenData();
// Construct an empty SMESH_OctreeNode used by SMESH_Octree::buildChildren()
virtual void buildChildrenData();
// Construct an empty SMESH_OctreeNode used by SMESH_Octree::buildChildren()
- virtual SMESH_Octree*
allocateOctree
Child() const;
+ virtual SMESH_Octree*
new
Child() const;
// Return in result a list of nodes closed to Node and remove it from SetOfNodes
void FindCoincidentNodes( const SMDS_MeshNode * Node,
// Return in result a list of nodes closed to Node and remove it from SetOfNodes
void FindCoincidentNodes( const SMDS_MeshNode * Node,
@@
-126,9
+137,6
@@
protected:
std::list<const SMDS_MeshNode*>* Result,
const double precision);
std::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)
TIDSortedNodeSet myNodes;
// The set of nodes inside the box of the Octree (Empty if Octree is not a leaf)
TIDSortedNodeSet myNodes;