How to int. select node from STL mesh

Hello,

I use the following code to read and display a stl mesh. Which works fine. However, I cannot figure out how  to select a node with the mouse. How can I activate the node selection mode in order to do that? I hope someone can help, as I am new to OCCT. Thanks a lot in advance!

 

  OSD_Path aFile(fileNameSTL.toUtf8().constData());
  Handle(StlMesh_Mesh) aSTLMesh = RWStl::ReadFile(aFile, aIndicator);
  Handle(MeshVS_Mesh) aMesh = new MeshVS_Mesh();
  Handle(XSDRAWSTLVRML_DataSource) aDS = new XSDRAWSTLVRML_DataSource(aSTLMesh);
  aMesh->SetDataSource(aDS);
  aMesh->AddBuilder(new MeshVS_MeshPrsBuilder(aMesh), Standard_True);//False -> No selection
  aMesh->GetDrawer()->SetBoolean(MeshVS_DA_DisplayNodes, Standard_True); //MeshVS_DrawerAttribute
  aMesh->GetDrawer()->SetBoolean(MeshVS_DA_ShowEdges, Standard_False);
  aMesh->GetDrawer()->SetMaterial(MeshVS_DA_FrontMaterial, Graphic3d_NOM_BRASS);
  aMesh->SetColor(Quantity_NOC_AZURE);
  aMesh->SetDisplayMode(MeshVS_DMF_Shading); // Mode as defaut
  aMesh->SetHilightMode(MeshVS_DMF_WireFrame); // Wireframe as default hilight mode

  aMesh->SetMeshSelMethod(MeshVS_MSM_NODES);

  myOccViewer->getContext()->Display(aMesh,1,0);

Hello World's picture

How did you solve it ?