b311480e |
1 | -- Created on: 1996-02-13 |
2 | -- Created by: Jacques GOUSSARD |
3 | -- Copyright (c) 1996-1999 Matra Datavision |
973c2be1 |
4 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | -- |
973c2be1 |
6 | -- This file is part of Open CASCADE Technology software library. |
b311480e |
7 | -- |
973c2be1 |
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. |
b311480e |
13 | -- |
973c2be1 |
14 | -- Alternatively, this file may be used under the terms of Open CASCADE |
15 | -- commercial license or contractual agreement. |
7fd59977 |
16 | |
17 | deferred class Form from BRepFeat inherits MakeShape from BRepBuilderAPI |
18 | |
4e57c75e |
19 | ---Purpose: Provides general functions to build form features. |
20 | -- Form features can be depressions or protrusions and include the following types: |
21 | -- - Cylinder |
22 | -- - Draft Prism |
23 | -- - Prism |
24 | -- - Revolved feature |
25 | -- - Pipe |
26 | -- In each case, you have a choice of operation type between the following: |
27 | -- - removing matter (a Boolean cut: Fuse setting 0) |
28 | -- - adding matter (Boolean fusion: Fuse setting 1) |
29 | -- The semantics of form feature creation is based on the construction of shapes: |
30 | -- - along a length |
31 | -- - up to a limiting face |
32 | -- - from a limiting face to a height |
33 | -- - above and/or below a plane |
34 | -- The shape defining construction of the feature can be either the |
35 | -- supporting edge or the concerned area of a face. |
36 | -- In case of the supporting edge, this contour can be attached to a |
37 | -- face of the basis shape by binding. When the contour is bound to this |
38 | -- face, the information that the contour will slide on the face |
39 | -- becomes available to the relevant class methods. In case of the |
40 | -- concerned area of a face, you could, for example, cut it out and |
41 | -- move it to a different height which will define the limiting face of a |
42 | -- protrusion or depression. |
43 | -- Topological definition with local operations of this sort makes |
44 | -- calculations simpler and faster than a global operation. The latter |
45 | -- would entail a second phase of removing unwanted matter to get the same result. |
7fd59977 |
46 | |
47 | uses Shape from TopoDS, |
48 | Face from TopoDS, |
49 | ShapeModification from BRepBuilderAPI, |
50 | DataMapOfShapeListOfShape from TopTools, |
51 | ListOfShape from TopTools, |
52 | SequenceOfCurve from TColGeom, |
53 | Curve from Geom, |
54 | DataMapOfShapeShape from TopTools, |
55 | Gluer from LocOpe, |
56 | PerfSelection from BRepFeat, |
57 | StatusError from BRepFeat, |
58 | HBuilder from TopOpeBRepBuild, |
59 | --modified by NIZNHY-PKV Thu Mar 21 17:09:08 2002 f |
4e57c75e |
60 | BooleanOperation from BRepAlgoAPI |
61 | --modified by NIZNHY-PKV Thu Mar 21 17:09:11 2002 t |
7fd59977 |
62 | is |
63 | |
64 | Initialize; |
65 | |
4e57c75e |
66 | ---Purpose: Redefines the empty constructor. |
67 | ---C++: inline |
7fd59977 |
68 | |
69 | --- Methods redefined from BRepBuilderAPI_MakeShape |
70 | |
71 | Modified(me: in out; F: Shape from TopoDS) |
4e57c75e |
72 | ---Purpose: returns the list of generated Faces. |
73 | ---C++: return const & |
74 | ---Level: Public |
7fd59977 |
75 | returns ListOfShape from TopTools |
76 | is redefined; |
77 | |
78 | |
79 | Generated(me: in out; S: Shape from TopoDS) |
4e57c75e |
80 | ---Purpose: returns a list of the created faces |
81 | -- from the shape <S>. |
82 | ---C++: return const & |
83 | ---Level: Public |
7fd59977 |
84 | returns ListOfShape from TopTools |
85 | is redefined; |
86 | |
87 | IsDeleted (me: in out; S : Shape from TopoDS) |
88 | returns Boolean |
89 | is redefined; |
90 | |
91 | |
92 | |
93 | FirstShape (me) |
4e57c75e |
94 | ---Purpose: Returns the list of shapes created at the bottom of |
95 | -- the created form. It may be an empty list. |
7fd59977 |
96 | returns ListOfShape from TopTools; |
4e57c75e |
97 | ---C++: return const& |
7fd59977 |
98 | |
99 | |
100 | LastShape (me) |
4e57c75e |
101 | ---Purpose: Returns the list of shapes created at the top of the |
102 | -- created form. It may be an empty list. |
7fd59977 |
103 | returns ListOfShape from TopTools; |
4e57c75e |
104 | ---C++: return const& |
7fd59977 |
105 | |
106 | NewEdges(me) |
4e57c75e |
107 | ---Purpose: Returns a list of the limiting and glueing edges |
108 | -- generated by the feature. These edges did not originally |
109 | -- exist in the basis shape. |
110 | -- The list provides the information necessary for |
111 | -- subsequent addition of fillets. It may be an empty list. |
7fd59977 |
112 | ---C++: return const& |
113 | returns ListOfShape from TopTools; |
114 | |
115 | TgtEdges(me) |
116 | ---Purpose: Returns a list of the tangent edges among the limiting |
4e57c75e |
117 | -- and glueing edges generated by the feature. These |
118 | -- edges did not originally exist in the basis shape and are |
119 | -- tangent to the face against which the feature is built. |
120 | -- The list provides the information necessary for |
121 | -- subsequent addition of fillets. It may be an empty list. |
122 | -- If an edge is tangent, no fillet is possible, and the edge |
123 | -- must subsequently be removed if you want to add a fillet. |
7fd59977 |
124 | ---C++: return const& |
125 | returns ListOfShape from TopTools; |
126 | |
127 | |
128 | BasisShapeValid(me: in out) |
129 | --- Purpose: Initializes the topological construction if the basis shape is present. |
130 | ---C++: inline |
4e57c75e |
131 | is static; |
7fd59977 |
132 | |
133 | |
134 | GeneratedShapeValid(me: in out) |
4e57c75e |
135 | ---Purpose: Initializes the topological construction if the generated shape S is present. |
7fd59977 |
136 | ---C++: inline |
4e57c75e |
137 | is static; |
7fd59977 |
138 | |
139 | |
140 | ShapeFromValid(me: in out) |
4e57c75e |
141 | ---Purpose: |
142 | -- Initializes the topological construction if the shape is |
143 | -- present from the specified integer on. |
7fd59977 |
144 | ---C++: inline |
4e57c75e |
145 | is static; |
7fd59977 |
146 | |
147 | |
148 | ShapeUntilValid(me: in out) |
4e57c75e |
149 | --- Purpose: |
150 | -- Initializes the topological construction if the shape is |
151 | -- present until the specified integer. |
152 | ---C++: inline |
153 | is static; |
7fd59977 |
154 | |
155 | |
156 | GluedFacesValid(me: in out) |
157 | ---Purpose: |
4e57c75e |
158 | -- Initializes the topological construction if the glued face is present. |
159 | ---C++: inline |
160 | is static; |
7fd59977 |
161 | |
162 | SketchFaceValid(me: in out) |
4e57c75e |
163 | --- Purpose: |
164 | -- Initializes the topological construction if the sketch face |
165 | -- is present. If the sketch face is inside the basis shape, |
166 | -- local operations such as glueing can be performed. |
167 | ---C++: inline |
168 | is static; |
7fd59977 |
169 | |
170 | PerfSelectionValid(me: in out) |
4e57c75e |
171 | --- Purpose: Initializes the topological construction if the selected face is present. |
7fd59977 |
172 | ---C++: inline |
4e57c75e |
173 | is static; |
7fd59977 |
174 | |
175 | |
176 | GlobalPerform(me: in out) |
4e57c75e |
177 | ---Purpose: General perform method... |
7fd59977 |
178 | |
4e57c75e |
179 | is static protected; |
7fd59977 |
180 | |
181 | |
182 | Curves(me: in out; S : in out SequenceOfCurve from TColGeom) |
183 | |
4e57c75e |
184 | is deferred; |
7fd59977 |
185 | |
186 | |
187 | BarycCurve(me: in out) |
188 | |
4e57c75e |
189 | returns Curve from Geom |
190 | is deferred; |
7fd59977 |
191 | |
192 | |
193 | -- Protected implementation methods |
194 | |
195 | UpdateDescendants(me: in out; G: Gluer from LocOpe) |
196 | |
4e57c75e |
197 | is static protected; |
7fd59977 |
198 | |
199 | --modified by NIZNHY-PKV Thu Mar 21 18:42:53 2002 f |
200 | UpdateDescendants(me: in out; |
4e57c75e |
201 | aBOP: BooleanOperation from BRepAlgoAPI; |
202 | SResult : Shape from TopoDS; |
7fd59977 |
203 | SkipFace : Boolean from Standard = Standard_False) |
4e57c75e |
204 | is static protected; |
7fd59977 |
205 | --modified by NIZNHY-PKV Thu Mar 21 18:42:50 2002 t |
206 | |
7fd59977 |
207 | UpdateDescendants(me: in out; |
208 | B : HBuilder from TopOpeBRepBuild; |
4e57c75e |
209 | SResult : Shape from TopoDS; |
7fd59977 |
210 | SkipFace : Boolean from Standard = Standard_False) |
211 | |
4e57c75e |
212 | is static protected; |
7fd59977 |
213 | TransformShapeFU(me: in out; flag: Integer from Standard) |
4e57c75e |
214 | returns Boolean from Standard |
215 | is protected; |
7fd59977 |
216 | |
217 | |
218 | CurrentStatusError(me) |
4e57c75e |
219 | returns StatusError from BRepFeat; |
7fd59977 |
220 | |
221 | |
222 | fields |
223 | |
224 | myFuse : Boolean from Standard is protected; |
225 | myModify : Boolean from Standard is protected; |
226 | myMap : DataMapOfShapeListOfShape from TopTools is protected; |
227 | myFShape : Shape from TopoDS is protected; |
228 | myLShape : Shape from TopoDS is protected; |
229 | myNewEdges: ListOfShape from TopTools is protected; |
230 | myTgtEdges: ListOfShape from TopTools is protected; |
231 | |
232 | myPerfSelection: PerfSelection from BRepFeat is protected; |
233 | myJustGluer: Boolean from Standard is protected; |
234 | myJustFeat: Boolean from Standard is protected; |
235 | |
236 | mySbase : Shape from TopoDS is protected; |
237 | mySkface : Face from TopoDS is protected; |
238 | myGShape : Shape from TopoDS is protected; |
239 | mySFrom : Shape from TopoDS is protected; |
240 | mySUntil : Shape from TopoDS is protected; |
241 | myGluedF : DataMapOfShapeShape from TopTools is protected; |
242 | |
243 | |
244 | mySbOK : Boolean from Standard; |
4e57c75e |
245 | mySkOK : Boolean from Standard; |
7fd59977 |
246 | myGSOK : Boolean from Standard; |
247 | mySFOK : Boolean from Standard; |
248 | mySUOK : Boolean from Standard; |
249 | myGFOK : Boolean from Standard; |
250 | myPSOK : Boolean from Standard; |
251 | |
252 | myStatusError : StatusError from BRepFeat; |
253 | |
254 | end Form; |
255 | |
256 | |