get topods & geom OCC from ID

HELLO;

if I'don't whirlwind. OCC doesn't put some ID on their entities "TopoDS & Geom" like for example STEP, ACIS...etc (#100# advanced_face...)

my Question is how to set an ID(name or integer refere to Entitees Topology & Geometry) in the first time, and to send this ID to OCC in the second time, and finally get him, to retrive the shape and Geometry OCC.

ANY IDEA MAY BE VERY HAPPY. please Help
THINK YOU

DeleDivaneeh's picture

I wonder this question, too!

My problem is same as with you.

Any suggestions?

stifan's picture

HI osman;

when you find a solution, said me.
and I also make the same thing.

Have a nice day...

Hugues Delorme's picture

Maybe give an eye at thread http://www.opencascade.org/org/forum/thread_7244/

Let us know if it was helpful.

DeleDivaneeh's picture

Thank you Hugues!

The post you sent is very useful,but I have another question.

In the post,it is said that we can get the ID's of the shapes like that :

**************************************************************
When you need the shape id for the TopoDS_Shape aShape ...
int shape_id = 0;
if ( _map_shape_int.IsBound( aShape ) ) {
shape_id = _map_shape_int( aShape );
}

***************************************************************
But how can we get the shapes by giving their ID's?I want to give the ID of the shape as an argument..

Hugues Delorme's picture

Why don't you use a std::map for example ?

DeleDivaneeh's picture

TopTools_DataMapOfIntegerShape class includes the methods that you want.

Standard_EXPORT const TopoDS_Shape & Find (const Standard_Integer &K) const

method takes the ID value as an argument and then returns the shape.