1 -- Created on: 1996-02-13
2 -- Created by: Jacques GOUSSARD
3 -- Copyright (c) 1996-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 deferred class Form from BRepFeat inherits MakeShape from BRepBuilderAPI
19 ---Purpose: Provides general functions to build form features.
20 -- Form features can be depressions or protrusions and include the following types:
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:
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.
47 uses Shape from TopoDS,
49 ShapeModification from BRepBuilderAPI,
50 DataMapOfShapeListOfShape from TopTools,
51 ListOfShape from TopTools,
52 SequenceOfCurve from TColGeom,
54 DataMapOfShapeShape from TopTools,
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
60 BooleanOperation from BRepAlgoAPI
61 --modified by NIZNHY-PKV Thu Mar 21 17:09:11 2002 t
66 ---Purpose: Redefines the empty constructor.
69 --- Methods redefined from BRepBuilderAPI_MakeShape
71 Modified(me: in out; F: Shape from TopoDS)
72 ---Purpose: returns the list of generated Faces.
73 ---C++: return const &
75 returns ListOfShape from TopTools
79 Generated(me: in out; S: Shape from TopoDS)
80 ---Purpose: returns a list of the created faces
81 -- from the shape <S>.
82 ---C++: return const &
84 returns ListOfShape from TopTools
87 IsDeleted (me: in out; S : Shape from TopoDS)
94 ---Purpose: Returns the list of shapes created at the bottom of
95 -- the created form. It may be an empty list.
96 returns ListOfShape from TopTools;
101 ---Purpose: Returns the list of shapes created at the top of the
102 -- created form. It may be an empty list.
103 returns ListOfShape from TopTools;
104 ---C++: return const&
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.
112 ---C++: return const&
113 returns ListOfShape from TopTools;
116 ---Purpose: Returns a list of the tangent edges among the limiting
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.
124 ---C++: return const&
125 returns ListOfShape from TopTools;
128 BasisShapeValid(me: in out)
129 --- Purpose: Initializes the topological construction if the basis shape is present.
134 GeneratedShapeValid(me: in out)
135 ---Purpose: Initializes the topological construction if the generated shape S is present.
140 ShapeFromValid(me: in out)
142 -- Initializes the topological construction if the shape is
143 -- present from the specified integer on.
148 ShapeUntilValid(me: in out)
150 -- Initializes the topological construction if the shape is
151 -- present until the specified integer.
156 GluedFacesValid(me: in out)
158 -- Initializes the topological construction if the glued face is present.
162 SketchFaceValid(me: in out)
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.
170 PerfSelectionValid(me: in out)
171 --- Purpose: Initializes the topological construction if the selected face is present.
176 GlobalPerform(me: in out)
177 ---Purpose: General perform method...
182 Curves(me: in out; S : in out SequenceOfCurve from TColGeom)
187 BarycCurve(me: in out)
189 returns Curve from Geom
193 -- Protected implementation methods
195 UpdateDescendants(me: in out; G: Gluer from LocOpe)
199 --modified by NIZNHY-PKV Thu Mar 21 18:42:53 2002 f
200 UpdateDescendants(me: in out;
201 aBOP: BooleanOperation from BRepAlgoAPI;
202 SResult : Shape from TopoDS;
203 SkipFace : Boolean from Standard = Standard_False)
205 --modified by NIZNHY-PKV Thu Mar 21 18:42:50 2002 t
207 UpdateDescendants(me: in out;
208 B : HBuilder from TopOpeBRepBuild;
209 SResult : Shape from TopoDS;
210 SkipFace : Boolean from Standard = Standard_False)
213 TransformShapeFU(me: in out; flag: Integer from Standard)
214 returns Boolean from Standard
218 CurrentStatusError(me)
219 returns StatusError from BRepFeat;
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;
232 myPerfSelection: PerfSelection from BRepFeat is protected;
233 myJustGluer: Boolean from Standard is protected;
234 myJustFeat: Boolean from Standard is protected;
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;
244 mySbOK : Boolean from Standard;
245 mySkOK : Boolean from Standard;
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;
252 myStatusError : StatusError from BRepFeat;