Salome HOME
Windows compatibility
[modules/geom.git] / src / ShHealOper / ShHealOper_FillHoles.cxx
index 8e8eb61c003aac1288505535dd09752fc5d0c840..d9adfbfabd65f43eab6b25085d0f1b302c3f348b 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -186,7 +186,10 @@ Standard_Boolean ShHealOper_FillHoles::Fill(const TopTools_SequenceOfShape& theF
       myDone = (addFace(aSurf,aWire,aCurves2d,aOrders,aSenses) || myDone);
   }
   if(myDone)
+  {
     myResultShape = myContext->Apply(myResultShape);
+    myStatistics.AddModif( "Face created to fill hole" , aSeqWires->Length() );
+  }
   return myDone;
 }
 
@@ -285,10 +288,10 @@ Handle(Geom_Surface) ShHealOper_FillHoles::buildSurface(const TopoDS_Wire& theWi
         BRepAdaptor_Curve adC(ae);
         Handle(BRepAdaptor_HCurve) aHAD= new BRepAdaptor_HCurve(adC);
         Handle(BRepFill_CurveConstraint) aConst =
-            new BRepFill_CurveConstraint (aHAD, (Standard_Integer) GeomAbs_C0, myNbPtsOnCur, myTol3d);
+            new BRepFill_CurveConstraint (Handle(Adaptor3d_HCurve)::DownCast(aHAD), (Standard_Integer) GeomAbs_C0, myNbPtsOnCur, myTol3d);
         //Handle(GeomPlate_CurveConstraint) aConst =
          // new GeomPlate_CurveConstraint(aHAD, (Standard_Integer) GeomAbs_C0, myNbPtsOnCur, myTol3d);
-        aBuilder.Add (aConst);
+        aBuilder.Add (Handle(GeomPlate_CurveConstraint)::DownCast(aConst));
       }
       aBuilder.Perform();
       if(!aBuilder.IsDone())
@@ -336,11 +339,7 @@ Standard_Boolean ShHealOper_FillHoles::addFace(const Handle(Geom_Surface)& theSu
                                                const Handle(TColStd_HArray1OfInteger)& theOrders,
                                                const Handle(TColStd_HArray1OfInteger)& theSenses)
 {
-#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
   BRepBuilderAPI_MakeFace aMakeFace (theSurf, Precision::Confusion());
-#else
-  BRepBuilderAPI_MakeFace aMakeFace (theSurf);
-#endif
   TopoDS_Face aFace = aMakeFace.Face();
   aFace.EmptyCopy();