//
#include "SMESH_OctreeNode.hxx"
-#include "SMDS_MeshNode.hxx"
#include "SMDS_SetIterator.hxx"
#include <gp_Pnt.hxx>
* \param minBoxSize - Minimal size of the Octree Box
*/
//================================================================
-SMESH_OctreeNode::SMESH_OctreeNode (const set<const SMDS_MeshNode*> & theNodes, const int maxLevel,
+SMESH_OctreeNode::SMESH_OctreeNode (const TIDSortedNodeSet & theNodes, const int maxLevel,
const int maxNbNodes , const double minBoxSize )
:SMESH_Octree( new SMESH_Octree::Limit( maxLevel,minBoxSize)),
myMaxNbNodes(maxNbNodes),
Bnd_B3d* SMESH_OctreeNode::buildRootBox()
{
Bnd_B3d* box = new Bnd_B3d;
- set<const SMDS_MeshNode*>::iterator it = myNodes.begin();
+ TIDSortedNodeSet::iterator it = myNodes.begin();
for (; it != myNodes.end(); it++) {
const SMDS_MeshNode* n1 = *it;
gp_XYZ p1( n1->X(), n1->Y(), n1->Z() );
gp_XYZ max = getBox().CornerMax();
gp_XYZ mid = (min + max)/2.;
- set<const SMDS_MeshNode*>::iterator it = myNodes.begin();
+ TIDSortedNodeSet::iterator it = myNodes.begin();
while (it != myNodes.end())
{
const SMDS_MeshNode* n1 = *it;
{
double minDist = precision * precision;
gp_Pnt p1 ( node->X(), node->Y(), node->Z() );
- set<const SMDS_MeshNode*>::iterator nIt = myNodes.begin();
+ TIDSortedNodeSet::iterator nIt = myNodes.begin();
for ( ; nIt != myNodes.end(); ++nIt )
{
gp_Pnt p2 ( (*nIt)->X(), (*nIt)->Y(), (*nIt)->Z() );
* \param maxNbNodes - maximum Nodes in a Leaf of the SMESH_OctreeNode constructed, default value is 5
*/
//=============================
-void SMESH_OctreeNode::FindCoincidentNodes (set<const SMDS_MeshNode*>& theSetOfNodes,
+void SMESH_OctreeNode::FindCoincidentNodes (TIDSortedNodeSet& theSetOfNodes,
list< list< const SMDS_MeshNode*> >* theGroupsOfNodes,
const double theTolerance,
const int maxLevel,
* \param theGroupsOfNodes - list of nodes closed to each other returned
*/
//=============================
-void SMESH_OctreeNode::FindCoincidentNodes ( set<const SMDS_MeshNode*>* theSetOfNodes,
+void SMESH_OctreeNode::FindCoincidentNodes ( TIDSortedNodeSet* theSetOfNodes,
const double theTolerance,
list< list< const SMDS_MeshNode*> >* theGroupsOfNodes)
{
- set<const SMDS_MeshNode*>::iterator it1 = theSetOfNodes->begin();
+ TIDSortedNodeSet::iterator it1 = theSetOfNodes->begin();
list<const SMDS_MeshNode*>::iterator it2;
while (it1 != theSetOfNodes->end())
*/
//======================================================================================
void SMESH_OctreeNode::FindCoincidentNodes (const SMDS_MeshNode * Node,
- set<const SMDS_MeshNode*>* SetOfNodes,
+ TIDSortedNodeSet* SetOfNodes,
list<const SMDS_MeshNode*>* Result,
const double precision)
{
{
gp_Pnt p1 (Node->X(), Node->Y(), Node->Z());
- set<const SMDS_MeshNode*> myNodesCopy = myNodes;
- set<const SMDS_MeshNode*>::iterator it = myNodesCopy.begin();
+ TIDSortedNodeSet myNodesCopy = myNodes;
+ TIDSortedNodeSet::iterator it = myNodesCopy.begin();
double tol2 = precision * precision;
bool squareBool;
{
if ( isLeaf() )
{
- set<const SMDS_MeshNode*>::iterator pNode = myNodes.find( node );
+ TIDSortedNodeSet::iterator pNode = myNodes.find( node );
bool nodeInMe = ( pNode != myNodes.end() );
SMDS_MeshNode pointNode( toPnt.X(), toPnt.Y(), toPnt.Z() );
SMDS_NodeIteratorPtr SMESH_OctreeNode::GetNodeIterator()
{
return SMDS_NodeIteratorPtr
- ( new SMDS_SetIterator< SMDS_pNode, set< SMDS_pNode >::const_iterator >
+ ( new SMDS_SetIterator< SMDS_pNode, TIDSortedNodeSet::const_iterator >
( myNodes.begin(), myNodes.size() ? myNodes.end() : myNodes.begin()));
}