[MOAB-dev] r4559 - MOAB/trunk/itaps/imesh

Jason Kraftcheck kraftche at cae.wisc.edu
Wed Mar 9 15:43:04 CST 2011


On 03/09/2011 03:34 PM, James Porter wrote:
> On Wed, 2011-03-09 at 14:42 -0600, Jason Kraftcheck wrote:
>> On 03/09/2011 02:40 PM, James Porter wrote:
>>> Should we do the same for iGeom? I have patches for that and iRel ready
>>> to go.
>>>
>>
>> Probably.  But they don't have the same priority as noone else uses or
>> implements those interfaces.
> 
> So there's one thing still failing here (which is causing failures for
> PyTAPS): iMesh_getTagType on a set-type tag returns iBase_ENTITY_HANDLE.
> The issue, of course, is that MOAB doesn't need to distinguish between
> entities and sets, but ITAPS does. I'm not sure what the best way to fix
> this is. Maybe adding a boolean flag to the MOAB tag to distinguish the
> two?
> 

So what are you proposing?  A new MOAB API to attach some kind of attribute
to tags?  Or a special API call just for this flag?

I'm not sure that this is worth worrying about.  But if you'd rather change
MOAB than your tests then I'd just do something like:
  if moab type is HANDLE
    get all tagged entities
    if range.all_of_type(SET)
      return SET_HANDLE
    else
      return HANDLE

This, of course, won't work if the tag hasn't been set on anything.  But it
will work for file IO.  Another alternative is to keep some list of
set_handle tags in iMesh_MOAB and do the above check on new tags found after
reading a file or creating with an existing moab::Core.

- jason




More information about the moab-dev mailing list