0024096: Eliminate compiler warning C4505 in MSVC++ with warning level 4
[occt.git] / src / BRepFeat / BRepFeat_MakePrism.cxx
index 7453add..493ad8d 100755 (executable)
@@ -94,23 +94,6 @@ static void MajMap(const TopoDS_Shape&, // base
 static Standard_Boolean ToFuse(const TopoDS_Face& ,
                               const TopoDS_Face&);
 
-
-static void SetGluedFaces(const TopoDS_Face& theSkface,
-                         const TopoDS_Shape& theSbase,
-                         const TopoDS_Shape& thePbase,
-                         const TopTools_DataMapOfShapeListOfShape& theSlmap,
-                          LocOpe_Prism&,
-                         TopTools_DataMapOfShapeShape&);
-
-#ifdef DEB
-static void VerifGluedFaces(const TopoDS_Face& theSkface,
-                           const TopoDS_Shape& thePbase,
-                           Handle(Geom_Curve)& theBCurve,
-                           TColGeom_SequenceOfCurve& theCurves,
-                           LocOpe_Prism& thePrism,
-                           TopTools_DataMapOfShapeShape& theMap);
-#endif
-
 static Standard_Real HeightMax(const TopoDS_Shape& theSbase,
                               const TopoDS_Face& theSkface,
                               const TopoDS_Shape& theSFrom,
@@ -301,7 +284,6 @@ void BRepFeat_MakePrism::Perform(const Standard_Real Length)
       if(ToFuse(ff, FFace)) {
        TopTools_DataMapOfShapeListOfShape sl;
        if(!FFace.IsSame(myPbase) && BRepFeat::IsInside(ff, FFace)) 
-//       SetGluedFaces(ff, mySbase, FFace, sl, thePrism, myGluedF);
        break;
       }
     }
@@ -309,9 +291,7 @@ void BRepFeat_MakePrism::Perform(const Standard_Real Length)
 
 // management of faces of gluing given by the user
 
-//  SetGluedFaces(mySkface, mySbase, myPbase, mySlface, thePrism, myGluedF);
   GluedFacesValid();
-//  VerifGluedFaces(mySkface, myPbase, myBCurve, myCurves, thePrism, myGluedF);
 
   if(!myGluedF.IsEmpty()) {   // case gluing
     myJustGluer = Standard_True;
@@ -393,11 +373,7 @@ void BRepFeat_MakePrism::Perform(const TopoDS_Shape& Until)
     MajMap(myPbase,thePrism,myMap,myFShape,myLShape);    
     myGShape = VraiPrism;
     GeneratedShapeValid();
-
-    //SetGluedFaces(mySkface, mySbase, myPbase, mySlface, thePrism, myGluedF);
     GluedFacesValid();
-//    VerifGluedFaces(mySkface, myPbase, myBCurve, myCurves, thePrism, myGluedF);
-
     thePrism.Curves(myCurves);
     myBCurve = thePrism.BarycCurve();
     GlobalPerform();
@@ -584,12 +560,7 @@ void BRepFeat_MakePrism::Perform(const TopoDS_Shape& From,
     
     myGShape = VraiPrism;
     GeneratedShapeValid();
-
-    //SetGluedFaces(TopoDS_Face(), // on ne veut pas binder mySkface
-       //        mySbase, myPbase, mySlface, thePrism, myGluedF);
     GluedFacesValid();
-////    VerifGluedFaces(mySkface, myPbase, myBCurve, myCurves, thePrism, myGluedF);
-
     thePrism.Curves(myCurves);
     myBCurve = thePrism.BarycCurve();
     GlobalPerform();
@@ -1017,11 +988,7 @@ void BRepFeat_MakePrism::PerformUntilHeight(const TopoDS_Shape& Until,
     
     myGShape = VraiPrism;
     GeneratedShapeValid();
-
-    //SetGluedFaces(mySkface, mySbase, myPbase, mySlface, thePrism, myGluedF);
     GluedFacesValid();
-//    VerifGluedFaces(mySkface, myPbase, myBCurve, myCurves, thePrism, myGluedF);
-
     thePrism.Curves(myCurves);
     myBCurve = thePrism.BarycCurve();
     GlobalPerform();
@@ -1198,125 +1165,6 @@ Standard_Integer SensOfPrism(const Handle(Geom_Curve) C,
   return sens;
 }
 
-
-//=======================================================================
-//function : SetGluedFaces
-//purpose  : management of gluing faces
-//=======================================================================
-
-static void SetGluedFaces(const TopoDS_Face& theSkface,
-                         const TopoDS_Shape& theSbase,
-                         const TopoDS_Shape& thePbase,
-                         const TopTools_DataMapOfShapeListOfShape& theSlmap,
-                         LocOpe_Prism& thePrism,
-                         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 {
-    for (exp.Init(theSbase,TopAbs_FACE); exp.More(); exp.Next()) {
-      if (exp.Current().IsSame(theSkface)) {
-       TopExp_Explorer exp2;
-       for (exp2.Init(thePbase,TopAbs_FACE);exp2.More();exp2.Next()) {
-         theMap.Bind(exp2.Current(),theSkface);
-       }
-       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();
-      TopTools_ListIteratorOfListOfShape it;
-      for (it.Initialize(ledg); it.More(); it.Next()) {
-       const TopTools_ListOfShape& gfac = thePrism.Shapes(it.Value());
-       if (gfac.Extent() != 1) {
-#ifdef DEB
-         Standard_Boolean trc = BRepFeat_GettraceFEAT();
-         if (trc)  cout << " BRepFeat_MakePrism : Pb SetGluedFace" << endl;
-#endif
-       }
-       theMap.Bind(gfac.First(),fac);
-      }
-    }
-  }
-}
-
-
-//=======================================================================
-//function : VerifGluedFaces
-//purpose  : Verification  intersection Tool/theSkface = thePbase
-//           If yes -> OK otherwise -> case without gluing
-//=======================================================================
-#ifdef DEB
-static void VerifGluedFaces(const TopoDS_Face& theSkface,
-                           const TopoDS_Shape& thePbase,
-                           Handle(Geom_Curve)& theBCurve,
-                           TColGeom_SequenceOfCurve& theCurves,
-                           LocOpe_Prism& thePrism,
-                           TopTools_DataMapOfShapeShape& theMap)
-{
-  Standard_Boolean GluedFaces = Standard_True;
-  TopoDS_Shape VraiPrism = thePrism.Shape();
-  
-  TColGeom_SequenceOfCurve scur;
-  thePrism.Curves(theCurves);
-  theBCurve = thePrism.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 18:07:35 2002 f
-    //BRepAlgo_Cut trP(VraiPrism,Comp);
-    BRepAlgoAPI_Cut trP(VraiPrism,Comp);
-    //modified by NIZNHY-PKV Thu Mar 21 18:07:39 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 Prism/skface : no gluing" << endl;
-#endif
-      theMap.Clear();
-    }
-  }
-}
-#endif
-
 //=======================================================================
 //function : MajMap
 //purpose  : management of descendants