Salome HOME
NPAL15298: geompy.KindOfShape(aShape) first version implemented.
[modules/geom.git] / src / NMTAlgo / NMTAlgo_Algo.cxx
1 // Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
3 // 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either 
7 // version 2.1 of the License.
8 // 
9 // This library is distributed in the hope that it will be useful 
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
12 // Lesser General Public License for more details.
13 //
14 // You should have received a copy of the GNU Lesser General Public  
15 // License along with this library; if not, write to the Free Software 
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
17 //
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 //
20 // File:        NMTAlgo_Algo.cxx
21 // Created:     Tue Jan 27 14:58:21 2004
22 // Author:      Peter KURNEV
23 //              <pkv@irinox>
24
25
26 #include <NMTAlgo_Algo.ixx>
27 #include <stdlib.h>
28 //=======================================================================
29 // function: NMTAlgo_Algo::NMTAlgo_Algo
30 // purpose: 
31 //=======================================================================
32   NMTAlgo_Algo::NMTAlgo_Algo()
33 :
34   myDSFiller(NULL),
35   myIsDone(Standard_False),
36   myIsComputed(Standard_False),
37   myErrorStatus(1)
38 {
39   myDraw=0;
40   //
41   char* xr=getenv("MDISP");
42   if (xr!=NULL) {
43     if (!strcmp (xr, "yes")) {
44       myDraw=1;
45     }
46   }
47 }
48 //=======================================================================
49 // function: NMTAlgo_Algo
50 // purpose: 
51 //=======================================================================
52   NMTAlgo_Algo::~NMTAlgo_Algo()
53 {
54   Clear();
55 }
56 //=======================================================================
57 // function: Clear
58 // purpose: 
59 //=======================================================================
60   void NMTAlgo_Algo::Clear()
61 {
62   myIsDone=Standard_False;
63   myIsComputed=Standard_False;
64   myErrorStatus=1;
65 }
66 //=======================================================================
67 // function: SetFiller
68 // purpose: 
69 //=======================================================================
70   void NMTAlgo_Algo::SetFiller(const NMTTools_DSFiller& aDSF)
71 {
72   myDSFiller=(NMTTools_DSFiller *)&aDSF;
73 }
74 //=======================================================================
75 // function: Filler
76 // purpose: 
77 //=======================================================================
78   const NMTTools_DSFiller& NMTAlgo_Algo::Filler()const
79 {
80   return *myDSFiller;
81 }
82 //=======================================================================
83 // function: ComputeWithFiller
84 // purpose: 
85 //=======================================================================
86   void NMTAlgo_Algo::ComputeWithFiller(const NMTTools_DSFiller& aDSF)
87 {
88   SetFiller(aDSF);
89 }
90 //=======================================================================
91 // function: Shape
92 // purpose: 
93 //=======================================================================
94   const TopoDS_Shape& NMTAlgo_Algo::Shape()const
95 {
96   return myShape;
97 }
98 //=======================================================================
99 // function: IsDone
100 // purpose: 
101 //=======================================================================
102   Standard_Boolean NMTAlgo_Algo::IsDone()const
103 {
104   return myIsDone;
105 }
106 //=======================================================================
107 // function: ErrorStatus
108 // purpose: 
109 //=======================================================================
110   Standard_Integer NMTAlgo_Algo::ErrorStatus()const
111 {
112   return myErrorStatus;
113 }
114 /*
115 //=======================================================================
116 // function: Compute
117 // purpose: 
118 //=======================================================================
119   void NMTAlgo_Algo::Compute()
120 {
121 }
122 //=======================================================================
123 // function: SetCompositeShape
124 // purpose: 
125 //=======================================================================
126   void NMTAlgo_Algo::SetCompositeShape(const TopoDS_Shape& aS)
127 {
128   myCompositeShape=aS;
129 }
130 //=======================================================================
131 // function: CompositeShape
132 // purpose: 
133 //=======================================================================
134   const TopoDS_Shape& NMTAlgo_Algo::CompositeShape()const
135 {
136   return myCompositeShape;
137 }
138 */