b311480e |
1 | // Created on: 2002-12-12 |
2 | // Created by: data exchange team |
973c2be1 |
3 | // Copyright (c) 2002-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 <Interface_Check.hxx> |
19 | #include <Interface_EntityIterator.hxx> |
20 | #include <RWStepFEA_RWCurveElementIntervalConstant.hxx> |
ec357c5c |
21 | #include <StepBasic_EulerAngles.hxx> |
42cf5bc1 |
22 | #include <StepData_StepReaderData.hxx> |
23 | #include <StepData_StepWriter.hxx> |
ec357c5c |
24 | #include <StepElement_CurveElementSectionDefinition.hxx> |
42cf5bc1 |
25 | #include <StepFEA_CurveElementIntervalConstant.hxx> |
26 | #include <StepFEA_CurveElementLocation.hxx> |
7fd59977 |
27 | |
28 | //======================================================================= |
29 | //function : RWStepFEA_RWCurveElementIntervalConstant |
30 | //purpose : |
31 | //======================================================================= |
7fd59977 |
32 | RWStepFEA_RWCurveElementIntervalConstant::RWStepFEA_RWCurveElementIntervalConstant () |
33 | { |
34 | } |
35 | |
36 | //======================================================================= |
37 | //function : ReadStep |
38 | //purpose : |
39 | //======================================================================= |
40 | |
41 | void RWStepFEA_RWCurveElementIntervalConstant::ReadStep (const Handle(StepData_StepReaderData)& data, |
42 | const Standard_Integer num, |
43 | Handle(Interface_Check)& ach, |
44 | const Handle(StepFEA_CurveElementIntervalConstant) &ent) const |
45 | { |
46 | // Check number of parameters |
47 | if ( ! data->CheckNbParams(num,3,ach,"curve_element_interval_constant") ) return; |
48 | |
49 | // Inherited fields of CurveElementInterval |
50 | |
51 | Handle(StepFEA_CurveElementLocation) aCurveElementInterval_FinishPosition; |
52 | data->ReadEntity (num, 1, "curve_element_interval.finish_position", ach, STANDARD_TYPE(StepFEA_CurveElementLocation), aCurveElementInterval_FinishPosition); |
53 | |
54 | Handle(StepBasic_EulerAngles) aCurveElementInterval_EuAngles; |
55 | data->ReadEntity (num, 2, "curve_element_interval.eu_angles", ach, STANDARD_TYPE(StepBasic_EulerAngles), aCurveElementInterval_EuAngles); |
56 | |
57 | // Own fields of CurveElementIntervalConstant |
58 | |
59 | Handle(StepElement_CurveElementSectionDefinition) aSection; |
60 | data->ReadEntity (num, 3, "section", ach, STANDARD_TYPE(StepElement_CurveElementSectionDefinition), aSection); |
61 | |
62 | // Initialize entity |
63 | ent->Init(aCurveElementInterval_FinishPosition, |
64 | aCurveElementInterval_EuAngles, |
65 | aSection); |
66 | } |
67 | |
68 | //======================================================================= |
69 | //function : WriteStep |
70 | //purpose : |
71 | //======================================================================= |
72 | |
73 | void RWStepFEA_RWCurveElementIntervalConstant::WriteStep (StepData_StepWriter& SW, |
74 | const Handle(StepFEA_CurveElementIntervalConstant) &ent) const |
75 | { |
76 | |
77 | // Inherited fields of CurveElementInterval |
78 | |
79 | SW.Send (ent->StepFEA_CurveElementInterval::FinishPosition()); |
80 | |
81 | SW.Send (ent->StepFEA_CurveElementInterval::EuAngles()); |
82 | |
83 | // Own fields of CurveElementIntervalConstant |
84 | |
85 | SW.Send (ent->Section()); |
86 | } |
87 | |
88 | //======================================================================= |
89 | //function : Share |
90 | //purpose : |
91 | //======================================================================= |
92 | |
93 | void RWStepFEA_RWCurveElementIntervalConstant::Share (const Handle(StepFEA_CurveElementIntervalConstant) &ent, |
94 | Interface_EntityIterator& iter) const |
95 | { |
96 | |
97 | // Inherited fields of CurveElementInterval |
98 | |
99 | iter.AddItem (ent->StepFEA_CurveElementInterval::FinishPosition()); |
100 | |
101 | iter.AddItem (ent->StepFEA_CurveElementInterval::EuAngles()); |
102 | |
103 | // Own fields of CurveElementIntervalConstant |
104 | |
105 | iter.AddItem (ent->Section()); |
106 | } |