0024662: Removing unused "generic" classes. Part 3
[occt.git] / src / Sweep / Sweep_LinearRegularSweep.cdl
1 -- Created on: 1993-01-27
2 -- Created by: Philippe DAUTRY
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 deferred generic class LinearRegularSweep from Sweep (
18     TheShape            as any;   -- resulting topological objects.
19     TheGenShape         as any;   -- Generating topological objects.
20     TheDirShape         as any;   -- Directing topological objects.
21     TheBuilder          as any;
22     TheGenShapeTool     as any;
23     TheDirShapeTool     as any;
24     TheShapeIterator    as any;
25     TheGenShapeIterator as any;
26     TheDirShapeIterator as any)
27
28
29         ---Purpose: This  a generic  class  is  used   to build Sweept
30         --          primitives   with    a  generating  "shape"  and a
31         --          directing "line".
32         --          
33         --          The indexation and type analysis services required
34         --          for the generatrix are given by <TheGenShapeTool>.
35         --          
36         --          The indexation and type analysis services required
37         --          for the directrix are given by <TheDirShapeTool>.
38         --          
39         --          The iteration services required for the generatrix
40         --          are given by <TheGenShapeIterator>.
41         --          
42         --          The iteration services required  for the directrix
43         --          are given by <TheDirShapeIterator>.
44         --          
45         --          The topology is like a grid of shapes.  Each shape
46         --          of the grid  must be addressable without confusion
47         --          by one  or  two objects   from  the generating  or
48         --          directing   shapes.  Here are  exemples of correct
49         --          associations to address:
50         --          
51         --          - a vertex : GenVertex - DirVertex
52         --          - an edge  : GenVertex - DirEdge
53         --          -          : GenEdge   - DirVertex
54         --          - a face   : GenEdge   - DirEdge
55         --                       GenFace   - DirVertex
56         --                       ...
57         --          
58         --          "GenObject" is used to identify an object from the
59         --          Generating     Shape,  and  "DirObject"  from  the
60         --          Directing Shape.  So may they   be  from different
61         --          types.
62         --          
63         --          The method Has... is given because in some special
64         --          cases, a vertex,    an  edge or   a   face may  be
65         --          geometricaly nonexistant or not usefull.
66
67 uses
68
69     Orientation from TopAbs,
70     Array2OfBoolean from TColStd
71
72 raises
73
74     NoMoreObject from Standard,
75     NoSuchObject from Standard,
76     RangeError from Standard,
77     DomainError from Standard
78     
79 -- Nested classes
80     
81     class Array2OfShapes
82         instantiates Array2 from TCollection (TheShape);
83     class SequenceOfShapes
84         instantiates Sequence from TCollection (TheShape);
85
86 is
87
88
89     -- """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
90
91     Delete(me:out) is virtual ;
92     ---C++: alias ~
93     
94     Initialize(aBuilder  : TheBuilder;
95                aGenShape : TheGenShape;
96                aDirWire  : TheDirShape);
97         ---Purpose: Creates a LinearRegularSweep.    <aBuilder>  gives
98         --          basic topological services.
99     
100
101     -- """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
102     --  Deferred Methods supporting the creation of the geometric part.
103
104     -- """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
105     
106     MakeEmptyVertex(me : in out; aGenV: TheGenShape; aDirV: TheDirShape)
107     returns TheShape 
108         ---Purpose: Builds the vertex addressed by [aGenV,aDirV], with its
109         --          geometric part, but without subcomponents.
110     is deferred;
111     
112     MakeEmptyDirectingEdge(me: in out; aGenV: TheGenShape; aDirE: TheDirShape)
113     returns TheShape
114         ---Purpose: Builds the edge addressed by [aGenV,aDirE], with its
115         --          geometric part, but without subcomponents.
116     is deferred;
117     
118     MakeEmptyGeneratingEdge(me: in out; aGenE: TheGenShape; aDirV: TheDirShape)
119     returns TheShape
120         ---Purpose: Builds the edge addressed by [aGenE,aDirV], with its
121         --          geometric part, but without subcomponents.
122     is deferred;
123     
124     SetParameters(me         : in out; 
125                   aNewFace   : TheShape; 
126                   aNewVertex : in out TheShape;
127                   aGenF      : TheGenShape; 
128                   aGenV      : TheGenShape;
129                   aDirV      : TheDirShape)
130         ---Purpose: Sets the  parameters of the new  vertex  on the new
131         --          face. The new face and  new vertex where generated
132         --          from aGenF, aGenV and aDirV .
133     is deferred;
134     
135     SetDirectingParameter(me         : in out; 
136                           aNewEdge   : TheShape; 
137                           aNewVertex : in out TheShape;
138                           aGenV      : TheGenShape;
139                           aDirE      : TheDirShape; 
140                           aDirV      : TheDirShape)
141         ---Purpose: Sets the  parameter of the new  vertex  on the new
142         --          edge. The new edge and  new vertex where generated
143         --          from aGenV aDirE, and aDirV.
144     is deferred;
145
146     SetGeneratingParameter(me         : in out; 
147                            aNewEdge   : TheShape; 
148                            aNewVertex : in out TheShape;
149                            aGenE      : TheGenShape; 
150                            aGenV      : TheGenShape;
151                            aDirV      : TheDirShape)
152         ---Purpose: Sets the  parameter of the new  vertex  on the new
153         --          edge. The new edge and  new vertex where generated
154         --          from aGenE, aGenV and aDirV .
155     is deferred;
156
157     MakeEmptyFace(me       : in out; 
158                   aGenS    : TheGenShape; 
159                   aDirS    : TheDirShape)
160     returns TheShape
161         ---Purpose: Builds the face  addressed by  [aGenS,aDirS], with
162         --          its geometric part, but without subcomponents. The
163         --          couple aGenS, aDirS  can be a "generating face and
164         --          a directing vertex"   or "a generating  edge and a
165         --          directing  edge".
166     is deferred;
167     
168     SetPCurve(me       : in out;
169               aNewFace : TheShape; 
170               aNewEdge : in out TheShape;
171               aGenF    : TheGenShape; 
172               aGenE    : TheGenShape;
173               aDirV    : TheDirShape;
174               orien    : Orientation from TopAbs)
175          ---Purpose: Sets the PCurve for a new edge on a new face. The
176          --          new edge and  the  new face were generated  using
177          --          aGenF, aGenE and aDirV.
178     is deferred;
179     
180     SetGeneratingPCurve(me       : in out;
181                         aNewFace : TheShape; 
182                         aNewEdge : in out TheShape;
183                         aGenE    : TheGenShape; 
184                         aDirE    : TheDirShape;
185                         aDirV    : TheDirShape;
186                         orien    : Orientation from TopAbs)
187
188          ---Purpose: Sets the PCurve for a new edge on a new face. The
189          --          new edge and  the  new face were generated  using
190          --          aGenE, aDirE and aDirV.
191     is deferred;
192             
193     SetDirectingPCurve(me       : in out;
194                        aNewFace : TheShape; 
195                        aNewEdge : in out TheShape;
196                        aGenE    : TheGenShape; 
197                        aGenV    : TheGenShape; 
198                        aDirE    : TheDirShape;
199                        orien    : Orientation from TopAbs)
200                        
201          ---Purpose: Sets the PCurve for a new edge on a new face. The
202          --          new edge and  the  new face were generated  using
203          --          aGenE, aDirE and aGenV.
204     is deferred;
205     
206     DirectSolid(me       : in out; 
207                 aGenS    : TheGenShape; 
208                 aDirS    : TheDirShape)
209     returns Orientation from TopAbs
210         ---Purpose: Returns the Orientation of the  shell in the solid
211         --          generated by the face aGenS  with  the edge aDirS.
212         --          It is  REVERSED  if the surface is  swept  in  the
213         --          direction of the normal.
214     is deferred;
215     
216     GGDShapeIsToAdd (me;
217                      aNewShape    : TheShape;
218                      aNewSubShape : TheShape;
219                      aGenS        : TheGenShape;
220                      aSubGenS     : TheGenShape;
221                      aDirS        : TheDirShape)
222     returns Boolean from Standard
223         ---Purpose: Returns   true   if  aNewSubShape    (addressed by
224         --          aSubGenS  and aDirS)  must  be added  in aNewShape
225         --          (addressed by aGenS and aDirS).
226     is deferred;
227     
228     GDDShapeIsToAdd (me;
229                      aNewShape    : TheShape;
230                      aNewSubShape : TheShape;
231                      aGenS        : TheGenShape;
232                      aDirS        : TheDirShape;
233                      aSubDirS     : TheDirShape)
234     returns Boolean from Standard
235         ---Purpose: Returns   true   if  aNewSubShape    (addressed by
236         --          aGenS  and aSubDirS)  must  be added  in aNewShape
237         --          (addressed by aGenS and aDirS).
238     is deferred;
239     
240     
241     SeparatedWires (me;
242                      aNewShape    : TheShape;
243                      aNewSubShape : TheShape;
244                      aGenS        : TheGenShape;
245                      aSubGenS     : TheGenShape;
246                      aDirS        : TheDirShape)
247     returns Boolean from Standard
248         ---Purpose: In  some  particular  cases  the   topology  of  a
249         --          generated  face must be  composed  of  independant
250         --          closed wires,  in this case  this function returns
251         --          true.
252     is deferred;
253     
254
255     SplitShell (me; aNewShape    : TheShape)
256     returns TheShape
257         ---Purpose: In  some  particular  cases  the   topology  of  a
258         --          generated  Shell must be  composed  of  independant
259         --          closed Shells,  in this case  this function returns
260         --          a Compound of independant Shells.
261     is virtual;
262     
263
264     -- """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
265     --  Method coding the continuities on the edges between 2 faces
266     -- """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
267     SetContinuity(me : in out; aGenS : TheGenShape; aDirS : TheDirShape)
268        ---Purpose: Called to propagate the continuity of  every vertex
269        --          between two edges of the  generating wire  aGenS on
270        --          the generated edge and faces.
271     is deferred;
272
273         
274     -- """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
275     --  User end methods.
276     --
277     -- """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
278     
279     -- Shapes
280     -- """"""
281
282     HasShape(me; aGenS : TheGenShape; aDirS : TheDirShape) 
283           returns Boolean from Standard
284         ---Purpose: Returns true   if aDirS   and aGenS  addresses   a
285         --          resulting Shape. In some  specific cases the shape
286         --          can  be    geometrically   inexsistant,  then this
287         --          function returns false.
288     is deferred;
289
290     Shape(me: in out; aGenS : TheGenShape; aDirS : TheDirShape) 
291           returns TheShape
292         ---Purpose: Returns the resulting  Shape indexed by aDirS  and
293         --          aGenS.
294     is static;
295
296
297     Shape(me: in out; aGenS : TheGenShape) 
298           returns TheShape
299         ---Purpose: Returns  the resulting Shape  indexed by myDirWire
300         --          and aGenS.
301     is static;
302
303     Shape(me: in out) 
304           returns TheShape
305         ---Purpose: Returns the resulting  Shape indexed by  myDirWire
306         --          and myGenShape.
307     is static;
308
309     FirstShape(me: in out) 
310           returns TheShape
311         ---Purpose: Returns the resulting Shape  indexed by the  first
312         --          Vertex  of myDirWire and myGenShape.
313     is static;
314
315     LastShape(me: in out) 
316           returns TheShape
317         ---Purpose: Returns the  resulting Shape  indexed by the  last
318         --          Vertex of myDirWire and myGenShape.
319     is static;
320     
321
322     FirstShape(me: in out; aGenS : TheGenShape) 
323           returns TheShape
324         ---Purpose: Returns the resulting Shape  indexed by the  first
325         --          Vertex  of myDirWire and aGenS.
326     is static;
327
328     LastShape(me: in out; aGenS : TheGenShape) 
329           returns TheShape
330         ---Purpose: Returns the  resulting Shape  indexed by the  last
331         --          Vertex of myDirWire and aGenS.
332     is static;
333     
334     
335     Closed(me) returns Boolean from Standard is static;
336     
337     
338 fields
339
340     -- Topology builder.
341
342     myBuilder  : TheBuilder is protected;  
343
344     -- Generating shape
345     
346     myGenShape : TheGenShape is protected;
347
348     -- Directing line
349     
350     myDirWire  : TheDirShape is protected;
351
352     -- shape tools.
353
354     myGenShapeTool   : TheGenShapeTool is protected;
355     myDirShapeTool   : TheDirShapeTool is protected;
356
357     -- Array of built objects (NbGShapes,NbDShapes).
358     myShapes       : Array2OfShapes is protected;
359
360     -- Array of built objects flags (NbGShapes,NbDShapes).
361     myBuiltShapes : Array2OfBoolean from TColStd is protected;
362                 
363 end LinearRegularSweep;