1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
3 // This file is part of Open CASCADE Technology software library.
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.
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
14 #include <XCAFDimTolObjects_GeomToleranceObject.hxx>
16 //=======================================================================
17 //function : XCAFDimTolObjects_GeomTolerance
19 //=======================================================================
21 XCAFDimTolObjects_GeomToleranceObject::XCAFDimTolObjects_GeomToleranceObject()
23 myHasAxis = Standard_False;
26 //=======================================================================
27 //function : XCAFDimTolObjects_GeomTolerance
29 //=======================================================================
31 XCAFDimTolObjects_GeomToleranceObject::XCAFDimTolObjects_GeomToleranceObject(const Handle(XCAFDimTolObjects_GeomToleranceObject)& theObj)
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;
45 //=======================================================================
48 //=======================================================================
50 void XCAFDimTolObjects_GeomToleranceObject::SetType (const XCAFDimTolObjects_GeomToleranceType theType)
55 //=======================================================================
58 //=======================================================================
60 XCAFDimTolObjects_GeomToleranceType XCAFDimTolObjects_GeomToleranceObject::GetType() const
65 //=======================================================================
68 //=======================================================================
70 void XCAFDimTolObjects_GeomToleranceObject::SetTypeOfValue (const XCAFDimTolObjects_GeomToleranceTypeValue theTypeOfValue)
72 myTypeOfValue = theTypeOfValue;
75 //=======================================================================
78 //=======================================================================
80 XCAFDimTolObjects_GeomToleranceTypeValue XCAFDimTolObjects_GeomToleranceObject::GetTypeOfValue() const
85 //=======================================================================
88 //=======================================================================
90 void XCAFDimTolObjects_GeomToleranceObject::SetValue (const Standard_Real theValue)
95 //=======================================================================
98 //=======================================================================
100 Standard_Real XCAFDimTolObjects_GeomToleranceObject::GetValue() const
105 //=======================================================================
108 //=======================================================================
110 void XCAFDimTolObjects_GeomToleranceObject::SetMaterialRequirementModifier (const XCAFDimTolObjects_GeomToleranceMatReqModif theMatReqModif)
112 myMatReqModif = theMatReqModif;
115 //=======================================================================
118 //=======================================================================
120 XCAFDimTolObjects_GeomToleranceMatReqModif XCAFDimTolObjects_GeomToleranceObject::GetMaterialRequirementModifier() const
122 return myMatReqModif;
125 //=======================================================================
128 //=======================================================================
130 void XCAFDimTolObjects_GeomToleranceObject::SetZoneModifier (const XCAFDimTolObjects_GeomToleranceZoneModif theZoneModif)
132 myZoneModif = theZoneModif;
135 //=======================================================================
138 //=======================================================================
140 XCAFDimTolObjects_GeomToleranceZoneModif XCAFDimTolObjects_GeomToleranceObject::GetZoneModifier() const
145 //=======================================================================
148 //=======================================================================
150 void XCAFDimTolObjects_GeomToleranceObject::SetValueOfZoneModifier (const Standard_Real theValue)
152 myValueOfZoneModif = theValue;
155 //=======================================================================
158 //=======================================================================
160 Standard_Real XCAFDimTolObjects_GeomToleranceObject::GetValueOfZoneModifier() const
162 return myValueOfZoneModif;
165 //=======================================================================
168 //=======================================================================
170 void XCAFDimTolObjects_GeomToleranceObject::SetModifiers (const XCAFDimTolObjects_GeomToleranceModifiersSequence& theModifiers)
172 myModifiers = theModifiers;
175 //=======================================================================
178 //=======================================================================
180 void XCAFDimTolObjects_GeomToleranceObject::AddModifier (const XCAFDimTolObjects_GeomToleranceModif theModifier)
182 myModifiers.Append(theModifier);
185 //=======================================================================
188 //=======================================================================
190 XCAFDimTolObjects_GeomToleranceModifiersSequence XCAFDimTolObjects_GeomToleranceObject::GetModifiers() const
195 //=======================================================================
198 //=======================================================================
200 void XCAFDimTolObjects_GeomToleranceObject::SetMaxValueModifier (const Standard_Real theModifier)
202 myMaxValueModif = theModifier;
205 //=======================================================================
208 //=======================================================================
210 Standard_Real XCAFDimTolObjects_GeomToleranceObject::GetMaxValueModifier() const
212 return myMaxValueModif;
215 //=======================================================================
218 //=======================================================================
220 void XCAFDimTolObjects_GeomToleranceObject::SetAxis (const gp_Ax2 theAxis)
223 myHasAxis = Standard_True;
226 //=======================================================================
229 //=======================================================================
231 gp_Ax2 XCAFDimTolObjects_GeomToleranceObject::GetAxis() const
236 //=======================================================================
239 //=======================================================================
241 Standard_Boolean XCAFDimTolObjects_GeomToleranceObject::HasAxis () const