| 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 |
| 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 | deferred class Form from BRepFeat inherits MakeShape from BRepBuilderAPI |
| 18 | |
| 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. |
| 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 |
| 60 | BooleanOperation from BRepAlgoAPI |
| 61 | --modified by NIZNHY-PKV Thu Mar 21 17:09:11 2002 t |
| 62 | is |
| 63 | |
| 64 | Initialize; |
| 65 | |
| 66 | ---Purpose: Redefines the empty constructor. |
| 67 | ---C++: inline |
| 68 | |
| 69 | --- Methods redefined from BRepBuilderAPI_MakeShape |
| 70 | |
| 71 | Modified(me: in out; F: Shape from TopoDS) |
| 72 | ---Purpose: returns the list of generated Faces. |
| 73 | ---C++: return const & |
| 74 | ---Level: Public |
| 75 | returns ListOfShape from TopTools |
| 76 | is redefined; |
| 77 | |
| 78 | |
| 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 & |
| 83 | ---Level: Public |
| 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) |
| 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; |
| 97 | ---C++: return const& |
| 98 | |
| 99 | |
| 100 | LastShape (me) |
| 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& |
| 105 | |
| 106 | NewEdges(me) |
| 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; |
| 114 | |
| 115 | TgtEdges(me) |
| 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; |
| 126 | |
| 127 | |
| 128 | BasisShapeValid(me: in out) |
| 129 | --- Purpose: Initializes the topological construction if the basis shape is present. |
| 130 | ---C++: inline |
| 131 | is static; |
| 132 | |
| 133 | |
| 134 | GeneratedShapeValid(me: in out) |
| 135 | ---Purpose: Initializes the topological construction if the generated shape S is present. |
| 136 | ---C++: inline |
| 137 | is static; |
| 138 | |
| 139 | |
| 140 | ShapeFromValid(me: in out) |
| 141 | ---Purpose: |
| 142 | -- Initializes the topological construction if the shape is |
| 143 | -- present from the specified integer on. |
| 144 | ---C++: inline |
| 145 | is static; |
| 146 | |
| 147 | |
| 148 | ShapeUntilValid(me: in out) |
| 149 | --- Purpose: |
| 150 | -- Initializes the topological construction if the shape is |
| 151 | -- present until the specified integer. |
| 152 | ---C++: inline |
| 153 | is static; |
| 154 | |
| 155 | |
| 156 | GluedFacesValid(me: in out) |
| 157 | ---Purpose: |
| 158 | -- Initializes the topological construction if the glued face is present. |
| 159 | ---C++: inline |
| 160 | is static; |
| 161 | |
| 162 | SketchFaceValid(me: in out) |
| 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; |
| 169 | |
| 170 | PerfSelectionValid(me: in out) |
| 171 | --- Purpose: Initializes the topological construction if the selected face is present. |
| 172 | ---C++: inline |
| 173 | is static; |
| 174 | |
| 175 | |
| 176 | GlobalPerform(me: in out) |
| 177 | ---Purpose: General perform method... |
| 178 | |
| 179 | is static protected; |
| 180 | |
| 181 | |
| 182 | Curves(me: in out; S : in out SequenceOfCurve from TColGeom) |
| 183 | |
| 184 | is deferred; |
| 185 | |
| 186 | |
| 187 | BarycCurve(me: in out) |
| 188 | |
| 189 | returns Curve from Geom |
| 190 | is deferred; |
| 191 | |
| 192 | |
| 193 | -- Protected implementation methods |
| 194 | |
| 195 | UpdateDescendants(me: in out; G: Gluer from LocOpe) |
| 196 | |
| 197 | is static protected; |
| 198 | |
| 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) |
| 204 | is static protected; |
| 205 | --modified by NIZNHY-PKV Thu Mar 21 18:42:50 2002 t |
| 206 | |
| 207 | UpdateDescendants(me: in out; |
| 208 | B : HBuilder from TopOpeBRepBuild; |
| 209 | SResult : Shape from TopoDS; |
| 210 | SkipFace : Boolean from Standard = Standard_False) |
| 211 | |
| 212 | is static protected; |
| 213 | TransformShapeFU(me: in out; flag: Integer from Standard) |
| 214 | returns Boolean from Standard |
| 215 | is protected; |
| 216 | |
| 217 | |
| 218 | CurrentStatusError(me) |
| 219 | returns StatusError from BRepFeat; |
| 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; |
| 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; |
| 251 | |
| 252 | myStatusError : StatusError from BRepFeat; |
| 253 | |
| 254 | end Form; |
| 255 | |
| 256 | |