7fd59977 |
1 | // File: RWStepFEA_RWFeaLinearElasticity.cxx |
2 | // Created: Thu Dec 12 17:51:05 2002 |
3 | // Author: data exchange team |
4 | // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2 |
5 | // Copyright: Open CASCADE 2002 |
6 | |
7 | #include <RWStepFEA_RWFeaLinearElasticity.ixx> |
8 | |
9 | #include <StepFEA_SymmetricTensor43dMember.hxx> |
10 | #include <TColStd_HArray1OfReal.hxx> |
11 | |
12 | |
13 | //======================================================================= |
14 | //function : RWStepFEA_RWFeaLinearElasticity |
15 | //purpose : |
16 | //======================================================================= |
17 | |
18 | RWStepFEA_RWFeaLinearElasticity::RWStepFEA_RWFeaLinearElasticity () |
19 | { |
20 | } |
21 | |
22 | //======================================================================= |
23 | //function : ReadStep |
24 | //purpose : |
25 | //======================================================================= |
26 | |
27 | void RWStepFEA_RWFeaLinearElasticity::ReadStep (const Handle(StepData_StepReaderData)& data, |
28 | const Standard_Integer num, |
29 | Handle(Interface_Check)& ach, |
30 | const Handle(StepFEA_FeaLinearElasticity) &ent) const |
31 | { |
32 | // Check number of parameters |
33 | if ( ! data->CheckNbParams(num,2,ach,"fea_linear_elasticity") ) return; |
34 | |
35 | // Inherited fields of RepresentationItem |
36 | |
37 | Handle(TCollection_HAsciiString) aRepresentationItem_Name; |
38 | data->ReadString (num, 1, "representation_item.name", ach, aRepresentationItem_Name); |
39 | |
40 | // Own fields of FeaLinearElasticity |
41 | |
42 | StepFEA_SymmetricTensor43d aFeaConstants; |
43 | data->ReadEntity (num, 2, "fea_constants", ach, aFeaConstants); |
44 | |
45 | // Initialize entity |
46 | ent->Init(aRepresentationItem_Name, |
47 | aFeaConstants); |
48 | |
49 | } |
50 | |
51 | //======================================================================= |
52 | //function : WriteStep |
53 | //purpose : |
54 | //======================================================================= |
55 | |
56 | void RWStepFEA_RWFeaLinearElasticity::WriteStep (StepData_StepWriter& SW, |
57 | const Handle(StepFEA_FeaLinearElasticity) &ent) const |
58 | { |
59 | |
60 | // Inherited fields of RepresentationItem |
61 | |
62 | SW.Send (ent->StepRepr_RepresentationItem::Name()); |
63 | |
64 | // Own fields of FeaLinearElasticity |
65 | |
66 | SW.Send (ent->FeaConstants().Value()); |
67 | } |
68 | |
69 | //======================================================================= |
70 | //function : Share |
71 | //purpose : |
72 | //======================================================================= |
73 | |
74 | void RWStepFEA_RWFeaLinearElasticity::Share (const Handle(StepFEA_FeaLinearElasticity) &ent, |
75 | Interface_EntityIterator& iter) const |
76 | { |
77 | |
78 | // Inherited fields of RepresentationItem |
79 | |
80 | // Own fields of FeaLinearElasticity |
81 | |
82 | iter.AddItem (ent->FeaConstants().Value()); |
83 | } |