[MOAB-dev] r1188 - in MOAB/trunk/tools/iMesh: . SIDL/mserver

tautges at mcs.anl.gov tautges at mcs.anl.gov
Fri Jul 6 14:16:17 CDT 2007


Author: tautges
Date: 2007-07-06 14:16:17 -0500 (Fri, 06 Jul 2007)
New Revision: 1188

Modified:
   MOAB/trunk/tools/iMesh/SIDL/mserver/Makefile.am
   MOAB/trunk/tools/iMesh/iMesh_MOAB.cpp
Log:
Fixing bug in iMesh_getEntities, when there are sets being
filtered out of output (# entities was not being adjusted
correctly).

Slight change to make variable in Makefile.am to get configure-set
value.



Modified: MOAB/trunk/tools/iMesh/SIDL/mserver/Makefile.am
===================================================================
--- MOAB/trunk/tools/iMesh/SIDL/mserver/Makefile.am	2007-07-06 17:05:42 UTC (rev 1187)
+++ MOAB/trunk/tools/iMesh/SIDL/mserver/Makefile.am	2007-07-06 19:16:17 UTC (rev 1188)
@@ -1,4 +1,4 @@
-INCLUDES += -I at BABEL_DIR@/include -I$(srcdir)/..
+INCLUDES += -I at BABEL_DIR@/include -I at srcdir@/..
 
 BUILT_SOURCES = $(libiMeshserver_la_SOURCES) $(libiMeshserver_la_include_HEADERS)
 

Modified: MOAB/trunk/tools/iMesh/iMesh_MOAB.cpp
===================================================================
--- MOAB/trunk/tools/iMesh/iMesh_MOAB.cpp	2007-07-06 17:05:42 UTC (rev 1187)
+++ MOAB/trunk/tools/iMesh/iMesh_MOAB.cpp	2007-07-06 19:16:17 UTC (rev 1188)
@@ -601,7 +601,7 @@
   bool use_top = false;
   bool use_type = false;
     // initialize just to get rid of compiler warning
-  MBEntityType type = mb_topology_table[iBase_ALL_TYPES];
+  MBEntityType type = mb_topology_table[iMesh_ALL_TOPOLOGIES];
   MBRange out_entities;
  
   if (entity_topology >= iMesh_POINT
@@ -646,15 +646,15 @@
   if (iBase_ALL_TYPES == entity_type && iMesh_ALL_TOPOLOGIES == entity_topology) {
     for (; iter != end_iter && MBI->type_from_handle(*iter) != MBENTITYSET; iter++)
       (*entity_handles)[k++] = (iBase_EntityHandle)*iter;
-    *entity_handles_size = k;
   }
   else {
     for (; iter != end_iter; iter++)
       (*entity_handles)[k++] = (iBase_EntityHandle)*iter;
   }
 
-    // now it's safe to set the size
-  *entity_handles_size = out_entities.size();
+    // now it's safe to set the size; set it to k, not out_entities.size(), to
+    // account for sets which might have been removed
+  *entity_handles_size = k;
 
   RETURN(iBase_SUCCESS);
 }




More information about the moab-dev mailing list