[MOAB-dev] r3964 - MOAB/trunk/src/io

wilsonp at engr.wisc.edu wilsonp at engr.wisc.edu
Wed May 26 15:04:27 CDT 2010


Author: wilsonp
Date: 2010-05-26 15:04:27 -0500 (Wed, 26 May 2010)
New Revision: 3964

Modified:
   MOAB/trunk/src/io/ReadCGM.cpp
Log:
Always store the faceting tolerance and geometry absolute resolution on the mesh.  If no
file_set is provided create a separate set that is tagged with these parameters.

It can be recovered upon reading by searching for all sets that have that tag.



Modified: MOAB/trunk/src/io/ReadCGM.cpp
===================================================================
--- MOAB/trunk/src/io/ReadCGM.cpp	2010-05-26 19:28:27 UTC (rev 3963)
+++ MOAB/trunk/src/io/ReadCGM.cpp	2010-05-26 20:04:27 UTC (rev 3964)
@@ -151,13 +151,22 @@
   if(MB_SUCCESS == opts.match_option(name,value)) 
     act_att = false; 
 
-  // tag the file_set with the faceting_tol and geometry absolute resolution
-  if (file_set) {
-    rval = mdbImpl->tag_set_data( faceting_tol_tag, file_set, 1, &faceting_tol );
-    if(MB_SUCCESS != rval) return rval;
-    rval = mdbImpl->tag_set_data( geometry_resabs_tag, file_set, 1, &GEOMETRY_RESABS );
-    if(MB_SUCCESS != rval) return rval;
+  // always tag with the faceting_tol and geometry absolute resolution
+  // if file_set is defined, use that, otherwise create a set
+  EntityHandle facet_tol_tag_set;
+  if (NULL == file_set) {
+    EntityHandle temp_tag_set;
+    rval = mdbImpl->create_meshset( MESHSET_SET, temp_tag_set );
+    if (MB_SUCCESS != rval) return rval;
+    facet_tol_tag_set = temp_tag_set;
+  } else {
+    facet_tol_tag_set = *file_set;
   }
+  
+  rval = mdbImpl->tag_set_data( faceting_tol_tag, &facet_tol_tag_set, 1, &faceting_tol );
+  if(MB_SUCCESS != rval) return rval;
+  rval = mdbImpl->tag_set_data( geometry_resabs_tag, &facet_tol_tag_set, 1, &GEOMETRY_RESABS );
+  if(MB_SUCCESS != rval) return rval;
 
   // CGM data
   std::map<RefEntity*,EntityHandle> entmap[5]; // one for each dim, and one for groups




















More information about the moab-dev mailing list