]> SALOME platform Git repositories - modules/geom.git/blob - src/GEOMAlgo/GEOMAlgo_ShapeAlgo.cxx
Salome HOME
Fix Makefile.am
[modules/geom.git] / src / GEOMAlgo / GEOMAlgo_ShapeAlgo.cxx
1 // Copyright (C) 2007-2011  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_ShapeAlgo.cxx
23 // Created:     Tue Dec  7 12:06:54 2004
24 // Author:      Peter KURNEV
25
26 #include <GEOMAlgo_ShapeAlgo.ixx>
27
28 #include <Basics_OCCTVersion.hxx>
29
30 //=======================================================================
31 //function : GEOMAlgo_ShapeAlgo
32 //purpose  : 
33 //=======================================================================
34 GEOMAlgo_ShapeAlgo::GEOMAlgo_ShapeAlgo()
35   : GEOMAlgo_Algo()
36 {
37   myTolerance=0.0001;
38 }
39        
40 //=======================================================================
41 //function : ~
42 //purpose  : 
43 //=======================================================================
44 GEOMAlgo_ShapeAlgo::~GEOMAlgo_ShapeAlgo()
45 {
46 }
47
48 #if OCC_VERSION_LARGE > 0x06050200
49 //=======================================================================
50 //function : SetContext
51 //purpose  : 
52 //=======================================================================
53 void GEOMAlgo_ShapeAlgo::SetContext(const Handle(IntTools_Context)& theContext)
54 {
55   myContext=theContext;
56 }
57
58 //=======================================================================
59 //function : Context
60 //purpose  : 
61 //=======================================================================
62 const Handle(IntTools_Context)& GEOMAlgo_ShapeAlgo::Context()const 
63 {
64   return myContext;
65 }
66
67 //=======================================================================
68 //function : Perform
69 //purpose  : 
70 //=======================================================================
71 void GEOMAlgo_ShapeAlgo::Perform()
72 {
73   if (myContext.IsNull()) {
74     myContext=new IntTools_Context;
75   }
76 }
77 #endif
78
79 //=======================================================================
80 //function : SetShape
81 //purpose  : 
82 //=======================================================================
83 void GEOMAlgo_ShapeAlgo::SetShape(const TopoDS_Shape& aS)
84 {
85   myShape=aS;
86 }
87 //=======================================================================
88 //function : Shape
89 //purpose  : 
90 //=======================================================================
91 const TopoDS_Shape& GEOMAlgo_ShapeAlgo::Shape()const
92 {
93   return myShape;
94 }
95 //=======================================================================
96 //function : SetTolerance
97 //purpose  : 
98 //=======================================================================
99 void GEOMAlgo_ShapeAlgo::SetTolerance(const Standard_Real aT)
100 {
101   myTolerance=aT;
102 }
103 //=======================================================================
104 //function : Tolerance
105 //purpose  : 
106 //=======================================================================
107 Standard_Real GEOMAlgo_ShapeAlgo::Tolerance()const
108 {
109   return myTolerance;
110 }
111 //=======================================================================
112 //function : Result
113 //purpose  : 
114 //=======================================================================
115 const TopoDS_Shape& GEOMAlgo_ShapeAlgo::Result()const
116 {
117   return myResult;
118 }