Re: [cgma-dev] Observer question?
Hi, David: As Tim said, after boolean operation, the engine determines which geometry get changed. And if you see GEOMETRY_TOPOLOGY_MODIFIED, you definitely need to call OCCBody::update_OCC_entity to get them synched. Or if you have BRepBuilderAPI_MakeShape *op or LocOpe_SplitShape* sp, you can call op->Modified(old) or op->Generated(old) or sp->DescendantShapes(old) to see what the engine returns for the changed geometry. Again, the boolean operation for OCC engine is not perfect itself, especially dealing with failure case, for issues that you think the operation should or shouldn't work, you can report them at http://www.opencascade.org/org/forum/ . Best luck for you! Jane Hu Asst. Researcher Dept. of Engineering Physics UW @ Madison "And we know that for those who love God, that is, for those who are called according to his purpose, all things are working together for good." (Romans 8:28) ________________________________ From: Tim Tautges <[email protected]> To: David Thompson <[email protected]> Cc: [email protected]; Jiangtao Hu <[email protected]> Sent: Monday, July 22, 2013 12:45 PM Subject: Re: [cgma-dev] Observer question? On 07/22/2013 11:01 AM, David Thompson wrote:
Hi Tim,
Good hearing from you, when did you leave Sandia?
It's been about a year.
On the observer question, entities that are not intersected will persist, including the RefEntity's, though whether something isn't modified depends on what the engine does (it's keyed off whether the underlying engine changes its topological entity). With Cubit, we've had mostly expected results that way, so no big worries.
Any idea about the OCC backend? I ask because the attached program calls webcut on one of the example models (62_shaver1.brep) and faces to both sides of the cut sheet (as well as one that intersects the sheet) all report GEOMETRY_TOPOLOGY_MODIFIED.
Hmm, I haven't worked much with the OCC backend, so I couldn't say. I'm cc'ing Jane Hu, who developed that backend, she might know.
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). - 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 ([email protected]) (telecommuting from UW-Madison) phone (gvoice): (608) 354-1459 1500 Engineering Dr. fax: (608) 263-4499 Madison, WI 53706
participants (1)
-
Jiangtao Hu