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
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
|
-- File: BRepBuilderAPI.cdl
-- Created: Tue Jul 6 17:29:03 1993
-- Author: Remi LEQUETTE
-- <rle@phylox>
---Copyright: Matra Datavision 1993
package BRepBuilderAPI
---Purpose: The BRepBuilderAPI package provides an Application
-- Programming Interface for the BRep topology data
-- structure.
--
-- The API is a set of classes aiming to provide :
--
-- * High level and simple calls for the most common
-- operations.
--
-- * Keeping an access on the low-level
-- implementation of high-level calls.
--
-- * Examples of programming of high-level operations
-- from low-level operations.
--
-- * A complete coverage of modelling :
--
-- - Creating vertices ,edges, faces, solids.
--
-- - Sweeping operations.
--
-- - Boolean operations.
--
-- - Global properties computation.
--
--
-- The API provides classes to build objects:
--
-- * The constructors of the classes provides the
-- different constructions methods.
--
-- * The class keeps as fields the different tools
-- used to build the object.
--
-- * The class provides a casting method to get
-- automatically the result with a function-like
-- call.
--
-- For example to make a vertex <V> from a point <P>
-- one can writes :
--
-- V = BRepBuilderAPI_MakeVertex(P);
--
-- or
--
-- BRepBuilderAPI_MakeVertex MV(P);
-- V = MV.Vertex();
--
--
-- For tolerances a default precision is used which
-- can be changed by the packahe method
-- BRepBuilderAPI::Precision.
--
-- For error handling the BRepBuilderAPI commands raise only
-- the NotDone error. When Done is false on a command
-- the error description can be asked to the command.
--
-- In theory the comands can be called with any
-- arguments, argument checking is performed by the
-- command.
uses
Standard,
StdFail,
gp,
GeomAbs,
Geom2d,
Geom,
TopAbs,
TopoDS,
TopTools,
TopLoc,
BRep,
BRepLib,
BRepTools,
TColStd,
TColgp
is
enumeration EdgeError is
---Purpose: Indicates the outcome of the
-- construction of an edge, i.e. whether it has been successful or
-- not, as explained below:
-- - BRepBuilderAPI_EdgeDone No error occurred; The edge is
-- correctly built.
-- - BRepBuilderAPI_PointProjectionFailed No parameters were given but
-- the projection of the 3D points on the curve failed. This
-- happens when the point distance to the curve is greater than
-- the precision value.
-- - BRepBuilderAPI_ParameterOutOfRange
-- The given parameters are not in the parametric range
-- C->FirstParameter(), C->LastParameter()
-- - BRepBuilderAPI_DifferentPointsOnClosedCurve
-- The two vertices or points are the extremities of a closed
-- curve but have different locations.
-- - BRepBuilderAPI_PointWithInfiniteParameter
-- A finite coordinate point was associated with an infinite
-- parameter (see the Precision package for a definition of infinite values).
-- - BRepBuilderAPI_DifferentsPointAndParameter
-- The distance between the 3D point and the point evaluated
-- on the curve with the parameter is greater than the precision.
-- - BRepBuilderAPI_LineThroughIdenticPoints
-- Two identical points were given to define a line (construction
-- of an edge without curve); gp::Resolution is used for the confusion test.
EdgeDone,
PointProjectionFailed,
ParameterOutOfRange,
DifferentPointsOnClosedCurve,
PointWithInfiniteParameter,
DifferentsPointAndParameter,
LineThroughIdenticPoints
end EdgeError;
enumeration WireError is
---Purpose: Indicates the outcome of wire
-- construction, i.e. whether it is successful or not, as explained below:
-- - BRepBuilderAPI_WireDone No
-- error occurred. The wire is correctly built.
-- - BRepBuilderAPI_EmptyWire No
-- initialization of the algorithm. Only an empty constructor was used.
-- - BRepBuilderAPI_DisconnectedWire
-- The last edge which you attempted to add was not connected to the wire.
-- - BRepBuilderAPI_NonManifoldWire
-- The wire with some singularity.
WireDone,
EmptyWire,
DisconnectedWire,
NonManifoldWire
end WireError;
enumeration FaceError is
---Purpose: Indicates the outcome of the
-- construction of a face, i.e. whether it has been successful or
-- not, as explained below:
-- - BRepBuilderAPI_FaceDone No error occurred. The face is
-- correctly built.
-- - BRepBuilderAPI_NoFace No initialization of the
-- algorithm; only an empty constructor was used.
-- - BRepBuilderAPI_NotPlanar
-- No surface was given and the wire was not planar.
-- - BRepBuilderAPI_CurveProjectionFailed
-- Not used so far.
-- - BRepBuilderAPI_ParametersOutOfRange
-- The parameters given to limit the surface are out of its bounds.
FaceDone,
NoFace,
NotPlanar,
CurveProjectionFailed,
ParametersOutOfRange
end FaceError;
enumeration ShellError is
---Purpose: Indicates the outcome of the construction of a face, i.e.
-- whether it is successful or not, as explained below:
-- - BRepBuilderAPI_ShellDone No error occurred.
-- The shell is correctly built.
-- - BRepBuilderAPI_EmptyShell No initialization of
-- the algorithm: only an empty constructor was used.
-- - BRepBuilderAPI_DisconnectedShell not yet used
-- - BRepBuilderAPI_ShellParametersOutOfRange
-- The parameters given to limit the surface are out of its bounds.
ShellDone,
EmptyShell,
DisconnectedShell,
ShellParametersOutOfRange
end ShellError;
enumeration PipeError is
---Purpose: Errors that can occur at (shell)pipe construction.
PipeDone, -- no error
PipeNotDone, -- Error with status unknown
PlaneNotIntersectGuide,
ImpossibleContact -- Impossible to rotat the section like the rotated section
-- have conact with the guide.
end PipeError;
enumeration ShapeModification is
---Purpose: Lists the possible types of modification to a shape
-- following a topological operation: Preserved, Deleted,
-- Trimmed, Merged or BoundaryModified.
-- This enumeration enables you to assign a "state" to the
-- different shapes that are on the list of operands for
-- each API function. The MakeShape class then uses this
-- to determine what has happened to the shapes which
-- constitute the list of operands.
Preserved,
Deleted,
Trimmed,
Merged,
BoundaryModified
end ShapeModification;
enumeration TransitionMode is
---Purpose: Option to manage discontinuities in Sweep
Transformed,
RightCorner,
RoundCorner
end TransitionMode;
deferred class Command;
---Purpose: Root class for all BRepBuilderAPI commands.
deferred class MakeShape;
---Purpose: Root class for all shape constructions.
--
-- Construction of topology from geometry
--
class MakeVertex;
class MakeEdge;
class MakeEdge2d;
class MakePolygon;
class MakeFace;
-- Construction of Shape through sections.
class FindPlane;
--
-- Construction of Shape from several shapes
--
class Sewing;
---Purpose: Provides a tool to
-- - identify contigous boundaries (for control
-- of continuity: C0, C1, ...)
-- - assemble contigous shapes into one shape.
--
-- Construction of composite topologies
--
class MakeWire;
class MakeShell;
class MakeSolid;
--
-- Shape modification (constant topology)
--
deferred class ModifyShape;
class Transform;
class NurbsConvert ;
---Purpose: converts all 3D analytical representation of surfaces
-- and curves to NURBS execpt for Planes
--
class GTransform;
class Copy;
class Collect;
--
-- Default plane for 2d edges.
--
Plane(P : Plane from Geom);
---Purpose: Sets the current plane.
---Level: Public
Plane returns Plane from Geom;
---Purpose: Returns the current plane.
--
---C++: return const &
---Level: Public
--
-- Default precison methods.
-- The default precision is initialized with Precision::Confusion()
--
Precision(P : Real from Standard);
---Purpose: Sets the default precision. The current Precision
-- is returned.
---Level: Public
Precision returns Real from Standard;
---Purpose: Returns the default precision.
---Level: Public
end BRepBuilderAPI;
|