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 | |
22 | class AreaBuilder from BOP |
23 | |
24 | ---Purpose: |
25 | |
26 | -- The Root class for the algorithms that are used to |
27 | |
28 | -- Reconstruct complex topological |
29 | -- objects as Faces or Solids. |
30 | -- Loop is the composite topological object of |
31 | -- the boundary. Wire for a Face. Shell for a Solid. |
32 | -- LoopSet is a tool describing the object to |
33 | -- build. It gives an iteration on Loops. For each |
34 | -- Loop it tells if it is on the boundary or if it is |
35 | -- an interference. |
36 | -- LoopClassifier is an algorithm used to test |
37 | -- if a Loop is inside another Loop. |
38 | -- The result of the reconstruction is an iteration |
39 | -- on the reconstructed areas. An area is described |
40 | -- by a set of Loops. |
41 | -- A AreaBuilder is built with : |
42 | -- - a LoopSet describing the object to reconstruct. |
43 | -- - a LoopClassifier providing the classification algorithm. |
44 | |
45 | uses |
46 | |
47 | State from TopAbs, |
48 | |
49 | Loop from BOP, |
50 | ListOfLoop from BOP, |
51 | ListIteratorOfListOfLoop from BOP, |
52 | ListOfListOfLoop from BOP, |
53 | LoopSet from BOP, |
54 | LoopClassifier from BOP, |
55 | LoopEnum from BOP, |
56 | ListIteratorOfListOfListOfLoop from BOP |
57 | |
58 | is |
59 | |
60 | Create |
61 | returns AreaBuilder; |
62 | ---Purpose: |
63 | --- Empty Constructor |
64 | --- |
65 | Create(LS :out LoopSet from BOP; |
66 | LC :out LoopClassifier from BOP; |
67 | ForceClass : Boolean = Standard_False) |
68 | returns AreaBuilder; |
69 | ---Purpose: |
70 | --- Creates the objectr to build the areas on |
71 | --- the shapes described by <LS> using the classifier <LC>. |
72 | --- |
73 | Delete(me:out) is virtual; |
74 | ---C++: alias "Standard_EXPORT virtual ~BOP_AreaBuilder(){Delete() ; }" |
75 | ---Purpose: |
76 | --- Destructor |
77 | --- |
78 | InitAreaBuilder(me :out; |
79 | LS :out LoopSet from BOP; |
80 | LC :out LoopClassifier; |
81 | ForceClass : Boolean from Standard = Standard_False) |
82 | is virtual; |
83 | ---Purpose: |
84 | --- Sets a AreaBuilder to find the areas on |
85 | --- the shapes described by <LS> using the classifier <LC>. |
86 | --- |
87 | CompareLoopWithListOfLoop(me; |
88 | LC : out LoopClassifier from BOP; |
89 | L : Loop from BOP; |
90 | LOL : ListOfLoop from BOP; |
91 | aWhat : LoopEnum from BOP) |
92 | returns State from TopAbs |
93 | is static protected; |
94 | ---Purpose: |
95 | --- Compare position of the Loop <L> with the Area <LOL> |
96 | --- using the Loop Classifier <LC>. |
97 | --- According to <aWhat>, Loops of <LOL> are selected or not |
98 | --- during <LOL> exploration. |
99 | --- |
100 | -- Result : TopAbs_OUT if <LOL> is empty |
101 | --- TopAbs_UNKNOWN if position undefined |
102 | --- TopAbs_IN if <L> is inside all the selected Loops of <LOL> |
103 | --- TopAbs_OUT if <L> is outside one of the selected Loops of <LOL> |
104 | --- TopAbs_ON if <L> is on one of the selected Loops of <LOL> |
105 | --- |
106 | --- |
107 | |
108 | --- Iteration on Areas |
109 | -- |
110 | InitArea(me:out) |
111 | returns Integer from Standard is static; |
112 | ---Purpose: |
113 | --- Initialize iteration on areas. |
114 | --- |
115 | MoreArea(me) |
116 | returns Boolean from Standard is static; |
117 | |
118 | NextArea(me:out) |
119 | is static; |
120 | |
121 | -- |
122 | -- Iteration on Loops inside the Area |
123 | -- |
124 | InitLoop(me:out) |
125 | returns Integer from Standard is static; |
126 | ---Purpose: |
127 | --- Initialize iteration on loops of current Area. |
128 | --- |
129 | MoreLoop(me) |
130 | returns Boolean from Standard is static; |
131 | |
132 | NextLoop(me:out) |
133 | is static; |
134 | |
135 | Loop(me) |
136 | returns Loop from BOP is static; |
137 | ---C++: return const& |
138 | ---Purpose: |
139 | --- Returns the current Loop in the current area. |
140 | --- |
141 | --- |
142 | --- |
143 | --- Methods that are not for public usage |
144 | --- |
145 | ADD_Loop_TO_LISTOFLoop (me; |
146 | L : Loop from BOP; |
147 | LOL: out ListOfLoop from BOP) |
148 | is virtual; |
149 | ---Purpose: |
150 | --- Internal |
151 | --- |
152 | REM_Loop_FROM_LISTOFLoop(me; |
153 | ITLOL: out ListIteratorOfListOfLoop from BOP; |
154 | LOL : out ListOfLoop from BOP) |
155 | is virtual; |
156 | ---Purpose: |
157 | --- Internal |
158 | --- |
159 | ADD_LISTOFLoop_TO_LISTOFLoop(me; |
160 | LOL1 : out ListOfLoop from BOP; |
161 | LOL2 : out ListOfLoop from BOP) |
162 | is virtual; |
163 | ---Purpose: |
164 | --- Internal |
165 | --- |
166 | Atomize(me; |
167 | state : in out State from TopAbs; |
168 | newstate : State from TopAbs) |
169 | is static protected; |
170 | ---Purpose: |
171 | --- Internal |
172 | --- |
173 | fields |
174 | |
175 | myArea : ListOfListOfLoop from BOP is protected; |
176 | myAreaIterator : ListIteratorOfListOfListOfLoop from BOP is protected; |
177 | myLoopIterator : ListIteratorOfListOfLoop from BOP is protected; |
178 | myUNKNOWNRaise : Boolean from Standard is protected; |
179 | |
180 | end AreaBuilder; |
181 | |