Identification of the nodes in topology

Hello!
May be, my question is simple, or, may be, not, but I'm new in OCC and I couldn't find something like this in examples.
In my program I build big topology (compound) from edges and polygons, every node in it has it's own identifier (number). And when user selects node, I need to know it's identifier for to load info about it. Can I keep this number somewhere in graphic objects and get it by OCC api, or I have to keep it outside and think, how to associate it with selected graphics myself? Or, may be, OCC has his own way to identify such elements and I can use it?
Thanks for any advices.

Sharjith Naramparambath's picture

OCC has its own way to identify the selected entity's topological owner. That's how it returns the selected topological element from the selected graphic entity. But most probably you cannot make good use of the internal representation. All you can do is get the selected topological entity and compare with the known entities for equality while using the geometry-topology-graphics only paradigm of OCC. However, if you use OCAF, you can assign tags to all the entities and retrive or identify them using the same tags and it appears that this is probably what you want.

Alena's picture

Thank you for help!
I didn't read in detail about OCAF later, because my application has C# windows forms interface, and I thought, I can't use this framework. But now I read OCAF manual and get interesting information about Data Framework, it's services really can be very useful for me. And I'm not sure if it possible to use only Data Framework without Application Framework. I'll try to clarify this by experiment, but if you have any ideas on this, I'll be glad to hear them.