Salome HOME
8787d431489c03df122a29116147a6b45875eb48
[modules/geom.git] / src / GEOMAlgo / GEOMAlgo_ShapeSolid.cxx
1 //  Copyright (C) 2007-2008  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 // File:        GEOMAlgo_ShapeSolid.cxx
23 // Created:     Thu Jan 13 12:54:48 2005
24 // Author:      Peter KURNEV
25 //              <pkv@irinox>
26 //
27 #include <GEOMAlgo_ShapeSolid.ixx>
28
29 #include <TopTools_ListIteratorOfListOfShape.hxx>
30 #include <TopTools_ListOfShape.hxx>
31
32 //=======================================================================
33 //function : GEOMAlgo_ShapeSolid
34 //purpose  : 
35 //=======================================================================
36 GEOMAlgo_ShapeSolid::GEOMAlgo_ShapeSolid()
37 :
38   GEOMAlgo_Algo(),
39   myRank(0),
40   myDSFiller(NULL)
41 {
42 }
43 //=======================================================================
44 //function : ~
45 //purpose  : 
46 //=======================================================================
47 GEOMAlgo_ShapeSolid::~GEOMAlgo_ShapeSolid()
48 {
49 }
50 //=======================================================================
51 //function : SetFiller
52 //purpose  : 
53 //=======================================================================
54 void GEOMAlgo_ShapeSolid::SetFiller(const BOPTools_DSFiller& aDSFiller)
55 {
56   myDSFiller=(BOPTools_DSFiller*) &aDSFiller;
57 }
58 //=======================================================================
59 // function: Shapes
60 // purpose: 
61 //=======================================================================
62 const TopTools_ListOfShape& GEOMAlgo_ShapeSolid::Shapes(const TopAbs_State aState) const
63 {
64   const TopTools_ListOfShape *pL;
65   //
66   switch (aState) {
67     case TopAbs_IN:
68       pL=&myLSIN;
69       break;
70     case TopAbs_OUT:
71       pL=&myLSOUT;
72       break;
73     case TopAbs_ON:
74       pL=&myLSON;
75       break;  
76     default:
77       pL=&myLSON;
78       break; 
79   }
80   return *pL;
81 }