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