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;
58 myPresentation = theObj->myPresentation;
59 myPresentationName = theObj->myPresentationName;
62 //=======================================================================
65 //=======================================================================
67 Handle(TCollection_HAsciiString) XCAFDimTolObjects_GeomToleranceObject::GetSemanticName() const
69 return mySemanticName;
72 //=======================================================================
75 //=======================================================================
77 void XCAFDimTolObjects_GeomToleranceObject::SetSemanticName(const Handle(TCollection_HAsciiString)& theName)
79 mySemanticName = theName;
82 //=======================================================================
85 //=======================================================================
87 void XCAFDimTolObjects_GeomToleranceObject::SetType (const XCAFDimTolObjects_GeomToleranceType theType)
92 //=======================================================================
95 //=======================================================================
97 XCAFDimTolObjects_GeomToleranceType XCAFDimTolObjects_GeomToleranceObject::GetType() const
102 //=======================================================================
105 //=======================================================================
107 void XCAFDimTolObjects_GeomToleranceObject::SetTypeOfValue (const XCAFDimTolObjects_GeomToleranceTypeValue theTypeOfValue)
109 myTypeOfValue = theTypeOfValue;
112 //=======================================================================
115 //=======================================================================
117 XCAFDimTolObjects_GeomToleranceTypeValue XCAFDimTolObjects_GeomToleranceObject::GetTypeOfValue() const
119 return myTypeOfValue;
122 //=======================================================================
125 //=======================================================================
127 void XCAFDimTolObjects_GeomToleranceObject::SetValue (const Standard_Real theValue)
132 //=======================================================================
135 //=======================================================================
137 Standard_Real XCAFDimTolObjects_GeomToleranceObject::GetValue() const
142 //=======================================================================
145 //=======================================================================
147 void XCAFDimTolObjects_GeomToleranceObject::SetMaterialRequirementModifier (const XCAFDimTolObjects_GeomToleranceMatReqModif theMatReqModif)
149 myMatReqModif = theMatReqModif;
152 //=======================================================================
155 //=======================================================================
157 XCAFDimTolObjects_GeomToleranceMatReqModif XCAFDimTolObjects_GeomToleranceObject::GetMaterialRequirementModifier() const
159 return myMatReqModif;
162 //=======================================================================
165 //=======================================================================
167 void XCAFDimTolObjects_GeomToleranceObject::SetZoneModifier (const XCAFDimTolObjects_GeomToleranceZoneModif theZoneModif)
169 myZoneModif = theZoneModif;
172 //=======================================================================
175 //=======================================================================
177 XCAFDimTolObjects_GeomToleranceZoneModif XCAFDimTolObjects_GeomToleranceObject::GetZoneModifier() const
182 //=======================================================================
185 //=======================================================================
187 void XCAFDimTolObjects_GeomToleranceObject::SetValueOfZoneModifier (const Standard_Real theValue)
189 myValueOfZoneModif = theValue;
192 //=======================================================================
195 //=======================================================================
197 Standard_Real XCAFDimTolObjects_GeomToleranceObject::GetValueOfZoneModifier() const
199 return myValueOfZoneModif;
202 //=======================================================================
205 //=======================================================================
207 void XCAFDimTolObjects_GeomToleranceObject::SetModifiers (const XCAFDimTolObjects_GeomToleranceModifiersSequence& theModifiers)
209 myModifiers = theModifiers;
212 //=======================================================================
215 //=======================================================================
217 void XCAFDimTolObjects_GeomToleranceObject::AddModifier (const XCAFDimTolObjects_GeomToleranceModif theModifier)
219 myModifiers.Append(theModifier);
222 //=======================================================================
225 //=======================================================================
227 XCAFDimTolObjects_GeomToleranceModifiersSequence XCAFDimTolObjects_GeomToleranceObject::GetModifiers() const
232 //=======================================================================
235 //=======================================================================
237 void XCAFDimTolObjects_GeomToleranceObject::SetMaxValueModifier (const Standard_Real theModifier)
239 myMaxValueModif = theModifier;
242 //=======================================================================
245 //=======================================================================
247 Standard_Real XCAFDimTolObjects_GeomToleranceObject::GetMaxValueModifier() const
249 return myMaxValueModif;
252 //=======================================================================
255 //=======================================================================
257 void XCAFDimTolObjects_GeomToleranceObject::SetAxis (const gp_Ax2 theAxis)
260 myHasAxis = Standard_True;
263 //=======================================================================
266 //=======================================================================
268 gp_Ax2 XCAFDimTolObjects_GeomToleranceObject::GetAxis() const
273 //=======================================================================
276 //=======================================================================
278 Standard_Boolean XCAFDimTolObjects_GeomToleranceObject::HasAxis () const