b311480e |
1 | -- Created on: 1995-06-13 |
2 | -- Created by: Jacques GOUSSARD |
3 | -- Copyright (c) 1995-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 | package BRepFeat |
18 | |
4e57c75e |
19 | ---Purpose: BRepFeat is necessary for the |
20 | -- creation and manipulation of both form and mechanical features in a |
21 | -- Boundary Representation framework. Form features can be depressions or |
22 | -- protrusions and include the following types: |
23 | -- - Cylinder |
24 | -- - Draft Prism |
25 | -- - Prism |
26 | -- - Revolved feature |
27 | -- - Pipe |
28 | -- Depending on whether you wish to make a depression or a protrusion, |
29 | -- you can choose your operation type between the following: |
30 | -- - removing matter (a Boolean cut: Fuse setting 0) |
31 | -- - adding matter (Boolean fusion: Fuse setting 1) |
32 | -- The semantics of form feature creation is based on the |
33 | -- construction of shapes: |
34 | -- - for a certain length in a certain direction |
35 | -- - up to a limiting face |
36 | -- - from a limiting face at a height |
37 | -- - above and/or below a plane |
38 | -- The shape defining the construction of a feature can be either a |
39 | -- supporting edge or a concerned area of a face. |
40 | -- In case of supporting edge, this contour can be attached to a face |
41 | -- of the basis shape by binding. When the contour is bound to this face, |
42 | -- the information that the contour will slide on the face becomes |
43 | -- available to the relevant class methods. In case of the concerned |
44 | -- area of a face, you could, for example, cut it out and move it at |
45 | -- a different height, which will define the limiting face of a |
46 | -- protrusion or depression. Topological definition with local |
47 | -- operations of this sort makes calculations simpler and faster |
48 | -- than a global operation. The latter would entail a second phase of |
49 | -- removing unwanted matter to get the same result. |
50 | -- Mechanical features include ribs - protrusions - and grooves (or |
51 | -- slots) - depressions along planar (linear) surfaces or revolution surfaces. |
52 | -- The semantics of mechanical features is based on giving |
53 | -- thickness to a contour. This thickness can either be unilateral |
54 | -- - on one side of the contour - or bilateral - on both sides. As in |
55 | -- the semantics of form features, the thickness is defined by |
56 | -- construction of shapes in specific contexts. |
57 | -- However, in case of mechanical features, development contexts |
58 | -- differ. Here they include extrusion: |
59 | -- - to a limiting face of the basis shape |
60 | -- - to or from a limiting plane |
61 | -- - to a height. |
7fd59977 |
62 | |
63 | uses BRepBuilderAPI, |
64 | LocOpe, |
65 | TopoDS, |
66 | TopTools, |
67 | TopOpeBRepBuild, |
68 | Geom, |
69 | gp, |
70 | TColgp, |
71 | TColGeom, |
72 | StdFail, |
73 | BRepTopAdaptor, |
74 | Geom2dAdaptor, |
75 | TopAbs, |
76 | --modified by NIZNHY-PKV Thu Mar 21 18:31:59 2002 f |
4e57c75e |
77 | BRepAlgoAPI, |
78 | BOPAlgo, |
79 | BOPDS, |
80 | BOPCol, |
81 | BOPTools |
82 | --BOP |
7fd59977 |
83 | --modified by NIZNHY-PKV Thu Mar 21 18:32:02 2002 t |
4e57c75e |
84 | |
85 | |
7fd59977 |
86 | is |
87 | |
88 | enumeration StatusError is |
4e57c75e |
89 | ---Purpose: Discribes the error. |
90 | OK, |
91 | BadDirect, |
92 | BadIntersect, |
93 | EmptyBaryCurve, |
94 | EmptyCutResult, |
95 | FalseSide, |
96 | IncDirection, |
97 | IncSlidFace, |
98 | IncParameter, |
99 | IncTypes, |
100 | IntervalOverlap, |
101 | InvFirstShape, |
102 | InvOption, |
103 | InvShape, |
104 | LocOpeNotDone, |
105 | LocOpeInvNotDone, |
106 | NoExtFace, |
107 | NoFaceProf, |
108 | NoGluer, |
109 | NoIntersectF, |
110 | NoIntersectU, |
111 | NoParts, |
112 | NoProjPt, |
113 | NotInitialized, |
114 | NotYetImplemented, |
115 | NullRealTool, |
116 | NullToolF, |
117 | NullToolU |
7fd59977 |
118 | |
119 | end StatusError; |
120 | |
121 | |
4e57c75e |
122 | class Builder; -- inherits BOP from BOPAlgo |
7fd59977 |
123 | |
7fd59977 |
124 | class MakeCylindricalHole; -- inherits Builder from BRepFeat; |
125 | |
7fd59977 |
126 | class SplitShape; -- inherits MakeShape from BRepBuilderAPI; |
127 | |
128 | deferred class Form; -- inherits MakeShape from BRepBuilderAPI; |
129 | |
130 | deferred class RibSlot; -- inherits MakeShape from BRepBuilderAPI; |
131 | |
132 | class MakePrism; -- inherits Form from BRepFeat |
133 | |
134 | class MakeRevol; -- inherits Form from BRepFeat |
135 | |
136 | class MakePipe; -- inherits Form from BRepFeat |
137 | |
138 | class Gluer; -- inherits MakeShape from BRepBuilderAPI |
139 | |
140 | class MakeDPrism; |
141 | |
142 | class MakeLinearForm; |
143 | |
144 | class MakeRevolutionForm; |
145 | |
146 | enumeration Status is -- to be completed |
147 | |
4e57c75e |
148 | NoError, |
149 | InvalidPlacement, |
150 | HoleTooLong |
7fd59977 |
151 | |
152 | end Status; |
153 | |
154 | enumeration PerfSelection is |
155 | |
4e57c75e |
156 | NoSelection, |
157 | SelectionFU, |
158 | SelectionU, |
159 | SelectionSh, |
160 | SelectionShU |
161 | ---Purpose: To declare the type of selection semantics for local operation Perform methods |
162 | -- - NoSelection |
163 | -- - SelectionFU - selection of a face up to which a |
164 | -- local operation will be performed |
165 | -- - SelectionU - selection of a point up to which a |
166 | -- local operation will be performed |
167 | -- - SelectionSh - selection of a shape on which a |
168 | -- local operation will be performed |
169 | -- - SelectionShU - selection of a shape up to which a |
170 | -- local operation will be performed. |
7fd59977 |
171 | end PerfSelection; |
172 | |
173 | |
174 | SampleEdges(S : Shape from TopoDS; |
4e57c75e |
175 | Pt: in out SequenceOfPnt from TColgp); |
7fd59977 |
176 | |
177 | |
178 | |
179 | Barycenter(S : Shape from TopoDS; |
4e57c75e |
180 | Pt: in out Pnt from gp); |
181 | |
7fd59977 |
182 | ParametricBarycenter(S : Shape from TopoDS; |
4e57c75e |
183 | C : Curve from Geom) |
184 | |
185 | returns Real from Standard; |
7fd59977 |
186 | |
187 | ParametricMinMax(S : Shape from TopoDS; |
4e57c75e |
188 | C : Curve from Geom; |
189 | prmin : out Real from Standard; |
190 | prmax : out Real from Standard; |
191 | prbmin: out Real from Standard; |
192 | prbmax: out Real from Standard; |
193 | flag : out Boolean from Standard; |
194 | Ori : Boolean from Standard = Standard_False); |
195 | ---Purpose: Ori = True taking account the orientation |
196 | |
7fd59977 |
197 | IsInside(F1 : Face from TopoDS; |
4e57c75e |
198 | F2 : Face from TopoDS) |
199 | |
200 | returns Boolean from Standard; |
7fd59977 |
201 | |
202 | IsInOut (FC : FClass2d from BRepTopAdaptor; |
4e57c75e |
203 | AC : Curve from Geom2dAdaptor) |
7fd59977 |
204 | |
4e57c75e |
205 | |
206 | returns Boolean from Standard; |
7fd59977 |
207 | |
208 | -- TangSli(E : Edge from TopoDS; |
4e57c75e |
209 | -- F : Shape from TopoDS) |
210 | |
211 | -- returns Boolean from Standard; |
7fd59977 |
212 | |
213 | |
214 | FaceUntil (S : Shape from TopoDS; |
4e57c75e |
215 | F : in out Face from TopoDS); |
216 | |
7fd59977 |
217 | |
218 | Tool (SRef : Shape from TopoDS; |
4e57c75e |
219 | Fac : Face from TopoDS; |
220 | Orf : Orientation from TopAbs) |
221 | |
222 | returns Solid from TopoDS; |
7fd59977 |
223 | |
224 | Print(SE : StatusError from BRepFeat; S : in out OStream) returns OStream; |
4e57c75e |
225 | ---Purpose: Prints the Error description of the State <St> as a String on |
226 | -- the Stream <S> and returns <S>. |
227 | -- |
228 | ---C++: return & |
7fd59977 |
229 | |
230 | end BRepFeat; |