[cgma-dev] iGeom and RefVolumes vs Bodies

Tim Tautges tautges at mcs.anl.gov
Thu Feb 4 12:18:31 CST 2010



Jason Kraftcheck wrote:
> 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
> 

I can't see any reason to go with bodies; I think it should be volumes.  Therefore, the interface to booleans will have 
to change, to allow passing back multiple volumes if that's the result.

- tim

> 

-- 
================================================================
"You will keep in perfect peace him whose mind is
   steadfast, because he trusts in you."               Isaiah 26:3

              Tim Tautges            Argonne National Laboratory
          (tautges at mcs.anl.gov)      (telecommuting from UW-Madison)
          phone: (608) 263-8485      1500 Engineering Dr.
            fax: (608) 263-4499      Madison, WI 53706



More information about the cgma-dev mailing list