summaryrefslogtreecommitdiff
path: root/inc/BRepTools_WireExplorer.hxx
blob: f39892bfe7409a3ae595781656767d70eb96df1d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
// This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to 
// this header file considered to be the "object code" form of the original source.

#ifndef _BRepTools_WireExplorer_HeaderFile
#define _BRepTools_WireExplorer_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#endif

#ifndef _TopTools_DataMapOfShapeListOfShape_HeaderFile
#include <TopTools_DataMapOfShapeListOfShape.hxx>
#endif
#ifndef _TopoDS_Edge_HeaderFile
#include <TopoDS_Edge.hxx>
#endif
#ifndef _TopoDS_Vertex_HeaderFile
#include <TopoDS_Vertex.hxx>
#endif
#ifndef _TopoDS_Face_HeaderFile
#include <TopoDS_Face.hxx>
#endif
#ifndef _TopTools_MapOfShape_HeaderFile
#include <TopTools_MapOfShape.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
#ifndef _TopAbs_Orientation_HeaderFile
#include <TopAbs_Orientation.hxx>
#endif
class Standard_DomainError;
class Standard_NoSuchObject;
class Standard_NoMoreObject;
class TopoDS_Wire;
class TopoDS_Face;
class TopoDS_Edge;
class TopoDS_Vertex;


//! The WireExplorer is a tool to explore the edges of <br>
//!          a wire in a connection order. <br>
//! <br>
//!          i.e. each edge is connected to the previous one by <br>
//!          its origin. <br>
//!      If a wire is not closed returns only a segment of edges which <br>
//! length depends on started in exploration edge. If wire has <br>
//! singularities (for example, loops) WireExplorer can return not all <br>
//! edges in a wire. it depends on type of singularity. <br>
class BRepTools_WireExplorer  {
public:

  void* operator new(size_t,void* anAddress) 
  {
    return anAddress;
  }
  void* operator new(size_t size) 
  {
    return Standard::Allocate(size); 
  }
  void  operator delete(void *anAddress) 
  {
    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
  }

  //! Constructs an empty explorer (which can be initialized using Init) <br>
  Standard_EXPORT   BRepTools_WireExplorer();
  //! Initializes an exploration  of the wire <W> face F is used to <br>
//!   involve 2D analysis while exploration). <br>
  Standard_EXPORT   BRepTools_WireExplorer(const TopoDS_Wire& W);
  //! Initializes an exploration  of the wire <W>. <br>
//!          F is used to select the edge connected to the <br>
//!          previous in the parametric representation of <F>. <br>
  Standard_EXPORT   BRepTools_WireExplorer(const TopoDS_Wire& W,const TopoDS_Face& F);
  //! Initializes an exploration of the wire <W>. <br>
  Standard_EXPORT     void Init(const TopoDS_Wire& W) ;
  //! Initializes an exploration of the wire <W>. <br>
//!          F is used to select the edge connected to the <br>
//!          previous in the parametric representation of <F>. <br>
//! <br>
  Standard_EXPORT     void Init(const TopoDS_Wire& W,const TopoDS_Face& F) ;
  //! Returns True if there  is a current  edge. <br>
  Standard_EXPORT     Standard_Boolean More() const;
  //! Proceeds to the next edge. <br>
  Standard_EXPORT     void Next() ;
  //! Returns the current edge. <br>
  Standard_EXPORT    const TopoDS_Edge& Current() const;
  //! Returns an Orientation for the current edge. <br>
  Standard_EXPORT     TopAbs_Orientation Orientation() const;
  //! Returns the vertex connecting the current  edge to <br>
//!          the previous one. <br>
  Standard_EXPORT    const TopoDS_Vertex& CurrentVertex() const;
  //! Clears the content of the explorer. <br>
  Standard_EXPORT     void Clear() ;





protected:





private:



TopTools_DataMapOfShapeListOfShape myMap;
TopoDS_Edge myEdge;
TopoDS_Vertex myVertex;
TopoDS_Face myFace;
TopTools_MapOfShape myDoubles;
Standard_Boolean myReverse;
Standard_Real myTolU;
Standard_Real myTolV;


};





// other Inline functions and methods (like "C++: function call" methods)


#endif