0027067: Avoid use of virtual methods for implementation of destructors in legacy...
[occt.git] / src / TopOpeBRepBuild / TopOpeBRepBuild_ffsfs.cxx
old mode 100755 (executable)
new mode 100644 (file)
index 455745e..21e1082
@@ -1,38 +1,55 @@
 // Created on: 1996-03-07
 // Created by: Jean Yves LEBEY
 // Copyright (c) 1996-1999 Matra Datavision
-// Copyright (c) 1999-2012 OPEN CASCADE SAS
+// Copyright (c) 1999-2014 OPEN CASCADE SAS
 //
-// The content of this file is subject to the Open CASCADE Technology Public
-// License Version 6.5 (the "License"). You may not use the content of this file
-// except in compliance with the License. Please obtain a copy of the License
-// at http://www.opencascade.org and read it completely before using this file.
+// This file is part of Open CASCADE Technology software library.
 //
-// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
-// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
 //
-// The Original Code and all software distributed under the License is
-// distributed on an "AS IS" basis, without warranty of any kind, and the
-// Initial Developer hereby disclaims all such warranties, including without
-// limitation, any warranties of merchantability, fitness for a particular
-// purpose or non-infringement. Please see the License for the specific terms
-// and conditions governing the rights and limitations under the License.
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
 
 
-#include <TopOpeBRepBuild_Builder.jxx>
+#include <BRep_Tool.hxx>
+#include <BRepClass3d_SolidExplorer.hxx>
+#include <BRepTopAdaptor_FClass2d.hxx>
+#include <gp_Pnt.hxx>
+#include <Standard_NoSuchObject.hxx>
+#include <TCollection_AsciiString.hxx>
+#include <TopoDS.hxx>
+#include <TopoDS_Edge.hxx>
+#include <TopoDS_Face.hxx>
+#include <TopoDS_Shape.hxx>
+#include <TopoDS_Vertex.hxx>
+#include <TopOpeBRepBuild_Builder.hxx>
 #include <TopOpeBRepBuild_define.hxx>
+#include <TopOpeBRepBuild_EdgeBuilder.hxx>
+#include <TopOpeBRepBuild_FaceBuilder.hxx>
 #include <TopOpeBRepBuild_FuseFace.hxx>
-
+#include <TopOpeBRepBuild_GTopo.hxx>
+#include <TopOpeBRepBuild_HBuilder.hxx>
+#include <TopOpeBRepBuild_PaveSet.hxx>
+#include <TopOpeBRepBuild_ShapeSet.hxx>
+#include <TopOpeBRepBuild_ShellFaceSet.hxx>
+#include <TopOpeBRepBuild_SolidBuilder.hxx>
+#include <TopOpeBRepBuild_WireEdgeSet.hxx>
+#include <TopOpeBRepDS_BuildTool.hxx>
+#include <TopOpeBRepDS_CurveIterator.hxx>
 #include <TopOpeBRepDS_EXPORT.hxx>
+#include <TopOpeBRepDS_HDataStructure.hxx>
+#include <TopOpeBRepDS_PointIterator.hxx>
 #include <TopOpeBRepDS_samdom.hxx>
+#include <TopOpeBRepDS_SurfaceIterator.hxx>
 #include <TopOpeBRepTool_EXPORT.hxx>
 #include <TopOpeBRepTool_SC.hxx>
-#include <BRepClass3d_SolidExplorer.hxx>
-#include <BRepTopAdaptor_FClass2d.hxx>
-#include <BRep_Tool.hxx>
-#include <TopoDS.hxx>
+#include <TopOpeBRepTool_ShapeExplorer.hxx>
 
-#ifdef DEB
+#ifdef OCCT_DEBUG
 #define DEBSHASET(sarg,meth,shaset,str) TCollection_AsciiString sarg((meth));(sarg)=(sarg)+(shaset).DEBNumber()+(str);
 Standard_EXPORT Standard_Boolean TopOpeBRepBuild_GetcontextNOFUFA();
 Standard_EXPORT void debffsfs(const Standard_Integer i){cout<<"+++ debffsfs "<<i<<endl;}
