summaryrefslogtreecommitdiff
path: root/inc/ShapeFix_WireSegment.hxx
blob: 50059fb52e12107a3ab133e045cd614f3d15abbe (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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
// 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 _ShapeFix_WireSegment_HeaderFile
#define _ShapeFix_WireSegment_HeaderFile

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

#ifndef _Handle_ShapeExtend_WireData_HeaderFile
#include <Handle_ShapeExtend_WireData.hxx>
#endif
#ifndef _TopoDS_Vertex_HeaderFile
#include <TopoDS_Vertex.hxx>
#endif
#ifndef _TopAbs_Orientation_HeaderFile
#include <TopAbs_Orientation.hxx>
#endif
#ifndef _Handle_TColStd_HSequenceOfInteger_HeaderFile
#include <Handle_TColStd_HSequenceOfInteger.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
class ShapeExtend_WireData;
class TColStd_HSequenceOfInteger;
class TopoDS_Wire;
class TopoDS_Vertex;
class TopoDS_Edge;


//! This class is auxiliary class used in ComposeShell. <br>
//!          It is intended for representing segment of the wire <br>
//!          (or whole wire). The segment itself is represented by <br>
//!          ShapeExtend_WireData. In addition, some associated data <br>
//!          necessary for computations are stored: <br>
class ShapeFix_WireSegment  {
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); 
  }

  //! Creates empty segment. <br>
  Standard_EXPORT   ShapeFix_WireSegment();
  //! Creates segment and initializes it with wire and orientation. <br>
  Standard_EXPORT   ShapeFix_WireSegment(const Handle(ShapeExtend_WireData)& wire,const TopAbs_Orientation ori = TopAbs_EXTERNAL);
  //! Creates segment and initializes it with wire and orientation. <br>
  Standard_EXPORT   ShapeFix_WireSegment(const TopoDS_Wire& wire,const TopAbs_Orientation ori = TopAbs_EXTERNAL);
  //! Clears all fields. <br>
  Standard_EXPORT     void Clear() ;
  //! Loads wire. <br>
  Standard_EXPORT     void Load(const Handle(ShapeExtend_WireData)& wire) ;
  //! Returns wire. <br>
  Standard_EXPORT    const Handle_ShapeExtend_WireData& WireData() const;
  //! Sets orientation flag. <br>
  Standard_EXPORT     void Orientation(const TopAbs_Orientation ori) ;
  //! Returns orientation flag. <br>
  Standard_EXPORT     TopAbs_Orientation Orientation() const;
  //! Returns first vertex of the first edge in the wire <br>
//!          (no dependance on Orientation()). <br>
  Standard_EXPORT     TopoDS_Vertex FirstVertex() const;
  //! Returns last vertex of the last edge in the wire <br>
//!          (no dependance on Orientation()). <br>
  Standard_EXPORT     TopoDS_Vertex LastVertex() const;
  //! Returns True if FirstVertex() == LastVertex() <br>
  Standard_EXPORT     Standard_Boolean IsClosed() const;
  //! Returns Number of edges in the wire <br>
  Standard_EXPORT     Standard_Integer NbEdges() const;
  //! Returns edge by given index in the wire <br>
  Standard_EXPORT     TopoDS_Edge Edge(const Standard_Integer i) const;
  //! Replaces edge at index i by new one. <br>
  Standard_EXPORT     void SetEdge(const Standard_Integer i,const TopoDS_Edge& edge) ;
  //! Insert a new edge with index i and implicitly defined <br>
//!          patch indices (indefinite patch). <br>
//!          If i==0, edge is inserted at end of wire. <br>
  Standard_EXPORT     void AddEdge(const Standard_Integer i,const TopoDS_Edge& edge) ;
  //! Insert a new edge with index i and explicitly defined <br>
//!          patch indices. If i==0, edge is inserted at end of wire. <br>
  Standard_EXPORT     void AddEdge(const Standard_Integer i,const TopoDS_Edge& edge,const Standard_Integer iumin,const Standard_Integer iumax,const Standard_Integer ivmin,const Standard_Integer ivmax) ;
  //! Set patch indices for edge i. <br>
  Standard_EXPORT     void SetPatchIndex(const Standard_Integer i,const Standard_Integer iumin,const Standard_Integer iumax,const Standard_Integer ivmin,const Standard_Integer ivmax) ;
  
  Standard_EXPORT     void DefineIUMin(const Standard_Integer i,const Standard_Integer iumin) ;
  
  Standard_EXPORT     void DefineIUMax(const Standard_Integer i,const Standard_Integer iumax) ;
  
  Standard_EXPORT     void DefineIVMin(const Standard_Integer i,const Standard_Integer ivmin) ;
  //! Modify minimal or maximal patch index for edge i. <br>
//!          The corresponding patch index for that edge is modified so <br>
//!          as to satisfy eq. iumin <= myIUMin(i) <= myIUMax(i) <= iumax <br>
  Standard_EXPORT     void DefineIVMax(const Standard_Integer i,const Standard_Integer ivmax) ;
  //! Returns patch indices for edge i. <br>
  Standard_EXPORT     void GetPatchIndex(const Standard_Integer i,Standard_Integer& iumin,Standard_Integer& iumax,Standard_Integer& ivmin,Standard_Integer& ivmax) const;
  //! Checks patch indices for edge i to satisfy equations <br>
//!          IUMin(i) <= IUMax(i) <= IUMin(i)+1 <br>
  Standard_EXPORT     Standard_Boolean CheckPatchIndex(const Standard_Integer i) const;
  
  Standard_EXPORT     void SetVertex(const TopoDS_Vertex& theVertex) ;
  
  Standard_EXPORT     TopoDS_Vertex GetVertex() const;
  
  Standard_EXPORT     Standard_Boolean IsVertex() const;





protected:





private:



Handle_ShapeExtend_WireData myWire;
TopoDS_Vertex myVertex;
TopAbs_Orientation myOrient;
Handle_TColStd_HSequenceOfInteger myIUMin;
Handle_TColStd_HSequenceOfInteger myIUMax;
Handle_TColStd_HSequenceOfInteger myIVMin;
Handle_TColStd_HSequenceOfInteger myIVMax;


};





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


#endif