How to get all Shape objects in the 3d View

hi, everyone! i have two demands, as follow:

1. I want to get all Shape objects in the 3d View without select those objects。

2. as the same, I want to get all the specific use-define AISInteractiveObject in the 3d View without select those AISInteractiveObject 。

i have been researched for a long time, still can not find any class or function in occ to solve my demand,hope someone give me some help , thanks in advance!

Giovanni Bettega's picture

Ciao Jin

Let myCTX your AIS_InteractiveContext

You can use

AIS_ListOfInteractive aList;
int Signature = -1

// for obtaining AIS_Shape
AIS_KindOfInteractive aKind = AIS_KOI_Shape 

// instead, for obtainin AIS_Object
// AIS_KindOfInteractive aKind = AIS_KOI_Object
// [...]
// other kinds: see AIS_KindOfInteractive enum values
// Signature = -1 makes all independent from predefined
// or custom signatures

myCTX->DisplayedObjects(AIS_KOI_Shape, Signature, aList);

// otherwhise can be useful
// myCTX->ObjectsInside(...)
// myCTX->ObjectsByDisplayStatus(...)



JIN JIN's picture

Ciao Giovanni,

Thanks for your help! It's work right, thanks a lot again!