1 // File: RWStepFEA_RWCurveElementIntervalLinearlyVarying.cxx
2 // Created: Wed Jan 22 17:31:43 2003
3 // Author: data exchange team
4 // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2
5 // Copyright: Open CASCADE 2002
7 #include <RWStepFEA_RWCurveElementIntervalLinearlyVarying.ixx>
8 #include <StepElement_HArray1OfCurveElementSectionDefinition.hxx>
9 #include <StepElement_CurveElementSectionDefinition.hxx>
11 //=======================================================================
12 //function : RWStepFEA_RWCurveElementIntervalLinearlyVarying
14 //=======================================================================
16 RWStepFEA_RWCurveElementIntervalLinearlyVarying::RWStepFEA_RWCurveElementIntervalLinearlyVarying ()
20 //=======================================================================
23 //=======================================================================
25 void RWStepFEA_RWCurveElementIntervalLinearlyVarying::ReadStep (const Handle(StepData_StepReaderData)& data,
26 const Standard_Integer num,
27 Handle(Interface_Check)& ach,
28 const Handle(StepFEA_CurveElementIntervalLinearlyVarying) &ent) const
30 // Check number of parameters
31 if ( ! data->CheckNbParams(num,3,ach,"curve_element_interval_linearly_varying") ) return;
33 // Inherited fields of CurveElementInterval
35 Handle(StepFEA_CurveElementLocation) aCurveElementInterval_FinishPosition;
36 data->ReadEntity (num, 1, "curve_element_interval.finish_position", ach, STANDARD_TYPE(StepFEA_CurveElementLocation), aCurveElementInterval_FinishPosition);
38 Handle(StepBasic_EulerAngles) aCurveElementInterval_EuAngles;
39 data->ReadEntity (num, 2, "curve_element_interval.eu_angles", ach, STANDARD_TYPE(StepBasic_EulerAngles), aCurveElementInterval_EuAngles);
41 // Own fields of CurveElementIntervalLinearlyVarying
43 Handle(StepElement_HArray1OfCurveElementSectionDefinition) aSections;
44 Standard_Integer sub3 = 0;
45 if ( data->ReadSubList (num, 3, "sections", ach, sub3) ) {
46 Standard_Integer nb0 = data->NbParams(sub3);
47 aSections = new StepElement_HArray1OfCurveElementSectionDefinition (1, nb0);
48 Standard_Integer num2 = sub3;
49 for ( Standard_Integer i0=1; i0 <= nb0; i0++ ) {
50 Handle(StepElement_CurveElementSectionDefinition) anIt0;
51 data->ReadEntity (num2, i0, "curve_element_section_definition", ach, STANDARD_TYPE(StepElement_CurveElementSectionDefinition), anIt0);
52 aSections->SetValue(i0, anIt0);
57 ent->Init(aCurveElementInterval_FinishPosition,
58 aCurveElementInterval_EuAngles,
62 //=======================================================================
63 //function : WriteStep
65 //=======================================================================
67 void RWStepFEA_RWCurveElementIntervalLinearlyVarying::WriteStep (StepData_StepWriter& SW,
68 const Handle(StepFEA_CurveElementIntervalLinearlyVarying) &ent) const
71 // Inherited fields of CurveElementInterval
73 SW.Send (ent->StepFEA_CurveElementInterval::FinishPosition());
75 SW.Send (ent->StepFEA_CurveElementInterval::EuAngles());
77 // Own fields of CurveElementIntervalLinearlyVarying
80 for (Standard_Integer i2=1; i2 <= ent->Sections()->Length(); i2++ ) {
81 Handle(StepElement_CurveElementSectionDefinition) Var0 = ent->Sections()->Value(i2);
87 //=======================================================================
90 //=======================================================================
92 void RWStepFEA_RWCurveElementIntervalLinearlyVarying::Share (const Handle(StepFEA_CurveElementIntervalLinearlyVarying) &ent,
93 Interface_EntityIterator& iter) const
96 // Inherited fields of CurveElementInterval
98 iter.AddItem (ent->StepFEA_CurveElementInterval::FinishPosition());
100 iter.AddItem (ent->StepFEA_CurveElementInterval::EuAngles());
102 // Own fields of CurveElementIntervalLinearlyVarying
104 for (Standard_Integer i3=1; i3 <= ent->Sections()->Length(); i3++ ) {
105 Handle(StepElement_CurveElementSectionDefinition) Var0 = ent->Sections()->Value(i3);