Forum archiveIssue archiveVisualization and 3D Viewer

Archived discussion

AIS_MultipleConnectedInteractive selection of connected entitites

Visualization and 3D ViewerThu, 02/16/2023 - 12:413 replies

Browse this forum
QuestionAuthor

Hey everyone

i'm trying to build a hierarchical treeview from an imported step file preserving relationship between assemblies and objects. Like the model browser in CAD Assistant.

I've been using AIS_MultipleConnectedInteractive to combine multiple representations into one.
I connect (sub-)assemblies (=AIS_MultipleConnectedInteractive) and leafs (=XCAFPrs_AISObject ) to a root AIS_MultipleConnectedInteractive object.

My question:

1)It behaves as a single object in terms of selection, but is there any way to select the connected objects? So the (sub-)assemblies and leaves?

Discussion

3 archived replies

Posts are displayed in their archived order.

01Author

bump

02Commenter-1

i don't have the solution but want to ask how you get them to be selected as one part?

...
Handle(AIS_MultipleConnectedInteractive) rootDisplay = new AIS_MultipleConnectedInteractive();

Handle(XCAFPrs_AISObject) display1 = new XCAFPrs_AISObject(label1);
rootDisplay->Connect(display1);
Handle(XCAFPrs_AISObject) display2 = new XCAFPrs_AISObject(label2);
rootDisplay->Connect(display2);
...

It shows the parts correct but both are selectable on its own.

I want one part.

Thanks!

03Commenter-2

I only add rootDisplay to the context, that is all i do.