summaryrefslogtreecommitdiff
path: root/src/RWStepElement/RWStepElement_RWUniformSurfaceSection.cxx
blob: 0d572020b1cf5dbf2041ca04474205402b42e83b (plain)
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
// File:	RWStepElement_RWUniformSurfaceSection.cxx
// Created:	Thu Dec 12 17:29:05 2002 
// Author:	data exchange team
// Generator:	ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.2
// Copyright:	Open CASCADE 2002

#include <RWStepElement_RWUniformSurfaceSection.ixx>

//=======================================================================
//function : RWStepElement_RWUniformSurfaceSection
//purpose  : 
//=======================================================================

RWStepElement_RWUniformSurfaceSection::RWStepElement_RWUniformSurfaceSection ()
{
}

//=======================================================================
//function : ReadStep
//purpose  : 
//=======================================================================

void RWStepElement_RWUniformSurfaceSection::ReadStep (const Handle(StepData_StepReaderData)& data,
                                                      const Standard_Integer num,
                                                      Handle(Interface_Check)& ach,
                                                      const Handle(StepElement_UniformSurfaceSection) &ent) const
{
  // Check number of parameters
  if ( ! data->CheckNbParams(num,6,ach,"uniform_surface_section") ) return;

  // Inherited fields of SurfaceSection

  StepElement_MeasureOrUnspecifiedValue aSurfaceSection_Offset;
  data->ReadEntity (num, 1, "surface_section.offset", ach, aSurfaceSection_Offset);

  StepElement_MeasureOrUnspecifiedValue aSurfaceSection_NonStructuralMass;
  data->ReadEntity (num, 2, "surface_section.non_structural_mass", ach, aSurfaceSection_NonStructuralMass);

  StepElement_MeasureOrUnspecifiedValue aSurfaceSection_NonStructuralMassOffset;
  data->ReadEntity (num, 3, "surface_section.non_structural_mass_offset", ach, aSurfaceSection_NonStructuralMassOffset);

  // Own fields of UniformSurfaceSection

  Standard_Real aThickness;
  data->ReadReal (num, 4, "thickness", ach, aThickness);

  StepElement_MeasureOrUnspecifiedValue aBendingThickness;
  data->ReadEntity (num, 5, "bending_thickness", ach, aBendingThickness);

  StepElement_MeasureOrUnspecifiedValue aShearThickness;
  data->ReadEntity (num, 6, "shear_thickness", ach, aShearThickness);

  // Initialize entity
  ent->Init(aSurfaceSection_Offset,
            aSurfaceSection_NonStructuralMass,
            aSurfaceSection_NonStructuralMassOffset,
            aThickness,
            aBendingThickness,
            aShearThickness);
}

//=======================================================================
//function : WriteStep
//purpose  : 
//=======================================================================

void RWStepElement_RWUniformSurfaceSection::WriteStep (StepData_StepWriter& SW,
                                                       const Handle(StepElement_UniformSurfaceSection) &ent) const
{

  // Inherited fields of SurfaceSection

  SW.Send (ent->StepElement_SurfaceSection::Offset().Value());

  SW.Send (ent->StepElement_SurfaceSection::NonStructuralMass().Value());

  SW.Send (ent->StepElement_SurfaceSection::NonStructuralMassOffset().Value());

  // Own fields of UniformSurfaceSection

  SW.Send (ent->Thickness());

  SW.Send (ent->BendingThickness().Value());

  SW.Send (ent->ShearThickness().Value());
}

//=======================================================================
//function : Share
//purpose  : 
//=======================================================================

void RWStepElement_RWUniformSurfaceSection::Share (const Handle(StepElement_UniformSurfaceSection) &ent,
                                                   Interface_EntityIterator& iter) const
{

  // Inherited fields of SurfaceSection
/*  CKY 17JUN04. Content is made of REAL and ENUM. No entity !
  iter.AddItem (ent->StepElement_SurfaceSection::Offset().Value());

  iter.AddItem (ent->StepElement_SurfaceSection::NonStructuralMass().Value());

  iter.AddItem (ent->StepElement_SurfaceSection::NonStructuralMassOffset().Value());

  // Own fields of UniformSurfaceSection

  iter.AddItem (ent->BendingThickness().Value());

  iter.AddItem (ent->ShearThickness().Value());
*/
}