0022627: Change OCCT memory management defaults
[occt.git] / src / BRepOffsetAPI / BRepOffsetAPI_DraftAngle.cdl
CommitLineData
7fd59977 1-- File: BRepOffsetAPI_DraftAngle.cdl
2-- Created: Wed Feb 22 11:32:25 1995
3-- Author: Jacques GOUSSARD
4-- <jag@topsn2>
5---Copyright: Matra Datavision 1995
6
7
8
9class DraftAngle from BRepOffsetAPI inherits ModifyShape from BRepBuilderAPI
10
11 ---Purpose: Taper-adding transformations on a shape.
12 -- The resulting shape is constructed by defining one face
13 -- to be tapered after another one, as well as the
14 -- geometric properties of their tapered transformation.
15 -- Each tapered transformation is propagated along the
16 -- series of faces which are tangential to one another and
17 -- which contains the face to be tapered.
18 -- This algorithm is useful in the construction of molds or
19 -- dies. It facilitates the removal of the article being produced.
20 -- A DraftAngle object provides a framework for:
21 -- - initializing the construction algorithm with a given shape,
22 -- - acquiring the data characterizing the faces to be tapered,
23 -- - implementing the construction algorithm, and
24 -- - consulting the results.
25 -- Warning
26 -- - This algorithm treats planar, cylindrical and conical faces.
27 -- - Do not use shapes, which with a draft angle added to
28 -- a face would modify the topology. This would, for
29 -- example, involve creation of new vertices, edges or
30 -- faces, or suppression of existing vertices, edges or faces.
31 -- - Any face, which is continuous in tangency with the
32 -- face to be tapered, will also be tapered. These
33 -- connected faces must also respect the above criteria.
34
35
36uses
37 Shape from TopoDS,
38 Face from TopoDS,
39 ShapeModification from BRepBuilderAPI,
40 ListOfShape from TopTools,
41 Dir from gp,
42 Pln from gp,
43 ErrorStatus from Draft
44
45raises
46 NotDone from StdFail,
47 NullObject from Standard,
48 NoSuchObject from Standard,
49 ConstructionError from Standard
50
51is
52
53 Create
54
55 returns DraftAngle from BRepOffsetAPI;
56 ---Purpose: Constructs an empty algorithm to perform
57 -- taper-adding transformations on faces of a shape.
58 -- Use the Init function to define the shape to be tapered.
59
60 Create(S: Shape from TopoDS)
61 returns DraftAngle from BRepOffsetAPI;
62 ---Purpose: Initializes an algorithm to perform taper-adding
63 -- transformations on faces of the shape S.
64 -- S will be referred to as the initial shape of the algorithm.
65
66 Clear(me: in out)
67
68 ---Purpose: Cancels the results of all taper-adding transformations
69 -- performed by this algorithm on the initial shape. These
70 -- results will have been defined by successive calls to the function Add.
71 is static;
72
73
74 Init(me: in out; S: Shape from TopoDS)
75
76 ---Purpose: Initializes, or reinitializes this taper-adding algorithm with the shape S.
77 -- S will be referred to as the initial shape of this algorithm.
78
79 is static;
80
81
82 Add(me: in out; F : Face from TopoDS;
83 Direction : Dir from gp;
84 Angle : Real from Standard;
85 NeutralPlane: Pln from gp;
86 Flag : Boolean from Standard = Standard_True)
87 ---Purpose: Adds the face F, the direction
88 -- Direction, the angle Angle, the plane NeutralPlane, and the flag
89 -- Flag to the framework created at construction time, and with this
90 -- data, defines the taper-adding transformation.
91 -- F is a face, which belongs to the initial shape of this algorithm or
92 -- to the shape loaded by the function Init.
93 -- Only planar, cylindrical or conical faces can be tapered:
94 -- - If the face F is planar, it is tapered by inclining it
95 -- through the angle Angle about the line of intersection between the
96 -- plane NeutralPlane and F.
97 -- Direction indicates the side of NeutralPlane from which matter is
98 -- removed if Angle is positive or added if Angle is negative.
99 -- - If F is cylindrical or conical, it is transformed in the
100 -- same way on a single face, resulting in a conical face if F
101 -- is cylindrical, and a conical or cylindrical face if it is already conical.
102 -- The taper-adding transformation is propagated from the face F along
103 -- the series of planar, cylindrical or conical faces containing F,
104 -- which are tangential to one another.
105 -- Use the function AddDone to check if this taper-adding transformation is successful.
106 -- Warning
107 -- Nothing is done if:
108 -- - the face F does not belong to the initial shape of this algorithm, or
109 -- - the face F is not planar, cylindrical or conical.
110 -- Exceptions
111 -- - Standard_NullObject if the initial shape is not
112 -- defined, i.e. if this algorithm has not been initialized
113 -- with the non-empty constructor or the Init function.
114 -- - Standard_ConstructionError if the previous call to
115 -- Add has failed. The function AddDone ought to have
116 -- been used to check for this, and the function Remove
117 -- to cancel the results of the unsuccessful taper-adding
118 -- transformation and to retrieve the previous shape.
119 raises NullObject from Standard,
120 ConstructionError from Standard
121 is static;
122
123
124 AddDone(me)
125
126 ---Purpose: Returns true if the previous taper-adding
127 -- transformation performed by this algorithm in the last
128 -- call to Add, was successful.
129 -- If AddDone returns false:
130 -- - the function ProblematicShape returns the face
131 -- on which the error occurred,
132 -- - the function Remove has to be used to cancel the
133 -- results of the unsuccessful taper-adding
134 -- transformation and to retrieve the previous shape.
135 -- Exceptions
136 -- Standard_NullObject if the initial shape has not
137 -- been defined, i.e. if this algorithm has not been
138 -- initialized with the non-empty constructor or the .Init function.
139 returns Boolean from Standard
140 raises NullObject from Standard
141
142 is static;
143
144
145 Remove(me: in out; F: Face from TopoDS)
146 ---Purpose: Cancels the taper-adding transformation previously
147 -- performed by this algorithm on the face F and the
148 -- series of tangential faces which contain F, and retrieves
149 -- the shape before the last taper-adding transformation.
150 -- Warning
151 -- You will have to use this function if the previous call to
152 -- Add fails. Use the function AddDone to check it.
153 -- Exceptions
154 -- - Standard_NullObject if the initial shape has not
155 -- been defined, i.e. if this algorithm has not been
156 -- initialized with the non-empty constructor or the Init function.
157 -- - Standard_NoSuchObject if F has not been added
158 -- or has already been removed.
159 raises NullObject from Standard,
160 NoSuchObject from Standard
161
162 is static;
163
164
165 ProblematicShape(me)
166
167 returns Shape from TopoDS
168 ---Purpose: Returns the shape on which an error occurred after an
169 -- unsuccessful call to Add or when IsDone returns false.
170 -- Exceptions
171 -- Standard_NullObject if the initial shape has not been
172 -- defined, i.e. if this algorithm has not been initialized with
173 -- the non-empty constructor or the Init function.
174 ---C++: return const&
175 raises NullObject from Standard
176
177 is static;
178
179
180
181 Status(me)
182 ---Purpose: Returns an error status when an error has occured
183 -- (Face, Edge or Vertex recomputaion problem).
184 -- Otherwise returns Draft_NoError. The method may be
185 -- called if AddDone returns Standard_False, or when
186 -- IsDone returns Standard_False.
187
188 returns ErrorStatus from Draft
189 raises NullObject from Standard
190 -- The exception is raised if no shape has been
191 -- given(constructor or Init method).
192
193 is static;
194
195
196 ConnectedFaces(me; F: Face from TopoDS)
197
198 returns ListOfShape from TopTools
199 ---Purpose: Returns all the faces which have been added
200 -- together with the face <F>.
201 --
202 ---C++: return const&
203
204 raises NullObject from Standard,
205 -- The exception is raised if no shape has been
206 -- given(constructor or Init method).
207 NoSuchObject from Standard,
208 -- The exception is raised if F has not been added.
209 NotDone from StdFail
210 -- The exception is raised if AddDone returns False.
211 is static;
212
213
214 ModifiedFaces(me)
215
216 returns ListOfShape from TopTools
217 ---Purpose: Returns all the faces on which a modification has
218 -- been given.
219 --
220 ---C++: return const&
221
222 raises NullObject from Standard,
223 -- The exception is raised if no shape has been
224 -- given(constructor or Init method).
225 NotDone from StdFail
226 -- The exception is raised if AddDone returns False.
227 is static;
228
229
230 Build(me : in out)
231
232 ---Purpose: Builds the resulting shape (redefined from MakeShape).
233 ---Level: Public
234 is redefined;
235
236 CorrectWires(me : in out);
237
238 Generated (me: in out; S : Shape from TopoDS)
239 ---Purpose: Returns the list of shapes generated from the
240 -- shape <S>.
241 ---C++: return const &
242 ---Level: Public
243 returns ListOfShape from TopTools
244 is redefined virtual;
245
246
247
248 Modified (me: in out; S : Shape from TopoDS)
249 ---Purpose: Returns the list of shapes modified from the shape
250 -- <S>.
251 ---C++: return const &
252 ---Level: Public
253 returns ListOfShape from TopTools
254 is redefined virtual;
255
256fields
257
258 myModifiedShapes : ListOfShape from TopTools;
259
260end DraftAngle;
261
262
263
264
265