<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Tim,<br>
<br>
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:<br>
<ul>
<li>get all sets that are tagged with the tag in question</li>
<li>if that is an empty set, check to see if the interface is tagged</li>
</ul>
Paul<br>
<br>
Tim Tautges wrote:
<blockquote cite="mid:4BFD8B56.4040206@mcs.anl.gov" type="cite">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.
<br>
<br>
- tim
<br>
<br>
On 05/26/2010 03:04 PM, <a class="moz-txt-link-abbreviated" href="mailto:wilsonp@engr.wisc.edu">wilsonp@engr.wisc.edu</a> wrote:
<br>
<blockquote type="cite">Author: wilsonp
<br>
Date: 2010-05-26 15:04:27 -0500 (Wed, 26 May 2010)
<br>
New Revision: 3964
<br>
<br>
Modified:
<br>
MOAB/trunk/src/io/ReadCGM.cpp
<br>
Log:
<br>
Always store the faceting tolerance and geometry absolute resolution on
the mesh. If no
<br>
file_set is provided create a separate set that is tagged with these
parameters.
<br>
<br>
It can be recovered upon reading by searching for all sets that have
that tag.
<br>
<br>
<br>
<br>
Modified: MOAB/trunk/src/io/ReadCGM.cpp
<br>
===================================================================
<br>
--- MOAB/trunk/src/io/ReadCGM.cpp 2010-05-26 19:28:27 UTC (rev 3963)
<br>
+++ MOAB/trunk/src/io/ReadCGM.cpp 2010-05-26 20:04:27 UTC (rev 3964)
<br>
@@ -151,13 +151,22 @@
<br>
if(MB_SUCCESS == opts.match_option(name,value))
<br>
act_att = false;
<br>
<br>
- // tag the file_set with the faceting_tol and geometry absolute
resolution
<br>
- if (file_set) {
<br>
- rval = mdbImpl->tag_set_data( faceting_tol_tag, file_set,
1,&faceting_tol );
<br>
- if(MB_SUCCESS != rval) return rval;
<br>
- rval = mdbImpl->tag_set_data( geometry_resabs_tag, file_set,
1,&GEOMETRY_RESABS );
<br>
- if(MB_SUCCESS != rval) return rval;
<br>
+ // always tag with the faceting_tol and geometry absolute resolution
<br>
+ // if file_set is defined, use that, otherwise create a set
<br>
+ EntityHandle facet_tol_tag_set;
<br>
+ if (NULL == file_set) {
<br>
+ EntityHandle temp_tag_set;
<br>
+ rval = mdbImpl->create_meshset( MESHSET_SET, temp_tag_set );
<br>
+ if (MB_SUCCESS != rval) return rval;
<br>
+ facet_tol_tag_set = temp_tag_set;
<br>
+ } else {
<br>
+ facet_tol_tag_set = *file_set;
<br>
}
<br>
+
<br>
+ rval = mdbImpl->tag_set_data(
faceting_tol_tag,&facet_tol_tag_set, 1,&faceting_tol );
<br>
+ if(MB_SUCCESS != rval) return rval;
<br>
+ rval = mdbImpl->tag_set_data(
geometry_resabs_tag,&facet_tol_tag_set, 1,&GEOMETRY_RESABS );
<br>
+ if(MB_SUCCESS != rval) return rval;
<br>
<br>
// CGM data
<br>
std::map<RefEntity*,EntityHandle> entmap[5]; // one for each
dim, and one for groups
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</blockquote>
<br>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Paul Wilson
-- ------------------------------------------------------------------ --
Paul P.H. Wilson 419 Engineering Research Building
<a class="moz-txt-link-abbreviated" href="mailto:wilsonp@engr.wisc.edu">wilsonp@engr.wisc.edu</a> 1500 Engineering Dr
ph/fax: 608/263-0807 Madison, WI 53706
My calendar: <a class="moz-txt-link-freetext" href="http://bit.ly/pphw-calendar">http://bit.ly/pphw-calendar</a>
Computational Nuclear Engineering Research Group
<a class="moz-txt-link-freetext" href="http://cnerg.engr.wisc.edu">http://cnerg.engr.wisc.edu</a>
Associate Professor, Nuclear Engineering
Engineering Physics Department
<a class="moz-txt-link-freetext" href="http://www.engr.wisc.edu/ep">http://www.engr.wisc.edu/ep</a>
Chair, Energy Analysis & Policy Certificate
Nelson Institute for Environmental Studies
<a class="moz-txt-link-freetext" href="http://nelson.wisc.edu/eap/">http://nelson.wisc.edu/eap/</a>
Contributing to the joy and improvement
of all those around me</pre>
</body>
</html>