[MOAB-dev] r3964 - MOAB/trunk/src/io
Paul Wilson
wilsonp at engr.wisc.edu
Wed May 26 21:07:29 CDT 2010
Hi Tim,
I found the code where you tag either the file_set (if it exists) or the
interface. Is there code that suggests how to read it back? Is it just
something like:
* get all sets that are tagged with the tag in question
* if that is an empty set, check to see if the interface is tagged
Paul
Tim Tautges wrote:
> 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
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
--
Paul Wilson
-- ------------------------------------------------------------------ --
Paul P.H. Wilson 419 Engineering Research Building
wilsonp at engr.wisc.edu 1500 Engineering Dr
ph/fax: 608/263-0807 Madison, WI 53706
My calendar: http://bit.ly/pphw-calendar
Computational Nuclear Engineering Research Group
http://cnerg.engr.wisc.edu
Associate Professor, Nuclear Engineering
Engineering Physics Department
http://www.engr.wisc.edu/ep
Chair, Energy Analysis & Policy Certificate
Nelson Institute for Environmental Studies
http://nelson.wisc.edu/eap/
Contributing to the joy and improvement
of all those around me
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/moab-dev/attachments/20100526/d6b27926/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3297 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.mcs.anl.gov/pipermail/moab-dev/attachments/20100526/d6b27926/attachment-0001.bin>
More information about the moab-dev
mailing list