0024830: Remove redundant keyword 'mutable' in CDL declarations
[occt.git] / src / Draft / Draft_Modification.cdl
CommitLineData
b311480e 1-- Created on: 1994-08-30
2-- Created by: Jacques GOUSSARD
3-- Copyright (c) 1994-1999 Matra Datavision
973c2be1 4-- Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5--
973c2be1 6-- This file is part of Open CASCADE Technology software library.
b311480e 7--
d5f74e42 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
973c2be1 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.
b311480e 13--
973c2be1 14-- Alternatively, this file may be used under the terms of Open CASCADE
15-- commercial license or contractual agreement.
7fd59977 16
17class Modification from Draft inherits Modification from BRepTools
18
19 ---Purpose:
20
21uses Shape from TopoDS,
22 Face from TopoDS,
23 Edge from TopoDS,
24 Vertex from TopoDS,
25 Location from TopLoc,
26 ListOfShape from TopTools,
27 IndexedDataMapOfShapeListOfShape from TopTools,
28
29 Orientation from TopAbs,
30 Shape from GeomAbs,
31
32 Surface from Geom,
33 Curve from Geom,
34 Curve from Geom2d,
35
36 Pnt from gp,
37 Lin from gp,
38 Pln from gp,
39 Dir from gp,
40
41 ErrorStatus from Draft,
42 DataMapOfFaceFaceInfo from Draft,
43 DataMapOfEdgeEdgeInfo from Draft,
44 DataMapOfVertexVertexInfo from Draft
45
46
47raises NotDone from StdFail,
48 NoSuchObject from Standard,
49 ConstructionError from Standard
50
51is
52
53 Create(S: Shape from TopoDS)
54
6e33d3ce 55 returns Modification from Draft;
7fd59977 56
57
58 Clear(me: mutable)
59 ---Purpose: Resets on the same shape.
60 is static;
61
62
63 Init(me: mutable; S: Shape from TopoDS)
64 ---Purpose: Changes the basis shape and resets.
65 is static;
66
67
68 Add(me: mutable; F : Face from TopoDS;
69 Direction : Dir from gp;
70 Angle : Real from Standard;
71 NeutralPlane: Pln from gp;
72 Flag : Boolean from Standard = Standard_True)
73 ---Purpose: Adds the face F and propagates the draft
74 -- modification to its neighbour faces if they are
75 -- tangent. If an error occurs, will return False and
76 -- ProblematicShape will return the "bad" face.
77
78 returns Boolean from Standard
79 raises ConstructionError from Standard
80 -- The exception is raised if ProblematicShape does not
81 -- return a null shape
82 is static;
83
84
85 Remove(me: mutable; F: Face from TopoDS)
86 ---Purpose: Removes the face F and the neighbour faces if they
87 -- are tangent. It will be necessary to call this
88 -- method if the method Add returns Standard_False,
89 -- to unset ProblematicFace.
90
91
92 raises NoSuchObject from Standard
93 -- The exception is raised if F has not been added.
94 is static;
95
96
97
98 Perform(me: mutable)
99 ---Purpose: Performs the draft angle modification and sets the
100 -- value returned by the method IsDone. If an error
101 -- occurs, IsDone will return Standard_False, and an
102 -- error status will be given by the method Error,
103 -- and the shape on which the problem appeared will
104 -- be given by ProblematicShape
105
106 raises ConstructionError from Standard
107 --- The exception is raised if ProblematicShape does not
108 -- return a null shape.
109 is static;
110
111
112 IsDone(me)
113 ---Purpose: Returns True if Perform has been succesfully
114 -- called. Otherwise more information can be obtained
115 -- using the methods Error() and ProblematicShape().
116 returns Boolean from Standard
117 is static;
118
119
120 Error(me)
121
122 returns ErrorStatus from Draft
123 is static;
124
125
126 ProblematicShape(me)
127 ---Purpose: Returns the shape (Face, Edge or Vertex) on which
128 -- an error occured.
129
130 returns Shape from TopoDS
131 ---C++: return const&
132 is static;
133
134
135 ConnectedFaces(me: mutable; F: Face from TopoDS)
136
137 returns ListOfShape from TopTools
138 ---Purpose: Returns all the faces which have been added
139 -- together with the face <F>.
140 --
141 ---C++: return const&
142
143 raises NoSuchObject from Standard,
144 -- The exception is raised if F has not been added.
145 NotDone from StdFail
146 -- The exception is raised if IsDone returns False.
147 is static;
148
149
150 ModifiedFaces(me: mutable)
151
152 returns ListOfShape from TopTools
153 ---Purpose: Returns all the faces on which a modification has
154 -- been given.
155 --
156 ---C++: return const&
157
158 raises NotDone from StdFail
159 -- The exception is raised if ProblematicShape does not return
160 -- a null shape.
161 is static;
162
163
164
165
166-- Methods inherited from BRepTools_Modification
167
168 NewSurface(me: mutable; F : Face from TopoDS;
169 S : out Surface from Geom;
170 L : out Location from TopLoc;
171 Tol : out Real from Standard;
172 RevWires : out Boolean from Standard;
173 RevFace : out Boolean from Standard)
174
175
176
177 ---Purpose: Returns Standard_True if the face <F> has been
178 -- modified. In this case, <S> is the new geometric
179 -- support of the face, <L> the new location,<Tol>
180 -- the new tolerance.<RevWires> has to be set to
181 -- Standard_True when the modification reverses the
182 -- normal of the surface.(the wires have to be
183 -- reversed). <RevFace> has to be set to
184 -- Standard_True if the orientation of the modified
185 -- face changes in the shells which contain it. Here
186 -- it will be set to Standard_False.
187 --
188 -- Otherwise, returns Standard_False, and <S>, <L>,
189 -- <Tol> , <RevWires> ,<RevFace> are not significant.
190
191 returns Boolean from Standard
192 ;
193
194
195 NewCurve(me: mutable; E : Edge from TopoDS;
196 C : out Curve from Geom;
197 L : out Location from TopLoc;
198 Tol: out Real from Standard)
199
200 returns Boolean from Standard
201 ;
202
203 ---Purpose: Returns Standard_True if the edge <E> has been
204 -- modified. In this case, <C> is the new geometric
205 -- support of the edge, <L> the new location, <Tol>
206 -- the new tolerance. Otherwise, returns
207 -- Standard_False, and <C>, <L>, <Tol> are not
208 -- significant.
209
210
211 NewPoint(me: mutable; V : Vertex from TopoDS;
212 P : out Pnt from gp;
213 Tol: out Real from Standard)
214
215 returns Boolean from Standard
216 ;
217
218 ---Purpose: Returns Standard_True if the vertex <V> has been
219 -- modified. In this case, <P> is the new geometric
220 -- support of the vertex, <Tol> the new tolerance.
221 -- Otherwise, returns Standard_False, and <P>, <Tol>
222 -- are not significant.
223
224
225 NewCurve2d(me: mutable; E : Edge from TopoDS;
226 F : Face from TopoDS;
227 NewE : Edge from TopoDS;
228 NewF : Face from TopoDS;
229 C : out Curve from Geom2d;
230 Tol : out Real from Standard)
231
232 returns Boolean from Standard
233 ;
234
235 ---Purpose: Returns Standard_True if the edge <E> has a new
236 -- curve on surface on the face <F>.In this case, <C>
237 -- is the new geometric support of the edge, <L> the
238 -- new location, <Tol> the new tolerance.
239 --
240 -- Otherwise, returns Standard_False, and <C>, <L>,
241 -- <Tol> are not significant.
242 --
243 -- <NewE> is the new edge created from <E>. <NewF>
244 -- is the new face created from <F>. They may be usefull.
245
246
247 NewParameter(me: mutable; V : Vertex from TopoDS;
248 E : Edge from TopoDS;
249 P : out Real from Standard;
250 Tol: out Real from Standard)
251
252 returns Boolean from Standard
253 ;
254
255 ---Purpose: Returns Standard_True if the Vertex <V> has a new
256 -- parameter on the edge <E>. In this case, <P> is
257 -- the parameter, <Tol> the new tolerance.
258 -- Otherwise, returns Standard_False, and <P>, <Tol>
259 -- are not significant.
260
261
262
263 Continuity(me: mutable; E : Edge from TopoDS;
264 F1,F2 : Face from TopoDS;
265 NewE : Edge from TopoDS;
266 NewF1,NewF2: Face from TopoDS)
267
268 returns Shape from GeomAbs;
269
270 ---Purpose: Returns the continuity of <NewE> between <NewF1>
271 -- and <NewF2>.
272 --
273 -- <NewE> is the new edge created from <E>. <NewF1>
274 -- (resp. <NewF2>) is the new face created from <F1>
275 -- (resp. <F2>).
276
277
278-- Private implementation methods
279
280 InternalAdd(me: mutable; F : Face from TopoDS;
281 Direction : Dir from gp;
282 Angle : Real from Standard;
283 NeutralPlane: Pln from gp;
284 Flag : Boolean from Standard = Standard_True)
285
286 returns Boolean from Standard
287 is static private;
288
289
290 Propagate(me: mutable)
291
292 returns Boolean from Standard
293 is static private;
294
295
296 NewCurve(me: mutable; C : Curve from Geom;
297 S : Surface from Geom;
298 OriS : Orientation from TopAbs;
299 Direction : Dir from gp;
300 Angle : Real from Standard;
301 NeutralPlane: Pln from gp;
302 Flag : Boolean from Standard = Standard_True)
303
6e33d3ce 304 returns Curve from Geom
7fd59977 305 is static private;
306
307
308 NewSurface(me: mutable; S : Surface from Geom;
309 OriS : Orientation from TopAbs;
310 Direction : Dir from gp;
311 Angle : Real from Standard;
312 NeutralPlane: Pln from gp)
313
6e33d3ce 314 returns Surface from Geom
7fd59977 315 is static private;
316
317
318fields
319
320 myFMap : DataMapOfFaceFaceInfo from Draft;
321 myEMap : DataMapOfEdgeEdgeInfo from Draft;
322 myVMap : DataMapOfVertexVertexInfo from Draft;
323 myComp : Boolean from Standard;
324 myShape : Shape from TopoDS;
325 badShape: Shape from TopoDS;
326 errStat : ErrorStatus from Draft;
327 curFace : Face from TopoDS;
328 conneF : ListOfShape from TopTools;
329 myEFMap : IndexedDataMapOfShapeListOfShape from TopTools;
330
331end Modification;