b311480e |
1 | // Created on: 2003-06-04 |
2 | // Created by: Galina KULIKOVA |
973c2be1 |
3 | // Copyright (c) 2003-2014 OPEN CASCADE SAS |
b311480e |
4 | // |
973c2be1 |
5 | // This file is part of Open CASCADE Technology software library. |
b311480e |
6 | // |
d5f74e42 |
7 | // This library is free software; you can redistribute it and/or modify it under |
8 | // the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
9 | // by the Free Software Foundation, with special exception defined in the file |
10 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
11 | // distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
12 | // |
973c2be1 |
13 | // Alternatively, this file may be used under the terms of Open CASCADE |
14 | // commercial license or contractual agreement. |
b311480e |
15 | |
7fd59977 |
16 | // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 |
7fd59977 |
17 | |
42cf5bc1 |
18 | #include <Standard_Type.hxx> |
19 | #include <StepBasic_MeasureWithUnit.hxx> |
28a73c1f |
20 | #include <StepDimTol_GeometricToleranceTarget.hxx> |
42cf5bc1 |
21 | #include <StepDimTol_GeometricToleranceWithDatumReference.hxx> |
22 | #include <StepRepr_ShapeAspect.hxx> |
23 | #include <TCollection_HAsciiString.hxx> |
7fd59977 |
24 | |
25 | //======================================================================= |
26 | //function : StepDimTol_GeometricToleranceWithDatumReference |
27 | //purpose : |
28 | //======================================================================= |
7fd59977 |
29 | StepDimTol_GeometricToleranceWithDatumReference::StepDimTol_GeometricToleranceWithDatumReference () |
30 | { |
31 | } |
32 | |
33 | //======================================================================= |
34 | //function : Init |
35 | //purpose : |
36 | //======================================================================= |
37 | |
38 | void StepDimTol_GeometricToleranceWithDatumReference::Init (const Handle(TCollection_HAsciiString) &aGeometricTolerance_Name, |
39 | const Handle(TCollection_HAsciiString) &aGeometricTolerance_Description, |
40 | const Handle(StepBasic_MeasureWithUnit) &aGeometricTolerance_Magnitude, |
41 | const Handle(StepRepr_ShapeAspect) &aGeometricTolerance_TolerancedShapeAspect, |
42 | const Handle(StepDimTol_HArray1OfDatumReference) &aDatumSystem) |
43 | { |
44 | StepDimTol_GeometricTolerance::Init(aGeometricTolerance_Name, |
45 | aGeometricTolerance_Description, |
46 | aGeometricTolerance_Magnitude, |
47 | aGeometricTolerance_TolerancedShapeAspect); |
48 | |
28a73c1f |
49 | theDatumSystem = new StepDimTol_HArray1OfDatumSystemOrReference(aDatumSystem->Lower(), aDatumSystem->Upper()); |
50 | StepDimTol_DatumSystemOrReference anAux; |
51 | for (Standard_Integer i = aDatumSystem->Lower(); i <= aDatumSystem->Upper(); i++) { |
52 | anAux.SetValue(aDatumSystem->Value(i)); |
53 | theDatumSystem->SetValue(i, anAux); |
54 | } |
55 | } |
56 | |
57 | //======================================================================= |
58 | //function : Init |
59 | //purpose : |
60 | //======================================================================= |
61 | |
62 | void StepDimTol_GeometricToleranceWithDatumReference::Init (const Handle(TCollection_HAsciiString) &aGeometricTolerance_Name, |
63 | const Handle(TCollection_HAsciiString) &aGeometricTolerance_Description, |
64 | const Handle(StepBasic_MeasureWithUnit) &aGeometricTolerance_Magnitude, |
65 | const StepDimTol_GeometricToleranceTarget &aGeometricTolerance_TolerancedShapeAspect, |
66 | const Handle(StepDimTol_HArray1OfDatumSystemOrReference) &aDatumSystem) |
67 | { |
68 | StepDimTol_GeometricTolerance::Init(aGeometricTolerance_Name, |
69 | aGeometricTolerance_Description, |
70 | aGeometricTolerance_Magnitude, |
71 | aGeometricTolerance_TolerancedShapeAspect); |
72 | |
7fd59977 |
73 | theDatumSystem = aDatumSystem; |
74 | } |
75 | |
76 | //======================================================================= |
77 | //function : DatumSystem |
78 | //purpose : |
79 | //======================================================================= |
80 | |
81 | Handle(StepDimTol_HArray1OfDatumReference) StepDimTol_GeometricToleranceWithDatumReference::DatumSystem () const |
28a73c1f |
82 | { |
83 | Handle(StepDimTol_HArray1OfDatumReference) aDatumSystem; |
84 | aDatumSystem = new StepDimTol_HArray1OfDatumReference(theDatumSystem->Lower(), theDatumSystem->Upper()); |
85 | for (Standard_Integer i = aDatumSystem->Lower(); i <= aDatumSystem->Upper(); i++) { |
86 | aDatumSystem->SetValue(i, theDatumSystem->Value(i).DatumReference()); |
87 | } |
88 | return aDatumSystem; |
89 | } |
90 | |
91 | //======================================================================= |
92 | //function : DatumSystemAP242 |
93 | //purpose : |
94 | //======================================================================= |
95 | |
96 | Handle(StepDimTol_HArray1OfDatumSystemOrReference) StepDimTol_GeometricToleranceWithDatumReference::DatumSystemAP242 () const |
7fd59977 |
97 | { |
98 | return theDatumSystem; |
99 | } |
100 | |
101 | //======================================================================= |
102 | //function : SetDatumSystem |
103 | //purpose : |
104 | //======================================================================= |
105 | |
106 | void StepDimTol_GeometricToleranceWithDatumReference::SetDatumSystem (const Handle(StepDimTol_HArray1OfDatumReference) &aDatumSystem) |
28a73c1f |
107 | { |
108 | theDatumSystem = new StepDimTol_HArray1OfDatumSystemOrReference(aDatumSystem->Lower(), aDatumSystem->Upper()); |
109 | StepDimTol_DatumSystemOrReference anAux; |
110 | for (Standard_Integer i = aDatumSystem->Lower(); i <= aDatumSystem->Upper(); i++) { |
111 | anAux.SetValue(aDatumSystem->Value(i)); |
112 | theDatumSystem->SetValue(i, anAux); |
113 | } |
114 | } |
115 | |
116 | //======================================================================= |
117 | //function : SetDatumSystem |
118 | //purpose : |
119 | //======================================================================= |
120 | |
121 | void StepDimTol_GeometricToleranceWithDatumReference::SetDatumSystem (const Handle(StepDimTol_HArray1OfDatumSystemOrReference) &aDatumSystem) |
7fd59977 |
122 | { |
123 | theDatumSystem = aDatumSystem; |
124 | } |