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

xcaf-doc, multiple views with different Objects, possible?

H Hahn's picture


I have an (XCAF)-document with attributs for different layers, and multiple views which repesent the document. I can switch the visibility-attribut of the layers and the views are updated.

What I want to do now is:
Show objects from differnt layers in differnt views.
For example in View1 Layer1 is visible, in View2 Layer2 is visible and in View3 all Layers are visible.

Is this possible with XCAF?

I was thinking of using one Interactive Context per view. But this causes some Problems:

1) an object highlighted (by Mouse) in one view is not highlighted in the other views ( different contexts). Or is there an solution?

2) I use the Document for getting an ID of selected Objects, by downcasting AISPresentation to an ais_interactiveObject receiving the label from it.
Can I attach multiple interactive_contexts to the document? (using the same data)

All I managed jet is to dublicate the whole document. And have one document per view where I can set layer visibility.
This is an laborious way and perhaps someone knows an better way.
I still have to solve Problem 1). At the moment I'm thinkinh of check for highlighted objects after each CTX->MoveTo() an highlighting the according Objects in the order views.

Any better solutions appreciated!!


h hahn

Is there an command to update all presentations after setting layervisibility. At the moment I have to iterate trough my labels and call Ais_presentation->Display(1) for each. Isn't there somethind like doc->Update()?

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.