0028417: Using PRECOMPILED HEADER to speed up compilation time
[occt.git] / src / TopOpeBRepTool / TopOpeBRepTool_faulty.cxx
1 // Created on: 1998-11-24
2 // Created by: Xuan PHAM PHU
3 // Copyright (c) 1998-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #include <TopOpeBRepTool_define.hxx>
18 #include <TopOpeBRepTool_EXPORT.hxx>
19 #include <TopOpeBRepTool_2d.hxx>
20 #include <TopExp_Explorer.hxx>
21 #include <BRep_Tool.hxx>
22 #include <GeomAdaptor_Surface.hxx>
23 #include <TopTools_Array1OfShape.hxx>
24 #include <TopoDS.hxx>
25 #include <TopExp.hxx>
26
27 #define M_FORWARD(sta)  (sta == TopAbs_FORWARD)
28 #define M_REVERSED(sta) (sta == TopAbs_REVERSED)
29 #define M_INTERNAL(sta) (sta == TopAbs_INTERNAL)
30 #define M_EXTERNAL(sta) (sta == TopAbs_EXTERNAL)
31
32 #ifdef DRAW
33 #include <TopOpeBRepTool_DRAW.hxx>
34 #endif
35
36 #ifdef OCCT_DEBUG
37 extern TopTools_IndexedMapOfShape STATIC_PURGE_mapv;
38 extern TopTools_IndexedMapOfOrientedShape STATIC_PURGE_mapeds;
39 extern Standard_Boolean TopOpeBRepTool_GettracePURGE();
40 void FUN_REINIT()
41 {
42   STATIC_PURGE_mapv.Clear(); STATIC_PURGE_mapeds.Clear();
43 }
44
45 Standard_EXPORT void FUN_tool_tori(const TopAbs_Orientation Or)
46 {
47   switch (Or) {
48   case TopAbs_FORWARD:
49     cout<<"FOR";break;
50   case TopAbs_REVERSED:
51     cout<<"REV";break;
52   case TopAbs_INTERNAL:
53     cout<<"INT";break;
54   case TopAbs_EXTERNAL:
55     cout<<"EXT";break;
56   }    
57 }
58 #endif
59
60 Standard_EXPORT void FUN_tool_trace(const Standard_Integer Index)
61 {
62   if (Index == 1) cout <<"FORWARD ";
63   if (Index == 2) cout <<"REVERSED ";
64 }
65 Standard_EXPORT void FUN_tool_trace(const gp_Pnt2d p2d)
66 {
67   cout<<" = ("<<p2d.X()<<" "<<p2d.Y()<<")"<<endl;
68 }