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
|
// 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 _BndLib_HeaderFile
#define _BndLib_HeaderFile
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
class gp_Lin;
class Bnd_Box;
class gp_Lin2d;
class Bnd_Box2d;
class gp_Circ;
class gp_Circ2d;
class gp_Elips;
class gp_Elips2d;
class gp_Parab;
class gp_Parab2d;
class gp_Hypr;
class gp_Hypr2d;
class gp_Cylinder;
class gp_Cone;
class gp_Sphere;
class gp_Torus;
class BndLib_Add3dCurve;
class BndLib_Add2dCurve;
class BndLib_AddSurface;
//! The BndLib package provides functions to add a geometric primitive to a bounding box. <br>
//! Note: these functions work with gp objects, optionally <br>
//! limited by parameter values. If the curves and surfaces <br>
//! provided by the gp package are not explicitly <br>
//! parameterized, they still have an implicit parameterization, <br>
//! similar to that which they infer for the equivalent Geom or Geom2d objects. <br>
//! Add : Package to compute the bounding boxes for elementary <br>
//! objects from gp in 2d and 3d . <br>
//! <br>
//! AddCurve2d : A class to compute the bounding box for a curve <br>
//! in 2d dimensions ;the curve is defined by a tool <br>
//! <br>
//! AddCurve : A class to compute the bounding box for a curve <br>
//! in 3d dimensions ;the curve is defined by a tool <br>
//! <br>
//! AddSurface : A class to compute the bounding box for a surface. <br>
//! The surface is defined by a tool for the geometry and another <br>
//! tool for the topology (only the edges in 2d dimensions) <br>
class BndLib {
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);
}
//! Adds the segment of the line L limited by the two <br>
//! parameter values P1 and P2, to the bounding box B, and <br>
//! then enlarges B by the tolerance value Tol. <br>
//! Tol is the tolerance value to enlarge the minimun and maximum dimension <br>
//! P1 and P2 may represent infinite values. <br>
//! Exceptions <br>
//! Standard_Failure if P1 and P2 are either two negative <br>
//! infinite real numbers, or two positive infinite real numbers. <br>
Standard_EXPORT static void Add(const gp_Lin& L,const Standard_Real P1,const Standard_Real P2,const Standard_Real Tol,Bnd_Box& B) ;
Standard_EXPORT static void Add(const gp_Lin2d& L,const Standard_Real P1,const Standard_Real P2,const Standard_Real Tol,Bnd_Box2d& B) ;
Standard_EXPORT static void Add(const gp_Circ& C,const Standard_Real Tol,Bnd_Box& B) ;
//! P2-P1 can be in [0,2*pi] <br>
Standard_EXPORT static void Add(const gp_Circ& C,const Standard_Real P1,const Standard_Real P2,const Standard_Real Tol,Bnd_Box& B) ;
Standard_EXPORT static void Add(const gp_Circ2d& C,const Standard_Real Tol,Bnd_Box2d& B) ;
//! Adds the circle C, or the arc of the circle C <br>
//! limited by the two parameter values P1 and P2, <br>
//! to the bounding box B, and then enlarges B by the tolerance value Tol. <br>
//! P2-P1 can be in [0,2*pi] <br>
Standard_EXPORT static void Add(const gp_Circ2d& C,const Standard_Real P1,const Standard_Real P2,const Standard_Real Tol,Bnd_Box2d& B) ;
Standard_EXPORT static void Add(const gp_Elips& C,const Standard_Real Tol,Bnd_Box& B) ;
//! P2-P1 can be in [0,2*pi] <br>
Standard_EXPORT static void Add(const gp_Elips& C,const Standard_Real P1,const Standard_Real P2,const Standard_Real Tol,Bnd_Box& B) ;
Standard_EXPORT static void Add(const gp_Elips2d& C,const Standard_Real Tol,Bnd_Box2d& B) ;
//! Adds the ellipse E, or the arc of the ellipse E <br>
//! limited by the two parameter values P1 and P2, <br>
//! to the bounding box B, and then enlarges B by the tolerance value Tol. <br>
//! P2-P1 can be in [0,2*pi] <br>
Standard_EXPORT static void Add(const gp_Elips2d& C,const Standard_Real P1,const Standard_Real P2,const Standard_Real Tol,Bnd_Box2d& B) ;
Standard_EXPORT static void Add(const gp_Parab& P,const Standard_Real P1,const Standard_Real P2,const Standard_Real Tol,Bnd_Box& B) ;
//! Adds the arc of the parabola P limited by the two <br>
//! parameter values P1 and P2, to the bounding box B, and <br>
//! then enlarges B by the tolerance value Tol. <br>
//! P1 and P2 may represent infinite values. <br>
//! Exceptions <br>
//! Standard_Failure if P1 and P2 are either two negative <br>
//! infinite real numbers, or two positive infinite real numbers. <br>
Standard_EXPORT static void Add(const gp_Parab2d& P,const Standard_Real P1,const Standard_Real P2,const Standard_Real Tol,Bnd_Box2d& B) ;
Standard_EXPORT static void Add(const gp_Hypr& H,const Standard_Real P1,const Standard_Real P2,const Standard_Real Tol,Bnd_Box& B) ;
//! Adds the arc of the branch of hyperbola H limited by the <br>
//! two parameter values P1 and P2, to the bounding box B, <br>
//! and then enlarges B by the tolerance value Tol. <br>
//! P1 and P2 may represent infinite values. <br>
//! Exceptions <br>
//! Standard_Failure if P1 and P2 are either two negative <br>
//! infinite real numbers, or two positive infinite real numbers. <br>
Standard_EXPORT static void Add(const gp_Hypr2d& H,const Standard_Real P1,const Standard_Real P2,const Standard_Real Tol,Bnd_Box2d& B) ;
//! UMax -UMin can be in [0,2*pi] <br>
Standard_EXPORT static void Add(const gp_Cylinder& S,const Standard_Real UMin,const Standard_Real UMax,const Standard_Real VMin,const Standard_Real VMax,const Standard_Real Tol,Bnd_Box& B) ;
//! Adds to the bounding box B, the patch of the cylinder S limited <br>
//! - in the v parametric direction, by the two parameter <br>
//! values VMin and VMax <br>
//! - and optionally in the u parametric direction, by the two <br>
//! parameter values UMin and UMax. <br>
//! B is then enlarged by the tolerance value Tol. <br>
//! VMin and VMax may represent infinite values. <br>
//! Exceptions <br>
//! Standard_Failure if VMin and VMax are either two <br>
//! negative infinite real numbers, or two positive infinite real numbers. <br>
Standard_EXPORT static void Add(const gp_Cylinder& S,const Standard_Real VMin,const Standard_Real VMax,const Standard_Real Tol,Bnd_Box& B) ;
//! UMax-UMin can be in [0,2*pi] <br>
Standard_EXPORT static void Add(const gp_Cone& S,const Standard_Real UMin,const Standard_Real UMax,const Standard_Real VMin,const Standard_Real VMax,const Standard_Real Tol,Bnd_Box& B) ;
//! Adds to the bounding box B, the patch of the cone S limited <br>
//! - in the v parametric direction, by the two parameter <br>
//! values VMin and VMax <br>
//! - and optionally in the u parametric direction, by the two <br>
//! parameter values UMin and UMax, <br>
//! B is then enlarged by the tolerance value Tol. <br>
//! VMin and VMax may represent infinite values. <br>
//! Exceptions <br>
//! Standard_Failure if VMin and VMax are either two <br>
//! negative infinite real numbers, or two positive infinite real numbers. <br>
Standard_EXPORT static void Add(const gp_Cone& S,const Standard_Real VMin,const Standard_Real VMax,const Standard_Real Tol,Bnd_Box& B) ;
Standard_EXPORT static void Add(const gp_Sphere& S,const Standard_Real Tol,Bnd_Box& B) ;
//! Adds to the bounding box B the sphere S, or <br>
//! - the patch of the sphere S, limited in the u parametric <br>
//! direction, by the two parameter values UMin and UMax, <br>
//! and in the v parametric direction, by the two parameter <br>
//! values VMin and VMax. <br>
//! B is then enlarged by the tolerance value Tol. <br>
//! UMax-UMin can be in [0,2*pi] <br>
//! VMin,VMax can be [-pi/2,pi/2] <br>
Standard_EXPORT static void Add(const gp_Sphere& S,const Standard_Real UMin,const Standard_Real UMax,const Standard_Real VMin,const Standard_Real VMax,const Standard_Real Tol,Bnd_Box& B) ;
Standard_EXPORT static void Add(const gp_Torus& P,const Standard_Real Tol,Bnd_Box& B) ;
//! Adds to the bounding box B <br>
//! - the torus S, or <br>
//! - the patch of the torus S, limited in the u parametric <br>
//! direction, by the two parameter values UMin and UMax, <br>
//! and in the v parametric direction, by the two parameter <br>
//! values VMin and VMax. <br>
//! B is then enlarged by the tolerance value Tol. <br>
//! UMax-UMin can be in [0,2*pi], <br>
//! VMin,VMax can be [-pi/2,pi/2] <br>
Standard_EXPORT static void Add(const gp_Torus& P,const Standard_Real UMin,const Standard_Real UMax,const Standard_Real VMin,const Standard_Real VMax,const Standard_Real Tol,Bnd_Box& B) ;
protected:
private:
friend class BndLib_Add3dCurve;
friend class BndLib_Add2dCurve;
friend class BndLib_AddSurface;
};
// other Inline functions and methods (like "C++: function call" methods)
#endif
|