0029338: Data Exchange - Add Planes for Tolerance zones in Geometric tolerances
[occt.git] / src / XCAFDimTolObjects / XCAFDimTolObjects_GeomToleranceObject.cxx
CommitLineData
9ebaae37 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
92efcf78 16IMPLEMENT_STANDARD_RTTIEXT(XCAFDimTolObjects_GeomToleranceObject,Standard_Transient)
17
9ebaae37 18//=======================================================================
19//function : XCAFDimTolObjects_GeomTolerance
20//purpose :
21//=======================================================================
22
23XCAFDimTolObjects_GeomToleranceObject::XCAFDimTolObjects_GeomToleranceObject()
24{
1c9d3225 25 myHasAxis = Standard_False;
5df609e7 26 myHasPlane = Standard_False;
27 myHasPnt = Standard_False;
28 myHasPntText = Standard_False;
b8bf9595 29 myAffectedPlaneType = XCAFDimTolObjects_ToleranceZoneAffectedPlane_None;
9ebaae37 30}
31
32//=======================================================================
33//function : XCAFDimTolObjects_GeomTolerance
34//purpose :
35//=======================================================================
36
37XCAFDimTolObjects_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;
5df609e7 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;
b8bf9595 55 myAffectedPlaneType = theObj->myAffectedPlaneType;
56 myAffectedPlane = theObj->myAffectedPlane;
9ebaae37 57}
58
59//=======================================================================
60//function :
61//purpose :
62//=======================================================================
63
64void XCAFDimTolObjects_GeomToleranceObject::SetType (const XCAFDimTolObjects_GeomToleranceType theType)
65{
66 myType = theType;
67}
68
69//=======================================================================
70//function :
71//purpose :
72//=======================================================================
73
74XCAFDimTolObjects_GeomToleranceType XCAFDimTolObjects_GeomToleranceObject::GetType() const
75{
76 return myType;
77}
78
79//=======================================================================
80//function :
81//purpose :
82//=======================================================================
83
84void XCAFDimTolObjects_GeomToleranceObject::SetTypeOfValue (const XCAFDimTolObjects_GeomToleranceTypeValue theTypeOfValue)
85{
86 myTypeOfValue = theTypeOfValue;
87}
88
89//=======================================================================
90//function :
91//purpose :
92//=======================================================================
93
94XCAFDimTolObjects_GeomToleranceTypeValue XCAFDimTolObjects_GeomToleranceObject::GetTypeOfValue() const
95{
96 return myTypeOfValue;
97}
98
99//=======================================================================
100//function :
101//purpose :
102//=======================================================================
103
104void XCAFDimTolObjects_GeomToleranceObject::SetValue (const Standard_Real theValue)
105{
106 myValue = theValue;
107}
108
109//=======================================================================
110//function :
111//purpose :
112//=======================================================================
113
114Standard_Real XCAFDimTolObjects_GeomToleranceObject::GetValue() const
115{
116 return myValue;
117}
118
119//=======================================================================
120//function :
121//purpose :
122//=======================================================================
123
124void XCAFDimTolObjects_GeomToleranceObject::SetMaterialRequirementModifier (const XCAFDimTolObjects_GeomToleranceMatReqModif theMatReqModif)
125{
126 myMatReqModif = theMatReqModif;
127}
128
129//=======================================================================
130//function :
131//purpose :
132//=======================================================================
133
134XCAFDimTolObjects_GeomToleranceMatReqModif XCAFDimTolObjects_GeomToleranceObject::GetMaterialRequirementModifier() const
135{
136 return myMatReqModif;
137}
138
139//=======================================================================
140//function :
141//purpose :
142//=======================================================================
143
144void XCAFDimTolObjects_GeomToleranceObject::SetZoneModifier (const XCAFDimTolObjects_GeomToleranceZoneModif theZoneModif)
145{
146 myZoneModif = theZoneModif;
147}
148
149//=======================================================================
150//function :
151//purpose :
152//=======================================================================
153
154XCAFDimTolObjects_GeomToleranceZoneModif XCAFDimTolObjects_GeomToleranceObject::GetZoneModifier() const
155{
156 return myZoneModif;
157}
158
159//=======================================================================
160//function :
161//purpose :
162//=======================================================================
163
164void XCAFDimTolObjects_GeomToleranceObject::SetValueOfZoneModifier (const Standard_Real theValue)
165{
166 myValueOfZoneModif = theValue;
167}
168
169//=======================================================================
170//function :
171//purpose :
172//=======================================================================
173
174Standard_Real XCAFDimTolObjects_GeomToleranceObject::GetValueOfZoneModifier() const
175{
176 return myValueOfZoneModif;
177}
178
179//=======================================================================
180//function :
181//purpose :
182//=======================================================================
183
184void XCAFDimTolObjects_GeomToleranceObject::SetModifiers (const XCAFDimTolObjects_GeomToleranceModifiersSequence& theModifiers)
185{
186 myModifiers = theModifiers;
187}
188
189//=======================================================================
190//function :
191//purpose :
192//=======================================================================
193
194void XCAFDimTolObjects_GeomToleranceObject::AddModifier (const XCAFDimTolObjects_GeomToleranceModif theModifier)
195{
196 myModifiers.Append(theModifier);
197}
198
199//=======================================================================
200//function :
201//purpose :
202//=======================================================================
203
204XCAFDimTolObjects_GeomToleranceModifiersSequence XCAFDimTolObjects_GeomToleranceObject::GetModifiers() const
205{
206 return myModifiers;
207}
208
209//=======================================================================
210//function :
211//purpose :
212//=======================================================================
213
214void XCAFDimTolObjects_GeomToleranceObject::SetMaxValueModifier (const Standard_Real theModifier)
215{
216 myMaxValueModif = theModifier;
217}
218
219//=======================================================================
220//function :
221//purpose :
222//=======================================================================
223
224Standard_Real XCAFDimTolObjects_GeomToleranceObject::GetMaxValueModifier() const
225{
226 return myMaxValueModif;
227}
1c9d3225 228
229//=======================================================================
230//function :
231//purpose :
232//=======================================================================
233
234void XCAFDimTolObjects_GeomToleranceObject::SetAxis (const gp_Ax2 theAxis)
235{
236 myAxis = theAxis;
237 myHasAxis = Standard_True;
238}
239
240//=======================================================================
241//function :
242//purpose :
243//=======================================================================
244
245gp_Ax2 XCAFDimTolObjects_GeomToleranceObject::GetAxis() const
246{
247 return myAxis;
248}
249
250//=======================================================================
251//function :
252//purpose :
253//=======================================================================
254
255Standard_Boolean XCAFDimTolObjects_GeomToleranceObject::HasAxis () const
256{
257 return myHasAxis;
5df609e7 258}