[MOAB-dev] r1410 - in MOAB/trunk: . tools/qvdual

tautges at mcs.anl.gov tautges at mcs.anl.gov
Mon Nov 19 11:49:21 CST 2007


Author: tautges
Date: 2007-11-19 11:49:21 -0600 (Mon, 19 Nov 2007)
New Revision: 1410

Modified:
   MOAB/trunk/AEntityFactory.cpp
   MOAB/trunk/DualTool.cpp
   MOAB/trunk/MBCore.cpp
   MOAB/trunk/tools/qvdual/CropTool.cpp
   MOAB/trunk/tools/qvdual/DrawDual.cpp
   MOAB/trunk/tools/qvdual/DrawDual.hpp
   MOAB/trunk/tools/qvdual/vtkMOABUtils.cxx
   MOAB/trunk/tools/qvdual/vtkMOABUtils.h
Log:
qvdual files: removed some unused var's to remove compile warnings;
also cleaned things up a bit for 64-bit operation

AEntityFactory.cpp: when removing an entity, check lower-dimensional
bounding entities for explicit adjacencies too, not just
higher-dimensional ones.

DualTool: more debugging on foc and ap, including better
implementation of split_pair_nonmanifold

MBCore.cpp: in range-based delete_entities, iterate over the range in
reverse, to avoid stale references to lower-dimensional entities.


Modified: MOAB/trunk/AEntityFactory.cpp
===================================================================
--- MOAB/trunk/AEntityFactory.cpp	2007-11-19 17:47:39 UTC (rev 1409)
+++ MOAB/trunk/AEntityFactory.cpp	2007-11-19 17:49:21 UTC (rev 1410)
@@ -467,7 +467,7 @@
         if (adjvect[j] == base_entity)
           remove_this = true;
         
-        if (MBCN::Dimension(TYPE_FROM_HANDLE(adjvect[j])) > base_ent_dim 
+        if (MBCN::Dimension(TYPE_FROM_HANDLE(adjvect[j])) != base_ent_dim 
          && explicitly_adjacent( adjvect[j], base_entity )) 
           remove_adjacency( adjvect[j], base_entity );
       }

Modified: MOAB/trunk/DualTool.cpp
===================================================================
--- MOAB/trunk/DualTool.cpp	2007-11-19 17:47:39 UTC (rev 1409)
+++ MOAB/trunk/DualTool.cpp	2007-11-19 17:49:21 UTC (rev 1410)
@@ -1417,21 +1417,24 @@
   
     // perform an atomic pillow operation around dedge
 
-    // 0. get star 2cells and 3cells around odedge (before odedge changes)
+    // grab the quad before deleting the odedge
+  quad1 = get_dual_entity(odedge);
+  assert(0 != quad1);
+
+    // 0. get star 2cells around odedge (before odedge changes) and 3cells around
+    // those 2cells (going to delete the 2cells, therefore need to delete the 3cells
+    // that depend on those too)
   MeshTopoUtil mtu(mbImpl);
-  MBRange star_2cells, star_3cells;
-  MBErrorCode result = mbImpl->get_adjacencies(&odedge, 1, 2, false, star_2cells); RR;
-  result = mbImpl->get_adjacencies(&odedge, 1, 3, false, star_3cells); RR;
+  MBRange star_cells, tmp_cells;
+  MBErrorCode result = mbImpl->get_adjacencies(&odedge, 1, 2, false, star_cells); RR;
+  result = mbImpl->get_adjacencies(star_cells, 3, false, tmp_cells,
+                                   MBInterface::UNION); RR;
+  star_cells.merge(tmp_cells);
+  star_cells.insert(odedge);
   
     // tear down the dual entities which will be modified by the ap first
-  result = delete_dual_entities(star_3cells);RR;
-  result = delete_dual_entities(star_2cells);RR;
+  result = delete_dual_entities(star_cells); RR;
 
-    // grab the quad before deleting the odedge
-  quad1 = get_dual_entity(odedge);
-  assert(0 != quad1);
-  result = delete_dual_entities(&odedge, 1); RR;
-
     // now change the quad to an ap
   std::vector<MBEntityHandle> verts;
   result = mbImpl->get_connectivity(&quad1, 1, verts); RR;
