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