0024096: Eliminate compiler warning C4505 in MSVC++ with warning level 4
[occt.git] / src / BRepFeat / BRepFeat_MakeDPrism.cxx
index ddab4dc..7578fe6 100755 (executable)
@@ -94,23 +94,6 @@ static void MajMap(const TopoDS_Shape&,
                   TopoDS_Shape&,  // myFShape
                   TopoDS_Shape&); // myLShape
 
-
-static void SetGluedFaces(const TopoDS_Face& theSkface,
-                         const TopoDS_Shape& theSbase,
-                         const TopoDS_Shape& thePbase,
-                         const TopTools_DataMapOfShapeListOfShape& theSlmap,
-                          LocOpe_DPrism&,
-                         TopTools_DataMapOfShapeShape&);
-
-#ifdef DEB
-static void VerifGluedFaces(const TopoDS_Face& theSkface,
-                           const TopoDS_Shape& thePbase,
-                           Handle(Geom_Curve)& theBCurve,
-                           TColGeom_SequenceOfCurve& theCurves,
-                           LocOpe_DPrism& theDPrism,
-                           TopTools_DataMapOfShapeShape& theMap);
-#endif
-
 static Standard_Real HeightMax(const TopoDS_Shape& theSbase,
                               const TopoDS_Face& theSkface,
                               const TopoDS_Shape& theSFrom,
@@ -307,7 +290,6 @@ void BRepFeat_MakeDPrism::Perform(const Standard_Real Height)
       const TopoDS_Face& ff = TopoDS::Face(exp.Current());
       if(ToFuse(ff, FFace)) {
        TopTools_DataMapOfShapeListOfShape sl;
-       //SetGluedFaces(ff, mySbase, FFace, sl, theDPrism, myGluedF);
        break;
       }
     }
@@ -315,9 +297,7 @@ void BRepFeat_MakeDPrism::Perform(const Standard_Real Height)
 
 // management of gluing faces 
 
-  //SetGluedFaces(mySkface, mySbase, theBase, mySlface, theDPrism, myGluedF);
   GluedFacesValid();
-//  VerifGluedFaces(mySkface, theBase, myBCurve, myCurves, theDPrism, myGluedF);
 
   if(!myGluedF.IsEmpty()) {   // case gluing
     myJustGluer = Standard_True;
@@ -407,11 +387,7 @@ void BRepFeat_MakeDPrism::Perform(const TopoDS_Shape& Until)
       return;
     }
 
-    //SetGluedFaces(mySkface, mySbase, theBase, mySlface, theDPrism, myGluedF);
     GluedFacesValid();
-//    VerifGluedFaces(mySkface, theBase, myBCurve, myCurves, theDPrism, myGluedF);
-   
-
     theDPrism.Curves(myCurves);
     myBCurve = theDPrism.BarycCurve();
     GlobalPerform();