@@ -1579,61 +1582,55 @@
   return MB_SUCCESS;
 }
 
-MBErrorCode DualTool::delete_dual_entities(MBEntityHandle *entities, 
-                                           const int num_entities) 
+MBErrorCode DualTool::delete_dual_entities(MBEntityHandle *entities,
+                                           int num_entities) 
 {
-  if (NULL == entities || num_entities == 0) return delete_whole_dual();
+  MBRange tmp_ents;
+  std::copy(entities, entities+num_entities, mb_range_inserter(tmp_ents));
+  return delete_dual_entities(tmp_ents);
+}
   
+MBErrorCode DualTool::delete_dual_entities(MBRange &entities) 
+{
+  if (entities.empty()) return delete_whole_dual();
+  
   MBEntityHandle null_entity = 0;
   MBErrorCode result;
-  std::vector<MBEntityHandle> ents_to_delete;
+  MBRange ents_to_delete;
   
-  for (int i = 0; i < num_entities; i++) {
+  while (!entities.empty()) {
+    MBEntityHandle this_entity = entities.pop_back();
+    
       // reset the primal's dual entity
-    MBEntityHandle primal = get_dual_entity(entities[i]);
-    if (get_dual_entity(primal) == entities[i]) {
+    MBEntityHandle primal = get_dual_entity(this_entity);
+    if (get_dual_entity(primal) == this_entity) {
       result = mbImpl->tag_set_data(dualEntity_tag(), &primal, 1, &null_entity); RR;
     }
     MBEntityHandle extra = get_extra_dual_entity(primal);
     if (0 != extra) {
       result = mbImpl->tag_set_data(extraDualEntity_tag(), &primal, 1, &null_entity); RR;
     }
-    ents_to_delete.push_back(entities[i]);
+
+    ents_to_delete.insert(this_entity);
     
       // check for extra dual entities
-    if (mbImpl->type_from_handle(entities[i]) == MBPOLYGON) {
+    if (mbImpl->type_from_handle(this_entity) == MBPOLYGON) {
       // for 2cell, might be a loop edge
       MBRange loop_edges;
-      result = mbImpl->get_adjacencies(&entities[i], 1, 1, false, loop_edges);
-      for (MBRange::iterator rit = loop_edges.begin(); rit != loop_edges.end(); rit++) {
-        if (check_1d_loop_edge(*rit)) {
-          MBEntityHandle this_ent = *rit;
-          result = delete_dual_entities(&this_ent, 1); RR;
-        }
-      }
+      result = mbImpl->get_adjacencies(&this_entity, 1, 1, false, loop_edges);
+      for (MBRange::iterator rit = loop_edges.begin(); rit != loop_edges.end(); rit++)
+        if (check_1d_loop_edge(*rit)) entities.insert(*rit);
     }
-    else if (extra && extra != entities[i])
+    else if (extra && extra != this_entity)
         // just put it on the list; primal for which we're extra has already been
         // reset to not point to extra entity
-      ents_to_delete.push_back(extra);
+      ents_to_delete.insert(extra);
   }
 
     // now delete the entities (sheets and chords will be updated automatically)
-  return mbImpl->delete_entities(&ents_to_delete[0], ents_to_delete.size());
+  return mbImpl->delete_entities(ents_to_delete);
 }
 
-MBErrorCode DualTool::delete_dual_entities(MBRange &entities) 
-{
-  MBErrorCode result = MB_SUCCESS;
-  for (MBRange::reverse_iterator rit = entities.rbegin(); rit != entities.rend(); rit++) {
-    MBEntityHandle this_ent = *rit;
-    MBErrorCode tmp_result = delete_dual_entities(&this_ent, 1);
-    if (MB_SUCCESS != tmp_result) result = tmp_result;
-  }
-
-  return result;
-}
-
 MBErrorCode DualTool::face_open_collapse(MBEntityHandle ocl, MBEntityHandle ocr) 
 {
   if (debug_ap) ((MBCore*)mbImpl)->check_adjacencies();
@@ -1821,7 +1818,6 @@
   result = mtu.split_entities_manifold(split_quads, 2, new_quads, NULL); RR;
   for (int i = 0; i < 2; i++) merge_ents.push_back(split_quads[i]);
   for (int i = 0; i < 2; i++) merge_ents.push_back(new_quads[i]);
-  
 
     // if we're splitting 2 edges, there might be other edges that have the split
     // node; also need to know which side they're on
@@ -1830,24 +1826,36 @@
     result = foc_get_addl_ents(star_dp1, star_dp2, split_node, addl_ents); RR;
   }
 
+    // also need to put old/new quads on the addl_ents lists so they get adjs to 
+    // split edges correctly
+  for (int i = 0; i < 2; i++) {
+    addl_ents[0].insert(new_quads[i]); 
+    addl_ents[1].insert(split_quads[i]); 
+  }
+  
     // now split the edges; just add the star ents to addl_ents to pass into
     // split_nonmanifold
   for (int i = 0; i < 2; i++) 
-    std::copy(star_dp1[i].begin(), star_dp1[i].end(), mb_range_inserter(addl_ents[i]));
+    std::copy(star_dp1[i].begin(), star_dp1[i].end(), 
+              mb_range_inserter(addl_ents[i]));
   
   MBEntityHandle new_entity;
-  result = mtu.split_entity_nonmanifold(split_edges[0], addl_ents[0], addl_ents[1],
-                                        new_entity); RR;
-  addl_ents[0].insert(split_edges[0]); addl_ents[1].insert(new_entity);
+    // pass addl_ents[1] in with split edge so that split edge remains
+    // on a bdy if it was before
+  result = mtu.split_entity_nonmanifold(split_edges[0], addl_ents[1], 
+                                        addl_ents[0], new_entity); RR;
+  addl_ents[1].insert(split_edges[0]); addl_ents[0].insert(new_entity);
 
   if (split_edges[1]) {
-    result = mtu.split_entity_nonmanifold(split_edges[1], addl_ents[0], addl_ents[1],
-                                          new_entity); RR;
-    addl_ents[0].insert(split_edges[0]); addl_ents[1].insert(new_entity);
+      // split 2nd edge; again send old edge with addl_ents[1] to keep
+      // on bdy
+    result = mtu.split_entity_nonmanifold(split_edges[1], addl_ents[1], 
+                                          addl_ents[0], new_entity); RR;
+    addl_ents[1].insert(split_edges[1]); addl_ents[0].insert(new_entity);
   
       // now split the node too
-    result = mtu.split_entity_nonmanifold(split_node, addl_ents[0], addl_ents[1],
-                                          new_entity); RR;
+    result = mtu.split_entity_nonmanifold(split_node, addl_ents[1], 
+                                          addl_ents[0], new_entity); RR;
   }
   
   return MB_SUCCESS;
@@ -1918,6 +1926,8 @@
   bool on_bdy;
   MBErrorCode result;
   MeshTopoUtil mtu(mbImpl);
+  MBEntityHandle first_split_quad = 0;
+  
   for (int i = 0; i < 2; i++) {
       // only do 2nd iteration if we have a 2nd edge
     if (1 == i && !split_edges[1]) continue;
@@ -1927,31 +1937,36 @@
     result = mtu.star_entities(split_edges[i], star_tmp[0], on_bdy, 0,
                                &star_tmp[1]); RR;
     std::vector<MBEntityHandle>::iterator fit, hit;
-    bool inside = false;
 
-      // separate the star into halves; store faces in split_qstar[0],[1], and
-      // the hexes in split_hstar[0],[1]
-    for (fit = star_tmp[0].begin(), hit = star_tmp[1].begin(); fit != star_tmp[0].end();
-         fit++, hit++) {
-        // start of loop, see if we're going from outside to inside
-      if (!inside && (*fit == split_quads[0] || *fit == split_quads[1]))
-        inside = true;
-        // put current face on right list
-      if (inside) split_qstar[0].push_back(*fit);
-      else split_qstar[1].push_back(*fit);
-        // decide whether we're going outside after this face
-      if (inside && *fit != *split_qstar[0].begin() &&
-          (*fit == split_quads[0] || *fit == split_quads[1]))
-        inside = false;
-        // save hex based on inside/outside *after* outside test, so that hex
-        // after outside face goes on outside list;
-        // only save hex if we're not on the end with a bdy
-      if (!on_bdy || fit != star_tmp[0].end()) {
-        if (inside) split_hstar[0].push_back(*hit);
-        else split_hstar[1].push_back(*hit);
+      // find 1st and 2nd split face around star
+    int first_ind = -1, second_ind = -1, j = 0;
+    for (fit = star_tmp[0].begin(); fit != star_tmp[0].end(); fit++, j++) {
+      if (*fit == split_quads[0] || *fit == split_quads[1]) {
+        if (first_ind == -1) first_ind = j;
+        else second_ind = j;
       }
     }
+    assert(-1 != first_ind && -1 != second_ind);
+    
+      // now assemble the parts of the star
+    for (j = 0; j < (int) star_tmp[0].size(); j++) {
+        // split quads and ones before/after go on outside list
+      if (j <= first_ind || j >= second_ind) 
+        split_qstar[1].push_back(star_tmp[0][j]);
+      else
+        split_qstar[0].push_back(star_tmp[0][j]);
+        // hexes before/after do too, but watch out for non-existent
+        // last one if we're on bdy
+      if (j >= first_ind && j < second_ind)
+        split_hstar[0].push_back(star_tmp[1][j]);
+      else if (!on_bdy || (on_bdy && j < (int) star_tmp[0].size()-1))
+        split_hstar[1].push_back(star_tmp[1][j]);
+    }
 
+      // save the 1st split quad on the 1st iteration, to align lists later
+    if (0 == first_split_quad) 
+      first_split_quad = star_tmp[0][first_ind];
+
       // if we're on edge 1, just put the halves into the result vectors
     if (0 == i) {
       star_dp1[0].swap(split_qstar[0]); star_dp1[1].swap(split_qstar[1]);
@@ -1964,10 +1979,12 @@
         // the back depending whether that face is 1st or last on split_qstar[0]
       MBEntityHandle hex1 = *star_dp2[0].begin();
       MBEntityHandle hex2 = 0;
-      if (*split_qstar[0].begin() == *star_dp1[0].begin())
+      if (star_tmp[0][first_ind] == first_split_quad)
         hex2 = *split_hstar[0].begin();
-      else if (*split_qstar[0].rbegin() == *star_dp1[0].begin())
+      else if (star_tmp[0][second_ind] == first_split_quad)
         hex2 = *split_hstar[0].rbegin();
+      else assert(false);
+      
       if (hex1 == hex2) {
         for (int i = 0; i < 2; i++)
           std::copy(split_qstar[i].begin(), split_qstar[i].end(), 
@@ -2034,13 +2051,7 @@
   for (MBRange::iterator rit = cells1or2.begin(); rit != cells1or2.end(); rit++)
     dual_hps.insert(get_dual_hyperplane(*rit));
 
-  std::vector<MBEntityHandle> dual_ents_vec;
-  std::copy(dual_ents.rbegin(), dual_ents.rend(), std::back_inserter(dual_ents_vec));
-  
-//  for (MBRange::iterator rit = dual_ents.rbegin(); rit != dual_ents.rend(); rit++)
-//    dual_ents_vec.push_back(*rit);
-  
-  result = delete_dual_entities(&dual_ents_vec[0], dual_ents_vec.size());
+  result = delete_dual_entities(dual_ents);
   if (MB_SUCCESS != result) return result;
 
     // now decide which sheet to delete (to be merged into the other)

Modified: MOAB/trunk/MBCore.cpp
===================================================================
--- MOAB/trunk/MBCore.cpp	2007-11-19 17:47:39 UTC (rev 1409)
+++ MOAB/trunk/MBCore.cpp	2007-11-19 17:49:21 UTC (rev 1410)
@@ -1794,7 +1794,7 @@
 MBErrorCode MBCore::delete_entities(const MBRange &range)
 {
   MBErrorCode result = MB_SUCCESS, rval;
-  for (MBRange::iterator i = range.begin(); i != range.end(); ++i)
+  for (MBRange::const_reverse_iterator i = range.rbegin(); i != range.rend(); ++i)
     if (MB_SUCCESS != (rval = delete_entities( &*i, 1)))
       result = rval;
   return rval;

Modified: MOAB/trunk/tools/qvdual/CropTool.cpp
===================================================================
--- MOAB/trunk/tools/qvdual/CropTool.cpp	2007-11-19 17:47:39 UTC (rev 1409)
+++ MOAB/trunk/tools/qvdual/CropTool.cpp	2007-11-19 17:49:21 UTC (rev 1410)
@@ -46,7 +46,7 @@
 
 void CropTool::type_activated(const int num, const int type_num)
 {
-  vtkImplicitFunction *the_func = NULL;
+    //vtkImplicitFunction *the_func = NULL;
   
   vtkPlane *plane;
   vtkCylinder *cyl;

Modified: MOAB/trunk/tools/qvdual/DrawDual.cpp
===================================================================
--- MOAB/trunk/tools/qvdual/DrawDual.cpp	2007-11-19 17:47:39 UTC (rev 1409)
+++ MOAB/trunk/tools/qvdual/DrawDual.cpp	2007-11-19 17:49:21 UTC (rev 1410)
@@ -246,11 +246,11 @@
       // assembly
     vtkActorCollection *actors = dualPicker->GetActors();
   
-    vtkActor *picked_actor = NULL, *tmp_actor;
-    MBEntityHandle picked_sheet = 0, picked_chord = 0;
+    vtkActor *tmp_actor;
+      //vtkActor *picked_actor = NULL;
+      //MBEntityHandle picked_sheet = 0, picked_chord = 0;
   
     actors->InitTraversal();
-    int i = 0;
     while ((tmp_actor = actors->GetNextItem())) {
       MBEntityHandle this_set = vtkMOABUtils::propSetMap[tmp_actor];
       if (0 == this_set || -1 == dualPicker->GetCellId()) continue;
@@ -366,10 +366,9 @@
   MBErrorCode result;
   std::vector<MBEntityHandle> dual_sets;
   std::vector<MBEntityHandle>::iterator vit;
-  static std::vector<GVEntity*> gvents;
-  gvents.reserve(pickRange.size());
+  GVEntity **gvents;
   
-  result = MBI->tag_get_data(gvEntityHandle, pickRange, &gvents[0]); 
+  result = MBI->tag_get_data(gvEntityHandle, pickRange, &gvents); 
   if (MB_SUCCESS != result) return;
   unsigned int i, j;
   MBRange::iterator rit;
@@ -957,13 +956,12 @@
                                      vtkFloatArray *color_ids) 
 {
   std::vector<MBEntityHandle> cell_verts;
-  std::vector<GVEntity*> gv_cells;
+  std::vector<GVEntity *> gv_cells(cell_range.size());
   int cell_num;
   MBRange::iterator rit;
   vtkIdType cell_points[20];
   static int vtk_cell_type[] = {VTK_VERTEX, VTK_LINE, VTK_POLYGON};
 
-  gv_cells.reserve(cell_range.size());
   MBErrorCode result = MBI->tag_get_data(gvEntityHandle, cell_range, &gv_cells[0]);
   if (MB_SUCCESS != result) return result;
 
@@ -1059,7 +1057,7 @@
   pd->Allocate();
   
   std::vector<GVEntity*> gv_verts;
-  gv_verts.reserve(verts.size());
+  gv_verts.resize(verts.size());
   
     // get the gventities
   MBErrorCode result = MBI->tag_get_data(gvEntityHandle, verts, &gv_verts[0]);
@@ -1080,6 +1078,7 @@
     result = get_xform(dual_surf, asym_pos, x_xform, y_xform);
 
   for (rit = verts.begin(), i = 0; rit != verts.end(); rit++, i++) {
+    assert(NULL != gv_verts[i]);
     int index = gv_verts[i]->get_index(dual_surf);
     assert(index >= 0 && NULL != gv_verts[i]->gvizPoints[index]);
     if (gv_verts[i]->vtkEntityIds[index] == -1) {
@@ -1098,7 +1097,7 @@
   if (edges.empty()) return MB_SUCCESS;
   
     // check for mid-edge points; reuse gv_verts
-  gv_verts.reserve(edges.size());
+  gv_verts.resize(edges.size());
   
     // get the gventities
   result = MBI->tag_get_data(gvEntityHandle, edges, &gv_verts[0]);
@@ -1107,6 +1106,7 @@
     return result;
   }
   for (rit = edges.begin(), i = 0; rit != edges.end(); rit++, i++) {
+    assert(NULL != gv_verts[i]);
     int index = gv_verts[i]->get_index(dual_surf);
     assert(index >= 0);
     if (NULL != gv_verts[i]->gvizPoints[index+2] &&
@@ -1146,6 +1146,7 @@
 
     // find a vertex with non-zero x, y coordinates
   for (std::vector<GVEntity*>::iterator vit = gv_verts.begin(); vit != gv_verts.end(); vit++) {
+    assert(NULL != *vit);
     int index = (*vit)->get_index(dual_surf);
     assert(index >= 0 && NULL != (*vit)->gvizPoints[index]);
       // get new point position
@@ -1315,39 +1316,31 @@
   }
     
     // for each vertex, allocate a graphviz point if it doesn't already have one
-  GVEntity **dvert_gv = new GVEntity*[dverts.size()];
-  MBErrorCode result = MBI->tag_get_data(gvEntityHandle, dverts, dvert_gv); RR;
   Agsym_t *asym_pos = (useGraphviz ? get_asym(dual_surf, 0, "pos") : NULL);
 
-  result = construct_graphviz_points(dual_surf, dverts, asym_pos, dvert_gv); RR;
+  MBErrorCode result = construct_graphviz_points(dual_surf, dverts, asym_pos); RR;
   
     // for each edge, allocate a graphviz edge if it doesn't already have one
-  GVEntity **dedge_gv = new GVEntity*[dedges.size()];
-  result = MBI->tag_get_data(gvEntityHandle, dedges, dedge_gv); RR;
-
-  result = construct_graphviz_edges(dual_surf, dedges, face_verts, asym_pos, 
-                                    dvert_gv, dedge_gv); RR;
+  result = construct_graphviz_edges(dual_surf, dedges, face_verts, asym_pos); RR;
   
-  delete [] dvert_gv;
-  delete [] dedge_gv;
-
   return result;
 }
 
 MBErrorCode DrawDual::construct_graphviz_edges(MBEntityHandle dual_surf, 
                                                MBRange &dedges, 
                                                MBRange &loop_verts, 
-                                               Agsym_t *asym_pos, 
-                                               GVEntity **dvert_gv, 
-                                               GVEntity **dedge_gv) 
+                                               Agsym_t *asym_pos) 
 {
   const MBEntityHandle *connect;
   int num_connect;
   MBErrorCode result = MB_SUCCESS;
   char dum_str[80];
   GraphWindows &this_gw = surfDrawrings[dual_surf];
-  Agsym_t *asym_weight = (useGraphviz ? get_asym(dual_surf, 1, "weight") : NULL), 
-    *asym_len = (useGraphviz ? get_asym(dual_surf, 1, "len") : NULL);
+    //Agsym_t *asym_weight = (useGraphviz ? get_asym(dual_surf, 1, "weight") : NULL), 
+    //*asym_len = (useGraphviz ? get_asym(dual_surf, 1, "len") : NULL);
+  std::vector<GVEntity*> dedge_gv(dedges.size());
+  result = MBI->tag_get_data(gvEntityHandle, dedges, &dedge_gv[0]); RR;
+  GVEntity *dvert_gv[2];
  
   MBRange::iterator rit;
   int i;
@@ -1468,14 +1461,15 @@
 
 MBErrorCode DrawDual::construct_graphviz_points(MBEntityHandle dual_surf, 
                                                 MBRange &dverts, 
-                                                Agsym_t *asym_pos,
-                                                GVEntity **dvert_gv) 
+                                                Agsym_t *asym_pos) 
 {
   MBRange::iterator rit;
   int i;
   MBErrorCode result = MB_SUCCESS;
   GraphWindows &this_gw = surfDrawrings[dual_surf];
   char dum_str[80];
+  std::vector<GVEntity*> dvert_gv(dverts.size());
+  result = MBI->tag_get_data(gvEntityHandle, dverts, &dvert_gv[0]);
   
   for (rit = dverts.begin(), i = 0; rit != dverts.end(); rit++, i++) {
 
@@ -1706,7 +1700,6 @@
   
     // if more, get the first two vertices on the first chord, then a 3rd
     // from another that's not in the 1st set
-  MBEntityHandle dum_verts[3];
   MBRange tmp_range;
   result = MBI->get_entities_by_dimension(chords[0], 1, tmp_range); RR;
   assert(3 < tmp_range.size());
@@ -2175,6 +2168,7 @@
   
   int offset = (extra ? 2 : 0);
   for (int i = 0; i < num_ents; i++) {
+    assert(NULL != gvs[i]);
     int index = gvs[i]->get_index(dual_surf);
     assert(index >= 0 && index < 3);
     points[i] = gvs[i]->gvizPoints[index+offset];

Modified: MOAB/trunk/tools/qvdual/DrawDual.hpp
===================================================================
--- MOAB/trunk/tools/qvdual/DrawDual.hpp	2007-11-19 17:47:39 UTC (rev 1409)
+++ MOAB/trunk/tools/qvdual/DrawDual.hpp	2007-11-19 17:49:21 UTC (rev 1410)
@@ -217,15 +217,12 @@
   
   MBErrorCode construct_graphviz_points(MBEntityHandle dual_surf, 
                                         MBRange &dverts, 
-                                        Agsym_t *asym_pos,
-                                        GVEntity **dvert_gv);
+                                        Agsym_t *asym_pos);
   
   MBErrorCode construct_graphviz_edges(MBEntityHandle dual_surf, 
                                        MBRange &dedges, 
                                        MBRange &loop_verts, 
-                                       Agsym_t *asym_pos, 
-                                       GVEntity **dvert_gv, 
-                                       GVEntity **dege_gv);
+                                       Agsym_t *asym_pos);
   
   Agsym_t *get_asym(MBEntityHandle dual_surf, const int dim,
                     const char *name, const char *def_val = NULL);

Modified: MOAB/trunk/tools/qvdual/vtkMOABUtils.cxx
===================================================================
--- MOAB/trunk/tools/qvdual/vtkMOABUtils.cxx	2007-11-19 17:47:39 UTC (rev 1409)
+++ MOAB/trunk/tools/qvdual/vtkMOABUtils.cxx	2007-11-19 17:49:21 UTC (rev 1410)
@@ -84,37 +84,37 @@
 MBTag vtkMOABUtils::vtkTopContainsTag = 0;
 
     //! name for vtkTopContainsTag;
-char *vtkMOABUtils::vtkTopContainsTagName = "__vtkTopContainsTag";
+const char *vtkMOABUtils::vtkTopContainsTagName = "__vtkTopContainsTag";
   
   //! tag indicating whether a given set is in top parent assy
 MBTag vtkMOABUtils::vtkTopParentTag = 0;
 
     //! name for vtkTopParentTag;
-char *vtkMOABUtils::vtkTopParentTagName = "__vtkTopParentTag";
+const char *vtkMOABUtils::vtkTopParentTagName = "__vtkTopParentTag";
   
   //! tag for pointing to vtk cell representing an entity
 MBTag vtkMOABUtils::vtkCellTag = 0;
   
   //! name for vtkCellTag
-char *vtkMOABUtils::vtkCellTagName = "__vtkCellTag";
+const char *vtkMOABUtils::vtkCellTagName = "__vtkCellTag";
 
   //! tag for pointing to vtk actor for a set
 MBTag vtkMOABUtils::vtkSetActorTag = 0;
   
     //! name for vtkSetActorTag
-char *vtkMOABUtils::vtkSetActorTagName = "__vtkSetActorTag";
+const char *vtkMOABUtils::vtkSetActorTagName = "__vtkSetActorTag";
 
     //! tag for pointing to vtk prop assembly for a set
 MBTag vtkMOABUtils::vtkSetPropAssemblyTag = 0;
   
     //! name for vtkSetPropAssemblyTag
-char *vtkMOABUtils::vtkSetPropAssemblyTagName = "__vtkSetPropAssemblyTag";
+const char *vtkMOABUtils::vtkSetPropAssemblyTagName = "__vtkSetPropAssemblyTag";
 
   //! tag for determining whether a point has been allocated for a vertex
 MBTag vtkMOABUtils::vtkPointAllocatedTag = 0;
   
   //! name for vtkPointAllocatedTag
-char *vtkMOABUtils::vtkPointAllocatedTagName = "__vtkPointAllocatedTag";
+const char *vtkMOABUtils::vtkPointAllocatedTagName = "__vtkPointAllocatedTag";
 
 DrawDual *vtkMOABUtils::drawDual = NULL;
 
@@ -392,7 +392,7 @@
   result = vtkMOABUtils::update_set_actors(sheet_sets, vtkMOABUtils::myUG, true, false, true);
   if (MB_SUCCESS != result) return result;
 
-  int table_size = ((int) chord_sets.size()+sheet_sets.size() > vtkMOABUtils::totalColors ? 
+  int table_size = ((int) (chord_sets.size()+sheet_sets.size()) > vtkMOABUtils::totalColors ? 
                     chord_sets.size()+sheet_sets.size() : vtkMOABUtils::totalColors);
   vtkMOABUtils::construct_lookup_table(table_size);
   

Modified: MOAB/trunk/tools/qvdual/vtkMOABUtils.h
===================================================================
--- MOAB/trunk/tools/qvdual/vtkMOABUtils.h	2007-11-19 17:47:39 UTC (rev 1409)
+++ MOAB/trunk/tools/qvdual/vtkMOABUtils.h	2007-11-19 17:49:21 UTC (rev 1410)
@@ -65,38 +65,38 @@
   static MBTag vtkTopContainsTag;
 
     //! name for vtkTopContainsTag;
-  static char *vtkTopContainsTagName;
+  static const char *vtkTopContainsTagName;
   
   //! tag indicating whether a given set is in top parent assy
   static MBTag vtkTopParentTag;
 
     //! name for vtkTopParentTag;
-  static char *vtkTopParentTagName;
+  static const char *vtkTopParentTagName;
   
     //! tag for pointing to vtk cell representing an entity
   static MBTag vtkCellTag;
   
     //! name for vtkCellTag
-  static char *vtkCellTagName;
+  static const char *vtkCellTagName;
 
     //! tag for pointing to vtk actor for a set
   static MBTag vtkSetActorTag;
   
     //! name for vtkSetActorTag
-  static char *vtkSetActorTagName;
+  static const char *vtkSetActorTagName;
 
     //! tag for pointing to vtk prop assembly for a set; a prop assembly
     //! for a set is only created if the set contains sets
   static MBTag vtkSetPropAssemblyTag;
   
     //! name for vtkSetPropAssemblyTag
-  static char *vtkSetPropAssemblyTagName;
+  static const char *vtkSetPropAssemblyTagName;
 
     //! tag for determining whether a point has been allocated for a vertex
   static MBTag vtkPointAllocatedTag;
   
     //! name for vtkPointAllocatedTag
-  static char *vtkPointAllocatedTagName;
+  static const char *vtkPointAllocatedTagName;
 
     //! picked entities
   static MBRange pickedEntities;




More information about the moab-dev mailing list