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 IMPLEMENT_STANDARD_RTTIEXT(XCAFDimTolObjects_GeomToleranceObject,Standard_Transient)
18 //=======================================================================
19 //function : XCAFDimTolObjects_GeomTolerance
21 //=======================================================================
23 XCAFDimTolObjects_GeomToleranceObject::XCAFDimTolObjects_GeomToleranceObject()
25 myHasAxis = Standard_False;
26 myHasPlane = Standard_False;
27 myHasPnt = Standard_False;
28 myHasPntText = Standard_False;
31 //=======================================================================
32 //function : XCAFDimTolObjects_GeomTolerance
34 //=======================================================================
36 XCAFDimTolObjects_GeomToleranceObject::XCAFDimTolObjects_GeomToleranceObject(const Handle(XCAFDimTolObjects_GeomToleranceObject)& theObj)
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;
50 myPntText= theObj->myPntText;
51 myHasPlane = theObj->myHasPlane;
52 myHasPnt = theObj->myHasPnt;
53 myHasPntText = theObj->myHasPntText;
56 //=======================================================================
59 //=======================================================================
61 void XCAFDimTolObjects_GeomToleranceObject::SetType (const XCAFDimTolObjects_GeomToleranceType theType)
66 //=======================================================================
69 //=======================================================================
71 XCAFDimTolObjects_GeomToleranceType XCAFDimTolObjects_GeomToleranceObject::GetType() const
76 //=======================================================================
79 //=======================================================================
81 void XCAFDimTolObjects_GeomToleranceObject::SetTypeOfValue (const XCAFDimTolObjects_GeomToleranceTypeValue theTypeOfValue)
83 myTypeOfValue = theTypeOfValue;
86 //=======================================================================
89 //=======================================================================
91 XCAFDimTolObjects_GeomToleranceTypeValue XCAFDimTolObjects_GeomToleranceObject::GetTypeOfValue() const
96 //=======================================================================
99 //=======================================================================
101 void XCAFDimTolObjects_GeomToleranceObject::SetValue (const Standard_Real theValue)
106 //=======================================================================
109 //=======================================================================
111 Standard_Real XCAFDimTolObjects_GeomToleranceObject::GetValue() const
116 //=======================================================================
119 //=======================================================================
121 void XCAFDimTolObjects_GeomToleranceObject::SetMaterialRequirementModifier (const XCAFDimTolObjects_GeomToleranceMatReqModif theMatReqModif)
123 myMatReqModif = theMatReqModif;
126 //=======================================================================
129 //=======================================================================
131 XCAFDimTolObjects_GeomToleranceMatReqModif XCAFDimTolObjects_GeomToleranceObject::GetMaterialRequirementModifier() const
133 return myMatReqModif;
136 //=======================================================================
139 //=======================================================================
141 void XCAFDimTolObjects_GeomToleranceObject::SetZoneModifier (const XCAFDimTolObjects_GeomToleranceZoneModif theZoneModif)
143 myZoneModif = theZoneModif;
146 //=======================================================================
149 //=======================================================================
151 XCAFDimTolObjects_GeomToleranceZoneModif XCAFDimTolObjects_GeomToleranceObject::GetZoneModifier() const
156 //=======================================================================
159 //=======================================================================
161 void XCAFDimTolObjects_GeomToleranceObject::SetValueOfZoneModifier (const Standard_Real theValue)
163 myValueOfZoneModif = theValue;
166 //=======================================================================
169 //=======================================================================
171 Standard_Real XCAFDimTolObjects_GeomToleranceObject::GetValueOfZoneModifier() const
173 return myValueOfZoneModif;
176 //=======================================================================
179 //=======================================================================
181 void XCAFDimTolObjects_GeomToleranceObject::SetModifiers (const XCAFDimTolObjects_GeomToleranceModifiersSequence& theModifiers)
183 myModifiers = theModifiers;
186 //=======================================================================
189 //=======================================================================
191 void XCAFDimTolObjects_GeomToleranceObject::AddModifier (const XCAFDimTolObjects_GeomToleranceModif theModifier)
193 myModifiers.Append(theModifier);
196 //=======================================================================
199 //=======================================================================
201 XCAFDimTolObjects_GeomToleranceModifiersSequence XCAFDimTolObjects_GeomToleranceObject::GetModifiers() const
206 //=======================================================================
209 //=======================================================================
211 void XCAFDimTolObjects_GeomToleranceObject::SetMaxValueModifier (const Standard_Real theModifier)
213 myMaxValueModif = theModifier;
216 //=======================================================================
219 //=======================================================================
221 Standard_Real XCAFDimTolObjects_GeomToleranceObject::GetMaxValueModifier() const
223 return myMaxValueModif;
226 //=======================================================================
229 //=======================================================================
231 void XCAFDimTolObjects_GeomToleranceObject::SetAxis (const gp_Ax2 theAxis)
234 myHasAxis = Standard_True;
237 //=======================================================================
240 //=======================================================================
242 gp_Ax2 XCAFDimTolObjects_GeomToleranceObject::GetAxis() const
247 //=======================================================================
250 //=======================================================================
252 Standard_Boolean XCAFDimTolObjects_GeomToleranceObject::HasAxis () const