Selecting planes in AIS_Trihedron

I would like to have a possibility of selecting planes in AIS_Trihedron object, but I couldn't find any information about it (except one which is now deprecated - I'm using OpenCascade 7.5.0). Could you please answer if there any chance of having selectable planes in AIS_Trihedron?

Kirill Gavrilov's picture

Have you tried activating selection modes defined by AIS_TrihedronSelectionMode enumeration using AIS_InteractiveContext::Activate()?

Handle(AIS_InteractiveContext) theCtx;
// display trihedron
Handle(Geom_Axis2Placement) aPlace = new Geom_Axis2Placement (gp::Origin(), gp::DZ(), gp::DX());
Handle(AIS_Trihedron) aTrihPrs = new AIS_Trihedron (aPlace);
theCtx->Display (aTrihPrs, false);
// change active selection mode(s)
theCtx->SetSelectionModeActive (aTrihPrs, AIS_TrihedronSelectionMode_MainPlanes,
                                true, AIS_SelectionModesConcurrency_GlobalOrLocal);
Ekaterina Evdokimova's picture

Kirill, no, I haven't. I've tried your solution and now it works fine! Thank you very much!