How to obtain TopoDS_Edge from TopoDS_Shape?

Hi. I'm using TopExp_Explorer to iterate over edges inside TopoDS_Face. Each object is definitely an TopoDS_Edge (ShapeType == TopAbs_EDGE). But BRep_Tool.Curve() doesn't accept it and insists that it is an TopoDS_Shape. How to downcast it? I'm using not C++ version, there is no Downcast method. TopoDS_Edge(object) is also doesn't work, because the TopoDS_Edge constructor doesn't take any parameters.

Mikhail Sazonov's picture

Use the method TopoDS::Edge(aShape) to downcast.

W W's picture

Thanks.