Salome HOME
Merge from V6_main_20120808 08Aug12
[modules/geom.git] / src / GEOMAlgo / GEOMAlgo_GluerAlgo.cxx
1 // Copyright (C) 2007-2012  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_GluerAlgo.cxx
23 // Created:
24 // Author:      Peter KURNEV
25 //              <peter@PREFEX>
26 //
27 #include <GEOMAlgo_GluerAlgo.hxx>
28 #include <IntTools_Context.hxx>
29
30
31 //=======================================================================
32 //function : GEOMAlgo_GluerAlgo
33 //purpose  :
34 //=======================================================================
35 GEOMAlgo_GluerAlgo::GEOMAlgo_GluerAlgo()
36 {
37   myTolerance=0.0001;
38   myCheckGeometry=Standard_True;
39 }
40 //=======================================================================
41 //function : ~GEOMAlgo_GluerAlgo
42 //purpose  :
43 //=======================================================================
44 GEOMAlgo_GluerAlgo::~GEOMAlgo_GluerAlgo()
45 {
46 }
47 //=======================================================================
48 //function : SetArgument
49 //purpose  :
50 //=======================================================================
51 void GEOMAlgo_GluerAlgo::SetArgument(const TopoDS_Shape& theShape)
52 {
53   myArgument=theShape;
54 }
55 //=======================================================================
56 //function : Argument
57 //purpose  :
58 //=======================================================================
59 const TopoDS_Shape& GEOMAlgo_GluerAlgo::Argument()const
60 {
61   return myArgument;
62 }
63 //=======================================================================
64 //function : SetTolerance
65 //purpose  :
66 //=======================================================================
67 void GEOMAlgo_GluerAlgo::SetTolerance(const Standard_Real aT)
68 {
69   myTolerance=aT;
70 }
71 //=======================================================================
72 //function : Tolerance
73 //purpose  :
74 //=======================================================================
75 Standard_Real GEOMAlgo_GluerAlgo::Tolerance()const
76 {
77   return myTolerance;
78 }
79
80 //=======================================================================
81 //function : SetCheckGeometry
82 //purpose  :
83 //=======================================================================
84 void GEOMAlgo_GluerAlgo::SetCheckGeometry(const Standard_Boolean aFlag)
85 {
86   myCheckGeometry=aFlag;
87 }
88 //=======================================================================
89 //function : CheckGeometry
90 //purpose  :
91 //=======================================================================
92 Standard_Boolean GEOMAlgo_GluerAlgo::CheckGeometry() const
93 {
94   return myCheckGeometry;
95 }
96 //=======================================================================
97 //function : SetContext
98 //purpose  :
99 //=======================================================================
100 void GEOMAlgo_GluerAlgo::SetContext(const Handle(IntTools_Context)& theContext)
101 {
102   myContext=theContext;
103 }
104 //=======================================================================
105 //function : Context
106 //purpose  :
107 //=======================================================================
108 const Handle(IntTools_Context)& GEOMAlgo_GluerAlgo::Context()
109 {
110   return myContext;
111 }
112 //=======================================================================
113 //function : Images
114 //purpose  :
115 //=======================================================================
116 const TopTools_DataMapOfShapeListOfShape& GEOMAlgo_GluerAlgo::Images()const
117 {
118   return myImages;
119 }
120 //=======================================================================
121 //function : Origins
122 //purpose  :
123 //=======================================================================
124 const TopTools_DataMapOfShapeShape& GEOMAlgo_GluerAlgo::Origins()const
125 {
126   return myOrigins;
127 }
128 //=======================================================================
129 //function : Clear
130 //purpose  :
131 //=======================================================================
132 void GEOMAlgo_GluerAlgo::Clear()
133 {
134   myImages.Clear();
135   myOrigins.Clear();
136 }
137 //=======================================================================
138 //function : Perform
139 //purpose  :
140 //=======================================================================
141 void GEOMAlgo_GluerAlgo::Perform()
142 {
143   if (myContext.IsNull()) {
144     myContext=new IntTools_Context;
145   }
146 }