@@ -55,7 +72,7 @@ Standard_EXPORT void FUNBUILD_ANCESTORRANKGET(TopOpeBRepBuild_Builder& B,const T
 
 static Standard_Integer FUN_getAncestorFsp(TopOpeBRepBuild_Builder& B,TopOpeBRepTool_ShapeClassifier& SC,const TopTools_ListOfShape& LF,const TopoDS_Shape& fsp,Standard_Boolean& p3ddef,gp_Pnt& p3d);
 static Standard_Integer FUN_getAncestorFsp(TopOpeBRepBuild_Builder& B,TopOpeBRepTool_ShapeClassifier& SC,const TopTools_ListOfShape& LF1,const TopTools_ListOfShape& LF2,const TopoDS_Shape& fsp);
-#ifdef DEB
+#ifdef OCCT_DEBUG
 //static void FUN_getAncestorFsp(const Handle(TopOpeBRepDS_HDataStructure)& HDS,TopOpeBRepTool_ShapeClassifier& SC,const TopTools_ListOfShape& LF1,const TopTools_ListOfShape& LF2,const TopTools_ListOfShape& spFOR,
 //                            TopTools_DataMapOfShapeInteger* SplitAnc);
 #endif
@@ -170,19 +187,19 @@ void TopOpeBRepBuild_Builder::GFillFaceSFS(const TopoDS_Shape& FOR,const TopTool
 {
   TopAbs_State TB1,TB2; Gin.StatesON(TB1,TB2);
   
-#ifdef DEB
+#ifdef OCCT_DEBUG
   Standard_Integer iF; Standard_Boolean tSPS = GtraceSPS(FOR,iF);
   if(tSPS)cout<<endl;
 #endif
   const TopOpeBRepDS_DataStructure& BDS = myDataStructure->DS();
   Standard_Boolean tosplit = GToSplit(FOR,TB1);
   Standard_Boolean tomerge = GToMerge(FOR);
-#ifdef DEB
+#ifdef OCCT_DEBUG
 //  Standard_Integer iFOR = BDS.Shape(FOR);
 #endif
   Standard_Integer rkFOR = BDS.AncestorRank(FOR);
   
-#ifdef DEB
+#ifdef OCCT_DEBUG
   if(tSPS){
     GdumpSHASTA(FOR,TB1,"--- GFillFaceSFS START ");
     cout<<" tosplit "<<tosplit<<" tomerge "<<tomerge<<endl;
@@ -210,7 +227,7 @@ void TopOpeBRepBuild_Builder::GFillFaceSFS(const TopoDS_Shape& FOR,const TopTool
     
     if (makemerge) {
       
-#ifdef DEB
+#ifdef OCCT_DEBUG
       if(tSPS) {
        GdumpSHASTA(FOR,TB1,"[[[[[[[[[[[[[[[[[[[[[[[[[[ GFillFaceSFS makemerge START ");
        cout<<endl;
@@ -218,7 +235,7 @@ void TopOpeBRepBuild_Builder::GFillFaceSFS(const TopoDS_Shape& FOR,const TopTool
 #endif
 
       Standard_Boolean performfufa = Standard_True;
-#ifdef DEB
+#ifdef OCCT_DEBUG
       performfufa = !TopOpeBRepBuild_GetcontextNOFUFA();
 #endif   
       if (performfufa) {       
@@ -261,7 +278,7 @@ void TopOpeBRepBuild_Builder::GFillFaceSFS(const TopoDS_Shape& FOR,const TopTool
       GM = Gin;
       GM.ChangeConfig(TopOpeBRepDS_SAMEORIENTED,TopOpeBRepDS_SAMEORIENTED);
       if (dodo) {
-#ifdef DEB
+#ifdef OCCT_DEBUG
        if(tSPS){
          GdumpSAMDOM(LF1, (char *) "LF1 (LFSO1) : ");
          GdumpSAMDOM(LF2, (char *) "LF2 (LFSO2) : ");
@@ -307,7 +324,7 @@ void TopOpeBRepBuild_Builder::GFillFaceSFS(const TopoDS_Shape& FOR,const TopTool
       GM.ChangeConfig(TopOpeBRepDS_SAMEORIENTED,TopOpeBRepDS_DIFFORIENTED);
       FUN_setmotherope(GM); // +12/07
       if (dodo) {
-#ifdef DEB
+#ifdef OCCT_DEBUG
        if(tSPS){
          TopAbs_State TB11,TB21; GM.StatesON(TB11,TB21);
          cout<<endl;
@@ -366,7 +383,7 @@ void TopOpeBRepBuild_Builder::GFillFaceSFS(const TopoDS_Shape& FOR,const TopTool
        GM.ChangeConfig(TopOpeBRepDS_SAMEORIENTED,TopOpeBRepDS_DIFFORIENTED);
        FUN_setmotherope(GM); // +12/07
        if (dodo) {
-#ifdef DEB
+#ifdef OCCT_DEBUG
          if(tSPS){
            TopAbs_State TB12,TB22; GM.StatesON(TB12,TB22);
            cout<<endl;
@@ -394,7 +411,7 @@ void TopOpeBRepBuild_Builder::GFillFaceSFS(const TopoDS_Shape& FOR,const TopTool
       
       FUN_unsetmotherope(); // +12/07
       
-#ifdef DEB
+#ifdef OCCT_DEBUG
       if(tSPS) { 
        GdumpSHASTA(FOR,TB1,"]]]]]]]]]]]]]]]]]]]]]]]]]] GFillFaceSFS makemerge END ");
        cout<<endl;
@@ -404,16 +421,16 @@ void TopOpeBRepBuild_Builder::GFillFaceSFS(const TopoDS_Shape& FOR,const TopTool
       GLOBAL_SplitAnc->Clear(); // xpu280598
 
       // FuseFace
-      Standard_Integer nlsfs = SFS.ChangeStartShapes().Extent();
+      SFS.ChangeStartShapes().Extent();
       if (performfufa) {       
-#ifdef DEB
+#ifdef OCCT_DEBUG
        if(tSPS) debffflo(iF);
 #endif
 //     const TopTools_ListOfShape& lou = Splits(FF,TopAbs_OUT); Standard_Integer nou = lou.Extent();
 //     const TopTools_ListOfShape& lin = Splits(FF,TopAbs_IN);  Standard_Integer nin = lin.Extent();
 //     GCopyList(lou,*GLOBAL_lfr1);
 //     GCopyList(lin,*GLOBAL_lfr1);    
-#ifdef DEB
+#ifdef OCCT_DEBUG
 //     Standard_Integer nlfr1 = GLOBAL_lfr1->Extent();
 #endif
 
@@ -423,7 +440,7 @@ void TopOpeBRepBuild_Builder::GFillFaceSFS(const TopoDS_Shape& FOR,const TopTool
        fufa.PerformFace();
        Standard_Boolean isdone = fufa.IsDone();
        if (!isdone) return;
-#ifdef DEB
+#ifdef OCCT_DEBUG
 //     Standard_Boolean ismodified = fufa.IsModified();
 #endif
        const TopTools_ListOfShape& lfr2 = fufa.LFuseFace();
@@ -433,7 +450,7 @@ void TopOpeBRepBuild_Builder::GFillFaceSFS(const TopoDS_Shape& FOR,const TopTool
        for (TopTools_ListIteratorOfListOfShape itlfr2(lfr2);itlfr2.More();itlfr2.Next()) {
          const TopoDS_Shape& flfr2 = itlfr2.Value();
          
-#ifdef DEB
+#ifdef OCCT_DEBUG
          if(tSPS){
            DEBSHASET(ss,"--- FillFaceSFS apres fufa",SFS," AddStartElement SFS+ face ");  
            GdumpSHA(flfr2,(Standard_Address)ss.ToCString());
@@ -443,7 +460,6 @@ void TopOpeBRepBuild_Builder::GFillFaceSFS(const TopoDS_Shape& FOR,const TopTool
 #endif
          SFS.AddStartElement(flfr2);
        }
-       nlsfs = SFS.ChangeStartShapes().Extent();
       } // performfufa (context)
       
     } // makemerge
@@ -459,7 +475,7 @@ void TopOpeBRepBuild_Builder::GFillFaceSFS(const TopoDS_Shape& FOR,const TopTool
   
   myEdgeAvoid.Clear();
   
-#ifdef DEB
+#ifdef OCCT_DEBUG
   if(tSPS){
     GdumpSHASTA(FOR,TB1,"--- GFillFaceSFS END ");cout<<endl;
   }