0024002: Overall code and build procedure refactoring -- automatic
[occt.git] / src / BRepLib / BRepLib_MakeWire.cxx
old mode 100755 (executable)
new mode 100644 (file)
index 8ad87f9..6c82af2
@@ -1,46 +1,43 @@
 // Created on: 1993-07-23
 // Created by: Remi LEQUETTE
 // Copyright (c) 1993-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 <BRepLib_MakeWire.ixx>
+#include <BRep_Builder.hxx>
+#include <BRep_Tool.hxx>
 #include <BRepLib.hxx>
 #include <BRepLib_MakeEdge.hxx>
-#include <BRep_Tool.hxx>
-#include <BRep_Builder.hxx>
+#include <BRepLib_MakeWire.hxx>
+#include <Geom_Curve.hxx>
+#include <gp.hxx>
+#include <gp_Pnt.hxx>
+#include <StdFail_NotDone.hxx>
 #include <TopExp.hxx>
 #include <TopExp_Explorer.hxx>
-#include <TopTools_MapOfShape.hxx>
-#include <TopTools_MapIteratorOfMapOfShape.hxx>
 #include <TopoDS.hxx>
+#include <TopoDS_Edge.hxx>
 #include <TopoDS_Iterator.hxx>
-#include <gp_Pnt.hxx>
-#include <Geom_Curve.hxx>
-#include <gp.hxx>
-
+#include <TopoDS_Vertex.hxx>
+#include <TopoDS_Wire.hxx>
+#include <TopTools_MapIteratorOfMapOfShape.hxx>
+#include <TopTools_MapOfShape.hxx>
 
 //=======================================================================
 //function : BRepLib_MakeWire
 //purpose  : 
 //=======================================================================
-
 BRepLib_MakeWire::BRepLib_MakeWire() :
      myError(BRepLib_EmptyWire)
 {
@@ -285,7 +282,6 @@ void  BRepLib_MakeWire::Add(const TopoDS_Edge& E)
        // copy the edge
        TopoDS_Shape Dummy = EE.EmptyCopied();
        myEdge = TopoDS::Edge(Dummy);
-       myEdge.Closed(EE.Closed());
        
        for (it.Initialize(EE); it.More(); it.Next()) {
 
@@ -357,7 +353,7 @@ void  BRepLib_MakeWire::Add(const TopoDS_Edge& E)
       if (V1.IsSame(myVertex)) VRef = V2;
       else if (V2.IsSame(myVertex)) VRef = V1;
       else {
-#if DEB
+#ifdef OCCT_DEBUG
        cout << "MakeWire : There is a PROBLEM !!" << endl;
 #endif
        myError = BRepLib_NonManifoldWire;
@@ -365,7 +361,7 @@ void  BRepLib_MakeWire::Add(const TopoDS_Edge& E)
       
       if (VF.IsSame(VL)) {
        // Particular case: it is required to control the orientation
-#if DEB
+#ifdef OCCT_DEBUG
        if (!VF.IsSame(myVertex))
          cout << "MakeWire : There is a PROBLEM !!" << endl;
 #endif
@@ -375,7 +371,7 @@ void  BRepLib_MakeWire::Add(const TopoDS_Edge& E)
        if (VF.IsSame(myVertex)) VF = VRef;
        else if (VL.IsSame(myVertex)) VL = VRef;
        else {
-#if DEB
+#ifdef OCCT_DEBUG
          cout << "MakeWire : Y A UN PROBLEME !!" << endl;
 #endif
          myError = BRepLib_NonManifoldWire;