[cgma-dev] iGeom and RefVolumes vs Bodies

Jason Kraftcheck kraftche at cae.wisc.edu
Mon Feb 1 17:26:18 CST 2010


I'm starting a new thread (with a more meaningful subject line) for the
discussion on Bodies vs RefVolumes in the iGeom API.

The current iGeom API is broken in that it exposes both Bodies and
RefVolumes.  This is the wrong thing to do because there is only one iBase
type that both must map to (iBase_REGION).  Otherwise which do we return
when a user asks for regions?  Both would definitely be wrong (it would be
redundant and quite confusing.)  I changed a bunch of the query functions in
our implementation (e.g. getEntities, iterator initialization, etc.) in our
iGeom interface to return Bodies rather than RefVolumes.  I'm not sure if
this was the right thing to do, though.

Given the way the interface is currently defined, we have to expose bodies
rather than volumes.  All of the Boolean functions (iGeom_uniteEnts,
iGeom_subtractEnts, iGeom_intersectEnts) return only one entity handle.  All
of these operations can result in a single Body with multiple RefVolumes.
(BTW, what is supposed to happen if these are passed surfaces or curves?)
However, I think that exposing RefVolumes would be better because:
  a) If iBase_FACE means a single, non-disjoint region of a surface, and
     iBase_EDGE means a single, non-disjoint subsection of a curve, then
     presumably iBase_REGION is a single non-disjoint volume.
  b) Having multi-volume bodies w/out any way to get at the individual
     volumes contained in them will make volume meshing very difficult.
  c) We are inconsistent with Cubit.  Cubit's GUI hides the existence of
     Bodies, presenting only volumes.  So we can set the name on a body,
     but that name will never be visible in the Cubit GUI.  Similarly,
     a user can set a name on a volume in Cubit and we'll have no way
     to access that name in iGeom if iGeom exposes only Bodies.

In summary:
  o We must chose only one entity type (Body or RefVolume) for iGeom
  o RefVolume makes a lot more sense for most things
  o The signature for the Boolean functions must change if we expose
     RefVolumes.

- jason



More information about the cgma-dev mailing list