6246f63cecc700432669f31938d052b8e01cc40d
[occt.git] / src / BOPAlgo / BOPAlgo_BuilderArea.cxx
1 // Created by: Peter KURNEV
2 // Copyright (c) 2010-2012 OPEN CASCADE SAS
3 // Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
4 // Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT,
5 //                         EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 //
7 // The content of this file is subject to the Open CASCADE Technology Public
8 // License Version 6.5 (the "License"). You may not use the content of this file
9 // except in compliance with the License. Please obtain a copy of the License
10 // at http://www.opencascade.org and read it completely before using this file.
11 //
12 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
13 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
14 //
15 // The Original Code and all software distributed under the License is
16 // distributed on an "AS IS" basis, without warranty of any kind, and the
17 // Initial Developer hereby disclaims all such warranties, including without
18 // limitation, any warranties of merchantability, fitness for a particular
19 // purpose or non-infringement. Please see the License for the specific terms
20 // and conditions governing the rights and limitations under the License.
21
22
23 #include <BOPAlgo_BuilderArea.ixx>
24
25 #include <BOPCol_ListOfShape.hxx>
26 #include <TopoDS_Shape.hxx>
27 #include <NCollection_BaseAllocator.hxx>
28
29 //=======================================================================
30 //function : 
31 //purpose  : 
32 //=======================================================================
33   BOPAlgo_BuilderArea::BOPAlgo_BuilderArea()
34 :
35   BOPAlgo_Algo(),
36   //myContext(NULL),
37   myShapes(myAllocator),
38   myLoops(myAllocator),
39   myLoopsInternal(myAllocator),
40   myAreas(myAllocator),
41   myShapesToAvoid(100, myAllocator) 
42 {
43 }
44 //=======================================================================
45 //function : 
46 //purpose  : 
47 //=======================================================================
48   BOPAlgo_BuilderArea::BOPAlgo_BuilderArea(const Handle(NCollection_BaseAllocator)& theAllocator)
49 :
50   BOPAlgo_Algo(theAllocator),
51   //myContext(NULL),
52   myShapes(myAllocator),
53   myLoops(myAllocator),
54   myLoopsInternal(myAllocator),
55   myAreas(myAllocator),
56   myShapesToAvoid(100, myAllocator) 
57 {
58 }
59 //=======================================================================
60 //function : ~
61 //purpose  : 
62 //=======================================================================
63   BOPAlgo_BuilderArea::~BOPAlgo_BuilderArea()
64 {
65 }
66 //=======================================================================
67 //function : SetContext
68 //purpose  : 
69 //=======================================================================
70   void BOPAlgo_BuilderArea::SetContext(const Handle(BOPInt_Context)& theContext)
71 {
72   myContext=theContext;
73 }
74 //=======================================================================
75 //function : SetShapes
76 //purpose  : 
77 //=======================================================================
78   void BOPAlgo_BuilderArea::SetShapes(const BOPCol_ListOfShape& theLF)
79 {
80   BOPCol_ListIteratorOfListOfShape aIt;
81   //
82   myShapes.Clear();
83   aIt.Initialize(theLF);
84   for(; aIt.More(); aIt.Next()) {
85     const TopoDS_Shape& aF=aIt.Value();
86     myShapes.Append(aF);
87   }
88 }
89 //=======================================================================
90 //function : Shapes
91 //purpose  : 
92 //=======================================================================
93   const BOPCol_ListOfShape& BOPAlgo_BuilderArea::Shapes()const
94 {
95   return myShapes;
96 }
97 //=======================================================================
98 //function : Loops
99 //purpose  : 
100 //=======================================================================
101   const BOPCol_ListOfShape& BOPAlgo_BuilderArea::Loops()const
102 {
103   return myLoops;
104 }
105 //=======================================================================
106 //function : Areas
107 //purpose  : 
108 //=======================================================================
109   const BOPCol_ListOfShape& BOPAlgo_BuilderArea::Areas()const
110 {
111   return myAreas;
112 }
113 /*
114 //=======================================================================
115 //function :PerformShapesToAvoid
116 //purpose  : 
117 //=======================================================================
118   void BOPAlgo_BuilderArea::PerformShapesToAvoid()
119 {
120 }
121 //=======================================================================
122 //function : PerformLoops
123 //purpose  : 
124 //=======================================================================
125   void BOPAlgo_BuilderArea::PerformLoops()
126 {
127 }
128 //=======================================================================
129 //function : PerformAreas
130 //purpose  : 
131 //=======================================================================
132   void BOPAlgo_BuilderArea::PerformAreas()
133 {
134 }
135 //=======================================================================
136 //function : PerformInternalShapes
137 //purpose  : 
138 //=======================================================================
139   void BOPAlgo_BuilderArea::PerformInternalShapes()
140 {
141 }
142 */