-// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2020 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
#include "SMESH_Utils.hxx"
+const double theEnlargeFactor = 1. + 1e-10;
+
//================================================================================
// Data limiting the tree height
struct SMESH_TreeLimit {
{
if ( !myLimit ) myLimit = new SMESH_TreeLimit();
myBox = buildRootBox();
+ enlargeByFactor( myBox, theEnlargeFactor );
if ( myLimit->myMinBoxSize > 0. && maxSize() <= myLimit->myMinBoxSize )
myIsLeaf = true;
else
myChildren[i]->myLimit = myLimit;
myChildren[i]->myLevel = myLevel + 1;
myChildren[i]->myBox = newChildBox( i );
- enlargeByFactor( myChildren[i]->myBox, 1. + 1e-10 );
+ enlargeByFactor( myChildren[i]->myBox, theEnlargeFactor );
if ( myLimit->myMinBoxSize > 0. && myChildren[i]->maxSize() <= myLimit->myMinBoxSize )
myChildren[i]->myIsLeaf = true;
}
if ( isLeaf() )
return 1;
- int heigth = 0;
+ int height = 0;
for (int i = 0; i<NB_CHILDREN; i++)
{
int h = myChildren[i]->getHeight( false );
- if ( h > heigth )
- heigth = h;
+ if ( h > height )
+ height = h;
}
- return heigth + 1;
+ return height + 1;
}
#endif