0024096: Eliminate compiler warning C4505 in MSVC++ with warning level 4
[occt.git] / src / TopOpeBRepTool / TopOpeBRepTool_faulty.cxx
CommitLineData
b311480e 1// Created on: 1998-11-24
2// Created by: Xuan PHAM PHU
3// Copyright (c) 1998-1999 Matra Datavision
4// Copyright (c) 1999-2012 OPEN CASCADE SAS
5//
6// The content of this file is subject to the Open CASCADE Technology Public
7// License Version 6.5 (the "License"). You may not use the content of this file
8// except in compliance with the License. Please obtain a copy of the License
9// at http://www.opencascade.org and read it completely before using this file.
10//
11// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13//
14// The Original Code and all software distributed under the License is
15// distributed on an "AS IS" basis, without warranty of any kind, and the
16// Initial Developer hereby disclaims all such warranties, including without
17// limitation, any warranties of merchantability, fitness for a particular
18// purpose or non-infringement. Please see the License for the specific terms
19// and conditions governing the rights and limitations under the License.
20
7fd59977 21
22#include <TopOpeBRepTool_define.hxx>
23#include <TopOpeBRepTool_EXPORT.hxx>
24#include <TopOpeBRepTool_2d.hxx>
25#include <TopExp_Explorer.hxx>
26#include <BRep_Tool.hxx>
27#include <GeomAdaptor_Surface.hxx>
28#include <TopTools_Array1OfShape.hxx>
29#include <TopoDS.hxx>
30#include <TopExp.hxx>
31
32#define M_FORWARD(sta) (sta == TopAbs_FORWARD)
33#define M_REVERSED(sta) (sta == TopAbs_REVERSED)
34#define M_INTERNAL(sta) (sta == TopAbs_INTERNAL)
35#define M_EXTERNAL(sta) (sta == TopAbs_EXTERNAL)
36
37#ifdef DRAW
38#include <TopOpeBRepTool_DRAW.hxx>
39#endif
40
41#ifdef DEB
1d0a9d4d 42extern TopTools_IndexedMapOfShape STATIC_PURGE_mapv;
43extern TopTools_IndexedMapOfOrientedShape STATIC_PURGE_mapeds;
44extern Standard_Boolean TopOpeBRepTool_GettracePURGE();
7fd59977 45Standard_EXPORT void FUN_REINIT()
7fd59977 46{
4e18e72a 47 STATIC_PURGE_mapv.Clear(); STATIC_PURGE_mapeds.Clear();
7fd59977 48}
4e18e72a 49Standard_EXPORT Standard_Integer FUN_addepc(const TopoDS_Shape& ed,const TopoDS_Shape&)
50{
7fd59977 51 Standard_Integer ie = STATIC_PURGE_mapeds.Add(ed);
52#ifdef DRAW
53// TCollection_AsciiString aa = TCollection_AsciiString("pc_"); FUN_tool_draw(aa,TopoDS::Edge(ed),TopoDS::Face(f),ie);
54// TCollection_AsciiString bb = TCollection_AsciiString("ed_"); FUN_tool_draw(bb,ed,ie);
55#endif
56 return ie;
57}
4e18e72a 58
7fd59977 59Standard_EXPORT Standard_Integer FUN_addcheckepc(const TopoDS_Shape& ed,const TopoDS_Shape& f) {
60 Standard_Integer ie = 0;
61 ie = STATIC_PURGE_mapeds.FindIndex(ed);
62 if (ie == 0) ie = FUN_addepc(ed,f);
63 return ie;
64}
7fd59977 65Standard_IMPORT Standard_Integer FUN_adds(const TopoDS_Shape& s);
4e18e72a 66
7fd59977 67Standard_EXPORT void FUN_tool_tori(const TopAbs_Orientation Or)
68{
69 switch (Or) {
70 case TopAbs_FORWARD:
71 cout<<"FOR";break;
72 case TopAbs_REVERSED:
73 cout<<"REV";break;
74 case TopAbs_INTERNAL:
75 cout<<"INT";break;
76 case TopAbs_EXTERNAL:
77 cout<<"EXT";break;
78 }
79}
80#endif
81
82Standard_EXPORT void FUN_tool_trace(const Standard_Integer Index)
7fd59977 83{
4e18e72a 84 if (Index == 1) cout <<"FORWARD ";
85 if (Index == 2) cout <<"REVERSED ";
7fd59977 86}
4e18e72a 87Standard_EXPORT void FUN_tool_trace(const gp_Pnt2d p2d)
7fd59977 88{
4e18e72a 89 cout<<" = ("<<p2d.X()<<" "<<p2d.Y()<<")"<<endl;
7fd59977 90}