0024880: Invalid result of pipe creation
[occt.git] / src / BRepFill / BRepFill_Pipe.cdl
1 -- Created on: 1994-06-07
2 -- Created by: Bruno DUMORTIER
3 -- Copyright (c) 1994-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
18 class Pipe from BRepFill 
19
20         ---Purpose: Create a  shape by sweeping a shape  (the profile)
21         --          along a wire (the spine).
22         --          
23         --          For each edge  or vertex from the spine  the  user
24         --          may ask for the shape generated from each subshape
25         --          of the profile.
26
27 uses
28
29     HArray2OfShape from TopTools,
30     MapOfShape     from TopTools,
31     DataMapOfShapeHArray2OfShape from BRepFill,
32     LocationLaw  from BRepFill,
33     Shape  from TopoDS,
34     Face   from TopoDS,
35     Wire   from TopoDS,
36     Edge   from TopoDS,
37     Vertex from TopoDS,  
38     Pnt    from  gp,
39     Trsf   from  gp,
40     Shape  from GeomAbs,
41     Trihedron from GeomFill
42
43 raises
44     DomainError from Standard, 
45     NotDone     from StdFail
46
47 is
48
49     Create returns Pipe from BRepFill;
50     
51     Create ( Spine   : Wire from TopoDS; 
52              Profile : Shape from TopoDS;
53              aMode   : Trihedron from GeomFill = GeomFill_IsCorrectedFrenet;
54              ForceApproxC1 : Boolean from Standard = Standard_False;
55              GeneratePartCase : Boolean from Standard = Standard_False) 
56     returns Pipe from BRepFill;
57     
58     Perform (me : in out;  Spine   : Wire from TopoDS; 
59                            Profile : Shape from TopoDS;
60                            GeneratePartCase : Boolean from Standard = Standard_False) 
61     is static;
62     
63     Spine(me) returns Shape from TopoDS
64         ---C++ : return const &
65     is static;
66
67     Profile(me) returns Shape from TopoDS
68         ---C++ : return const &
69     is static;
70
71     Shape(me) returns Shape from TopoDS
72         ---C++ : return const &
73     is static;
74
75     FirstShape(me) returns Shape from TopoDS
76         ---C++ : return const &
77     is static;
78
79     LastShape(me) returns Shape from TopoDS
80         ---C++ : return const &
81     is static;
82
83     Face(me : in out; ESpine, EProfile : Edge from TopoDS)
84     returns Face from TopoDS
85         ---Purpose: Returns the face created from an edge of the spine
86         --          and an edge of the profile.
87     raises
88         DomainError from Standard 
89         ---Purpose: if the edges are not in the spine or the profile
90         
91     is static;
92     
93     Edge(me : in out; ESpine : Edge from TopoDS; VProfile : Vertex from TopoDS)
94     returns Edge from TopoDS
95         ---Purpose: Returns the edge created from an edge of the spine
96         --          and a vertex of the profile.
97     raises
98         DomainError from Standard 
99         ---Purpose: if the edge or the vertex are not in  the spine or
100         --          the profile.
101         
102     is static;
103     
104     Section(me; VSpine : Vertex from TopoDS)
105     returns Shape from TopoDS
106         ---Purpose: Returns  the shape created from the profile at the
107         --          position of the vertex VSpine.
108     raises
109         DomainError from Standard
110         ---Purpose: if the vertex is not in the Spine
111     is static; 
112      
113      
114     PipeLine(me : in out;  Point :  Pnt  from  gp)  
115         ---Purpose: Create a Wire by sweeping the Point along the <spine>
116     returns  Wire  from  TopoDS 
117     raises
118         DomainError from Standard
119         ---Purpose: if the <Spine> is undefined      
120     is  static;
121
122
123     --
124     --  Private methods
125     --  
126     
127     MakeShape(me : in out; S : Shape from TopoDS; 
128                            FirstShape,  LastShape  :  Shape  from  TopoDS)
129     returns Shape from TopoDS
130         ---Purpose: Auxiliary  recursive  method  used  to  build  the
131         --          result. 
132     is static private;
133
134
135     FindEdge(me;  S : Shape from TopoDS;  
136                   E : Edge  from  TopoDS;  
137                   Init  : in  out Integer)       
138         ---Purpose: Auxiliary recursive method used to find the edge's index
139     returns  Integer
140     is static private;
141
142     FindVertex(me;  S : Shape from TopoDS;  
143                     V : Vertex  from  TopoDS;  
144                     Init  : in  out Integer) 
145     returns  Integer
146     is static private; 
147   
148     DefineRealSegmax(me : in out)
149     is static private; 
150     
151     RebuildTopOrBottomFace(me; aFace: Shape from TopoDS;
152                                IsTop: Boolean from Standard)
153     is static private; 
154     
155     ShareFaces(me: in out; theShape: Shape from TopoDS;
156                            theInitialFacesLen: Integer;
157                            theInitialEdgesLen: Integer;
158                            theInitialSectionsLen: Integer)
159         ---Purpose: Performs sharing coincident faces in theShape. Also modifies
160         --          myFaces, mySections and myEdges to contain shared shapes.
161         --          Returns the shared shape. If theShape is not modified this
162         --          method returns it.
163     returns Shape from TopoDS
164     is static private; 
165      
166 fields
167     mySpine   : Wire  from TopoDS;
168     myProfile : Shape from TopoDS;
169     myShape   : Shape from TopoDS; 
170     myTrsf    : Trsf  from  gp; 
171     myLoc     : LocationLaw  from BRepFill;
172     mySections: HArray2OfShape from TopTools; 
173     myFaces   : HArray2OfShape from TopTools;  
174     myEdges   : HArray2OfShape from TopTools;  
175     myReversedEdges : MapOfShape from TopTools;  
176     myTapes   : DataMapOfShapeHArray2OfShape from BRepFill;
177     myRails   : DataMapOfShapeHArray2OfShape from BRepFill;
178     myCurIndexOfSectionEdge : Integer from Standard;
179     myFirst   :  Shape  from  TopoDS; 
180     myLast    :  Shape  from  TopoDS; 
181      
182     myDegmax  : Integer from Standard;
183     mySegmax  : Integer from Standard;
184     myContinuity : Shape from GeomAbs;
185     myMode    : Trihedron from GeomFill;
186     myForceApproxC1 : Boolean from Standard;
187     
188 end Pipe;