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 mySemanticName = theObj->mySemanticName;
56 myAffectedPlaneType = theObj->myAffectedPlaneType;
57 myAffectedPlane = theObj->myAffectedPlane;
60 //=======================================================================
63 //=======================================================================
65 Handle(TCollection_HAsciiString) XCAFDimTolObjects_GeomToleranceObject::GetSemanticName() const
67 return mySemanticName;
70 //=======================================================================
73 //=======================================================================
75 void XCAFDimTolObjects_GeomToleranceObject::SetSemanticName(const Handle(TCollection_HAsciiString)& theName)
77 mySemanticName = theName;
80 //=======================================================================
83 //=======================================================================
85 void XCAFDimTolObjects_GeomToleranceObject::SetType (const XCAFDimTolObjects_GeomToleranceType theType)
90 //=======================================================================
93 //=======================================================================
95 XCAFDimTolObjects_GeomToleranceType XCAFDimTolObjects_GeomToleranceObject::GetType() const
100 //=======================================================================
103 //=======================================================================
105 void XCAFDimTolObjects_GeomToleranceObject::SetTypeOfValue (const XCAFDimTolObjects_GeomToleranceTypeValue theTypeOfValue)
107 myTypeOfValue = theTypeOfValue;
110 //=======================================================================
113 //=======================================================================
115 XCAFDimTolObjects_GeomToleranceTypeValue XCAFDimTolObjects_GeomToleranceObject::GetTypeOfValue() const
117 return myTypeOfValue;
120 //=======================================================================
123 //=======================================================================
125 void XCAFDimTolObjects_GeomToleranceObject::SetValue (const Standard_Real theValue)
130 //=======================================================================
133 //=======================================================================
135 Standard_Real XCAFDimTolObjects_GeomToleranceObject::GetValue() const
140 //=======================================================================
143 //=======================================================================
145 void XCAFDimTolObjects_GeomToleranceObject::SetMaterialRequirementModifier (const XCAFDimTolObjects_GeomToleranceMatReqModif theMatReqModif)
147 myMatReqModif = theMatReqModif;
150 //=======================================================================
153 //=======================================================================
155 XCAFDimTolObjects_GeomToleranceMatReqModif XCAFDimTolObjects_GeomToleranceObject::GetMaterialRequirementModifier() const
157 return myMatReqModif;
160 //=======================================================================
163 //=======================================================================
165 void XCAFDimTolObjects_GeomToleranceObject::SetZoneModifier (const XCAFDimTolObjects_GeomToleranceZoneModif theZoneModif)
167 myZoneModif = theZoneModif;
170 //=======================================================================
173 //=======================================================================
175 XCAFDimTolObjects_GeomToleranceZoneModif XCAFDimTolObjects_GeomToleranceObject::GetZoneModifier() const
180 //=======================================================================
183 //=======================================================================
185 void XCAFDimTolObjects_GeomToleranceObject::SetValueOfZoneModifier (const Standard_Real theValue)
187 myValueOfZoneModif = theValue;
190 //=======================================================================
193 //=======================================================================
195 Standard_Real XCAFDimTolObjects_GeomToleranceObject::GetValueOfZoneModifier() const
197 return myValueOfZoneModif;
200 //=======================================================================
203 //=======================================================================
205 void XCAFDimTolObjects_GeomToleranceObject::SetModifiers (const XCAFDimTolObjects_GeomToleranceModifiersSequence& theModifiers)
207 myModifiers = theModifiers;
210 //=======================================================================
213 //=======================================================================
215 void XCAFDimTolObjects_GeomToleranceObject::AddModifier (const XCAFDimTolObjects_GeomToleranceModif theModifier)
217 myModifiers.Append(theModifier);
220 //=======================================================================
223 //=======================================================================
225 XCAFDimTolObjects_GeomToleranceModifiersSequence XCAFDimTolObjects_GeomToleranceObject::GetModifiers() const
230 //=======================================================================
233 //=======================================================================
235 void XCAFDimTolObjects_GeomToleranceObject::SetMaxValueModifier (const Standard_Real theModifier)
237 myMaxValueModif = theModifier;
240 //=======================================================================
243 //=======================================================================
245 Standard_Real XCAFDimTolObjects_GeomToleranceObject::GetMaxValueModifier() const
247 return myMaxValueModif;
250 //=======================================================================
253 //=======================================================================
255 void XCAFDimTolObjects_GeomToleranceObject::SetAxis (const gp_Ax2 theAxis)
258 myHasAxis = Standard_True;
261 //=======================================================================
264 //=======================================================================
266 gp_Ax2 XCAFDimTolObjects_GeomToleranceObject::GetAxis() const
271 //=======================================================================
274 //=======================================================================
276 Standard_Boolean XCAFDimTolObjects_GeomToleranceObject::HasAxis () const