[cgma-dev] Seg fault when loading OCC geometry with associations

Tim Tautges tautges at mcs.anl.gov
Tue Mar 31 12:49:55 CDT 2009



Jed Brown wrote:
> On Mon 2009-03-30 16:43, Tim Tautges wrote:
>> To re-iterate, iRel/Lasso currently isn't able to re-associate based on  
>> the relations saved on tags on the mesh/geometry.  It's necessary to  
>> create GEOM_DIMENSION sets in the mesh and assign appropriate mesh  
>> entities to those sets.
> 
> I roughly understood this from before.  I had the appropriate sets, but
> was not tagging them with GEOM_DIMENSION and GLOBAL_ID correctly.  My
> confusion is that it related *something*.  I would much prefer that it
> just doesn't find a relation than that it picks up the wrong relations.
> Any guess, at least without expensive heuristics, is likely to be wrong.
> The updated test case (attached) works correctly, which is enough for
> me.  It would be convenient to have an iRel_extensions.h with a function
> to encode a relation as permanent tags on the mesh?
> 
>> Eventually we do need the ability to save and restore the relations tag  
>> directly, since this will save some time in cases where you're matching  
>> multiple tags in the infer function.  This is a bit trickier than it  
>> looks, since the EntityHandle tag type won't make sense across different  
>> interfaces (i.e. the entity handle for a geom entity can't be saved to a  
>> file from the mesh interface, since that's just a pointer to the  
>> RefEntity in CGM, which won't come back the same way).
> 
> GLOBAL_ID on the geometry is currently immutable
> (cf. CGMTagManager::setPresetTagData).  This means that in practice, a
> relation is encoded using tags on the mesh.  With the current
> convention, only one relation can be placed on the mesh.  A more
> symmetric alternative is to set GLOBAL_ID on the entire mesh,
> independent of any relation and separately save the relations (as mesh
> GLOBAL_ID -> geom GLOBAL_ID or vice versa).  This could be a separate
> file or lumped into the mesh file.
> 

That's essentially what I envision the solution to be too, though I'd 
use something other than GLOBAL_ID (probably some tag name that gets 
written to both sides, like the association tag is now but not based on 
handles).  One other issue is that some of the tag code in iGeom is 
messed up, so I have a rewrite of that pending too.

- tim

> Jed

-- 
================================================================
"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