[MOAB-dev] commit/MOAB: iulian07: another format change for cubit 14

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Wed Feb 19 23:51:41 CST 2014


1 new commit in MOAB:

https://bitbucket.org/fathomteam/moab/commits/6ad048225895/
Changeset:   6ad048225895
Branch:      master
User:        iulian07
Date:        2014-02-20 06:47:55
Summary:     another format change for cubit 14

unique ids are used to identify geometric entities; in cubit 14 the
format of the acis attribute that contains the UNIQUE_ID field is changed
cubit 13 and lower it looked like:
UNIQUE_ID 1 0 1 499666844 #
cubit 14 it looks like
UNIQUE_ID 0 1 1144110686 #

change the reading accordingly

still need to add a test for cubit 14 reader.

Affected #:  1 file

diff --git a/src/io/Tqdcfr.cpp b/src/io/Tqdcfr.cpp
index 9362d1e..76767ea 100644
--- a/src/io/Tqdcfr.cpp
+++ b/src/io/Tqdcfr.cpp
@@ -2462,7 +2462,10 @@ ErrorCode Tqdcfr::parse_acis_attribs(const unsigned int entity_rec_num,
     }
     else if (strncmp(records[current_attrib].att_string.c_str(), "UNIQUE_ID", 9) == 0) {
         // parse uid
-      num_read = sscanf(records[current_attrib].att_string.c_str(), "UNIQUE_ID 1 0 1 %d", &uid);
+      if (major >=14) // change of format for cubit 14:
+        num_read =sscanf(records[current_attrib].att_string.c_str(), "UNIQUE_ID 0 1 %d", &uid);
+      else
+        num_read = sscanf(records[current_attrib].att_string.c_str(), "UNIQUE_ID 1 0 1 %d", &uid);
       if (1 != num_read) return MB_FAILURE;
     }
     else if (strncmp(records[current_attrib].att_string.c_str(), "COMPOSITE_ATTRIB @9 UNIQUE_ID", 29) == 0) {

Repository URL: https://bitbucket.org/fathomteam/moab/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.


More information about the moab-dev mailing list