[MOAB-dev] Vertex-vertex adjacencies in iMesh?

James Porter jvporter at wisc.edu
Thu May 27 18:53:17 CDT 2010


On Thu, 2010-05-27 at 18:00 -0500, Jason Kraftcheck wrote:
> James Porter wrote:
> > Should iMesh return an error when you ask for the vertices adjacent to
> > another vertex? As I understand it (not that I can find a citation), the
> > iMesh spec says that vertices aren't adjacent to themselves, but does it
> > also require that the functions return errors? It seems like it would be
> > better to return no adjacencies instead.
> > 
> 
> IIRC, this was discussed during one of the ITAPS telecons a year or two ago,
> and the decision was that this should result in an error.

That's unfortunate, since it makes what I think is a pretty common use
case really difficult: given an arbitrary collection of entities, get
the set of vertices needed to describe the position of those entities.
Ensuring that the set of vertices contains no duplicates (i.e. is a set)
is also helpful.

Even though returning nothing for a vertex-vertex adjacency isn't ideal
for me, it would at least make it easier to work around the problem. (Of
course, it'd also be easier to work around if the entity type/topology
enums were actually bitmasks.) I can't think of any reason that this
behavior would be detrimental; generally, I'd prefer a library avoid
returning errors unless it absolutely can't figure out a
useful/consistent value to return.

Of course, it's entirely possible I'm preaching to the choir here, and
the ITAPS list is where I need to be arguing this. :)

- Jim



More information about the moab-dev mailing list