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