For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings


Need to speed up your development?
Have a look at our:

Samples & Tools


Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

access Objects of TObj_Model

Mimosa Olive's picture


I guess I don't have much experience with Opencascade. I have started a program, in which I can draw the bottle tutorial. Now I would like to show the objects (in my case only the bottle) in a tree product structure. I am trying to access all the objects doing this:

Handle(TObj_ObjectIterator) objs = Handle(TObj_Model)::GetObjects();

but the compiler says 'GetObjects' is not a member of 'opencascade::handle<TObj_Model>'

I also tried on 2 lines with the same error:

Handle_TObj_Model mModel;
Handle(TObj_ObjectIterator) objs = mModel.GetObjects();

What am I missing? Thanks!

Andrey BETENEV's picture

Use -> instead of dot

Handle(TObj_ObjectIterator) objs = mModel->GetObjects();

Mimosa Olive's picture

Great! Now however I have a linking error:

undefined reference to `TDF_Attribute::DynamicType() const'

Which library am I missing?

Mimosa Olive's picture

I got it to compile now by adding the additional library, in a very particular order. Also the declaration of the needed .h files had to be ordered specifically.

When I test run the program however, the gui does not show up and the exe stops after 1 second. In Debug mode it throws:

Process terminated with status 255.

This means something went of out range. My only 2 lines creating this bug are:

Handle_TObj_Model mModel;

Handle(TObj_ObjectIterator) objs = mModel->GetObjects();

Contact us

Attention: DO NOT use this form for all kind of request for the removal of your personal data. Please follow this link for such cases.