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

How can i select more than one entity? hlp plz

g's picture

I want to select a surface and transform it to a face ,select a point and transform it to a vertex...etc
my probleme is that i can't manage more than one selected object so how can i do a multiple selection without unselecting the previous selected object?can i do this with OCC5?

A.Akbari's picture

Try this:
for(myAISContext->InitSelected(); myAISContext->MoreSelected();
TopoDS_Shape shape=myAISContext->SelectedShape();
//Do some with shape...

g's picture

I already find that but i still get no answer for what you call"//Do some with shape..."
I want to select two faces and get the intersection with BRepAlgoAPI_Cut , can you help me
Handle(AIS_InteractiveObject) obj = myAISContext->Current();
Handle(AIS_Shape) aShape = Handle(AIS_Shape)::DownCast (obj);
//TopoDS_Shape Courrent = aShape->Shape ();
//if(Courrent1.IsNull) Courrent1=aShape->Shape ();
//else if (Courrent2.IsNull)Courrent2=aShape->Shape ();
//TopoDS_Shape ShapeCut = BRepAlgoAPI_Cut(Courrent1,Courrent2);
//Handle (AIS_Shape) aSection = new AIS_Shape(ShapeCut);

Patrik Müller's picture


have you tried "ShiftSelect" as Hugues wrote?



Hugues's picture

If your problem is to allow the user to select more than one shape, then you should do the following :
- when the user picks an object :
- get the (x,y) mouse's coordinates
- call AIS_InteractiveContext::MoveTo (x, y, view_object)
- call AIS_InteractiveContext::ShiftSelect ()

Afterwards you can browse the selected shapes as Akbari shown it.

g's picture

Thanks to All for alL,
Most included OCC samples support multiple-selection (Use Shift-MB1) click to select/unselect.
I had already found that and it's typically what you said so thanks...

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.