Getting the Brep_TVertex

I am creating a vertices using BrepBuilder_MakeVertex of a point. I want to get the points and change its value. So first i got the AIS Shape using the Shape. Handle_TopoDS_TShape tsp = shp.TShape(); will return me the T_Shape of the Vertex. How to get the Brep_TVertex values using the TShape i am having. Please Help

Thanks & Regards
Vidhyan

Roman Lygin's picture

Hi Vidhyan,

Take a look at the 2nd and the 3rd diagrams at my post here http://opencascade.blogspot.com/2009/02/topology-and-geometry-in-open-ca....
In fact, TShape returned by TopoDS_Vertex::TShape() *is* BRep_TVertex, so you can cast:

Handle(BRep_TVertex) aTVertex = Handle(BRep_TVertex)::DownCast (aVertex.TShape());

However normally you never need this (beware of doing this in places of extensive computations). If you simply need a point underlying a vertex, use BRep_Tool::Pnt().

Roman

---
opencascade.blogspot.com - blog on Open CASCADE