Salome HOME
Update from BR_V5_DEV 13Feb2009
[modules/geom.git] / src / NMTAlgo / NMTAlgo_Algo.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:        NMTAlgo_Algo.cxx
23 // Created:     Tue Jan 27 14:58:21 2004
24 // Author:      Peter KURNEV
25 //              <pkv@irinox>
26 //
27 #include <NMTAlgo_Algo.ixx>
28 #include <stdlib.h>
29 //=======================================================================
30 // function: NMTAlgo_Algo::NMTAlgo_Algo
31 // purpose: 
32 //=======================================================================
33   NMTAlgo_Algo::NMTAlgo_Algo()
34 :
35   myDSFiller(NULL),
36   myIsDone(Standard_False),
37   myIsComputed(Standard_False),
38   myErrorStatus(1)
39 {
40   myDraw=0;
41   //
42   char* xr=getenv("MDISP");
43   if (xr!=NULL) {
44     if (!strcmp (xr, "yes")) {
45       myDraw=1;
46     }
47   }
48 }
49 //=======================================================================
50 // function: NMTAlgo_Algo
51 // purpose: 
52 //=======================================================================
53   NMTAlgo_Algo::~NMTAlgo_Algo()
54 {
55   Clear();
56 }
57 //=======================================================================
58 // function: Clear
59 // purpose: 
60 //=======================================================================
61   void NMTAlgo_Algo::Clear()
62 {
63   myIsDone=Standard_False;
64   myIsComputed=Standard_False;
65   myErrorStatus=1;
66 }
67 //=======================================================================
68 // function: SetFiller
69 // purpose: 
70 //=======================================================================
71   void NMTAlgo_Algo::SetFiller(const NMTTools_DSFiller& aDSF)
72 {
73   myDSFiller=(NMTTools_DSFiller *)&aDSF;
74 }
75 //=======================================================================
76 // function: Filler
77 // purpose: 
78 //=======================================================================
79   const NMTTools_DSFiller& NMTAlgo_Algo::Filler()const
80 {
81   return *myDSFiller;
82 }
83 //=======================================================================
84 // function: ComputeWithFiller
85 // purpose: 
86 //=======================================================================
87   void NMTAlgo_Algo::ComputeWithFiller(const NMTTools_DSFiller& aDSF)
88 {
89   SetFiller(aDSF);
90 }
91 //=======================================================================
92 // function: Shape
93 // purpose: 
94 //=======================================================================
95   const TopoDS_Shape& NMTAlgo_Algo::Shape()const
96 {
97   return myShape;
98 }
99 //=======================================================================
100 // function: IsDone
101 // purpose: 
102 //=======================================================================
103   Standard_Boolean NMTAlgo_Algo::IsDone()const
104 {
105   return myIsDone;
106 }
107 //=======================================================================
108 // function: ErrorStatus
109 // purpose: 
110 //=======================================================================
111   Standard_Integer NMTAlgo_Algo::ErrorStatus()const
112 {
113   return myErrorStatus;
114 }
115 /*
116 //=======================================================================
117 // function: Compute
118 // purpose: 
119 //=======================================================================
120   void NMTAlgo_Algo::Compute()
121 {
122 }
123 //=======================================================================
124 // function: SetCompositeShape
125 // purpose: 
126 //=======================================================================
127   void NMTAlgo_Algo::SetCompositeShape(const TopoDS_Shape& aS)
128 {
129   myCompositeShape=aS;
130 }
131 //=======================================================================
132 // function: CompositeShape
133 // purpose: 
134 //=======================================================================
135   const TopoDS_Shape& NMTAlgo_Algo::CompositeShape()const
136 {
137   return myCompositeShape;
138 }
139 */