[MOAB-dev] r4231 - MOAB/trunk/itaps/igeom

iulian at mcs.anl.gov iulian at mcs.anl.gov
Wed Oct 20 22:49:34 CDT 2010


Author: iulian
Date: 2010-10-20 22:49:33 -0500 (Wed, 20 Oct 2010)
New Revision: 4231

Modified:
   MOAB/trunk/itaps/igeom/SmoothFaceEval.cpp
   MOAB/trunk/itaps/igeom/iGeom_MOAB.cpp
Log:
the obb tree needs to be constructed before getting the root for a 
geometric surface  :) 
the performance was very bad, as the tree root retrieved in the constructor of
SmoothFace was NULL; a lot of triangles were verified



Modified: MOAB/trunk/itaps/igeom/SmoothFaceEval.cpp
===================================================================
--- MOAB/trunk/itaps/igeom/SmoothFaceEval.cpp	2010-10-20 23:04:37 UTC (rev 4230)
+++ MOAB/trunk/itaps/igeom/SmoothFaceEval.cpp	2010-10-21 03:49:33 UTC (rev 4231)
@@ -58,7 +58,11 @@
    //_mbOut->create_meshset(MESHSET_SET, _oSet); //will contain the
    // get also the obb_root
    if (_my_geomTopoTool)
+   {
       _my_geomTopoTool->get_root(this->_set, _obb_root);
+      if (debug_surf_eval1)
+            _my_geomTopoTool->obb_tree()->stats(_obb_root, std::cout);
+   }
 }
 
 SmoothFaceEval::~SmoothFaceEval() {

Modified: MOAB/trunk/itaps/igeom/iGeom_MOAB.cpp
===================================================================
--- MOAB/trunk/itaps/igeom/iGeom_MOAB.cpp	2010-10-20 23:04:37 UTC (rev 4230)
+++ MOAB/trunk/itaps/igeom/iGeom_MOAB.cpp	2010-10-21 03:49:33 UTC (rev 4231)
@@ -83,6 +83,16 @@
    int numSurfaces = _my_gsets[2].size();
    //SmoothFaceEval ** smthFace = new SmoothFaceEval *[numSurfaces];
    _smthFace = new SmoothFaceEval *[numSurfaces];
+   if (!t_created) {
+      GETGTT(instance);
+      rval = _my_geomTopoTool->construct_obb_trees();
+      if (rval != MB_SUCCESS)
+      { 
+         std::cout << "Failed to construct obb tree.\n";
+         return false;
+      }
+      t_created = true;
+   }
    // there should also be a map from surfaces to evaluators
    //std::map<MBEntityHandle, SmoothFaceEval*> mapSurfaces;
 















More information about the moab-dev mailing list