0024428: Implementation of LGPL license
[occt.git] / src / BRepFill / BRepFill_Sweep.cdl
1 -- Created on: 1997-11-21
2 -- Created by: Philippe MANGIN
3 -- Copyright (c) 1997-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 Sweep from BRepFill 
18
19         ---Purpose: Topological Sweep Algorithm
20         ---Level: Advanced
21
22 uses 
23    SectionLaw   from  BRepFill, 
24    LocationLaw  from  BRepFill, 
25    ApproxStyle  from  GeomFill, 
26    TransitionStyle  from  BRepFill,
27    HCurve       from  Adaptor3d, 
28    Shape        from  GeomAbs, 
29    HArray2OfShape      from  TopTools, 
30    ListOfShape         from  TopTools, 
31    DataMapOfShapeShape from TopTools,
32    Wire         from  TopoDS, 
33    Shape        from  TopoDS,  
34    Trsf         from  gp
35    
36 raises
37     NotDone,   
38     OutOfRange,   
39     ConstructionError 
40 is
41    Create(Section  :  SectionLaw  from  BRepFill;  
42           Location :  LocationLaw from  BRepFill; 
43           WithKPart:  Boolean)    
44    returns Sweep  from  BRepFill; 
45     
46    SetBounds(me  :  in  out;   
47              FirstShape,  LastShape  :  Wire  from  TopoDS);
48      
49    SetTolerance(me  :  in  out;   
50                 Tol3d  :  Real; 
51                 BoundTol   : Real  =  1.0; 
52                 Tol2d      : Real  =  1.0e-5;   
53                 TolAngular : Real  =  1.0e-2); 
54    ---Purpose: Set Approximation Tolerance
55            --    Tol3d : Tolerance to surface approximation
56            --    Tol2d : Tolerance used to perform curve approximation
57            --            Normaly the 2d curve are approximated with a 
58            --            tolerance given by the resolution on support surfaces, 
59            --            but if this tolerance is too large Tol2d is used.
60            --    TolAngular : Tolerance (in radian) to control the angle 
61            --                 beetween tangents on the section law and
62            --                 tangent of iso-v on approximed surface
63   
64    SetAngularControl(me:  in  out; 
65                      AngleMin  :  Real  =  0.01; 
66                      AngleMax  :  Real  =  6.0)  
67    ---Purpose: Tolerance  To controle Corner management.
68    --          
69    --   If the discontinuity is lesser than <AngleMin> in radian The
70    --   Transition Performed will be alway "Modified"
71    -- 
72         
73    --   If the discontinuity is greater  than <AngleMax> in radian The
74    --   Transition "Round" replace the Transition "Right"          
75    is  static; 
76                      
77    SetForceApproxC1(me:  in  out;
78                     ForceApproxC1 : Boolean from Standard);
79         ---Purpose: Set the flag that indicates attempt to approximate
80         --          a C1-continuous surface if a swept surface proved
81         --          to be C0.
82
83                      
84    Build(me : in  out; 
85          Transition : TransitionStyle  =  BRepFill_Modified;    
86          Continuity : Shape  from  GeomAbs   = GeomAbs_C2;
87          Approx     : ApproxStyle = GeomFill_Location; 
88          Degmax     : Integer = 11;
89          Segmax     : Integer = 30); 
90          
91    ---Purpose: Build the Sweeep  Surface
92    --    Transition define Transition strategy
93    --    Approx define Approximation Strategy
94    --    - GeomFill_Section : The composed Function Location X Section
95    --                         is directly approximed.
96    --    - GeomFill_Location : The location law is approximed, and the
97    --                          SweepSurface is bulid algebric composition
98    --                          of approximed location law and section law
99    --                          This option is Ok, if Section.Surface() methode
100    --                          is effective.
101    --    Continuity : The continuity in v waiting on the surface 
102    --    Degmax     : The maximum degree in v requiered on the surface 
103    --    Segmax     : The maximum number of span in v requiered on 
104    --                 the surface.
105     
106    CorrectApproxParameters(me:  in  out)
107    returns  Boolean  is  private; 
108    
109    BuildWire(me : in  out; 
110              Transition : TransitionStyle)
111    returns  Boolean  is  private; 
112           
113    BuildShell(me : in  out;   
114             Transition : TransitionStyle;              
115             Vf,  Vl    : Integer;    
116             ExtendFirst :  Real  =  0.0; 
117             ExtendLast  :  Real  =  0.0)  
118    returns Boolean is  private;
119       
120    IsDone(me) 
121     ---Purpose: Say if the Shape is Build.          
122    returns  Boolean;  
123     
124    Shape(me)   
125     ---Purpose: returns the Sweeping Shape
126    returns  Shape  from TopoDS; 
127     
128    ErrorOnSurface(me) 
129     ---Purpose: Get the Approximation  error.       
130    returns  Real;
131      
132    SubShape(me)  
133     returns  HArray2OfShape from  TopTools;     
134
135    InterFaces(me)   
136     returns  HArray2OfShape from  TopTools; 
137    
138    Sections(me)   
139     returns  HArray2OfShape from  TopTools; 
140     
141    PerformCorner(me  :  in  out;  Index  :  Integer;   
142                  Transition  :  TransitionStyle; 
143                  Bounds      :  HArray2OfShape  from  TopTools)  
144    is  private; 
145     
146    EvalExtrapol(me;  Index  :  Integer; 
147                 Transition  :   TransitionStyle)   
148    returns  Real 
149    is  private; 
150     
151    MergeVertex(me; 
152                V1  :  Shape  from  TopoDS; 
153                V2  :  in  out Shape  from  TopoDS) 
154    returns  Boolean  is  private;  
155     
156    UpdateVertex(me; Ipath,  Isec  :  Integer; 
157                 Error,  Param  :  Real; 
158                 V  :  in  out Shape  from  TopoDS) 
159    is  private; 
160    
161 fields
162   isDone           :  Boolean; 
163   KPart            :  Boolean;  
164   myTol3d          :  Real; 
165   myBoundTol       :  Real; 
166   myTol2d          :  Real;   
167   myTolAngular     :  Real; 
168   myAngMin         :  Real; 
169   myAngMax         :  Real; 
170   myApproxStyle    :  ApproxStyle from GeomFill; 
171   myContinuity     :  Shape from  GeomAbs; 
172   myDegmax         :  Integer; 
173   mySegmax         :  Integer;
174   myForceApproxC1  :  Boolean;
175   myShape          :  Shape from  TopoDS; 
176   myLoc            :  LocationLaw  from  BRepFill; 
177   mySec            :  SectionLaw   from  BRepFill; 
178   myUEdges         :  HArray2OfShape  from  TopTools;  
179   myVEdges         :  HArray2OfShape  from  TopTools;   
180   myVEdgesModified :  DataMapOfShapeShape from TopTools;
181   myFaces          :  HArray2OfShape  from  TopTools; 
182   myAuxShape       :  ListOfShape     from  TopTools;   
183      
184   Error            :  Real;  
185   FirstShape, 
186   LastShape        :  Wire  from  TopoDS; 
187 end Sweep;