From: abk Date: Wed, 13 Feb 2013 12:15:42 +0000 (+0400) Subject: Access to vertex 3D point and edge degenerated flag was made through class X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FCR23696_2;p=occt-copy.git Access to vertex 3D point and edge degenerated flag was made through class BRep_Tool. --- diff --git a/src/DBRep/DBRep.cxx b/src/DBRep/DBRep.cxx index 00a3d98ffd..a65eab57ee 100755 --- a/src/DBRep/DBRep.cxx +++ b/src/DBRep/DBRep.cxx @@ -51,7 +51,7 @@ #include #include #include -#include +#include #include // memory management @@ -631,9 +631,8 @@ static Standard_Integer nexplode(Draw_Interpretor& di, const TopoDS_Shape & aS = aShapes(Index); gp_Pnt GPoint; TopoDS_Edge anES; - Handle_BRep_TEdge anEG; - if (typ != TopAbs_EDGE || (anES = TopoDS::Edge(aS), - anEG = (Handle_BRep_TEdge &)anES.TShape(), !anEG->Degenerated())) + if (typ != TopAbs_EDGE || + (anES = TopoDS::Edge(aS), BRep_Tool::Degenerated(anES))) { GProp_GProps GPr; BRepGProp::LinearProperties(aS,GPr); @@ -645,8 +644,7 @@ static Standard_Integer nexplode(Draw_Interpretor& di, for (TopExp_Explorer aVE(anES, TopAbs_VERTEX); aVE.More(); aVE.Next()) { TopoDS_Vertex aVS = TopoDS::Vertex(aVE.Current()); - Handle_BRep_TVertex & aVG = (Handle_BRep_TVertex &)aVS.TShape(); - gp_Pnt aP = aVG->Pnt(); + gp_Pnt aP = BRep_Tool::Pnt(aVS); aP.Transform(anES.Location()); aP.Transform(aS.Location()); aPD.AddPoint(aP);