summaryrefslogtreecommitdiff
path: root/inc/BRepOffsetAPI_FindContigousEdges.hxx
blob: c7e7354638ddee9566d9c121dd338deed718ce9f (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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
// 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 _BRepOffsetAPI_FindContigousEdges_HeaderFile
#define _BRepOffsetAPI_FindContigousEdges_HeaderFile

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

#ifndef _Handle_BRepBuilderAPI_Sewing_HeaderFile
#include <Handle_BRepBuilderAPI_Sewing.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
class BRepBuilderAPI_Sewing;
class Standard_OutOfRange;
class Standard_NoSuchObject;
class TopoDS_Shape;
class TopoDS_Edge;
class TopTools_ListOfShape;


//! Provides methods to identify contigous boundaries <br>
//!          for continuity control (C0, C1, ...) <br>
//! <br>
//!          Use this function as following: <br>
//!            - create an object <br>
//!                - default tolerance 1.E-06 <br>
//!                - with analysis of degenerated faces on <br>
//!                - define if necessary a new tolerance <br>
//!                - set if necessary analysis of degenerated shapes off <br>
//!            - add shapes to be controlled -> Add <br>
//!            - compute -> Perfom <br>
//!            - output couples of connected edges for control <br>
//!            - output the problems if any <br>
class BRepOffsetAPI_FindContigousEdges  {
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); 
  }

  //! Initializes an algorithm for identifying contiguous edges <br>
//! on shapes with tolerance as the tolerance of contiguity <br>
//! (defaulted to 1.0e-6). This tolerance value is used to <br>
//! determine whether two edges or sections of edges are coincident. <br>
//! Use the function Add to define the shapes to be checked. <br>
//! Set option to false. This argument (defaulted to true) will <br>
//! serve in subsequent software releases for performing an <br>
//! analysis of degenerated shapes. <br>
  Standard_EXPORT   BRepOffsetAPI_FindContigousEdges(const Standard_Real tolerance = 1.0e-06,const Standard_Boolean option = Standard_True);
  //! Initializes this algorithm for identifying contiguous edges <br>
//! on shapes using the tolerance of contiguity tolerance. <br>
//! This tolerance value is used to determine whether two <br>
//! edges or sections of edges are coincident. <br>
//! Use the function Add to define the shapes to be checked. <br>
//! Sets <option> to false. <br>
  Standard_EXPORT     void Init(const Standard_Real tolerance,const Standard_Boolean option) ;
  //! Adds the shape shape to the list of shapes to be <br>
//! checked by this algorithm. <br>
//! Once all the shapes to be checked have been added, <br>
//! use the function Perform to find the contiguous edges <br>
//! and the function ContigousEdge to return these edges. <br>
  Standard_EXPORT     void Add(const TopoDS_Shape& shape) ;
  //! Finds coincident parts of edges of two or more shapes <br>
//! added to this algorithm and breaks down these edges <br>
//! into contiguous and non-contiguous sections on copies <br>
//! of the initial shapes. <br>
//!        The function ContigousEdge returns contiguous <br>
//! edges. The function Modified can be used to return <br>
//! modified copies of the initial shapes where one or more <br>
//! edges were broken down into contiguous and non-contiguous sections. <br>
//! Warning <br>
//! This function must be used once all the shapes to be <br>
//! checked have been added. It is not possible to add <br>
//! further shapes subsequently and then to repeat the call to Perform. <br>
  Standard_EXPORT     void Perform() ;
  //! Gives  the number  of edges (free  edges + contigous <br>
//!          edges  +  multiple edge) <br>
  Standard_EXPORT     Standard_Integer NbEdges() const;
  //! Returns the number of contiguous edges found by the <br>
//! function Perform on the shapes added to this algorithm. <br>
  Standard_EXPORT     Standard_Integer NbContigousEdges() const;
  //! Returns the contiguous edge of index index found by <br>
//! the function Perform on the shapes added to this algorithm. <br>
//! Exceptions <br>
//! Standard_OutOfRange if: <br>
//! - index is less than 1, or <br>
//! - index is greater than the number of contiguous <br>
//!   edges found by the function Perform on the shapes added to this algorithm. <br>
  Standard_EXPORT    const TopoDS_Edge& ContigousEdge(const Standard_Integer index) const;
  //! Returns a list of edges coincident with the contiguous <br>
//! edge of index index found by the function Perform. <br>
//! There are as many edges in the list as there are faces <br>
//! adjacent to this contiguous edge. <br>
//! Exceptions <br>
//! Standard_OutOfRange if: <br>
//! - index is less than 1, or <br>
//! - index is greater than the number of contiguous edges <br>
//!   found by the function Perform on the shapes added to this algorithm. <br>
  Standard_EXPORT    const TopTools_ListOfShape& ContigousEdgeCouple(const Standard_Integer index) const;
  //! Returns the edge on the initial shape, of which the <br>
//! modified copy contains the edge section. <br>
//! section is coincident with a contiguous edge found by <br>
//! the function Perform. Use the function <br>
//! ContigousEdgeCouple to obtain a valid section. <br>
//! This information is useful for verification purposes, since <br>
//! it provides a means of determining the surface to which <br>
//! the contiguous edge belongs. <br>
//! Exceptions <br>
//! Standard_NoSuchObject if section is not coincident <br>
//! with a contiguous edge. Use the function <br>
//! ContigousEdgeCouple to obtain a valid section. <br>
  Standard_EXPORT    const TopoDS_Edge& SectionToBoundary(const TopoDS_Edge& section) const;
  //! Gives the number of degenerated shapes <br>
  Standard_EXPORT     Standard_Integer NbDegeneratedShapes() const;
  //! Gives a degenerated shape <br>
  Standard_EXPORT    const TopoDS_Shape& DegeneratedShape(const Standard_Integer index) const;
  //! Indicates if a input shape is degenerated <br>
  Standard_EXPORT     Standard_Boolean IsDegenerated(const TopoDS_Shape& shape) const;
  //! Returns true if the copy of the initial shape shape was <br>
//! modified by the function Perform (i.e. if one or more of <br>
//! its edges was broken down into contiguous and non-contiguous sections). <br>
//! Warning <br>
//! Returns false if shape is not one of the initial shapes <br>
//! added to this algorithm. <br>
  Standard_EXPORT     Standard_Boolean IsModified(const TopoDS_Shape& shape) const;
  //! Gives a modifieded shape <br>
//! Raises   NoSuchObject if shape has not been modified <br>
  Standard_EXPORT    const TopoDS_Shape& Modified(const TopoDS_Shape& shape) const;
  //! Dump properties of resulting shape. <br>
  Standard_EXPORT     void Dump() const;





protected:





private:



Handle_BRepBuilderAPI_Sewing mySewing;


};





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


#endif