[MOAB-dev] r4395 - in MOAB/trunk: src tools/dagmc
bmsmith6 at wisc.edu
bmsmith6 at wisc.edu
Tue Dec 21 13:50:05 CST 2010
Author: bmsmith
Date: 2010-12-21 13:50:05 -0600 (Tue, 21 Dec 2010)
New Revision: 4395
Modified:
MOAB/trunk/src/OrientedBoxTreeTool.cpp
MOAB/trunk/tools/dagmc/test_geom.cc
Log:
-bug fix: affected DAGMC point_in_volume only if ray trajectory intersected an edge
or node AND overlaps were assumed to exist (0 != overlap_thickness). Fixed by improving
the neighborhood handling for this type of call to ray_intersect_sets.
-added DAGMC test case for this failure mode.
Modified: MOAB/trunk/src/OrientedBoxTreeTool.cpp
===================================================================
--- MOAB/trunk/src/OrientedBoxTreeTool.cpp 2010-12-21 17:09:28 UTC (rev 4394)
+++ MOAB/trunk/src/OrientedBoxTreeTool.cpp 2010-12-21 19:50:05 UTC (rev 4395)
@@ -45,9 +45,10 @@
*\param tri The intersected triangle
*\param ray_direction The direction of the ray
*\param int_type The type of intersection (EDGE0, EDGE1, NODE2, ...)
- *\param close_tris Vector of triangles in the neighborhood of the intersection
- *\param close_senses Vector of surface senses for tris in the neighborhood of
- * the intersection
+ *\param close_tris Vector of triangles in the proximity of the intersection
+ *\param close_senses Vector of surface senses for tris in the proximity of
+ * the intersection
+ *\param neighborhood Vector of triangles in the topological neighborhood of the intersection
*\return True if piercing, false otherwise.
*/
static
@@ -56,7 +57,8 @@
const GeomUtil::intersection_type int_type,
const std::vector<EntityHandle>& close_tris,
const std::vector<int>& close_senses,
- const Interface* MBI ) {
+ const Interface* MBI,
+ std::vector<EntityHandle>* neighborhood_tris = 0 ) {
// get the node of the triangle
const EntityHandle* conn;
@@ -137,6 +139,10 @@
return MB_FAILURE;
}
+ // The close tris were in proximity to the intersection. The adj_tris are
+ // topologically adjacent to the intersection (the neighborhood).
+ if(neighborhood_tris) (*neighborhood_tris).assign( adj_tris.begin(), adj_tris.end() );
+
// determine glancing/piercing
// If a desired_orientation was used in this call to ray_intersect_sets,
// the plucker_ray_tri_intersect will have already used it. For a piercing
@@ -164,7 +170,7 @@
// intersection is glancing if tri and ray do not point in same direction
// for every triangle
- if(0!=sign && 0>sign*norm%ray_direction) return false;
+ if(0!=sign && 0>sign*dot_prod) return false;
}
return true;
@@ -1011,6 +1017,8 @@
unsigned int* raytri_test_count;
EntityHandle lastSet;
More information about the moab-dev
mailing list