[MOAB-dev] r3991 - in MOAB/trunk: src/io tools/dagmc

wilsonp at engr.wisc.edu wilsonp at engr.wisc.edu
Wed Jun 2 09:51:02 CDT 2010


Author: wilsonp
Date: 2010-06-02 09:51:01 -0500 (Wed, 02 Jun 2010)
New Revision: 3991

Modified:
   MOAB/trunk/src/io/ReadCGM.cpp
   MOAB/trunk/tools/dagmc/DagMC.cpp
Log:
Instead of creating a phantom set for geometry-level tags, we now 
tag the interface when no file set is specified.  This is used for
faceting tolerance and geometrical resolution for CGM based models.

Changed ReadCGM to tag the interface and changed DagMC to read tag 
from the interface when no tagged set exists.


Modified: MOAB/trunk/src/io/ReadCGM.cpp
===================================================================
--- MOAB/trunk/src/io/ReadCGM.cpp	2010-06-02 00:25:38 UTC (rev 3990)
+++ MOAB/trunk/src/io/ReadCGM.cpp	2010-06-02 14:51:01 UTC (rev 3991)
@@ -150,20 +150,11 @@
     act_att = false; 
 
   // 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 file_set is defined, use that, otherwise (file_set == NULL) tag the interface
+  rval = mdbImpl->tag_set_data( faceting_tol_tag, file_set, (file_set ? 1 : 0), &faceting_tol );
   if(MB_SUCCESS != rval) return rval;
-  rval = mdbImpl->tag_set_data( geometry_resabs_tag, &facet_tol_tag_set, 1, &GEOMETRY_RESABS );
+
+  rval = mdbImpl->tag_set_data( geometry_resabs_tag, file_set, (file_set ? 1 : 0), &GEOMETRY_RESABS );
   if(MB_SUCCESS != rval) return rval;
 
   // CGM data

Modified: MOAB/trunk/tools/dagmc/DagMC.cpp
===================================================================
--- MOAB/trunk/tools/dagmc/DagMC.cpp	2010-06-02 00:25:38 UTC (rev 3990)
+++ MOAB/trunk/tools/dagmc/DagMC.cpp	2010-06-02 14:51:01 UTC (rev 3991)
@@ -963,32 +963,34 @@
 
 
   // search for a tag that has the faceting tolerance
-  // PROBLEM: MOAB is not consistent with file_set behavior. The tag may not be
-  // on the file_set.
-  // If we read a CGM file here, the file_set created above should be tagged
-  // If we read an H5M file that is derived from a CGM geometry through MOAB::ReadCGM, 
-  //     it could also have a file_set tagged with this.
-  // Otherwise, there may not be anything - how to detect and/or respond?
   Tag faceting_tol_tag;
+  Range tagged_sets;
+  double facet_tol_tagvalue = 0;
+  bool other_set_tagged = false, root_tagged = false;
   rval = MBI->tag_create( "FACETING_TOL", sizeof(double), MB_TAG_SPARSE,
 			  MB_TYPE_DOUBLE, faceting_tol_tag, 0, true );
-  Range facet_tol_tagged_set;


More information about the moab-dev mailing list