Mesh selection


CAD practitioner
I have visualized a STL file using RWStl::ReadFile and then with MeshVS_Mesh function calls( See Attached PDF file).
The mesh comes well displayed and with smooth and fluid movements while zooming,orbiting and so on , despite about 8000 Nodes and 17 000 triangles
I am also playing around face selection of triangle mesh and it runs fine.
In fact,by calling the function
m_context->Activate(aMesh, MeshVS_SMF_Face)
the triangles of the mesh located under the mouse cursor are highlighted (as shown in fig. 2) and I am able to click and select a triangle of the mesh.
But on the other hand, by calling the same above function with the "MeshVS_SMF_Node" (instead of MeshVS_SMF_Face) parameter, the nodes are NOT highlighted; it does happen nothing ; I was expecting node highligths for selection.
Any reason for this?
Any suggestion on how select a vertex of the mesh?
Where am I doing wrong?
Thanks in advance


  • mesh (3).pdf
    198.5 KB · Views: 8


Staff member
Hello @devdscm

You may check selection of vertices on the mesh using the next commands in DRAW interpreter:

mesh3delem m
vselmode m 1 1

The result is highlighted vertices on the prepared mesh:

I would propose you to debug it and follow the way how it's done in this scenario and in yours.
You correctly activate mesh with the 'MeshVS_SMF_Node' mode. This way works in this scenario. To check it, set the breakpoint into 'MeshVS_Mesh::ComputeSelection' and look what is happening inside, whether it goes into the enum processing.

Best regards


CAD practitioner
Hello, thanks for your reply.
So, if I well understand, you propose to debug : this mean insert a breakpoint at MeshVS_Mesh::ComputeSelection then I have to recompile OCC libraries.Is it correct?
No other chances?


Staff member
You may do this in your code before, to be sure that this mode is processed.
Last edited: