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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
|
// 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 _BRepFilletAPI_MakeFillet2d_HeaderFile
#define _BRepFilletAPI_MakeFillet2d_HeaderFile
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#endif
#ifndef _ChFi2d_Builder_HeaderFile
#include <ChFi2d_Builder.hxx>
#endif
#ifndef _BRepBuilderAPI_MakeShape_HeaderFile
#include <BRepBuilderAPI_MakeShape.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
#ifndef _ChFi2d_ConstructionError_HeaderFile
#include <ChFi2d_ConstructionError.hxx>
#endif
class TopoDS_Face;
class TopoDS_Edge;
class TopoDS_Vertex;
class TopTools_SequenceOfShape;
class TopTools_ListOfShape;
class TopoDS_Shape;
//! Describes functions to build fillets and chamfers on the <br>
//! vertices of a planar face. <br>
//! Fillets and Chamfers on the Vertices of a Planar Face <br>
//! A MakeFillet2d object provides a framework for: <br>
//! - initializing the construction algorithm with a given face, <br>
//! - acquiring the data characterizing the fillets and chamfers, <br>
//! - building the fillets and chamfers, and constructing the <br>
//! resulting shape, and <br>
//! - consulting the result. <br>
//! Warning <br>
//! Only segments of straight lines and arcs of circles are <br>
//! treated. BSplines are not processed. <br>
class BRepFilletAPI_MakeFillet2d : public BRepBuilderAPI_MakeShape {
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 empty algorithm for computing fillets and <br>
//! chamfers. The face on which the fillets and <br>
//! chamfers are built is defined using the Init function. <br>
//! The vertices on which fillets or chamfers are built are <br>
//! defined using the AddFillet or AddChamfer function. <br>
//! Warning <br>
//! The status of the initialization, as given by the Status <br>
//! function, can be one of the following: <br>
//! - ChFi2d_Ready if the initialization is correct, <br>
//! - ChFi2d_NotPlanar if F is not planar, <br>
//! - ChFi2d_NoFace if F is a null face. <br>
Standard_EXPORT BRepFilletAPI_MakeFillet2d();
//! Initializes an algorithm for computing fillets and chamfers on the face F. <br>
//! The vertices on which fillets or chamfers are built are <br>
//! defined using the AddFillet or AddChamfer function. <br>
//! Warning <br>
//! The status of the initialization, as given by the Status <br>
//! function, can be one of the following: <br>
//! - ChFi2d_Ready if the initialization is correct, <br>
//! - ChFi2d_NotPlanar if F is not planar, <br>
//! - ChFi2d_NoFace if F is a null face. <br>
Standard_EXPORT BRepFilletAPI_MakeFillet2d(const TopoDS_Face& F);
//! Initializes this algorithm for constructing fillets or <br>
//! chamfers with the face F. <br>
//! Warning <br>
//! The status of the initialization, as given by the Status <br>
//! function, can be one of the following: <br>
//! - ChFi2d_Ready if the initialization is correct, <br>
//! - ChFi2d_NotPlanar if F is not planar, <br>
//! - ChFi2d_NoFace if F is a null face. <br>
Standard_EXPORT void Init(const TopoDS_Face& F) ;
//! This initialize method allow to init the builder <br>
//! from a face <RefFace> and another face <ModFace> <br>
//! which derive from <RefFace>. This is usefull to <br>
//! modify a fillet or a chamfer already created on <br>
//! <ModFace> . <br>
Standard_EXPORT void Init(const TopoDS_Face& RefFace,const TopoDS_Face& ModFace) ;
//! Adds a fillet of radius Radius between the two edges <br>
//! adjacent to the vertex V on the face modified by this <br>
//! algorithm. The two edges do not need to be rectilinear. <br>
//! This function returns the fillet and builds the resulting face. <br>
//! Warning <br>
//! The status of the construction, as given by the Status <br>
//! function, can be one of the following: <br>
//! - ChFi2d_IsDone if the fillet is built, <br>
//! - ChFi2d_ConnexionError if V does not belong to the initial face, <br>
//! - ChFi2d_ComputationError if Radius is too large <br>
//! to build a fillet between the two adjacent edges, <br>
//! - ChFi2d_NotAuthorized <br>
//! - if one of the two edges connected to V is a fillet or chamfer, or <br>
//! - if a curve other than a straight line or an arc of a <br>
//! circle is used as E, E1 or E2. <br>
//! Do not use the returned fillet if the status of the construction is not ChFi2d_IsDone. <br>
//! Exceptions <br>
//! Standard_NegativeValue if Radius is less than or equal to zero. <br>
Standard_EXPORT TopoDS_Edge AddFillet(const TopoDS_Vertex& V,const Standard_Real Radius) ;
//! Assigns the radius Radius to the fillet Fillet already <br>
//! built on the face modified by this algorithm. <br>
//! This function returns the new fillet and modifies the existing face. <br>
//! Warning <br>
//! The status of the construction, as given by the Status <br>
//! function, can be one of the following: <br>
//! - ChFi2d_IsDone if the new fillet is built, <br>
//! - ChFi2d_ConnexionError if Fillet does not <br>
//! belong to the existing face, <br>
//! - ChFi2d_ComputationError if Radius is too <br>
//! large to build a fillet between the two adjacent edges. <br>
//! Do not use the returned fillet if the status of the <br>
//! construction is not ChFi2d_IsDone. <br>
//! Exceptions <br>
//! Standard_NegativeValue if Radius is less than or equal to zero. <br>
Standard_EXPORT TopoDS_Edge ModifyFillet(const TopoDS_Edge& Fillet,const Standard_Real Radius) ;
//! Removes the fillet Fillet already built on the face <br>
//! modified by this algorithm. <br>
//! This function returns the vertex connecting the two <br>
//! adjacent edges of Fillet and modifies the existing face. <br>
//! Warning <br>
//! - The returned vertex is only valid if the Status <br>
//! function returns ChFi2d_IsDone. <br>
//! - A null vertex is returned if the edge Fillet does not <br>
//! belong to the initial face. <br>
Standard_EXPORT TopoDS_Vertex RemoveFillet(const TopoDS_Edge& Fillet) ;
//! Adds a chamfer on the face modified by this algorithm <br>
//! between the two adjacent edges E1 and E2, where <br>
//! the extremities of the chamfer are on E1 and E2 at <br>
//! distances D1 and D2 respectively <br>
//! In cases where the edges are not rectilinear, distances <br>
//! are measured using the curvilinear abscissa of the <br>
//! edges and the angle is measured with respect to the <br>
//! tangent at the corresponding point. <br>
//! The angle Ang is given in radians. <br>
//! This function returns the chamfer and builds the resulting face. <br>
Standard_EXPORT TopoDS_Edge AddChamfer(const TopoDS_Edge& E1,const TopoDS_Edge& E2,const Standard_Real D1,const Standard_Real D2) ;
//! Adds a chamfer on the face modified by this algorithm <br>
//! between the two edges connected by the vertex V, <br>
//! where E is one of the two edges. The chamfer makes <br>
//! an angle Ang with E and one of its extremities is on <br>
//! E at distance D from V. <br>
//! In cases where the edges are not rectilinear, distances <br>
//! are measured using the curvilinear abscissa of the <br>
//! edges and the angle is measured with respect to the <br>
//! tangent at the corresponding point. <br>
//! The angle Ang is given in radians. <br>
//! This function returns the chamfer and builds the resulting face. <br>
//! Warning <br>
//! The status of the construction, as given by the Status function, can <br>
//! be one of the following: <br>
//! - ChFi2d_IsDone if the chamfer is built, <br>
//! - ChFi2d_ParametersError if D1, D2, D or Ang is less than or equal to zero, <br>
//! - ChFi2d_ConnexionError if: <br>
//! - the edge E, E1 or E2 does not belong to the initial face, or <br>
//! - the edges E1 and E2 are not adjacent, or <br>
//! - the vertex V is not one of the limit points of the edge E, <br>
//! - ChFi2d_ComputationError if the parameters of the chamfer <br>
//! are too large to build a chamfer between the two adjacent edges, <br>
//! - ChFi2d_NotAuthorized if: <br>
//! - the edge E1, E2 or one of the two edges connected to V is a fillet or chamfer, or <br>
//! - a curve other than a straight line or an arc of a circle is used as E, E1 or E2. <br>
//! Do not use the returned chamfer if <br>
//! the status of the construction is not ChFi2d_IsDone. <br>
Standard_EXPORT TopoDS_Edge AddChamfer(const TopoDS_Edge& E,const TopoDS_Vertex& V,const Standard_Real D,const Standard_Real Ang) ;
//! Modifies the chamfer Chamfer on the face modified <br>
//! by this algorithm, where: <br>
//! E1 and E2 are the two adjacent edges on which <br>
//! Chamfer is already built; the extremities of the new <br>
//! chamfer are on E1 and E2 at distances D1 and D2 respectively. <br>
Standard_EXPORT TopoDS_Edge ModifyChamfer(const TopoDS_Edge& Chamfer,const TopoDS_Edge& E1,const TopoDS_Edge& E2,const Standard_Real D1,const Standard_Real D2) ;
//! Modifies the chamfer Chamfer on the face modified <br>
//! by this algorithm, where: <br>
//! E is one of the two adjacent edges on which <br>
//! Chamfer is already built; the new chamfer makes <br>
//! an angle Ang with E and one of its extremities is <br>
//! on E at distance D from the vertex on which the chamfer is built. <br>
//! In cases where the edges are not rectilinear, the <br>
//! distances are measured using the curvilinear abscissa <br>
//! of the edges and the angle is measured with respect <br>
//! to the tangent at the corresponding point. <br>
//! The angle Ang is given in radians. <br>
//! This function returns the new chamfer and modifies the existing face. <br>
//! Warning <br>
//! The status of the construction, as given by the Status <br>
//! function, can be one of the following: <br>
//! - ChFi2d_IsDone if the chamfer is built, <br>
//! - ChFi2d_ParametersError if D1, D2, D or Ang is less than or equal to zero, <br>
//! - ChFi2d_ConnexionError if: <br>
//! - the edge E, E1, E2 or Chamfer does not belong <br>
//! to the existing face, or <br>
//! - the edges E1 and E2 are not adjacent, <br>
//! - ChFi2d_ComputationError if the parameters of <br>
//! the chamfer are too large to build a chamfer <br>
//! between the two adjacent edges, <br>
//! - ChFi2d_NotAuthorized if E1 or E2 is a fillet or chamfer. <br>
//! Do not use the returned chamfer if the status of the <br>
//! construction is not ChFi2d_IsDone. <br>
Standard_EXPORT TopoDS_Edge ModifyChamfer(const TopoDS_Edge& Chamfer,const TopoDS_Edge& E,const Standard_Real D,const Standard_Real Ang) ;
//! Removes the chamfer Chamfer already built on the face <br>
//! modified by this algorithm. <br>
//! This function returns the vertex connecting the two <br>
//! adjacent edges of Chamfer and modifies the existing face. <br>
//! Warning <br>
//! - The returned vertex is only valid if the Status <br>
//! function returns ChFi2d_IsDone. <br>
//! - A null vertex is returned if the edge Chamfer does <br>
//! not belong to the initial face. <br>
Standard_EXPORT TopoDS_Vertex RemoveChamfer(const TopoDS_Edge& Chamfer) ;
//! Returns true if the edge E on the face modified by this <br>
//! algorithm is chamfered or filleted. <br>
//! Warning <br>
//! Returns false if E does not belong to the face modified by this algorithm. <br>
Standard_Boolean IsModified(const TopoDS_Edge& E) const;
//! Returns the table of fillets on the face modified by this algorithm. <br>
const TopTools_SequenceOfShape& FilletEdges() const;
//! Returns the number of fillets on the face modified by this algorithm. <br>
Standard_Integer NbFillet() const;
//! Returns the table of chamfers on the face modified by this algorithm. <br>
const TopTools_SequenceOfShape& ChamferEdges() const;
//! Returns the number of chamfers on the face modified by this algorithm. <br>
Standard_Integer NbChamfer() const;
//! Returns the list of shapes modified from the shape <br>
//! <S>. <br>
Standard_EXPORT virtual const TopTools_ListOfShape& Modified(const TopoDS_Shape& S) ;
//! returns the number of new curves <br>
//! after the shape creation. <br>
Standard_EXPORT Standard_Integer NbCurves() const;
//! Return the Edges created for curve I. <br>
Standard_EXPORT const TopTools_ListOfShape& NewEdges(const Standard_Integer I) ;
Standard_Boolean HasDescendant(const TopoDS_Edge& E) const;
//! Returns the chamfered or filleted edge built from the <br>
//! edge E on the face modified by this algorithm. If E has <br>
//! not been modified, this function returns E. <br>
//! Exceptions <br>
//! Standard_NoSuchObject if the edge E does not <br>
//! belong to the initial face. <br>
const TopoDS_Edge& DescendantEdge(const TopoDS_Edge& E) const;
//! Returns the basis edge on the face modified by this <br>
//! algorithm from which the chamfered or filleted edge E is <br>
//! built. If E has not been modified, this function returns E. <br>
//! Warning <br>
//! E is returned if it does not belong to the initial face. <br>
Standard_EXPORT const TopoDS_Edge& BasisEdge(const TopoDS_Edge& E) const;
ChFi2d_ConstructionError Status() const;
//! Update the result and set the Done flag <br>
Standard_EXPORT virtual void Build() ;
protected:
private:
ChFi2d_Builder myMakeChFi2d;
};
#include <BRepFilletAPI_MakeFillet2d.lxx>
// other Inline functions and methods (like "C++: function call" methods)
#endif
|