1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
|
// File: RWStepFEA_RWCurve3dElementProperty.cxx
// Created: Thu Dec 12 17:51:03 2002
// Author: data exchange team
// Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2
// Copyright: Open CASCADE 2002
#include <RWStepFEA_RWCurve3dElementProperty.ixx>
#include <StepFEA_HArray1OfCurveElementInterval.hxx>
#include <StepFEA_CurveElementInterval.hxx>
#include <StepFEA_HArray1OfCurveElementEndOffset.hxx>
#include <StepFEA_CurveElementEndOffset.hxx>
#include <StepFEA_HArray1OfCurveElementEndRelease.hxx>
#include <StepFEA_CurveElementEndRelease.hxx>
//=======================================================================
//function : RWStepFEA_RWCurve3dElementProperty
//purpose :
//=======================================================================
RWStepFEA_RWCurve3dElementProperty::RWStepFEA_RWCurve3dElementProperty ()
{
}
//=======================================================================
//function : ReadStep
//purpose :
//=======================================================================
void RWStepFEA_RWCurve3dElementProperty::ReadStep (const Handle(StepData_StepReaderData)& data,
const Standard_Integer num,
Handle(Interface_Check)& ach,
const Handle(StepFEA_Curve3dElementProperty) &ent) const
{
// Check number of parameters
if ( ! data->CheckNbParams(num,5,ach,"curve3d_element_property") ) return;
// Own fields of Curve3dElementProperty
Handle(TCollection_HAsciiString) aPropertyId;
data->ReadString (num, 1, "property_id", ach, aPropertyId);
Handle(TCollection_HAsciiString) aDescription;
data->ReadString (num, 2, "description", ach, aDescription);
Handle(StepFEA_HArray1OfCurveElementInterval) aIntervalDefinitions;
Standard_Integer sub3 = 0;
if ( data->ReadSubList (num, 3, "interval_definitions", ach, sub3) ) {
Standard_Integer nb0 = data->NbParams(sub3);
aIntervalDefinitions = new StepFEA_HArray1OfCurveElementInterval (1, nb0);
Standard_Integer num2 = sub3;
for ( Standard_Integer i0=1; i0 <= nb0; i0++ ) {
Handle(StepFEA_CurveElementInterval) anIt0;
data->ReadEntity (num2, i0, "curve_element_interval", ach, STANDARD_TYPE(StepFEA_CurveElementInterval), anIt0);
aIntervalDefinitions->SetValue(i0, anIt0);
}
}
Handle(StepFEA_HArray1OfCurveElementEndOffset) aEndOffsets;
Standard_Integer sub4 = 0;
if ( data->ReadSubList (num, 4, "end_offsets", ach, sub4) ) {
Standard_Integer nb0 = data->NbParams(sub4);
aEndOffsets = new StepFEA_HArray1OfCurveElementEndOffset (1, nb0);
Standard_Integer num2 = sub4;
for ( Standard_Integer i0=1; i0 <= nb0; i0++ ) {
Handle(StepFEA_CurveElementEndOffset) anIt0;
data->ReadEntity (num2, i0, "curve_element_end_offset", ach, STANDARD_TYPE(StepFEA_CurveElementEndOffset), anIt0);
aEndOffsets->SetValue(i0, anIt0);
}
}
Handle(StepFEA_HArray1OfCurveElementEndRelease) aEndReleases;
Standard_Integer sub5 = 0;
if ( data->ReadSubList (num, 5, "end_releases", ach, sub5) ) {
Standard_Integer nb0 = data->NbParams(sub5);
aEndReleases = new StepFEA_HArray1OfCurveElementEndRelease (1, nb0);
Standard_Integer num2 = sub5;
for ( Standard_Integer i0=1; i0 <= nb0; i0++ ) {
Handle(StepFEA_CurveElementEndRelease) anIt0;
data->ReadEntity (num2, i0, "curve_element_end_release", ach, STANDARD_TYPE(StepFEA_CurveElementEndRelease), anIt0);
aEndReleases->SetValue(i0, anIt0);
}
}
// Initialize entity
ent->Init(aPropertyId,
aDescription,
aIntervalDefinitions,
aEndOffsets,
aEndReleases);
}
//=======================================================================
//function : WriteStep
//purpose :
//=======================================================================
void RWStepFEA_RWCurve3dElementProperty::WriteStep (StepData_StepWriter& SW,
const Handle(StepFEA_Curve3dElementProperty) &ent) const
{
// Own fields of Curve3dElementProperty
SW.Send (ent->PropertyId());
SW.Send (ent->Description());
SW.OpenSub();
for (Standard_Integer i2=1; i2 <= ent->IntervalDefinitions()->Length(); i2++ ) {
Handle(StepFEA_CurveElementInterval) Var0 = ent->IntervalDefinitions()->Value(i2);
SW.Send (Var0);
}
SW.CloseSub();
SW.OpenSub();
for (Standard_Integer i3=1; i3 <= ent->EndOffsets()->Length(); i3++ ) {
Handle(StepFEA_CurveElementEndOffset) Var0 = ent->EndOffsets()->Value(i3);
SW.Send (Var0);
}
SW.CloseSub();
SW.OpenSub();
for (Standard_Integer i4=1; i4 <= ent->EndReleases()->Length(); i4++ ) {
Handle(StepFEA_CurveElementEndRelease) Var0 = ent->EndReleases()->Value(i4);
SW.Send (Var0);
}
SW.CloseSub();
}
//=======================================================================
//function : Share
//purpose :
//=======================================================================
void RWStepFEA_RWCurve3dElementProperty::Share (const Handle(StepFEA_Curve3dElementProperty) &ent,
Interface_EntityIterator& iter) const
{
// Own fields of Curve3dElementProperty
for (Standard_Integer i1=1; i1 <= ent->IntervalDefinitions()->Length(); i1++ ) {
Handle(StepFEA_CurveElementInterval) Var0 = ent->IntervalDefinitions()->Value(i1);
iter.AddItem (Var0);
}
for (Standard_Integer i2=1; i2 <= ent->EndOffsets()->Length(); i2++ ) {
Handle(StepFEA_CurveElementEndOffset) Var0 = ent->EndOffsets()->Value(i2);
iter.AddItem (Var0);
}
for (Standard_Integer i3=1; i3 <= ent->EndReleases()->Length(); i3++ ) {
Handle(StepFEA_CurveElementEndRelease) Var0 = ent->EndReleases()->Value(i3);
iter.AddItem (Var0);
}
}
|