How to return points from AIS Selection

I have written some code which queries a the TopoDS_Shape in the local AIS context. Using the BREp_GProps class methods I can ask for the linear, surface and volume properties for edges, faces and comp/solids. However, my question is how to return the point when a Vertex is selected in the local context?

I would be grateful if anyone can let me know how to do this.


David Bramall

Stephane Routelous's picture


you can have the TopoDS_Vertex with the same way as the other shapes. After that , use :

TopoDS_Vertex theVertex = myAISContext->SelectedShape();

gp_Pnt thePoint = BRep_Tool::Pnt(theVertex);