]> OCCT Git - occt-copy.git/commitdiff
Test case bugs/modalg/buc60462_2 was changed: - tolerances were corrected on input...
authorabk <abk@opencascade.com>
Wed, 9 Jan 2013 12:35:15 +0000 (16:35 +0400)
committerabk <abk@opencascade.com>
Fri, 1 Mar 2013 12:19:50 +0000 (16:19 +0400)
src/BRepGProp/BRepGProp.cxx

index 29f32083dee2507681524b2311602270c3266a74..f6700f9e028f3c5b1b7c82fc893ae75dadea1055 100755 (executable)
@@ -24,7 +24,9 @@
 #include <BRepGProp_VinertGK.hxx>
 #include <BRepGProp_Face.hxx>
 #include <BRepGProp_Domain.hxx>
+#include <GProp_PGProps.hxx>
 #include <TopoDS.hxx>
+#include <TopoDS_Vertex.hxx>
 #include <BRepAdaptor_Curve.hxx>
 
 #include <TopTools.hxx>
@@ -33,6 +35,7 @@
 #include <BRepCheck_Shell.hxx>
 #include <TopTools_ListIteratorOfListOfShape.hxx>
 #include <BRep_TEdge.hxx>
+#include <BRep_TVertex.hxx>
 #ifdef DEB
 static Standard_Integer AffichEps = 0;
 #endif
@@ -65,6 +68,20 @@ void  BRepGProp::LinearProperties(const TopoDS_Shape& S, GProp_GProps& SProps){
       BRepGProp_Cinert CG(BAC,P);
       SProps.Add(CG);
     }
+    else
+    {
+      GProp_PGProps aPD;
+      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();
+        aP.Transform(anES.Location());
+        aP.Transform(S.Location());
+        aPD.AddPoint(aP);
+      }
+      SProps.Add(aPD);
+    }
   }
 }