0026689: Necessary to improve STEPCAFControl_Reader to read GD&T data from STEP model...
[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 //=======================================================================
17 //function : XCAFDimTolObjects_GeomTolerance
18 //purpose  : 
19 //=======================================================================
20
21 XCAFDimTolObjects_GeomToleranceObject::XCAFDimTolObjects_GeomToleranceObject()
22 {
23   myHasAxis = Standard_False;
24 }
25
26 //=======================================================================
27 //function : XCAFDimTolObjects_GeomTolerance
28 //purpose  : 
29 //=======================================================================
30
31 XCAFDimTolObjects_GeomToleranceObject::XCAFDimTolObjects_GeomToleranceObject(const Handle(XCAFDimTolObjects_GeomToleranceObject)& theObj)
32 {
33   myType = theObj->myType;
34   myTypeOfValue = theObj->myTypeOfValue;
35   myValue = theObj->myValue;
36   myMatReqModif = theObj->myMatReqModif;
37   myZoneModif = theObj->myZoneModif;
38   myValueOfZoneModif = theObj->myValueOfZoneModif;
39   myModifiers = theObj->myModifiers;
40   myMaxValueModif = theObj->myMaxValueModif;
41   myAxis = theObj->GetAxis();
42   myHasAxis = Standard_False;
43 }
44
45 //=======================================================================
46 //function :
47 //purpose  : 
48 //=======================================================================
49
50 void XCAFDimTolObjects_GeomToleranceObject::SetType (const XCAFDimTolObjects_GeomToleranceType theType) 
51 {
52   myType = theType;
53 }
54
55 //=======================================================================
56 //function :
57 //purpose  : 
58 //=======================================================================
59
60 XCAFDimTolObjects_GeomToleranceType XCAFDimTolObjects_GeomToleranceObject::GetType()  const
61 {
62   return myType;
63 }
64
65 //=======================================================================
66 //function :
67 //purpose  : 
68 //=======================================================================
69
70 void XCAFDimTolObjects_GeomToleranceObject::SetTypeOfValue (const XCAFDimTolObjects_GeomToleranceTypeValue theTypeOfValue) 
71 {
72   myTypeOfValue = theTypeOfValue;
73 }
74
75 //=======================================================================
76 //function :
77 //purpose  : 
78 //=======================================================================
79
80 XCAFDimTolObjects_GeomToleranceTypeValue XCAFDimTolObjects_GeomToleranceObject::GetTypeOfValue()  const
81 {
82   return myTypeOfValue;
83 }
84
85 //=======================================================================
86 //function :
87 //purpose  : 
88 //=======================================================================
89
90 void XCAFDimTolObjects_GeomToleranceObject::SetValue (const Standard_Real theValue) 
91 {
92   myValue = theValue;
93 }
94
95 //=======================================================================
96 //function :
97 //purpose  : 
98 //=======================================================================
99
100 Standard_Real XCAFDimTolObjects_GeomToleranceObject::GetValue()  const
101 {
102   return myValue;
103 }
104
105 //=======================================================================
106 //function :
107 //purpose  : 
108 //=======================================================================
109
110 void XCAFDimTolObjects_GeomToleranceObject::SetMaterialRequirementModifier (const XCAFDimTolObjects_GeomToleranceMatReqModif theMatReqModif) 
111 {
112   myMatReqModif = theMatReqModif;
113 }
114
115 //=======================================================================
116 //function :
117 //purpose  : 
118 //=======================================================================
119
120 XCAFDimTolObjects_GeomToleranceMatReqModif XCAFDimTolObjects_GeomToleranceObject::GetMaterialRequirementModifier()  const
121 {
122   return myMatReqModif;
123 }
124
125 //=======================================================================
126 //function :
127 //purpose  : 
128 //=======================================================================
129
130 void XCAFDimTolObjects_GeomToleranceObject::SetZoneModifier (const XCAFDimTolObjects_GeomToleranceZoneModif theZoneModif) 
131 {
132   myZoneModif = theZoneModif;
133 }
134
135 //=======================================================================
136 //function :
137 //purpose  : 
138 //=======================================================================
139
140 XCAFDimTolObjects_GeomToleranceZoneModif XCAFDimTolObjects_GeomToleranceObject::GetZoneModifier()  const
141 {
142   return myZoneModif;
143 }
144
145 //=======================================================================
146 //function :
147 //purpose  : 
148 //=======================================================================
149
150 void XCAFDimTolObjects_GeomToleranceObject::SetValueOfZoneModifier (const Standard_Real theValue) 
151 {
152   myValueOfZoneModif = theValue;
153 }
154
155 //=======================================================================
156 //function :
157 //purpose  : 
158 //=======================================================================
159
160 Standard_Real XCAFDimTolObjects_GeomToleranceObject::GetValueOfZoneModifier()  const
161 {
162   return myValueOfZoneModif;
163 }
164
165 //=======================================================================
166 //function :
167 //purpose  : 
168 //=======================================================================
169
170 void XCAFDimTolObjects_GeomToleranceObject::SetModifiers (const XCAFDimTolObjects_GeomToleranceModifiersSequence& theModifiers) 
171 {
172   myModifiers = theModifiers;
173 }
174
175 //=======================================================================
176 //function :
177 //purpose  : 
178 //=======================================================================
179
180 void XCAFDimTolObjects_GeomToleranceObject::AddModifier (const XCAFDimTolObjects_GeomToleranceModif theModifier) 
181 {
182   myModifiers.Append(theModifier);
183 }
184
185 //=======================================================================
186 //function :
187 //purpose  : 
188 //=======================================================================
189
190 XCAFDimTolObjects_GeomToleranceModifiersSequence XCAFDimTolObjects_GeomToleranceObject::GetModifiers()  const
191 {
192   return myModifiers;
193 }
194
195 //=======================================================================
196 //function :
197 //purpose  : 
198 //=======================================================================
199
200 void XCAFDimTolObjects_GeomToleranceObject::SetMaxValueModifier (const Standard_Real theModifier) 
201 {
202   myMaxValueModif = theModifier;
203 }
204
205 //=======================================================================
206 //function :
207 //purpose  : 
208 //=======================================================================
209
210 Standard_Real XCAFDimTolObjects_GeomToleranceObject::GetMaxValueModifier()  const
211 {
212   return myMaxValueModif;
213 }
214
215 //=======================================================================
216 //function :
217 //purpose  : 
218 //=======================================================================
219
220 void XCAFDimTolObjects_GeomToleranceObject::SetAxis (const gp_Ax2 theAxis) 
221 {
222   myAxis = theAxis;
223   myHasAxis = Standard_True;
224 }
225
226 //=======================================================================
227 //function :
228 //purpose  : 
229 //=======================================================================
230
231 gp_Ax2 XCAFDimTolObjects_GeomToleranceObject::GetAxis()  const
232 {
233   return myAxis;
234 }
235
236 //=======================================================================
237 //function :
238 //purpose  : 
239 //=======================================================================
240
241 Standard_Boolean XCAFDimTolObjects_GeomToleranceObject::HasAxis () const 
242 {
243   return myHasAxis;
244 }