Commit | Line | Data |
---|---|---|
b311480e | 1 | -- Created on: 1995-10-26 |
2 | -- Created by: Yves FRICAUD | |
3 | -- Copyright (c) 1995-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 | -- Modified by skv - Tue Mar 15 16:17:37 2005 | |
24 | -- Add methods for supporting history. | |
25 | ||
26 | class MakeOffset from BRepOffset | |
27 | ||
28 | ---Purpose: | |
29 | ||
30 | uses | |
31 | Image from BRepAlgo, | |
32 | AsDes from BRepAlgo, | |
33 | Analyse from BRepOffset, | |
34 | Mode from BRepOffset, | |
35 | DataMapOfShapeOffset from BRepOffset, | |
36 | Error from BRepOffset, | |
37 | Inter3d from BRepOffset, | |
38 | DataMapOfShapeReal from TopTools, | |
39 | Shape from TopoDS, | |
40 | JoinType from GeomAbs, | |
41 | Face from TopoDS, | |
42 | Edge from TopoDS, | |
43 | MapOfShape from TopTools, | |
975ec82a | 44 | IndexedMapOfShape from TopTools, |
7fd59977 | 45 | ListOfShape from TopTools, |
46 | MakeLoops from BRepOffset | |
47 | ||
48 | is | |
49 | ||
50 | Create; | |
51 | ||
52 | Create ( S : Shape from TopoDS; | |
53 | Offset : Real from Standard; | |
54 | Tol : Real from Standard; | |
55 | Mode : Mode from BRepOffset = BRepOffset_Skin; | |
56 | Intersection : Boolean from Standard = Standard_False; | |
57 | SelfInter : Boolean from Standard = Standard_False; | |
58 | Join : JoinType from GeomAbs = GeomAbs_Arc; | |
59 | Thickening : Boolean from Standard = Standard_False) | |
60 | returns MakeOffset from BRepOffset; | |
61 | ||
62 | ---Category: Initialization. | |
63 | ||
64 | Initialize (me : in out; | |
65 | S : Shape from TopoDS; | |
66 | Offset : Real from Standard; | |
67 | Tol : Real from Standard; | |
68 | Mode : Mode from BRepOffset = BRepOffset_Skin; | |
69 | Intersection : Boolean from Standard = Standard_False; | |
70 | SelfInter : Boolean from Standard = Standard_False; | |
71 | Join : JoinType from GeomAbs = GeomAbs_Arc; | |
72 | Thickening : Boolean from Standard = Standard_False) | |
73 | is static; | |
74 | ||
75 | Clear (me : in out) | |
76 | is static; | |
77 | ||
78 | AddFace (me : in out; F : Face from TopoDS) is static; | |
79 | ---Purpose: Add Closing Faces, <F> has to be in the initial | |
80 | -- shape S. | |
81 | ||
82 | SetOffsetOnFace (me : in out; | |
83 | F : Face from TopoDS; | |
84 | Off : Real from Standard) is static; | |
85 | ---Purpose: set the offset <Off> on the Face <F> | |
86 | ||
87 | ||
88 | ---Category: Computation. | |
89 | ||
90 | MakeOffsetShape (me : in out) is static; | |
91 | ||
92 | MakeThickSolid (me : in out) is static; | |
93 | ||
94 | ---Category: Querying. | |
95 | ||
96 | GetAnalyse(me) | |
97 | ---C++: return const & | |
98 | returns Analyse from BRepOffset | |
99 | is static; | |
100 | ||
101 | IsDone (me) returns Boolean from Standard | |
102 | is static; | |
103 | ||
104 | Shape (me) | |
105 | ---C++: return const & | |
106 | returns Shape from TopoDS | |
107 | is static; | |
108 | ||
109 | Error (me) returns Error from BRepOffset; | |
110 | ---Purpose: returns information if IsDone() = FALSE. | |
111 | ||
112 | ||
113 | OffsetFacesFromShapes (me) | |
114 | ---Purpose: Returns <Image> containing links between initials | |
115 | -- shapes and offset faces. | |
116 | ---C++: return const & | |
117 | returns Image from BRepAlgo | |
118 | is static; | |
119 | ||
120 | -- Modified by skv - Tue Mar 15 16:17:37 2005 Begin | |
121 | -- Query offset join type. | |
122 | ||
123 | GetJoinType(me) | |
124 | ---Purpose: Returns myJoin. | |
125 | returns JoinType from GeomAbs | |
126 | is static; | |
127 | ||
128 | -- Add methods for supporting history. | |
129 | ||
130 | OffsetEdgesFromShapes (me) | |
131 | ---Purpose: Returns <Image> containing links between initials | |
132 | -- shapes and offset edges. | |
133 | ---C++: return const & | |
134 | returns Image from BRepAlgo | |
135 | is static; | |
136 | ||
137 | -- Modified by skv - Tue Mar 15 16:17:37 2005 End | |
138 | ||
139 | ClosingFaces (me) | |
140 | ---Purpose: Returns the list of closing faces stores by AddFace | |
141 | ---C++: return const & | |
975ec82a | 142 | returns IndexedMapOfShape from TopTools |
7fd59977 | 143 | is static; |
144 | ||
145 | ---Category: private methods | |
146 | ||
147 | BuildOffsetByArc ( me : in out ) | |
148 | is static private; | |
149 | ||
150 | BuildOffsetByInter ( me : in out ) | |
151 | is static private; | |
152 | ||
153 | SelfInter (me : in out ; | |
154 | Modif : in out MapOfShape from TopTools) | |
155 | is static private; | |
156 | ||
157 | Intersection3D (me : in out; | |
158 | Inter : in out Inter3d from BRepOffset) | |
159 | is static private; | |
160 | ||
161 | Intersection2D ( me : in out ; | |
975ec82a J |
162 | Modif : IndexedMapOfShape from TopTools; |
163 | NewEdges : IndexedMapOfShape from TopTools) | |
7fd59977 | 164 | is static private; |
165 | ||
166 | MakeLoops ( me : in out ; | |
975ec82a | 167 | Modif : in out IndexedMapOfShape from TopTools) |
7fd59977 | 168 | is static private; |
169 | ||
170 | MakeLoopsOnContext ( me : in out ; | |
171 | Modif : in out MapOfShape from TopTools) | |
172 | is static private; | |
173 | ||
174 | MakeFaces ( me : in out ; | |
975ec82a | 175 | Modif : in out IndexedMapOfShape from TopTools) |
7fd59977 | 176 | is static private; |
177 | ||
178 | MakeShells (me : in out ) | |
179 | is static private; | |
180 | ||
181 | SelectShells (me : in out) | |
182 | is static private; | |
183 | ||
184 | EncodeRegularity( me : in out) | |
185 | is static private; | |
186 | ||
187 | MakeSolid (me : in out) | |
188 | is static private; | |
189 | ||
190 | ToContext (me : in out; | |
191 | MapSF : in out DataMapOfShapeOffset from BRepOffset) | |
192 | is static private; | |
193 | ||
194 | UpdateFaceOffset (me: in out) | |
195 | ---Purpose: Private method use to update the map face<->offset | |
196 | is static private; | |
197 | ||
198 | CorrectConicalFaces (me: in out) | |
199 | ---Purpose: Private method used to correct degenerated edges on conical faces | |
200 | is static private; | |
201 | ||
202 | MakeMissingWalls (me: in out) | |
203 | ---Purpose: Private method used to build walls for thickening the shell | |
204 | is static private; | |
205 | ||
206 | fields | |
207 | ||
208 | myOffset : Real from Standard; | |
209 | myTol : Real from Standard; | |
210 | myShape : Shape from TopoDS; -- Initial | |
211 | myMode : Mode from BRepOffset; | |
212 | myInter : Boolean from Standard; | |
213 | mySelfInter : Boolean from Standard; | |
214 | myJoin : JoinType from GeomAbs; | |
215 | myThickening : Boolean from Standard; | |
216 | ||
217 | myFaceOffset : DataMapOfShapeReal from TopTools; | |
218 | ||
975ec82a J |
219 | myFaces : IndexedMapOfShape from TopTools; |
220 | myAnalyse : Analyse from BRepOffset; | |
7fd59977 | 221 | |
222 | myOffsetShape : Shape from TopoDS; -- Result | |
223 | myInitOffsetFace : Image from BRepAlgo; | |
224 | myInitOffsetEdge : Image from BRepAlgo; | |
225 | myImageOffset : Image from BRepAlgo; | |
226 | myWalls : ListOfShape from TopTools; | |
227 | myAsDes : AsDes from BRepAlgo; | |
228 | ||
229 | myDone : Boolean from Standard; | |
230 | myError : Error from BRepOffset; | |
231 | ||
232 | myMakeLoops : MakeLoops from BRepOffset; | |
233 | ||
234 | end MakeOffset; |