[cgma-dev] r3519 - cgm/trunk/itaps

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Mon Feb 1 15:57:27 CST 2010


Author: kraftche
Date: 2010-02-01 15:57:27 -0600 (Mon, 01 Feb 2010)
New Revision: 3519

Modified:
   cgm/trunk/itaps/iGeom_CGMA.cc
Log:
Fix use of stale pointers in iGeom_mergeEnts when input array contains
entities of mixed dimension:

Need to merge entities of lowest dimension first, proceeding to highest
dimension last.  Otherwise lists of lower-dimension entities can contain
stale handles resulting from deleting those entities as a part of merging
parent entities.


Modified: cgm/trunk/itaps/iGeom_CGMA.cc
===================================================================
--- cgm/trunk/itaps/iGeom_CGMA.cc	2010-02-01 20:16:09 UTC (rev 3518)
+++ cgm/trunk/itaps/iGeom_CGMA.cc	2010-02-01 21:57:27 UTC (rev 3519)
@@ -5996,13 +5996,13 @@
   
   CubitStatus status = CUBIT_SUCCESS, temp_status;
     
-  if (bods.size() != 0) {
-    temp_status = MergeTool::instance()->merge_bodies(bods);
+  if (verts.size() != 0) {
+    temp_status = MergeTool::instance()->merge_refvertices(verts, false);
     if (CUBIT_SUCCESS != temp_status) status = temp_status;
   }
     
-  if (vols.size() != 0) {
-    temp_status = MergeTool::instance()->merge_volumes(vols, false);
+  if (edges.size() != 0) {
+    temp_status = MergeTool::instance()->merge_refedges(edges, true, false);
     if (CUBIT_SUCCESS != temp_status) status = temp_status;
   }
     
@@ -6011,13 +6011,13 @@
     if (CUBIT_SUCCESS != temp_status) status = temp_status;
   }
     
-  if (edges.size() != 0) {
-    temp_status = MergeTool::instance()->merge_refedges(edges, true, false);
+  if (vols.size() != 0) {
+    temp_status = MergeTool::instance()->merge_volumes(vols, false);
     if (CUBIT_SUCCESS != temp_status) status = temp_status;
   }
     
-  if (verts.size() != 0) {
-    temp_status = MergeTool::instance()->merge_refvertices(verts, false);
+  if (bods.size() != 0) {
+    temp_status = MergeTool::instance()->merge_bodies(bods);
     if (CUBIT_SUCCESS != temp_status) status = temp_status;
   }
 



More information about the cgma-dev mailing list