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

iulian at mcs.anl.gov iulian at mcs.anl.gov
Wed Apr 20 11:00:21 CDT 2011


Author: iulian
Date: 2011-04-20 11:00:21 -0500 (Wed, 20 Apr 2011)
New Revision: 4753

Modified:
   MOAB/trunk/src/GeomTopoTool.cpp
Log:
logic error in retrieving face senses
pointed out by Tim


Modified: MOAB/trunk/src/GeomTopoTool.cpp
===================================================================
--- MOAB/trunk/src/GeomTopoTool.cpp	2011-04-20 13:45:37 UTC (rev 4752)
+++ MOAB/trunk/src/GeomTopoTool.cpp	2011-04-20 16:00:21 UTC (rev 4753)
@@ -687,22 +687,21 @@
       return rval;
     EntityHandle sense_data[2] = { 0, 0 };
     rval = mdbImpl->tag_get_data(sense2Tag, &entity, 1, sense_data);
-    if (MB_SUCCESS != rval) {
+    if (MB_SUCCESS != rval)
       return rval;
-      if (sense_data[0] != 0 && sense_data[1] == sense_data[0]) {
+    if (sense_data[0] != 0 && sense_data[1] == sense_data[0]) {
+      wrt_entities.push_back(sense_data[0]);
+      senses.push_back(0);// both
+    } else {
+      if (sense_data[0] != 0) {
         wrt_entities.push_back(sense_data[0]);
-        senses.push_back(0);// both
-      } else {
-        if (sense_data[0] != 0) {
-          wrt_entities.push_back(sense_data[0]);
-          senses.push_back(1);
-        }
-        if (sense_data[1] != 0) {
-          wrt_entities.push_back(sense_data[1]);
-          senses.push_back(-1);
-        }
-
+        senses.push_back(1);
       }
+      if (sense_data[1] != 0) {
+        wrt_entities.push_back(sense_data[1]);
+        senses.push_back(-1);
+      }
+
     }
 
   }














More information about the moab-dev mailing list