[MOAB-dev] r4243 - MOAB/trunk/src/io
tautges at mcs.anl.gov
tautges at mcs.anl.gov
Mon Nov 1 18:00:23 CDT 2010
Author: tautges
Date: 2010-11-01 18:00:23 -0500 (Mon, 01 Nov 2010)
New Revision: 4243
Modified:
MOAB/trunk/src/io/Tqdcfr.cpp
Log:
Fixed a bug retrieving entity ids from acis attributes. Thanks Steve J for the example.
Passes make check.
Modified: MOAB/trunk/src/io/Tqdcfr.cpp
===================================================================
--- MOAB/trunk/src/io/Tqdcfr.cpp 2010-10-26 21:54:15 UTC (rev 4242)
+++ MOAB/trunk/src/io/Tqdcfr.cpp 2010-11-01 23:00:23 UTC (rev 4243)
@@ -2446,8 +2446,11 @@
type_substr-this_record.att_string.c_str() < 20) {
this_record.rec_type = Tqdcfr::ATTRIB;
bool simple_attrib = false;
+ bool generic_attrib = false;
if ((type_substr = strstr(this_record.att_string.c_str(), "simple-snl-attrib")) != NULL)
simple_attrib = true;
+ else if ((type_substr = strstr(this_record.att_string.c_str(), "integer_attrib-name_attrib-gen-attrib")) != NULL)
+ generic_attrib = true;
else {
this_record.rec_type = Tqdcfr::UNKNOWN;
return MB_SUCCESS;
@@ -2474,6 +2477,13 @@
std::string dum_str(type_substr);
this_record.att_string = dum_str;
}
+ else if (generic_attrib) {
+ type_substr = strstr(this_record.att_string.c_str(), "CUBIT_ID");
+ if (NULL == type_substr) return MB_FAILURE;
+ // copy the rest of the string to a dummy string
+ std::string dum_str(type_substr);
+ this_record.att_string = dum_str;
+ }
}
else {
// else it's a topological entity, I think
More information about the moab-dev
mailing list