0024536: GCC compiler warning on breakage of pointer aliasing rules in BRepFill_Evolv...
[occt.git] / src / BRepFill / BRepFill_PipeShell.cdl
1 -- Created on: 1998-07-22
2 -- Created by: Philippe MANGIN
3 -- Copyright (c) 1998-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
9 -- under the terms of the GNU Lesser General Public 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 class PipeShell from BRepFill inherits  TShared from MMgt 
18
19         ---Purpose: Perform general sweeping construction
20 uses  
21  Dir  from  gp,
22  Ax2  from  gp,
23  Trsf from  gp,
24  Function from Law,  
25  ListOfShape  from  TopTools, 
26  HArray2OfShape   from  TopTools,
27  Shape from  TopoDS,
28  Wire  from  TopoDS,
29  Vertex  from  TopoDS, 
30  TransitionStyle  from BRepFill, 
31  Trihedron        from  GeomFill,   
32  PipeError        from  GeomFill,  
33  LocationLaw       from  BRepFill, 
34  SectionLaw        from  BRepFill,  
35  Section           from  BRepFill, 
36  Sweep             from BRepFill,
37  DataMapOfShapeListOfShape from TopTools,
38  SequenceOfSection from  BRepFill,
39  TypeOfContact     from  BRepFill
40
41 raises
42  DomainError from Standard, 
43  NotDone  from  StdFail
44
45 is    
46     Create( Spine   : Wire  from TopoDS)
47         ---Level: Public
48     returns PipeShell from BRepFill;
49
50 -- =================================
51 --  Methodes Set
52 -- ================================= 
53   ---Purpose: Set an sweep's mode
54    --         If no mode are setted, the mode use in MakePipe is used
55    ---See Also: GeomFill_IsCorrectedFrenet  
56
57     Set(me  :  mutable; Frenet  :  Boolean  =  Standard_False);
58         ---Purpose: Set an Frenet or an CorrectedFrenet trihedron  
59         --          to  perform  the  sweeping
60         ---Level:  Public   
61         ---See Also:GeomFill_IsCorrectedFrenet
62     
63     SetDiscrete(me  :  mutable);
64         ---Purpose: Set a Discrete trihedron  
65         --          to  perform  the  sweeping
66         ---Level:  Public   
67         ---See Also:GeomFill_IsDiscreteTrihedron
68     
69     Set(me  :  mutable;  Axe  :  Ax2  from  gp); 
70         ---Purpose: Set  an  fixed  trihedron  to  perform  the  sweeping 
71          --         all sections will be parallel.
72         ---Level: Public       
73         ---See Also: GeomFill_IsFixed
74
75     Set(me  :  mutable;  BiNormal  :  Dir  from  gp); 
76         ---Purpose: Set an fixed  BiNormal  direction to  perform   
77                 --  the sweeping        
78         ---Level: Public      
79         ---See Also: GeomFill_IsConstantNormal
80
81     Set(me  :  mutable;  SpineSupport : Shape  from  TopoDS) 
82         ---Purpose: Set support to the spine to define the BiNormal
83         --           at   the spine, like    the  normal the surfaces.
84         --  Warning: To  be  effective,  Each  edge  of  the  <spine>  must  
85                 --  have an  representaion  on   one   face  of<SpineSupport>         
86         ---Level: Public 
87         ---See Also: GeomFill_IsDarboux
88     returns  Boolean;
89
90     Set(me  :  mutable;   
91         AuxiliarySpine  :  Wire  from  TopoDS; 
92         CurvilinearEquivalence :  Boolean  =  Standard_True; 
93         KeepContact  : TypeOfContact from BRepFill  =  BRepFill_NoContact );
94
95         ---Purpose: Set  an  auxiliary  spine  to  define  the Normal
96         --  For  each  Point  of  the  Spine  P,  an  Point  Q  is  evalued
97         --    on  <AuxiliarySpine>           
98         -- If <CurvilinearEquivalence>  
99         --   Q split <AuxiliarySpine> with  the  same  length ratio
100         --   than P split  <Spline>. 
101         -- Else  the  plan  define  by  P  and  the  tangent  to  the  <Spine> 
102         --       intersect <AuxiliarySpine> in Q.
103         -- If <KeepContact> the  Normal  is  defined to  assume like  the  sweeped 
104         --                  section is  in  contact to  the  <AuxiliarySpine>
105         -- Else  the  Normal  is  defined  by the vector  PQ. 
106
107         ---Level: Public
108
109     SetForceApproxC1(me  :  mutable;
110                      ForceApproxC1 : Boolean from Standard);
111         ---Purpose: Set the flag that indicates attempt to approximate
112         --          a C1-continuous surface if a swept surface proved
113         --          to be C0.
114
115
116 -- =================================
117 --  Methodes to define section(s)
118 -- ================================= 
119   ---Purpose: Give section to sweep.
120    -- Possibilities are :
121    --   - Give one or sevral profile
122    --     - Give one profile and an homotetic law.
123    --     - Automatic compute of correspondance beetween profile, and section 
124    --                 on the sweeped shape
125    --     - correspondance beetween profile, and section on the sweeped shape
126    --       defined by a vertex of the spine
127
128    --    -"WithCorrection" The profile is  rotated to have a Normal --
129    --     parallel   to  the  trihedron's    normal and   have tangent
130    --    perpendicular to the trihedron's  tangent.
131     
132
133     Add(me:mutable; 
134         Profile  : Shape  from TopoDS; 
135         WithContact    :  Boolean  =  Standard_False; 
136         WithCorrection :  Boolean  =  Standard_False ); 
137         ---Purpose: Set an section. The corespondance with the spine, will
138         --          be automaticaly performed.
139         ---Level: Public
140   
141     Add(me:mutable; 
142         Profile : Shape  from TopoDS;   
143         Location  :  Vertex from  TopoDS; 
144         WithContact    :  Boolean =  Standard_False; 
145         WithCorrection :  Boolean =  Standard_False) 
146         ---Purpose: Set an section.   The corespondance with the spine, is
147         --          given by  <Location>
148
149         ---Level: Public
150     raises DomainError;  -- if the <Spine> do not contain <Location>
151
152     SetLaw(me  :mutable; 
153            Profile  :  Shape  from TopoDS; 
154            L : Function from Law; 
155            WithContact    :  Boolean =  Standard_False; 
156            WithCorrection :  Boolean  =  Standard_False);
157         ---Purpose: Set  an    section  and  an   homotetic    law. 
158         -- The  homotetie's  centers  is  given  by  point  on  the  <Spine>.
159         ---Level:  Public
160
161
162     SetLaw(me  :mutable; 
163            Profile  :  Shape  from TopoDS; 
164            L : Function from Law; 
165            Location  :  Vertex from  TopoDS; 
166            WithContact    :  Boolean =  Standard_False; 
167            WithCorrection :  Boolean  =  Standard_False);
168         ---Purpose: Set  an    section  and  an   homotetic    law. 
169         --   The  homotetie  center  is  given  by  point  on  the  <Spine>
170         ---Level:  Public
171
172  
173     Delete(me  :  mutable;  Profile : Shape from TopoDS);  
174         ---Purpose: Delete an section.
175         ---Level: Public    
176     
177      
178 --  ======================================== 
179 --  Methodes  to perform  and  read   shape
180 --  ========================================
181     IsReady(me)
182      ---Purpose: Say if <me> is ready to build the shape
183      --          return False if <me> do not have section definition        
184     returns  Boolean;   
185
186     GetStatus(me) 
187     ---Purpose: Get a status, when Simulate or Build failed.        
188     returns  PipeError  from  GeomFill;
189
190     SetTolerance(me  :  mutable; 
191                  Tol3d  :  Real  =  1.0e-4; 
192                  BoundTol   : Real  =  1.0e-4;
193                  TolAngular : Real  =  1.0e-2); 
194                   
195     SetTransition(me  :  mutable;  
196                   Mode  :TransitionStyle  from  BRepFill   
197                         =  BRepFill_Modified; 
198                   Angmin  :  Real  =  1.0e-2; 
199                   Angmax  :  Real  =  6.0)    
200         ---Purpose: Set the  Transition Mode to manage discontinuities
201         --          on the sweep.
202         ---Level: Public
203     is  static; 
204         
205     Simulate(me : mutable;   
206              NumberOfSection  :  Integer; 
207              Sections         : out   ListOfShape from TopTools)
208         ---Purpose: Perform simulation of the sweep : 
209          --         Somes Section are returned.
210         ---Level: Public 
211     raises  NotDone;  --  If  <me> it is not Ready
212      
213                                                        
214     Build(me : mutable)
215         ---Purpose: Builds the resulting shape (redefined from MakeShape).
216         ---Level: Public
217     returns Boolean 
218     raises  NotDone  --  If  <me> it is not Ready
219     is static; 
220
221     MakeSolid(me :  mutable) 
222          ---Purpose: Transform the sweeping Shell in Solid. 
223          --          If the section are not closed returns False        
224          ---Level: Public
225     returns  Boolean 
226     raises  NotDone;  --  If  <me> is not Builded;           
227     
228     Shape (me)
229     ---Purpose: Returns the result Shape.
230     ---C++: return const & 
231     ---Level: Public 
232     returns Shape from TopoDS
233     is  static;    
234     
235     FirstShape (me)
236     ---Purpose: Returns the  TopoDS  Shape of the bottom of the sweep.
237     ---C++: return const & 
238     ---Level: Public 
239     returns Shape from TopoDS
240     is  static;
241
242     LastShape (me)
243     ---Purpose: Returns the TopoDS Shape of the top of the sweep.
244     ---C++: return const & 
245     ---Level: Public
246     returns Shape from TopoDS   
247     is  static; 
248      
249     Generated (me: mutable; 
250                S : Shape from TopoDS;
251                L : out ListOfShape from TopTools)
252         ---Purpose: Returns the  list   of shapes generated   from the
253         --          shape <S>. 
254         ---Level: Public
255     is static;  
256     
257     Prepare(me:  mutable)  is  private; 
258      
259     Place(me : mutable;  
260           Sec  :  Section  from  BRepFill; 
261           W    :  out  Wire   from  TopoDS; 
262           Trsf :  out  Trsf   from  gp; 
263         param  :  out  Real  from  Standard)  is  private; 
264            
265     ResetLoc(me  :  mutable)  is  private;
266     
267     BuildHistory(me: mutable; theSweep: Sweep from BRepFill)
268         is private;
269           
270 fields      
271   mySpine       :  Wire  from  TopoDS;
272   myFirst       :  Shape  from  TopoDS; 
273   myLast        :  Shape  from  TopoDS;  
274   myShape       :  Shape  from  TopoDS;   
275   mySeq         :  SequenceOfSection from BRepFill; 
276
277   myGenMap      :  DataMapOfShapeListOfShape from TopTools;
278
279   myTol3d       :  Real; 
280   myBoundTol    :  Real;  
281   myTolAngular  :  Real;
282   angmin,  angmax  :  Real; 
283   myForceApproxC1 : Boolean;
284   
285   myLaw         :  Function         from  Law;    
286   myIsAutomaticLaw : Boolean        from  Standard;
287   myLocation    :  LocationLaw      from  BRepFill; 
288   mySection     :  SectionLaw       from  BRepFill; 
289   myFaces       :  HArray2OfShape   from  TopTools;
290   myTrihedron   :  Trihedron        from  GeomFill;
291   myTransition  :  TransitionStyle  from  BRepFill; 
292   myStatus      :  PipeError        from  GeomFill;
293 end PipeShell;
294
295
296
297
298