Commit | Line | Data |
---|---|---|
7fd59977 | 1 | -- File: BRepBuilderAPI.cdl |
2 | -- Created: Tue Jul 6 17:29:03 1993 | |
3 | -- Author: Remi LEQUETTE | |
4 | -- <rle@phylox> | |
5 | ---Copyright: Matra Datavision 1993 | |
6 | ||
7 | ||
8 | ||
9 | package BRepBuilderAPI | |
10 | ||
11 | ---Purpose: The BRepBuilderAPI package provides an Application | |
12 | -- Programming Interface for the BRep topology data | |
13 | -- structure. | |
14 | -- | |
15 | -- The API is a set of classes aiming to provide : | |
16 | -- | |
17 | -- * High level and simple calls for the most common | |
18 | -- operations. | |
19 | -- | |
20 | -- * Keeping an access on the low-level | |
21 | -- implementation of high-level calls. | |
22 | -- | |
23 | -- * Examples of programming of high-level operations | |
24 | -- from low-level operations. | |
25 | -- | |
26 | -- * A complete coverage of modelling : | |
27 | -- | |
28 | -- - Creating vertices ,edges, faces, solids. | |
29 | -- | |
30 | -- - Sweeping operations. | |
31 | -- | |
32 | -- - Boolean operations. | |
33 | -- | |
34 | -- - Global properties computation. | |
35 | -- | |
36 | -- | |
37 | -- The API provides classes to build objects: | |
38 | -- | |
39 | -- * The constructors of the classes provides the | |
40 | -- different constructions methods. | |
41 | -- | |
42 | -- * The class keeps as fields the different tools | |
43 | -- used to build the object. | |
44 | -- | |
45 | -- * The class provides a casting method to get | |
46 | -- automatically the result with a function-like | |
47 | -- call. | |
48 | -- | |
49 | -- For example to make a vertex <V> from a point <P> | |
50 | -- one can writes : | |
51 | -- | |
52 | -- V = BRepBuilderAPI_MakeVertex(P); | |
53 | -- | |
54 | -- or | |
55 | -- | |
56 | -- BRepBuilderAPI_MakeVertex MV(P); | |
57 | -- V = MV.Vertex(); | |
58 | -- | |
59 | -- | |
60 | -- For tolerances a default precision is used which | |
61 | -- can be changed by the packahe method | |
62 | -- BRepBuilderAPI::Precision. | |
63 | -- | |
64 | -- For error handling the BRepBuilderAPI commands raise only | |
65 | -- the NotDone error. When Done is false on a command | |
66 | -- the error description can be asked to the command. | |
67 | -- | |
68 | -- In theory the comands can be called with any | |
69 | -- arguments, argument checking is performed by the | |
70 | -- command. | |
71 | ||
72 | ||
73 | ||
74 | uses | |
75 | Standard, | |
76 | StdFail, | |
77 | gp, | |
78 | GeomAbs, | |
79 | Geom2d, | |
80 | Geom, | |
81 | TopAbs, | |
82 | TopoDS, | |
83 | TopTools, | |
84 | TopLoc, | |
85 | BRep, | |
86 | BRepLib, | |
87 | BRepTools, | |
88 | TColStd, | |
92434a36 A |
89 | TColgp, |
90 | Message | |
7fd59977 | 91 | is |
92 | ||
93 | ||
94 | enumeration EdgeError is | |
95 | ---Purpose: Indicates the outcome of the | |
96 | -- construction of an edge, i.e. whether it has been successful or | |
97 | -- not, as explained below: | |
98 | -- - BRepBuilderAPI_EdgeDone No error occurred; The edge is | |
99 | -- correctly built. | |
100 | -- - BRepBuilderAPI_PointProjectionFailed No parameters were given but | |
101 | -- the projection of the 3D points on the curve failed. This | |
102 | -- happens when the point distance to the curve is greater than | |
103 | -- the precision value. | |
104 | -- - BRepBuilderAPI_ParameterOutOfRange | |
105 | -- The given parameters are not in the parametric range | |
106 | -- C->FirstParameter(), C->LastParameter() | |
107 | -- - BRepBuilderAPI_DifferentPointsOnClosedCurve | |
108 | -- The two vertices or points are the extremities of a closed | |
109 | -- curve but have different locations. | |
110 | -- - BRepBuilderAPI_PointWithInfiniteParameter | |
111 | -- A finite coordinate point was associated with an infinite | |
112 | -- parameter (see the Precision package for a definition of infinite values). | |
113 | -- - BRepBuilderAPI_DifferentsPointAndParameter | |
114 | -- The distance between the 3D point and the point evaluated | |
115 | -- on the curve with the parameter is greater than the precision. | |
116 | -- - BRepBuilderAPI_LineThroughIdenticPoints | |
117 | -- Two identical points were given to define a line (construction | |
118 | -- of an edge without curve); gp::Resolution is used for the confusion test. | |
119 | EdgeDone, | |
120 | PointProjectionFailed, | |
121 | ParameterOutOfRange, | |
122 | DifferentPointsOnClosedCurve, | |
123 | PointWithInfiniteParameter, | |
124 | DifferentsPointAndParameter, | |
125 | LineThroughIdenticPoints | |
126 | end EdgeError; | |
127 | ||
128 | ||
129 | enumeration WireError is | |
130 | ---Purpose: Indicates the outcome of wire | |
131 | -- construction, i.e. whether it is successful or not, as explained below: | |
132 | -- - BRepBuilderAPI_WireDone No | |
133 | -- error occurred. The wire is correctly built. | |
134 | -- - BRepBuilderAPI_EmptyWire No | |
135 | -- initialization of the algorithm. Only an empty constructor was used. | |
136 | -- - BRepBuilderAPI_DisconnectedWire | |
137 | -- The last edge which you attempted to add was not connected to the wire. | |
138 | -- - BRepBuilderAPI_NonManifoldWire | |
139 | -- The wire with some singularity. | |
140 | WireDone, | |
141 | EmptyWire, | |
142 | DisconnectedWire, | |
143 | NonManifoldWire | |
144 | ||
145 | end WireError; | |
146 | ||
147 | ||
148 | enumeration FaceError is | |
149 | ---Purpose: Indicates the outcome of the | |
150 | -- construction of a face, i.e. whether it has been successful or | |
151 | -- not, as explained below: | |
152 | -- - BRepBuilderAPI_FaceDone No error occurred. The face is | |
153 | -- correctly built. | |
154 | -- - BRepBuilderAPI_NoFace No initialization of the | |
155 | -- algorithm; only an empty constructor was used. | |
156 | -- - BRepBuilderAPI_NotPlanar | |
157 | -- No surface was given and the wire was not planar. | |
158 | -- - BRepBuilderAPI_CurveProjectionFailed | |
159 | -- Not used so far. | |
160 | -- - BRepBuilderAPI_ParametersOutOfRange | |
161 | -- The parameters given to limit the surface are out of its bounds. | |
162 | FaceDone, | |
163 | NoFace, | |
164 | NotPlanar, | |
165 | CurveProjectionFailed, | |
166 | ParametersOutOfRange | |
167 | ||
168 | end FaceError; | |
169 | ||
170 | ||
171 | enumeration ShellError is | |
172 | ---Purpose: Indicates the outcome of the construction of a face, i.e. | |
173 | -- whether it is successful or not, as explained below: | |
174 | -- - BRepBuilderAPI_ShellDone No error occurred. | |
175 | -- The shell is correctly built. | |
176 | -- - BRepBuilderAPI_EmptyShell No initialization of | |
177 | -- the algorithm: only an empty constructor was used. | |
178 | -- - BRepBuilderAPI_DisconnectedShell not yet used | |
179 | -- - BRepBuilderAPI_ShellParametersOutOfRange | |
180 | -- The parameters given to limit the surface are out of its bounds. | |
181 | ShellDone, | |
182 | EmptyShell, | |
183 | DisconnectedShell, | |
184 | ShellParametersOutOfRange | |
185 | ||
186 | end ShellError; | |
187 | ||
188 | enumeration PipeError is | |
189 | ---Purpose: Errors that can occur at (shell)pipe construction. | |
190 | ||
191 | PipeDone, -- no error | |
192 | PipeNotDone, -- Error with status unknown | |
193 | PlaneNotIntersectGuide, | |
194 | ImpossibleContact -- Impossible to rotat the section like the rotated section | |
195 | -- have conact with the guide. | |
196 | ||
197 | end PipeError; | |
198 | ||
199 | ||
200 | ||
201 | enumeration ShapeModification is | |
202 | ---Purpose: Lists the possible types of modification to a shape | |
203 | -- following a topological operation: Preserved, Deleted, | |
204 | -- Trimmed, Merged or BoundaryModified. | |
205 | -- This enumeration enables you to assign a "state" to the | |
206 | -- different shapes that are on the list of operands for | |
207 | -- each API function. The MakeShape class then uses this | |
208 | -- to determine what has happened to the shapes which | |
209 | -- constitute the list of operands. | |
210 | Preserved, | |
211 | Deleted, | |
212 | Trimmed, | |
213 | Merged, | |
214 | BoundaryModified | |
215 | ||
216 | end ShapeModification; | |
217 | ||
218 | enumeration TransitionMode is | |
219 | ---Purpose: Option to manage discontinuities in Sweep | |
220 | Transformed, | |
221 | RightCorner, | |
222 | RoundCorner | |
223 | end TransitionMode; | |
224 | ||
225 | deferred class Command; | |
226 | ---Purpose: Root class for all BRepBuilderAPI commands. | |
227 | ||
228 | deferred class MakeShape; | |
229 | ---Purpose: Root class for all shape constructions. | |
230 | ||
231 | -- | |
232 | -- Construction of topology from geometry | |
233 | -- | |
234 | ||
235 | class MakeVertex; | |
236 | ||
237 | class MakeEdge; | |
238 | ||
239 | class MakeEdge2d; | |
240 | ||
241 | class MakePolygon; | |
242 | ||
243 | class MakeFace; | |
244 | ||
245 | ||
246 | -- Construction of Shape through sections. | |
247 | ||
248 | class FindPlane; | |
249 | ||
250 | -- | |
251 | -- Construction of Shape from several shapes | |
252 | -- | |
253 | ||
254 | class Sewing; | |
255 | ---Purpose: Provides a tool to | |
256 | -- - identify contigous boundaries (for control | |
257 | -- of continuity: C0, C1, ...) | |
258 | -- - assemble contigous shapes into one shape. | |
259 | ||
260 | -- | |
261 | -- Construction of composite topologies | |
262 | -- | |
263 | ||
264 | class MakeWire; | |
265 | ||
266 | class MakeShell; | |
267 | ||
268 | class MakeSolid; | |
269 | ||
270 | -- | |
271 | -- Shape modification (constant topology) | |
272 | -- | |
273 | ||
274 | deferred class ModifyShape; | |
275 | ||
276 | class Transform; | |
277 | ||
278 | class NurbsConvert ; | |
279 | ---Purpose: converts all 3D analytical representation of surfaces | |
280 | -- and curves to NURBS execpt for Planes | |
281 | -- | |
282 | ||
283 | class GTransform; | |
284 | ||
285 | class Copy; | |
286 | ||
287 | class Collect; | |
288 | ||
289 | ||
290 | -- | |
291 | -- Default plane for 2d edges. | |
292 | -- | |
293 | ||
294 | Plane(P : Plane from Geom); | |
295 | ---Purpose: Sets the current plane. | |
296 | ---Level: Public | |
297 | ||
298 | Plane returns Plane from Geom; | |
299 | ---Purpose: Returns the current plane. | |
300 | -- | |
301 | ---C++: return const & | |
302 | ---Level: Public | |
303 | ||
304 | -- | |
305 | -- Default precison methods. | |
306 | -- The default precision is initialized with Precision::Confusion() | |
307 | -- | |
308 | ||
309 | Precision(P : Real from Standard); | |
310 | ---Purpose: Sets the default precision. The current Precision | |
311 | -- is returned. | |
312 | ---Level: Public | |
313 | ||
314 | Precision returns Real from Standard; | |
315 | ---Purpose: Returns the default precision. | |
316 | ---Level: Public | |
317 | ||
318 | ||
319 | ||
320 | end BRepBuilderAPI; |