f1e5c77dd00a0b10f1141991edcfea14470b3477
[occt.git] / src / XCAFDimTolObjects / XCAFDimTolObjects_GeomToleranceObject.cxx
1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
2 //
3 // This file is part of Open CASCADE Technology software library.
4 //
5 // This library is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU Lesser General Public License version 2.1 as published
7 // by the Free Software Foundation, with special exception defined in the file
8 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 // distribution for complete text of the license and disclaimer of any warranty.
10 //
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
13
14 #include <XCAFDimTolObjects_GeomToleranceObject.hxx>
15
16 IMPLEMENT_STANDARD_RTTIEXT(XCAFDimTolObjects_GeomToleranceObject,Standard_Transient)
17
18 //=======================================================================
19 //function : XCAFDimTolObjects_GeomTolerance
20 //purpose  : 
21 //=======================================================================
22
23 XCAFDimTolObjects_GeomToleranceObject::XCAFDimTolObjects_GeomToleranceObject()
24 {
25   myHasAxis = Standard_False;
26   myHasPlane = Standard_False;
27   myHasPnt = Standard_False;
28   myHasPntText = Standard_False;
29 }
30
31 //=======================================================================
32 //function : XCAFDimTolObjects_GeomTolerance
33 //purpose  : 
34 //=======================================================================
35
36 XCAFDimTolObjects_GeomToleranceObject::XCAFDimTolObjects_GeomToleranceObject(const Handle(XCAFDimTolObjects_GeomToleranceObject)& theObj)
37 {
38   myType = theObj->myType;
39   myTypeOfValue = theObj->myTypeOfValue;
40   myValue = theObj->myValue;
41   myMatReqModif = theObj->myMatReqModif;
42   myZoneModif = theObj->myZoneModif;
43   myValueOfZoneModif = theObj->myValueOfZoneModif;
44   myModifiers = theObj->myModifiers;
45   myMaxValueModif = theObj->myMaxValueModif;
46   myAxis = theObj->myAxis;
47   myHasAxis = theObj->myHasAxis;
48   myPlane = theObj->myPlane;
49   myPnt= theObj->myPnt;
50   myPntText= theObj->myPntText;
51   myHasPlane = theObj->myHasPlane;
52   myHasPnt = theObj->myHasPnt;
53   myHasPntText = theObj->myHasPntText;
54 }
55
56 //=======================================================================
57 //function :
58 //purpose  : 
59 //=======================================================================
60
61 void XCAFDimTolObjects_GeomToleranceObject::SetType (const XCAFDimTolObjects_GeomToleranceType theType) 
62 {
63   myType = theType;
64 }
65
66 //=======================================================================
67 //function :
68 //purpose  : 
69 //=======================================================================
70
71 XCAFDimTolObjects_GeomToleranceType XCAFDimTolObjects_GeomToleranceObject::GetType()  const
72 {
73   return myType;
74 }
75
76 //=======================================================================
77 //function :
78 //purpose  : 
79 //=======================================================================
80
81 void XCAFDimTolObjects_GeomToleranceObject::SetTypeOfValue (const XCAFDimTolObjects_GeomToleranceTypeValue theTypeOfValue) 
82 {
83   myTypeOfValue = theTypeOfValue;
84 }
85
86 //=======================================================================
87 //function :
88 //purpose  : 
89 //=======================================================================
90
91 XCAFDimTolObjects_GeomToleranceTypeValue XCAFDimTolObjects_GeomToleranceObject::GetTypeOfValue()  const
92 {
93   return myTypeOfValue;
94 }
95
96 //=======================================================================
97 //function :
98 //purpose  : 
99 //=======================================================================
100
101 void XCAFDimTolObjects_GeomToleranceObject::SetValue (const Standard_Real theValue) 
102 {
103   myValue = theValue;
104 }
105
106 //=======================================================================
107 //function :
108 //purpose  : 
109 //=======================================================================
110
111 Standard_Real XCAFDimTolObjects_GeomToleranceObject::GetValue()  const
112 {
113   return myValue;
114 }
115
116 //=======================================================================
117 //function :
118 //purpose  : 
119 //=======================================================================
120
121 void XCAFDimTolObjects_GeomToleranceObject::SetMaterialRequirementModifier (const XCAFDimTolObjects_GeomToleranceMatReqModif theMatReqModif) 
122 {
123   myMatReqModif = theMatReqModif;
124 }
125
126 //=======================================================================
127 //function :
128 //purpose  : 
129 //=======================================================================
130
131 XCAFDimTolObjects_GeomToleranceMatReqModif XCAFDimTolObjects_GeomToleranceObject::GetMaterialRequirementModifier()  const
132 {
133   return myMatReqModif;
134 }
135
136 //=======================================================================
137 //function :
138 //purpose  : 
139 //=======================================================================
140
141 void XCAFDimTolObjects_GeomToleranceObject::SetZoneModifier (const XCAFDimTolObjects_GeomToleranceZoneModif theZoneModif) 
142 {
143   myZoneModif = theZoneModif;
144 }
145
146 //=======================================================================
147 //function :
148 //purpose  : 
149 //=======================================================================
150
151 XCAFDimTolObjects_GeomToleranceZoneModif XCAFDimTolObjects_GeomToleranceObject::GetZoneModifier()  const
152 {
153   return myZoneModif;
154 }
155
156 //=======================================================================
157 //function :
158 //purpose  : 
159 //=======================================================================
160
161 void XCAFDimTolObjects_GeomToleranceObject::SetValueOfZoneModifier (const Standard_Real theValue) 
162 {
163   myValueOfZoneModif = theValue;
164 }
165
166 //=======================================================================
167 //function :
168 //purpose  : 
169 //=======================================================================
170
171 Standard_Real XCAFDimTolObjects_GeomToleranceObject::GetValueOfZoneModifier()  const
172 {
173   return myValueOfZoneModif;
174 }
175
176 //=======================================================================
177 //function :
178 //purpose  : 
179 //=======================================================================
180
181 void XCAFDimTolObjects_GeomToleranceObject::SetModifiers (const XCAFDimTolObjects_GeomToleranceModifiersSequence& theModifiers) 
182 {
183   myModifiers = theModifiers;
184 }
185
186 //=======================================================================
187 //function :
188 //purpose  : 
189 //=======================================================================
190
191 void XCAFDimTolObjects_GeomToleranceObject::AddModifier (const XCAFDimTolObjects_GeomToleranceModif theModifier) 
192 {
193   myModifiers.Append(theModifier);
194 }
195
196 //=======================================================================
197 //function :
198 //purpose  : 
199 //=======================================================================
200
201 XCAFDimTolObjects_GeomToleranceModifiersSequence XCAFDimTolObjects_GeomToleranceObject::GetModifiers()  const
202 {
203   return myModifiers;
204 }
205
206 //=======================================================================
207 //function :
208 //purpose  : 
209 //=======================================================================
210
211 void XCAFDimTolObjects_GeomToleranceObject::SetMaxValueModifier (const Standard_Real theModifier) 
212 {
213   myMaxValueModif = theModifier;
214 }
215
216 //=======================================================================
217 //function :
218 //purpose  : 
219 //=======================================================================
220
221 Standard_Real XCAFDimTolObjects_GeomToleranceObject::GetMaxValueModifier()  const
222 {
223   return myMaxValueModif;
224 }
225
226 //=======================================================================
227 //function :
228 //purpose  : 
229 //=======================================================================
230
231 void XCAFDimTolObjects_GeomToleranceObject::SetAxis (const gp_Ax2 theAxis) 
232 {
233   myAxis = theAxis;
234   myHasAxis = Standard_True;
235 }
236
237 //=======================================================================
238 //function :
239 //purpose  : 
240 //=======================================================================
241
242 gp_Ax2 XCAFDimTolObjects_GeomToleranceObject::GetAxis()  const
243 {
244   return myAxis;
245 }
246
247 //=======================================================================
248 //function :
249 //purpose  : 
250 //=======================================================================
251
252 Standard_Boolean XCAFDimTolObjects_GeomToleranceObject::HasAxis () const 
253 {
254   return myHasAxis;
255 }