[MOAB-dev] r4713 - MOAB/trunk/itaps/igeom

iulian at mcs.anl.gov iulian at mcs.anl.gov
Mon Apr 4 16:43:38 CDT 2011


Author: iulian
Date: 2011-04-04 16:43:38 -0500 (Mon, 04 Apr 2011)
New Revision: 4713

Modified:
   MOAB/trunk/itaps/igeom/iGeom_MOAB.cpp
Log:

sense convention changed, so this has to change too
(similar change to FBEngine)


Modified: MOAB/trunk/itaps/igeom/iGeom_MOAB.cpp
===================================================================
--- MOAB/trunk/itaps/igeom/iGeom_MOAB.cpp	2011-04-03 03:55:42 UTC (rev 4712)
+++ MOAB/trunk/itaps/igeom/iGeom_MOAB.cpp	2011-04-04 21:43:38 UTC (rev 4713)
@@ -1322,39 +1322,18 @@
    ErrorCode rval = _my_geomTopoTool->get_senses( MBH_cast(edge), faces, senses);
    MBERRORR("Failed to get edge senses in iGeom_getEgFcSense.");
    //
-   int index = -1;
-   EntityHandle mbfaceSet = MBH_cast(face);
-   bool sense_forward = false;
-   bool sense_reverse = false;
-   for (unsigned int i = 0; i<faces.size(); i++)
-   {
-      if (faces[i] == mbfaceSet)
+   EntityHandle mbface = MBH_cast(face);
+   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(iBase_SUCCESS);
       }
-   }
-   if (index == -1)
-   {
-      *err = iBase_FAILURE;
-      return;
-   }
+    }
+   *err = iBase_FAILURE;
+   return;
 
-   // 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(iBase_SUCCESS);
-
 }


More information about the moab-dev mailing list