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

Tim Tautges tautges at mcs.anl.gov
Wed May 26 15:57:58 CDT 2010


I would prefer if you tagged the interface as a whole, instead of creating an empty set and tagging that.  That's the 
procedure I used in the CCMIO reader for similar tags.

- tim

On 05/26/2010 03:04 PM, wilsonp at engr.wisc.edu wrote:
> 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
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

-- 
================================================================
"You will keep in perfect peace him whose mind is
   steadfast, because he trusts in you."               Isaiah 26:3

              Tim Tautges            Argonne National Laboratory
          (tautges at mcs.anl.gov)      (telecommuting from UW-Madison)
          phone: (608) 263-8485      1500 Engineering Dr.
            fax: (608) 263-4499      Madison, WI 53706



More information about the moab-dev mailing list