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;
29 myAffectedPlaneType = XCAFDimTolObjects_ToleranceZoneAffectedPlane_None;
32 //=======================================================================
33 //function : XCAFDimTolObjects_GeomTolerance
35 //=======================================================================
37 XCAFDimTolObjects_GeomToleranceObject::XCAFDimTolObjects_GeomToleranceObject(const Handle(XCAFDimTolObjects_GeomToleranceObject)& theObj)
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;
51 myPntText= theObj->myPntText;
52 myHasPlane = theObj->myHasPlane;
53 myHasPnt = theObj->myHasPnt;
54 myHasPntText = theObj->myHasPntText;
55 myAffectedPlaneType = theObj->myAffectedPlaneType;
56 myAffectedPlane = theObj->myAffectedPlane;
59 //=======================================================================
62 //=======================================================================
64 void XCAFDimTolObjects_GeomToleranceObject::SetType (const XCAFDimTolObjects_GeomToleranceType theType)
69 //=======================================================================
72 //=======================================================================
74 XCAFDimTolObjects_GeomToleranceType XCAFDimTolObjects_GeomToleranceObject::GetType() const
79 //=======================================================================
82 //=======================================================================
84 void XCAFDimTolObjects_GeomToleranceObject::SetTypeOfValue (const XCAFDimTolObjects_GeomToleranceTypeValue theTypeOfValue)
86 myTypeOfValue = theTypeOfValue;
89 //=======================================================================
92 //=======================================================================
94 XCAFDimTolObjects_GeomToleranceTypeValue XCAFDimTolObjects_GeomToleranceObject::GetTypeOfValue() const
99 //=======================================================================
102 //=======================================================================
104 void XCAFDimTolObjects_GeomToleranceObject::SetValue (const Standard_Real theValue)
109 //=======================================================================
112 //=======================================================================
114 Standard_Real XCAFDimTolObjects_GeomToleranceObject::GetValue() const
119 //=======================================================================
122 //=======================================================================
124 void XCAFDimTolObjects_GeomToleranceObject::SetMaterialRequirementModifier (const XCAFDimTolObjects_GeomToleranceMatReqModif theMatReqModif)
126 myMatReqModif = theMatReqModif;
129 //=======================================================================
132 //=======================================================================
134 XCAFDimTolObjects_GeomToleranceMatReqModif XCAFDimTolObjects_GeomToleranceObject::GetMaterialRequirementModifier() const
136 return myMatReqModif;
139 //=======================================================================
142 //=======================================================================
144 void XCAFDimTolObjects_GeomToleranceObject::SetZoneModifier (const XCAFDimTolObjects_GeomToleranceZoneModif theZoneModif)
146 myZoneModif = theZoneModif;
149 //=======================================================================
152 //=======================================================================
154 XCAFDimTolObjects_GeomToleranceZoneModif XCAFDimTolObjects_GeomToleranceObject::GetZoneModifier() const
159 //=======================================================================
162 //=======================================================================
164 void XCAFDimTolObjects_GeomToleranceObject::SetValueOfZoneModifier (const Standard_Real theValue)
166 myValueOfZoneModif = theValue;
169 //=======================================================================
172 //=======================================================================
174 Standard_Real XCAFDimTolObjects_GeomToleranceObject::GetValueOfZoneModifier() const
176 return myValueOfZoneModif;
179 //=======================================================================
182 //=======================================================================
184 void XCAFDimTolObjects_GeomToleranceObject::SetModifiers (const XCAFDimTolObjects_GeomToleranceModifiersSequence& theModifiers)
186 myModifiers = theModifiers;
189 //=======================================================================
192 //=======================================================================
194 void XCAFDimTolObjects_GeomToleranceObject::AddModifier (const XCAFDimTolObjects_GeomToleranceModif theModifier)
196 myModifiers.Append(theModifier);
199 //=======================================================================
202 //=======================================================================
204 XCAFDimTolObjects_GeomToleranceModifiersSequence XCAFDimTolObjects_GeomToleranceObject::GetModifiers() const
209 //=======================================================================
212 //=======================================================================
214 void XCAFDimTolObjects_GeomToleranceObject::SetMaxValueModifier (const Standard_Real theModifier)
216 myMaxValueModif = theModifier;
219 //=======================================================================
222 //=======================================================================
224 Standard_Real XCAFDimTolObjects_GeomToleranceObject::GetMaxValueModifier() const
226 return myMaxValueModif;
229 //=======================================================================
232 //=======================================================================
234 void XCAFDimTolObjects_GeomToleranceObject::SetAxis (const gp_Ax2 theAxis)
237 myHasAxis = Standard_True;
240 //=======================================================================
243 //=======================================================================
245 gp_Ax2 XCAFDimTolObjects_GeomToleranceObject::GetAxis() const
250 //=======================================================================
253 //=======================================================================
255 Standard_Boolean XCAFDimTolObjects_GeomToleranceObject::HasAxis () const