b311480e |
1 | -- Created on: 1995-12-21 |
2 | -- Created by: Jean Yves LEBEY |
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 | -- modified by PKV Tue Apr 3 16:57:39 2001 |
b311480e |
22 | |
7fd59977 |
23 | |
24 | class FaceBuilder from BOP |
25 | |
26 | ---Purpose: |
27 | --- The algorithm to construct Faces from a WireEdgeSet |
28 | --- |
29 | |
30 | uses |
31 | |
32 | Shape from TopoDS, |
33 | Face from TopoDS, |
34 | Wire from TopoDS, |
35 | Edge from TopoDS, |
36 | Vertex from TopoDS, |
7fd59977 |
37 | ListOfShape from TopTools, |
5faddbe4 |
38 | SequenceOfInteger from TColStd, |
39 | Context from IntTools, |
7fd59977 |
40 | WireEdgeSet from BOP, |
7fd59977 |
41 | PWireEdgeSet from BOP |
5faddbe4 |
42 | -- LoopSet from BOP, |
43 | -- BlockIterator from BOP, |
44 | -- BlockBuilder from BOP, |
45 | -- FaceAreaBuilder from BOP, |
46 | |
7fd59977 |
47 | |
48 | is |
49 | |
50 | Create |
51 | returns FaceBuilder; |
52 | ---Purpose: |
53 | --- Empty constructor; |
54 | --- |
55 | Do(me :out; |
56 | aWES : WireEdgeSet from BOP; |
57 | aForceClass : Boolean from Standard =Standard_True); |
58 | ---Purpose: |
59 | --- Launches the algorithm consisting of four steps |
60 | --- 1. Split the WES on wires |
61 | --- 2. Make Loops from wires |
62 | --- 3. Make Areas from Loops |
63 | --- 4. Make Faces from Areas |
64 | --- |
5faddbe4 |
65 | |
7fd59977 |
66 | --- |
5faddbe4 |
67 | -- BuildNewFaces (me :out) |
68 | -- is private; |
7fd59977 |
69 | ---Purpose: |
70 | --- Make Faces from Areas |
5faddbe4 |
71 | --- |
72 | |
73 | --modified by NIZNHY-PKV Wed Feb 29 10:57:40 2012f |
74 | SetContext(me:out; |
75 | aCtx:Context from IntTools); |
76 | ---Purpose: |
77 | -- Sets intersection context <aCtx> |
78 | |
79 | Context(me) |
80 | returns Context from IntTools; |
81 | ---C++: return const & |
82 | ---Purpose: |
83 | -- Returns intersection context |
84 | --modified by NIZNHY-PKV Wed Feb 29 10:57:52 2012t |
85 | |
7fd59977 |
86 | WES (me) |
87 | returns WireEdgeSet from BOP; |
88 | ---C++: return const & |
89 | ---Purpose: |
90 | --- Selector |
91 | --- |
92 | NewFaces (me) |
93 | returns ListOfShape from TopTools; |
94 | ---C++: return const & |
95 | ---Purpose: |
96 | --- Selector |
97 | --- |
98 | SetTreatment (me: out; |
99 | aTreatment: Integer from Standard); |
100 | ---Purpose: |
101 | --- Modifier |
102 | --- 0 -Treat internal edges, |
103 | --- 1 -Do not treat internal edges |
104 | --- |
5faddbe4 |
105 | |
7fd59977 |
106 | SetTreatSDScales (me: out; |
107 | aTreatment: Integer from Standard); |
108 | ---Purpose: |
109 | --- Modifier |
110 | --- 1 -Treat scale configured same domain faces, |
111 | --- 0 -Do not treat them. |
5faddbe4 |
112 | --- |
113 | -- SetManifoldFlag(me: out; |
114 | -- aMFlag: Boolean from Standard); |
115 | ---Purpose: |
116 | --- Modifier |
117 | --- |
118 | -- ManifoldFlag(me) |
119 | -- returns Boolean from Standard; |
7fd59977 |
120 | ---Purpose: |
121 | --- Selector |
122 | --- |
123 | Treatment (me) |
124 | returns Integer from Standard; |
125 | ---Purpose: |
126 | --- Selector |
127 | --- |
128 | TreatSDScales (me) |
129 | returns Integer from Standard; |
130 | ---Purpose: |
131 | --- Selector |
132 | --- |
133 | --- |
134 | --- |
135 | --- Faces' iterator |
136 | --- |
5faddbe4 |
137 | -- InitFace(me:out) |
138 | -- returns Integer from Standard; |
7fd59977 |
139 | |
5faddbe4 |
140 | -- MoreFace(me) |
141 | -- returns Boolean from Standard; |
7fd59977 |
142 | |
5faddbe4 |
143 | -- NextFace(me:out); |
7fd59977 |
144 | ---Purpose: |
145 | --- |
146 | --- |
147 | --- Wires' iterator |
148 | --- |
5faddbe4 |
149 | -- InitWire(me:out) |
150 | -- returns Integer from Standard; |
7fd59977 |
151 | |
5faddbe4 |
152 | -- MoreWire(me) |
153 | -- returns Boolean from Standard; |
7fd59977 |
154 | |
5faddbe4 |
155 | -- NextWire(me:out); |
7fd59977 |
156 | |
5faddbe4 |
157 | -- IsOldWire(me) |
158 | -- returns Boolean from Standard; |
7fd59977 |
159 | |
5faddbe4 |
160 | -- OldWire(me) |
161 | -- returns Shape from TopoDS; |
162 | -- ---C++: return const & |
7fd59977 |
163 | |
5faddbe4 |
164 | -- Wire(me) |
165 | -- returns Wire from TopoDS; |
166 | -- ---C++: return const & |
167 | -- ---Purpose: |
168 | -- --- |
7fd59977 |
169 | |
170 | --- |
171 | --- Edges' iterator |
172 | --- |
5faddbe4 |
173 | -- FindNextValidElement(me:out); |
7fd59977 |
174 | |
5faddbe4 |
175 | -- InitEdge(me:out) |
176 | -- returns Integer from Standard; |
7fd59977 |
177 | |
5faddbe4 |
178 | -- MoreEdge(me) |
179 | -- returns Boolean from Standard; |
7fd59977 |
180 | |
5faddbe4 |
181 | -- NextEdge(me : in out); |
7fd59977 |
182 | |
5faddbe4 |
183 | -- Edge(me) |
184 | -- returns Edge from TopoDS; |
185 | -- ---C++: return const & |
7fd59977 |
186 | ---Purpose: |
5faddbe4 |
187 | --- |
188 | |
189 | -- MakeLoops(me :out; |
190 | -- SS :out WireEdgeSet from BOP) |
191 | -- is protected; |
7fd59977 |
192 | ---Purpose: |
193 | --- Make Loops from wires |
194 | --- |
5faddbe4 |
195 | DoInternalEdges (me :out) |
196 | is protected; |
197 | ---Purpose: |
198 | --- Processes internal edges if they exists |
199 | |
7fd59977 |
200 | SDScales(me :out) |
5faddbe4 |
201 | is protected; |
7fd59977 |
202 | ---Purpose: |
203 | --- Treatment SD faces with a "scale" |
204 | --- |
5faddbe4 |
205 | --modified by NIZNHY-PKV Wed Feb 29 09:12:17 2012f |
206 | PerformAreas(me :out; |
207 | SS :out WireEdgeSet from BOP) |
208 | is protected; |
209 | --modified by NIZNHY-PKV Wed Feb 29 09:12:20 2012t |
210 | |
7fd59977 |
211 | fields |
212 | |
213 | myFace : Face from TopoDS; |
5faddbe4 |
214 | -- myLoopSet : LoopSet from BOP; |
215 | -- myBlockIterator : BlockIterator from BOP; |
216 | -- myBlockBuilder : BlockBuilder from BOP; |
217 | -- myFaceAreaBuilder : FaceAreaBuilder from BOP; |
7fd59977 |
218 | myWES : PWireEdgeSet from BOP; |
219 | myNewFaces : ListOfShape from TopTools; |
7fd59977 |
220 | myTreatment : Integer from Standard; |
5faddbe4 |
221 | -- myManifoldFlag : Boolean from Standard; |
7fd59977 |
222 | myTreatSDScales : Integer from Standard; |
223 | myNegatives : SequenceOfInteger from TColStd; |
5faddbe4 |
224 | myContext : Context from IntTools; |
7fd59977 |
225 | end FaceBuilder; |