0028643: Coding rules - eliminate GCC compiler warnings -Wmisleading-indentation
[occt.git] / src / BRepTools / BRepTools_Quilt.cxx
old mode 100755 (executable)
new mode 100644 (file)
index 5ded198..bf7aa77
@@ -1,38 +1,46 @@
-// File:       BRepTools_Quilt.cxx
-// Created:    Fri Dec 23 10:37:05 1994
-// Author:     Remi LEQUETTE
-//             <rle@bravox>
+// Created on: 1994-12-23
+// Created by: Remi LEQUETTE
+// Copyright (c) 1994-1999 Matra Datavision
+// Copyright (c) 1999-2014 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// 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.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
 
 
-#include <BRepTools_Quilt.ixx>
-
+#include <BRep_Builder.hxx>
+#include <BRep_Tool.hxx>
+#include <BRepTools_Quilt.hxx>
+#include <Geom2d_Curve.hxx>
+#include <Standard_NoSuchObject.hxx>
+#include <TopExp_Explorer.hxx>
 #include <TopoDS.hxx>
+#include <TopoDS_Compound.hxx>
+#include <TopoDS_Edge.hxx>
 #include <TopoDS_Face.hxx>
-#include <TopoDS_Wire.hxx>
+#include <TopoDS_Iterator.hxx>
 #include <TopoDS_Shape.hxx>
 #include <TopoDS_Shell.hxx>
-#include <TopoDS_Compound.hxx>
-#include <TopoDS_Iterator.hxx>
-
+#include <TopoDS_Vertex.hxx>
+#include <TopoDS_Wire.hxx>
 #include <TopTools_DataMapIteratorOfDataMapOfShapeShape.hxx>
 #include <TopTools_DataMapOfShapeShape.hxx>
-#include <TopExp_Explorer.hxx>
-
-#include <Geom2d_Curve.hxx>
-
-#include <BRep_Builder.hxx>
-#include <BRep_Tool.hxx>
-#include <TopTools_MapOfShape.hxx>
-#include <TopoDS_Shape.hxx>
-#include <TopTools_MapIteratorOfMapOfShape.hxx>
-#include <TopTools_ListOfShape.hxx>
 #include <TopTools_IndexedDataMapOfShapeShape.hxx>
+#include <TopTools_ListOfShape.hxx>
+#include <TopTools_MapIteratorOfMapOfShape.hxx>
+#include <TopTools_MapOfShape.hxx>
 
 //=======================================================================
 //function : BRepTools_Quilt
 //purpose  : 
 //=======================================================================
-
 BRepTools_Quilt::BRepTools_Quilt() : hasCopy(Standard_False)
 {
 }
@@ -103,17 +111,27 @@ void BRepTools_Quilt::Add(const TopoDS_Shape& S)
   // Binds all the faces of S
   //  - to the face itself if it is not copied
   //  - to the copy if it is copied
-  if(myBounds.Contains(S)) return;
+  if(myBounds.Contains(S))
+  {
+    return;
+  }
+
   BRep_Builder B;
-  for (TopExp_Explorer wex(S,TopAbs_WIRE,TopAbs_FACE); wex.More(); wex.Next()) 
-     myBounds.Add(wex.Current(),wex.Current());
-  
+  for (TopExp_Explorer wex(S,TopAbs_WIRE,TopAbs_FACE); wex.More(); wex.Next())
+  {
+    myBounds.Add(wex.Current(),wex.Current());
+  }
+
   for (TopExp_Explorer eex(S,TopAbs_EDGE,TopAbs_WIRE); eex.More(); eex.Next())
+  {
     myBounds.Add(eex.Current(),eex.Current());
-  
+  }
+
   for (TopExp_Explorer vex(S,TopAbs_VERTEX,TopAbs_EDGE); vex.More(); vex.Next())
+  {
     myBounds.Add(vex.Current(),vex.Current());
-  
+  }
+
     // explore the faces
     for (TopExp_Explorer fex(S,TopAbs_FACE); fex.More(); fex.Next()) {
       
@@ -427,17 +445,17 @@ TopoDS_Shape BRepTools_Quilt::Shells() const
            // Add the faces of oldShell in SH.
            for (TopoDS_Iterator its(oldShell); its.More(); its.Next()) {
              const TopoDS_Face Fo = TopoDS::Face(its.Value());
-             TopAbs_Orientation NewO;
+             TopAbs_Orientation NewOFo;
              // update the orientation of Fo in SH.
              if (Rev) 
-               NewO = TopAbs::Reverse(MF(Fo).Orientation());
+               NewOFo = TopAbs::Reverse(MF(Fo).Orientation());
              else
-               NewO = MF(Fo).Orientation();
+               NewOFo = MF(Fo).Orientation();
 
-             MF.Bind(Fo,SH.Oriented(NewO));
+             MF.Bind(Fo,SH.Oriented(NewOFo));
 //           B.Add  (SH.Oriented(TopAbs_FORWARD),Fo.Oriented(NewO));
-              TopoDS_Shape arefShape = SH.Oriented(TopAbs_FORWARD) ;
-             B.Add  ( arefShape ,Fo.Oriented(NewO));
+              TopoDS_Shape arefShapeFo = SH.Oriented(TopAbs_FORWARD) ;
+             B.Add  ( arefShapeFo,Fo.Oriented(NewOFo));
            }
            // Rebind the free edges of the old shell to the new shell
             //gka BUG 6491
@@ -496,7 +514,7 @@ TopoDS_Shape BRepTools_Quilt::Shells() const
   // Unclose all shells having free edges
   for (TopTools_DataMapIteratorOfDataMapOfShapeShape it(M); it.More(); it.Next()) {
     TopoDS_Shape S = it.Value();
-    S.Closed(Standard_Boolean(Standard_False));
+    S.Closed (Standard_False);
   }
   
   TopTools_MapIteratorOfMapOfShape itother(MapOtherShape); //gka version for free edges