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
6 -- This file is part of Open CASCADE Technology software library.
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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 package BRepBuilderAPI
19 ---Purpose: The BRepBuilderAPI package provides an Application
20 -- Programming Interface for the BRep topology data
23 -- The API is a set of classes aiming to provide :
25 -- * High level and simple calls for the most common
28 -- * Keeping an access on the low-level
29 -- implementation of high-level calls.
31 -- * Examples of programming of high-level operations
32 -- from low-level operations.
34 -- * A complete coverage of modelling :
36 -- - Creating vertices ,edges, faces, solids.
38 -- - Sweeping operations.
40 -- - Boolean operations.
42 -- - Global properties computation.
45 -- The API provides classes to build objects:
47 -- * The constructors of the classes provides the
48 -- different constructions methods.
50 -- * The class keeps as fields the different tools
51 -- used to build the object.
53 -- * The class provides a casting method to get
54 -- automatically the result with a function-like
57 -- For example to make a vertex <V> from a point <P>
60 -- V = BRepBuilderAPI_MakeVertex(P);
64 -- BRepBuilderAPI_MakeVertex MV(P);
68 -- For tolerances a default precision is used which
69 -- can be changed by the packahe method
70 -- BRepBuilderAPI::Precision.
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.
76 -- In theory the comands can be called with any
77 -- arguments, argument checking is performed by the
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
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.
128 PointProjectionFailed,
130 DifferentPointsOnClosedCurve,
131 PointWithInfiniteParameter,
132 DifferentsPointAndParameter,
133 LineThroughIdenticPoints
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.
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
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
168 -- - BRepBuilderAPI_ParametersOutOfRange
169 -- The parameters given to limit the surface are out of its bounds.
173 CurveProjectionFailed,
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.
192 ShellParametersOutOfRange
196 enumeration PipeError is
197 ---Purpose: Errors that can occur at (shell)pipe construction.
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.
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.
224 end ShapeModification;
226 enumeration TransitionMode is
227 ---Purpose: Option to manage discontinuities in Sweep
233 deferred class Command;
234 ---Purpose: Root class for all BRepBuilderAPI commands.
236 deferred class MakeShape;
237 ---Purpose: Root class for all shape constructions.
240 -- Construction of topology from geometry
254 -- Construction of Shape through sections.
259 -- Construction of Shape from several shapes
263 ---Purpose: Provides a tool to
264 -- - identify contigous boundaries (for control
265 -- of continuity: C0, C1, ...)
266 -- - assemble contigous shapes into one shape.
269 -- Construction of composite topologies
279 -- Shape modification (constant topology)
282 deferred class ModifyShape;
287 ---Purpose: converts all 3D analytical representation of surfaces
288 -- and curves to NURBS execpt for Planes
299 -- Default plane for 2d edges.
302 Plane(P : Plane from Geom);
303 ---Purpose: Sets the current plane.
306 Plane returns Plane from Geom;
307 ---Purpose: Returns the current plane.
309 ---C++: return const &
313 -- Default precison methods.
314 -- The default precision is initialized with Precision::Confusion()
317 Precision(P : Real from Standard);
318 ---Purpose: Sets the default precision. The current Precision
322 Precision returns Real from Standard;
323 ---Purpose: Returns the default precision.