[cgma-dev] Observer question?

Tim Tautges tautges at mcs.anl.gov
Mon Jul 22 15:11:54 CDT 2013



On 07/22/2013 02:51 PM, David Thompson wrote:
>>> ...
>>> The notify_observer() method called on observers doesn't appear to provide information about the entity(-ies) replacing those being modified. Is there a way to obtain the resulting split or merged entities? If I create an attribute to hold an ID on faces or edges of interest, how fast will lookup be?
>>
>> If it's anything like ACIS, you generally don't know the correspondence between an entity that gets deleted and the ones used to replace it.  IIRC you don't get many notifications of split or merge type, only of delete type (and implicitly create type, which show up as not having associated CGM entities yet).
>
>
> Hmm. If different engines behave differently, then I guess we shouldn't rely on it for tracking persistent geometry across operations. Would you advise adding UUIDs as attributes for that kind of tracking?
>

No; you'd get exactly the same results.  We hang an attribute on the engine entities pointing to the CGM entities, then 
after the operation, see what's left, and remove the CGM entities that are no longer referenced.  So in a sense, we only 
get "before" and "after" pictures, not "during" pictures.

- tim

> 	Thanks,
> 	David
>

-- 
================================================================
"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 (gvoice): (608) 354-1459      1500 Engineering Dr.
             fax: (608) 263-4499      Madison, WI 53706



More information about the cgma-dev mailing list