Salome HOME
CMake porting.
[modules/geom.git] / src / GEOMAlgo / GEOMAlgo_BuilderArea.cxx
1 // Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 // File:        GEOMAlgo_BuilderArea.cxx
24 // Created:
25 // Author:      Peter KURNEV
26 //
27 #include <GEOMAlgo_BuilderArea.hxx>
28
29 #include <TopTools_ListIteratorOfListOfShape.hxx>
30 #include <TopoDS_Shape.hxx>
31 #include <IntTools_Context.hxx>
32
33 //=======================================================================
34 //function :
35 //purpose  :
36 //=======================================================================
37 GEOMAlgo_BuilderArea::GEOMAlgo_BuilderArea()
38 :
39   GEOMAlgo_Algo()
40 {
41 }
42 //=======================================================================
43 //function : ~
44 //purpose  :
45 //=======================================================================
46 GEOMAlgo_BuilderArea::~GEOMAlgo_BuilderArea()
47 {
48 }
49 //=======================================================================
50 //function : SetContext
51 //purpose  :
52 //=======================================================================
53 void GEOMAlgo_BuilderArea::SetContext(const Handle(IntTools_Context)& theContext)
54 {
55   myContext=theContext;
56 }
57 //=======================================================================
58 //function : Context
59 //purpose  :
60 //=======================================================================
61 const Handle(IntTools_Context)& GEOMAlgo_BuilderArea::Context()const
62 {
63   return myContext;
64 }
65 //=======================================================================
66 //function : Perform
67 //purpose  :
68 //=======================================================================
69 void GEOMAlgo_BuilderArea::Perform()
70 {
71   if (myContext.IsNull()) {
72     myContext=new IntTools_Context;
73   }
74 }
75 //=======================================================================
76 //function : SetShapes
77 //purpose  :
78 //=======================================================================
79 void GEOMAlgo_BuilderArea::SetShapes(const TopTools_ListOfShape& theLF)
80 {
81   TopTools_ListIteratorOfListOfShape aIt;
82   //
83   myShapes.Clear();
84   aIt.Initialize(theLF);
85   for(; aIt.More(); aIt.Next()) {
86     const TopoDS_Shape& aF=aIt.Value();
87     myShapes.Append(aF);
88   }
89 }
90 //=======================================================================
91 //function : Shapes
92 //purpose  :
93 //=======================================================================
94 const TopTools_ListOfShape& GEOMAlgo_BuilderArea::Shapes()const
95 {
96   return myShapes;
97 }
98 //=======================================================================
99 //function : Loops
100 //purpose  :
101 //=======================================================================
102 const TopTools_ListOfShape& GEOMAlgo_BuilderArea::Loops()const
103 {
104   return myLoops;
105 }
106 //=======================================================================
107 //function : Areas
108 //purpose  :
109 //=======================================================================
110 const TopTools_ListOfShape& GEOMAlgo_BuilderArea::Areas()const
111 {
112   return myAreas;
113 }
114 //=======================================================================
115 //function :PerformShapesToAvoid
116 //purpose  :
117 //=======================================================================
118 void GEOMAlgo_BuilderArea::PerformShapesToAvoid()
119 {
120 }
121 //=======================================================================
122 //function : PerformLoops
123 //purpose  :
124 //=======================================================================
125 void GEOMAlgo_BuilderArea::PerformLoops()
126 {
127 }
128 //=======================================================================
129 //function : PerformAreas
130 //purpose  :
131 //=======================================================================
132 void GEOMAlgo_BuilderArea::PerformAreas()
133 {
134 }
135 //=======================================================================
136 //function : PerformInternalShapes
137 //purpose  :
138 //=======================================================================
139 void GEOMAlgo_BuilderArea::PerformInternalShapes()
140 {
141 }
142