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

iulian at mcs.anl.gov iulian at mcs.anl.gov
Fri Sep 30 22:07:17 CDT 2011


Author: iulian
Date: 2011-09-30 22:07:17 -0500 (Fri, 30 Sep 2011)
New Revision: 5183

Modified:
   MOAB/trunk/src/GeomTopoTool.cpp
Log:
another slight change to the "geometrization" of a plain surface set
if input set is not the root set, this set becomes the geo set of dimension 2
if input is the root set, create a new surface set.
In this case, also add the surface set to the output set, which would be the 
model root in fuure models 


Modified: MOAB/trunk/src/GeomTopoTool.cpp
===================================================================
--- MOAB/trunk/src/GeomTopoTool.cpp	2011-09-30 23:26:09 UTC (rev 5182)
+++ MOAB/trunk/src/GeomTopoTool.cpp	2011-10-01 03:07:17 UTC (rev 5183)
@@ -869,10 +869,13 @@
     return rval;
     // mb
 
-  EntityHandle face ;
-  rval = mdbImpl->create_meshset(MESHSET_SET, face);
-  if (MB_SUCCESS != rval)
+  EntityHandle face =  surface;
+  if (!surface)// in the case it is root set, create another set
+  {
+    rval = mdbImpl->create_meshset(MESHSET_SET, face);
+    if (MB_SUCCESS != rval)
     return rval;
+  }
   // set the geo tag
   rval = add_geo_set(face, 2);
   if (MB_SUCCESS != rval)
@@ -890,10 +893,13 @@
   // how many edges do we need to create?
   // depends on how many loops we have
   // also, we should avoid non-manifold topology
-  rval = mdbImpl->add_entities(face, surface_ents);
-  if (MB_SUCCESS != rval)
-    return rval;
+  if (!surface) {// in this case, surface is root, so we have to add entities
+    rval = mdbImpl->add_entities(face, surface_ents);
+    if (MB_SUCCESS != rval)
+      return rval;
+  }
 
+
   Skinner tool(mdbImpl);
   rval = tool.find_skin(surface_ents, 1, edge_ents);
   if (MB_SUCCESS != rval)















More information about the moab-dev mailing list