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