]> OCCT Git - occt-copy.git/commitdiff
Access to vertex 3D point and edge degenerated flag was made through class CR23696_2
authorabk <abk@opencascade.com>
Wed, 13 Feb 2013 12:15:42 +0000 (16:15 +0400)
committerabk <abk@opencascade.com>
Wed, 13 Feb 2013 12:15:42 +0000 (16:15 +0400)
BRep_Tool.

src/DBRep/DBRep.cxx

index 00a3d98ffd6d6cdc509da38de9831cf66348f1c7..a65eab57ee670747c0c39c35917804bc776a7f15 100755 (executable)
@@ -51,7 +51,7 @@
 #include <BRepGProp.hxx>
 #include <TColStd_Array1OfReal.hxx>
 #include <Draw_ProgressIndicator.hxx>
-#include <BRep_TEdge.hxx>
+#include <BRep_Tool.hxx>
 #include <GProp_PGProps.hxx>
 
 // 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);