@@ -572,7 +548,6 @@ void BRepFeat_MakeDPrism::Perform(const TopoDS_Shape& From,
     GeneratedShapeValid();
 
   // management of gluing faces 
-    //SetGluedFaces(TopoDS_Face(), // on ne veut pas binder mySkface
        //        mySbase, myPbase, mySlface, theDPrism, myGluedF);
     GluedFacesValid();
     theDPrism.Curves(myCurves);
@@ -983,10 +958,7 @@ void BRepFeat_MakeDPrism::PerformUntilHeight(const TopoDS_Shape& Until,
       return;
     }
 
-    //SetGluedFaces(mySkface, mySbase, theBase, mySlface, theDPrism, myGluedF);
     GluedFacesValid();
-//    VerifGluedFaces(mySkface, theBase, myBCurve, myCurves, theDPrism, myGluedF);
-
     theDPrism.Curves(myCurves);
     myBCurve = theDPrism.BarycCurve();
     GlobalPerform();
@@ -1262,125 +1234,6 @@ Standard_Integer SensOfPrism(const Handle(Geom_Curve) C,
   return sens;
 }
 
-
- //=======================================================================
-//function : SetGluedFaces
-//purpose  : 
-//=======================================================================
-
-static void SetGluedFaces(const TopoDS_Face& theSkface,
-                         const TopoDS_Shape& theSbase,
-                         const TopoDS_Shape& thePbase,
-                         const TopTools_DataMapOfShapeListOfShape& theSlmap,
-                         LocOpe_DPrism& theDPrism,
-                         TopTools_DataMapOfShapeShape& theMap)
-{
-  TopExp_Explorer exp;
-  if (!theSkface.IsNull() && thePbase.ShapeType() == TopAbs_FACE) {
-    for (exp.Init(theSbase,TopAbs_FACE); exp.More(); exp.Next()) {
-      if (exp.Current().IsSame(theSkface)) {
-       theMap.Bind(thePbase,theSkface);
-       break;
-      }
-    }
-  }
-  else {
-    TopExp_Explorer exp2;
-    for (exp.Init(thePbase,TopAbs_FACE);exp.More();exp.Next()) {
-      const TopoDS_Face& fac = TopoDS::Face(exp.Current());
-      for (exp2.Init(theSbase,TopAbs_FACE);exp2.More();exp2.Next()) {
-       if (exp2.Current().IsSame(fac)) {
-         theMap.Bind(fac,fac);
-         break;
-       }
-      }
-    }
-  }
-
-  // Sliding
-  TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itm(theSlmap);
-  if(!theSlmap.IsEmpty()) {
-    for (; itm.More(); itm.Next()) {
-      const TopoDS_Face& fac = TopoDS::Face(itm.Key());
-      const TopTools_ListOfShape& ledg = itm.Value();
-      for (TopTools_ListIteratorOfListOfShape it(ledg); it.More(); it.Next()) {
-       const TopTools_ListOfShape& gfac = theDPrism.Shapes(it.Value());
-       if (gfac.Extent() != 1) {
-#ifdef DEB
-         Standard_Boolean trc = BRepFeat_GettraceFEAT();
-         if (trc) cout << " BRepFeat_MakeDPrism : Pb SetGluedFace" << endl;
-#endif
-       }
-       theMap.Bind(gfac.First(),fac);
-      }
-    }
-  }
-}
-
-
-//=======================================================================
-//function : VerifGluedFaces
-//purpose  : Checking intersection Tool/theSkface = thePbase
-//           if yes -> OK if no -> case without gluing
-//=======================================================================
-#ifdef DEB
-static void VerifGluedFaces(const TopoDS_Face& theSkface,
-                           const TopoDS_Shape& thePbase,
-                           Handle(Geom_Curve)& theBCurve,
-                           TColGeom_SequenceOfCurve& theCurves,
-                           LocOpe_DPrism& theDPrism,
-                           TopTools_DataMapOfShapeShape& theMap)
-{
-  Standard_Boolean GluedFaces = Standard_True;
-  TopoDS_Shape VraiDPrism = theDPrism.Shape();
-  
-  TColGeom_SequenceOfCurve scur;
-  theDPrism.Curves(theCurves);
-  theBCurve = theDPrism.BarycCurve();    
-  scur.Clear();    
-  scur.Append(theBCurve);
-  LocOpe_CSIntersector ASI(theSkface);
-  ASI.Perform(scur);
-  if (ASI.IsDone() && ASI.NbPoints(1) >=1) {
-    TopAbs_Orientation Or = ASI.Point(1,1).Orientation();
-    TopoDS_Face FSk = ASI.Point(1,1).Face();
-    TopoDS_Shape Comp;
-    BRep_Builder B;
-    B.MakeCompound(TopoDS::Compound(Comp));
-    TopoDS_Solid S = BRepFeat::Tool(theSkface, FSk, Or);
-    if (!S.IsNull()) B.Add(Comp,S);
-    //modified by NIZNHY-PKV Thu Mar 21 17:48:45 2002 f
-    //BRepAlgo_Cut trP(VraiDPrism,Comp);
-    BRepAlgoAPI_Cut trP(VraiDPrism,Comp);
-    //modified by NIZNHY-PKV Thu Mar 21 17:48:49 2002 t
-    TopoDS_Shape Cutsh = trP.Shape();
-    TopExp_Explorer ex(Cutsh, TopAbs_SOLID);
-    for(; ex.More(); ex.Next()) {
-      TopExp_Explorer ex1(ex.Current(), TopAbs_FACE);
-      for(; ex1.More(); ex1.Next()) {
-       const TopoDS_Face& fac1 = TopoDS::Face(ex1.Current());
-       TopExp_Explorer ex2(thePbase, TopAbs_FACE);
-       for(; ex2.More(); ex2.Next()) {
-         const TopoDS_Face& fac2 = TopoDS::Face(ex2.Current());
-         if(fac1.IsSame(fac2)) break;
-       }
-       if (ex2.More()) break;
-      }
-      if (ex1.More()) continue;
-      GluedFaces = Standard_False;
-      break;
-    }
-    if (!GluedFaces) {
-#ifdef DEB
-      Standard_Boolean trc = BRepFeat_GettraceFEAT();
-      if (trc) cout << " Intersection DPrism/skface : no gluing" << endl;
-#endif
-      theMap.Clear();
-    }
-  }
-}
-#endif
-
 //=======================================================================
 //function : MajMap
 //purpose  :