DiscussionsIssue archiveVisualization and 3D Viewer

Archived discussion

Mesh Selection

Visualization and 3D ViewerMon, 09/12/2022 - 17:574 replies

Browse this forum
QuestionAuthor

Dear All,
I have loaded and visualized a STL file using RWStl::ReadFile and then 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).

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.
Any reason for this?
Where am I doing wrong?
Thanks in advance

Discussion

4 archived replies

Posts are displayed in their archived order.

01Commenter-1

Handle(TColStd_HPackedMapOfInteger) nodes = new TColStd_HPackedMapOfInteger(aMesh->GetDataSource()->GetAllNodes());
aMesh->SetSelectableNodes(nodes);

02Author

Thanks Giovanni.
(Grazie Giovanni, proverò la tua soluzione)

03Commenter-1

Ciao Author
this is exactly the same solution I adopted. See video.
Commenter-1

04Commenter-2

Giovanni
I tried and still didn't respond, is it convenient to give a case code? Thank you so much!