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.
15 #include <Standard_Type.hxx>
16 #include <StepBasic_MeasureWithUnit.hxx>
17 #include <StepDimTol_GeometricToleranceTarget.hxx>
18 #include <StepDimTol_GeometricToleranceWithDatumReference.hxx>
19 #include <StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol.hxx>
20 #include <StepDimTol_ModifiedGeometricTolerance.hxx>
21 #include <StepDimTol_PositionTolerance.hxx>
22 #include <StepRepr_ShapeAspect.hxx>
23 #include <TCollection_HAsciiString.hxx>
25 IMPLEMENT_STANDARD_RTTIEXT(StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol,StepDimTol_GeometricTolerance)
27 //=======================================================================
28 //function : StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol
30 //=======================================================================
31 StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol::StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol()
36 //=======================================================================
39 //=======================================================================
41 void StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol::Init
42 (const Handle(TCollection_HAsciiString)& aName,
43 const Handle(TCollection_HAsciiString)& aDescription,
44 const Handle(StepBasic_MeasureWithUnit)& aMagnitude,
45 const Handle(StepRepr_ShapeAspect)& aTolerancedShapeAspect,
46 const Handle(StepDimTol_GeometricToleranceWithDatumReference)& aGTWDR,
47 const Handle(StepDimTol_ModifiedGeometricTolerance)& aMGT)
50 SetDescription(aDescription);
51 SetMagnitude(aMagnitude);
52 SetTolerancedShapeAspect(aTolerancedShapeAspect);
53 myGeometricToleranceWithDatumReference = aGTWDR;
54 myModifiedGeometricTolerance = aMGT;
57 //=======================================================================
60 //=======================================================================
62 void StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol::Init
63 (const Handle(TCollection_HAsciiString)& aName,
64 const Handle(TCollection_HAsciiString)& aDescription,
65 const Handle(StepBasic_MeasureWithUnit)& aMagnitude,
66 const StepDimTol_GeometricToleranceTarget& aTolerancedShapeAspect,
67 const Handle(StepDimTol_GeometricToleranceWithDatumReference)& aGTWDR,
68 const Handle(StepDimTol_ModifiedGeometricTolerance)& aMGT)
71 SetDescription(aDescription);
72 SetMagnitude(aMagnitude);
73 SetTolerancedShapeAspect(aTolerancedShapeAspect);
74 myGeometricToleranceWithDatumReference = aGTWDR;
75 myModifiedGeometricTolerance = aMGT;
79 //=======================================================================
80 //function : SetGeometricToleranceWithDatumReference
82 //=======================================================================
84 void StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol::SetGeometricToleranceWithDatumReference
85 (const Handle(StepDimTol_GeometricToleranceWithDatumReference)& aGTWDR)
87 myGeometricToleranceWithDatumReference = aGTWDR;
91 //=======================================================================
92 //function : GetGeometricToleranceWithDatumReference
94 //=======================================================================
96 Handle(StepDimTol_GeometricToleranceWithDatumReference) StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol::GetGeometricToleranceWithDatumReference() const
98 return myGeometricToleranceWithDatumReference;
102 //=======================================================================
103 //function : SetModifiedGeometricTolerance
105 //=======================================================================
107 void StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol::SetModifiedGeometricTolerance
108 (const Handle(StepDimTol_ModifiedGeometricTolerance)& aMGT)
110 myModifiedGeometricTolerance = aMGT;
114 //=======================================================================
115 //function : GetModifiedGeometricTolerance
117 //=======================================================================
119 Handle(StepDimTol_ModifiedGeometricTolerance) StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol::GetModifiedGeometricTolerance() const
121 return myModifiedGeometricTolerance;
125 //=======================================================================
126 //function : SetPositionTolerance
128 //=======================================================================
130 void StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol::SetPositionTolerance
131 (const Handle(StepDimTol_PositionTolerance)& aPT)
133 myPositionTolerance = aPT;
137 //=======================================================================
138 //function : GetPositionTolerance
140 //=======================================================================
142 Handle(StepDimTol_PositionTolerance) StepDimTol_GeoTolAndGeoTolWthDatRefAndModGeoTolAndPosTol::GetPositionTolerance() const
144 return myPositionTolerance;