[MOAB-dev] commit/MOAB: iulian07: replace an assert in cubit file reader

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Tue Aug 20 16:16:03 CDT 2013


1 new commit in MOAB:

https://bitbucket.org/fathomteam/moab/commits/04cf6c73e18d/
Changeset:   04cf6c73e18d
Branch:      master
User:        iulian07
Date:        2013-08-20 23:08:50
Summary:     replace an assert in cubit file reader

asserts are triggered in debug mode only
 This assert should not be ignored in optimized mode,
because if we ignore it,  we are setting some tags on entity handle 0,
which is not what we want.
Instead, we will get out early from that routine;
Entity Handle is 0 in this case because we do not have a geometric mesh set
defined for a geometric entity that is not meshed.

Affected #:  1 file

diff --git a/src/io/Tqdcfr.cpp b/src/io/Tqdcfr.cpp
index dc841fc..b930ab6 100644
--- a/src/io/Tqdcfr.cpp
+++ b/src/io/Tqdcfr.cpp
@@ -2492,7 +2492,10 @@ ErrorCode Tqdcfr::parse_acis_attribs(const unsigned int entity_rec_num,
     records[entity_rec_num].entity = uidSetMap[uid];
   }
 
-  assert(records[entity_rec_num].entity);
+  if (0==records[entity_rec_num].entity)
+    return MB_SUCCESS; // we do not have a MOAB entity for this, skip
+
+  //assert(records[entity_rec_num].entity);
   
     // set the id
   if (id != -1) {

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