0031687: Draw Harness, ViewerTest - extend command vrenderparams with option updating...
[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   myAffectedPlaneType = XCAFDimTolObjects_ToleranceZoneAffectedPlane_None;
30 }
31
32 //=======================================================================
33 //function : XCAFDimTolObjects_GeomTolerance
34 //purpose  : 
35 //=======================================================================
36
37 XCAFDimTolObjects_GeomToleranceObject::XCAFDimTolObjects_GeomToleranceObject(const Handle(XCAFDimTolObjects_GeomToleranceObject)& theObj)
38 {
39   myType = theObj->myType;
40   myTypeOfValue = theObj->myTypeOfValue;
41   myValue = theObj->myValue;
42   myMatReqModif = theObj->myMatReqModif;
43   myZoneModif = theObj->myZoneModif;
44   myValueOfZoneModif = theObj->myValueOfZoneModif;
45   myModifiers = theObj->myModifiers;
46   myMaxValueModif = theObj->myMaxValueModif;
47   myAxis = theObj->myAxis;
48   myHasAxis = theObj->myHasAxis;
49   myPlane = theObj->myPlane;
50   myPnt= theObj->myPnt;
51   myPntText= theObj->myPntText;
52   myHasPlane = theObj->myHasPlane;
53   myHasPnt = theObj->myHasPnt;
54   myHasPntText = theObj->myHasPntText;
55   mySemanticName = theObj->mySemanticName;
56   myAffectedPlaneType = theObj->myAffectedPlaneType;
57   myAffectedPlane = theObj->myAffectedPlane;
58 }
59
60 //=======================================================================
61 //function : 
62 //purpose  : 
63 //=======================================================================
64
65 Handle(TCollection_HAsciiString) XCAFDimTolObjects_GeomToleranceObject::GetSemanticName() const
66 {
67   return mySemanticName;
68 }
69
70 //=======================================================================
71 //function : 
72 //purpose  : 
73 //=======================================================================
74
75 void XCAFDimTolObjects_GeomToleranceObject::SetSemanticName(const Handle(TCollection_HAsciiString)& theName)
76 {
77   mySemanticName = theName;
78 }
79
80 //=======================================================================
81 //function :
82 //purpose  : 
83 //=======================================================================
84
85 void XCAFDimTolObjects_GeomToleranceObject::SetType (const XCAFDimTolObjects_GeomToleranceType theType) 
86 {
87   myType = theType;
88 }
89
90 //=======================================================================
91 //function :
92 //purpose  : 
93 //=======================================================================
94
95 XCAFDimTolObjects_GeomToleranceType XCAFDimTolObjects_GeomToleranceObject::GetType()  const
96 {
97   return myType;
98 }
99
100 //=======================================================================
101 //function :
102 //purpose  : 
103 //=======================================================================
104
105 void XCAFDimTolObjects_GeomToleranceObject::SetTypeOfValue (const XCAFDimTolObjects_GeomToleranceTypeValue theTypeOfValue) 
106 {
107   myTypeOfValue = theTypeOfValue;
108 }
109
110 //=======================================================================
111 //function :
112 //purpose  : 
113 //=======================================================================
114
115 XCAFDimTolObjects_GeomToleranceTypeValue XCAFDimTolObjects_GeomToleranceObject::GetTypeOfValue()  const
116 {
117   return myTypeOfValue;
118 }
119
120 //=======================================================================
121 //function :
122 //purpose  : 
123 //=======================================================================
124
125 void XCAFDimTolObjects_GeomToleranceObject::SetValue (const Standard_Real theValue) 
126 {
127   myValue = theValue;
128 }
129
130 //=======================================================================
131 //function :
132 //purpose  : 
133 //=======================================================================
134
135 Standard_Real XCAFDimTolObjects_GeomToleranceObject::GetValue()  const
136 {
137   return myValue;
138 }
139
140 //=======================================================================
141 //function :
142 //purpose  : 
143 //=======================================================================
144
145 void XCAFDimTolObjects_GeomToleranceObject::SetMaterialRequirementModifier (const XCAFDimTolObjects_GeomToleranceMatReqModif theMatReqModif) 
146 {
147   myMatReqModif = theMatReqModif;
148 }
149
150 //=======================================================================
151 //function :
152 //purpose  : 
153 //=======================================================================
154
155 XCAFDimTolObjects_GeomToleranceMatReqModif XCAFDimTolObjects_GeomToleranceObject::GetMaterialRequirementModifier()  const
156 {
157   return myMatReqModif;
158 }
159
160 //=======================================================================
161 //function :
162 //purpose  : 
163 //=======================================================================
164
165 void XCAFDimTolObjects_GeomToleranceObject::SetZoneModifier (const XCAFDimTolObjects_GeomToleranceZoneModif theZoneModif) 
166 {
167   myZoneModif = theZoneModif;
168 }
169
170 //=======================================================================
171 //function :
172 //purpose  : 
173 //=======================================================================
174
175 XCAFDimTolObjects_GeomToleranceZoneModif XCAFDimTolObjects_GeomToleranceObject::GetZoneModifier()  const
176 {
177   return myZoneModif;
178 }
179
180 //=======================================================================
181 //function :
182 //purpose  : 
183 //=======================================================================
184
185 void XCAFDimTolObjects_GeomToleranceObject::SetValueOfZoneModifier (const Standard_Real theValue) 
186 {
187   myValueOfZoneModif = theValue;
188 }
189
190 //=======================================================================
191 //function :
192 //purpose  : 
193 //=======================================================================
194
195 Standard_Real XCAFDimTolObjects_GeomToleranceObject::GetValueOfZoneModifier()  const
196 {
197   return myValueOfZoneModif;
198 }
199
200 //=======================================================================
201 //function :
202 //purpose  : 
203 //=======================================================================
204
205 void XCAFDimTolObjects_GeomToleranceObject::SetModifiers (const XCAFDimTolObjects_GeomToleranceModifiersSequence& theModifiers) 
206 {
207   myModifiers = theModifiers;
208 }
209
210 //=======================================================================
211 //function :
212 //purpose  : 
213 //=======================================================================
214
215 void XCAFDimTolObjects_GeomToleranceObject::AddModifier (const XCAFDimTolObjects_GeomToleranceModif theModifier) 
216 {
217   myModifiers.Append(theModifier);
218 }
219
220 //=======================================================================
221 //function :
222 //purpose  : 
223 //=======================================================================
224
225 XCAFDimTolObjects_GeomToleranceModifiersSequence XCAFDimTolObjects_GeomToleranceObject::GetModifiers()  const
226 {
227   return myModifiers;
228 }
229
230 //=======================================================================
231 //function :
232 //purpose  : 
233 //=======================================================================
234
235 void XCAFDimTolObjects_GeomToleranceObject::SetMaxValueModifier (const Standard_Real theModifier) 
236 {
237   myMaxValueModif = theModifier;
238 }
239
240 //=======================================================================
241 //function :
242 //purpose  : 
243 //=======================================================================
244
245 Standard_Real XCAFDimTolObjects_GeomToleranceObject::GetMaxValueModifier()  const
246 {
247   return myMaxValueModif;
248 }
249
250 //=======================================================================
251 //function :
252 //purpose  : 
253 //=======================================================================
254
255 void XCAFDimTolObjects_GeomToleranceObject::SetAxis (const gp_Ax2 theAxis) 
256 {
257   myAxis = theAxis;
258   myHasAxis = Standard_True;
259 }
260
261 //=======================================================================
262 //function :
263 //purpose  : 
264 //=======================================================================
265
266 gp_Ax2 XCAFDimTolObjects_GeomToleranceObject::GetAxis()  const
267 {
268   return myAxis;
269 }
270
271 //=======================================================================
272 //function :
273 //purpose  : 
274 //=======================================================================
275
276 Standard_Boolean XCAFDimTolObjects_GeomToleranceObject::HasAxis () const 
277 {
278   return myHasAxis;
279 }