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

iulian at mcs.anl.gov iulian at mcs.anl.gov
Sat Apr 2 22:55:46 CDT 2011


Author: iulian
Date: 2011-04-02 22:55:42 -0500 (Sat, 02 Apr 2011)
New Revision: 4712

Modified:
   MOAB/trunk/src/FBEngine.cpp
   MOAB/trunk/src/GeomTopoTool.cpp
Log:
use the new sense conventions in facet based geometry
correct the logic when an edge has multiple faces (correct previous 
commit). 


Modified: MOAB/trunk/src/FBEngine.cpp
===================================================================
--- MOAB/trunk/src/FBEngine.cpp	2011-04-02 20:22:34 UTC (rev 4711)
+++ MOAB/trunk/src/FBEngine.cpp	2011-04-03 03:55:42 UTC (rev 4712)
@@ -727,39 +727,17 @@
   ErrorCode rval = _my_geomTopoTool->get_senses(mbedge, faces, senses);
   if (MB_SUCCESS != rval)
     return rval;
-  //
-  int index = -1;
 
-  bool sense_forward = false;
-  bool sense_reverse = false;
   for (unsigned int i = 0; i < faces.size(); i++)
   {
     if (faces[i] == mbface)
     {
-      index = i;
-      if (senses[i] == 0)
-        sense_forward = true;
-      else
-        sense_reverse = true;
+      sense_out = senses[i];
+      return MB_SUCCESS;
     }
   }
-  if (index == -1)
-  {
-    return MB_FAILURE;
-  }
+  return MB_FAILURE;
 
-  // 0 is not possible for us, but maybe we should consider this?
-  if (sense_forward && sense_reverse)
-    sense_out = 0; // is it really possible for a nice geometry ?
-  else
-  {
-    if (sense_forward) // only sense forward
-      sense_out = 1;
-    else if (sense_reverse)
-      sense_out = -1;
-  }
-  return MB_SUCCESS;
-
 }
 // we assume the measures array was allocated correctly
 ErrorCode FBEngine::measure(const EntityHandle * moab_entities,

Modified: MOAB/trunk/src/GeomTopoTool.cpp
===================================================================
--- MOAB/trunk/src/GeomTopoTool.cpp	2011-04-02 20:22:34 UTC (rev 4711)


More information about the moab-dev mailing list