[MOAB-dev] r1234 - MOAB/trunk

kraftche at mcs.anl.gov kraftche at mcs.anl.gov
Wed Aug 15 10:33:58 CDT 2007


Author: kraftche
Date: 2007-08-15 10:33:58 -0500 (Wed, 15 Aug 2007)
New Revision: 1234

Modified:
   MOAB/trunk/MBOrientedBoxTreeTool.cpp
Log:
fix bug in sphere_intersect_triangles: skip contents of leaves that are not triangles

Modified: MOAB/trunk/MBOrientedBoxTreeTool.cpp
===================================================================
--- MOAB/trunk/MBOrientedBoxTreeTool.cpp	2007-08-15 15:32:12 UTC (rev 1233)
+++ MOAB/trunk/MBOrientedBoxTreeTool.cpp	2007-08-15 15:33:58 UTC (rev 1234)
@@ -548,13 +548,22 @@
 # else
     rval = get_moab_instance()->get_entities_by_handle( node, tris );
 # endif
+    t = tris.begin();
 #else
     rval = get_moab_instance()->get_entities_by_handle( node, tris );
+    t = tris.lower_bound( MBTRI );
 #endif
     if (MB_SUCCESS != rval)
       return rval;
     
     for (t = tris.begin(); t != tris.end(); ++t) {
+#ifndef MB_OBB_USE_VECTOR_QUERIES
+      if (TYPE_FROM_HANDLE(*t) != MBTRI)
+        break;
+#elif !defined(MB_OBB_USE_TYPE_QUERIES)
+      if (TYPE_FROM_HANDLE(*t) != MBTRI)
+        continue;
+#endif      
       rval = get_moab_instance()->get_connectivity( *t, conn, num_conn, true );
       if (MB_SUCCESS != rval)
         return rval;




More information about the moab-dev mailing list