[MOAB-dev] r5071 - MOAB/trunk/src

iulian at mcs.anl.gov iulian at mcs.anl.gov
Mon Jul 25 01:05:56 CDT 2011


Author: iulian
Date: 2011-07-25 01:05:56 -0500 (Mon, 25 Jul 2011)
New Revision: 5071

Modified:
   MOAB/trunk/src/GeomTopoTool.cpp
Log:
get senses filters the results using the model set the entities should
belong to.
initial filtering was introduced because after extracting with mbconvert,
some sense tags values pointing to surfaces not extracted were set to 0.
more filters are needed because the gentities could belong to a different 
model set altogether. 




Modified: MOAB/trunk/src/GeomTopoTool.cpp
===================================================================
--- MOAB/trunk/src/GeomTopoTool.cpp	2011-07-22 21:39:30 UTC (rev 5070)
+++ MOAB/trunk/src/GeomTopoTool.cpp	2011-07-25 06:05:56 UTC (rev 5071)
@@ -728,16 +728,20 @@
   // filter the results with the sets that are in the model at this time
   // this was introduced because extracting some sets (e.g. neumann set, with mbconvert)
   //   from a model would leave some sense tags not defined correctly
+  // also, the geom ent set really needs to be part of the current model set
   unsigned int currentSize =0;
-  Range & possibleEntities = geomRanges[edim+1];
+
   for (unsigned int index=0; index<wrt_entities.size(); index++)
   {
     EntityHandle wrt_ent=wrt_entities[index];
-    if (possibleEntities.find(wrt_ent)!=possibleEntities.end() )
+    if (wrt_ent )
     {
-      wrt_entities[currentSize] = wrt_entities[index];
-      senses[currentSize] = senses[index];
-      currentSize++;
+      if (mdbImpl->contains_entities(modelSet, &wrt_ent, 1))
+      {
+        wrt_entities[currentSize] = wrt_entities[index];
+        senses[currentSize] = senses[index];
+        currentSize++;
+      }
     }
   }
   wrt_entities.resize(currentSize);























More information about the moab-dev mailing list