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
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.
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.
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.
22 class AreaBuilder from BOP
26 -- The Root class for the algorithms that are used to
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
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
41 -- A AreaBuilder is built with :
42 -- - a LoopSet describing the object to reconstruct.
43 -- - a LoopClassifier providing the classification algorithm.
51 ListIteratorOfListOfLoop from BOP,
52 ListOfListOfLoop from BOP,
54 LoopClassifier from BOP,
56 ListIteratorOfListOfListOfLoop from BOP
65 Create(LS :out LoopSet from BOP;
66 LC :out LoopClassifier from BOP;
67 ForceClass : Boolean = Standard_False)
70 --- Creates the objectr to build the areas on
71 --- the shapes described by <LS> using the classifier <LC>.
73 Delete(me:out) is virtual;
74 ---C++: alias "Standard_EXPORT virtual ~BOP_AreaBuilder(){Delete() ; }"
78 InitAreaBuilder(me :out;
79 LS :out LoopSet from BOP;
80 LC :out LoopClassifier;
81 ForceClass : Boolean from Standard = Standard_False)
84 --- Sets a AreaBuilder to find the areas on
85 --- the shapes described by <LS> using the classifier <LC>.
87 CompareLoopWithListOfLoop(me;
88 LC : out LoopClassifier from BOP;
90 LOL : ListOfLoop from BOP;
91 aWhat : LoopEnum from BOP)
92 returns State from TopAbs
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.
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>
108 --- Iteration on Areas
111 returns Integer from Standard is static;
113 --- Initialize iteration on areas.
116 returns Boolean from Standard is static;
122 -- Iteration on Loops inside the Area
125 returns Integer from Standard is static;
127 --- Initialize iteration on loops of current Area.
130 returns Boolean from Standard is static;
136 returns Loop from BOP is static;
137 ---C++: return const&
139 --- Returns the current Loop in the current area.
143 --- Methods that are not for public usage
145 ADD_Loop_TO_LISTOFLoop (me;
147 LOL: out ListOfLoop from BOP)
152 REM_Loop_FROM_LISTOFLoop(me;
153 ITLOL: out ListIteratorOfListOfLoop from BOP;
154 LOL : out ListOfLoop from BOP)
159 ADD_LISTOFLoop_TO_LISTOFLoop(me;
160 LOL1 : out ListOfLoop from BOP;
161 LOL2 : out ListOfLoop from BOP)
167 state : in out State from TopAbs;
168 newstate : State from TopAbs)
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;