Mon, 02/15/2021 - 23:39
Forums:
Hi, ı have a problem with selection of objects and highlighting them.
For selection in a mode ı do the following code
myContext->Deactivate(shapes[i].shape); myContext->Activate(shapes[i].shape, mode);
myContext->MoveTo(x, y, myView, true);
myContext->Select();
When i choose a mode for example Vertex mode(for a box). I can only choose vertexs but the highlighting always for edges. if i click mouse and choose the object selected object is edges. What i am saying is selecting part is working true but the result (highlithing and selected object == ALWAYS EDGES) is wrong. How can i fix this?
Please help!!
Tue, 02/16/2021 - 09:41
Your description doen't make sense:
So that if quoted sequence of calls is all that you have:
then there is no way selection could highlight any Edge of this Shape.
There is either some bug, or scenario description is incomplete.
Tue, 02/16/2021 - 10:30
Submitted by emir yılmaz on 16 February, 2021 - 08:30
Hİ, thanks for your answer. But still ı have a problem.
myContext->SetSelectionModeActive and myContext->SelectDetected this funcitons does not appear in my library. There is setSelectionMode (not active) and Select() not SelectDetected() . What can ı do to use this funcitons?
Tue, 02/16/2021 - 11:13
That code wasn't meant to propose any solution - it is the same logic as yours, just ported to the latest OCCT version.
AIS_InteractiveContext::SetSelectionModeActive() has been introduced by OCCT 7.3.0, so you are using some older release.
Wed, 02/17/2021 - 09:37
Okay ı got it but what should i do to select face vertex, edges and to highlight them?
Tue, 02/16/2021 - 11:21
Okay ı got it but what should i do to select face vertex, edges and to highlight them?