0023022: This is desirable to access OpenGl extensions and core API (1.2+) in one...
[occt.git] / src / RWStepShape / RWStepShape_RWExtrudedFaceSolid.cxx
CommitLineData
7fd59977 1
2#include <RWStepShape_RWExtrudedFaceSolid.ixx>
3#include <StepGeom_Direction.hxx>
4#include <StepShape_FaceSurface.hxx>
5
6#include <Interface_EntityIterator.hxx>
7
8
9#include <StepShape_ExtrudedFaceSolid.hxx>
10
11
12RWStepShape_RWExtrudedFaceSolid::RWStepShape_RWExtrudedFaceSolid () {}
13
14void RWStepShape_RWExtrudedFaceSolid::ReadStep
15 (const Handle(StepData_StepReaderData)& data,
16 const Standard_Integer num,
17 Handle(Interface_Check)& ach,
18 const Handle(StepShape_ExtrudedFaceSolid)& ent) const
19{
20
21
22 // --- Number of Parameter Control ---
23
24 if (!data->CheckNbParams(num,4,ach,"extruded_face_solid")) return;
25
26 // --- inherited field : name ---
27
28 Handle(TCollection_HAsciiString) aName;
29 //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
30 data->ReadString (num,1,"name",ach,aName);
31
32 // --- inherited field : sweptFace ---
33
34 Handle(StepShape_FaceSurface) aSweptFace;
35 //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
36 data->ReadEntity(num, 2,"swept_face", ach, STANDARD_TYPE(StepShape_FaceSurface), aSweptFace);
37
38 // --- own field : extrudedDirection ---
39
40 Handle(StepGeom_Direction) aExtrudedDirection;
41 //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
42 data->ReadEntity(num, 3,"extruded_direction", ach, STANDARD_TYPE(StepGeom_Direction), aExtrudedDirection);
43
44 // --- own field : depth ---
45
46 Standard_Real aDepth;
47 //szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
48 data->ReadReal (num,4,"depth",ach,aDepth);
49
50 //--- Initialisation of the read entity ---
51
52 ent->Init(aName, aSweptFace, aExtrudedDirection, aDepth);
53}
54
55
56void RWStepShape_RWExtrudedFaceSolid::WriteStep
57 (StepData_StepWriter& SW,
58 const Handle(StepShape_ExtrudedFaceSolid)& ent) const
59{
60
61 // --- inherited field name ---
62
63 SW.Send(ent->Name());
64
65 // --- inherited field sweptFace ---
66
67 SW.Send(ent->SweptFace());
68
69 // --- own field : extrudedDirection ---
70
71 SW.Send(ent->ExtrudedDirection());
72
73 // --- own field : depth ---
74
75 SW.Send(ent->Depth());
76}
77
78
79void RWStepShape_RWExtrudedFaceSolid::Share(const Handle(StepShape_ExtrudedFaceSolid)& ent, Interface_EntityIterator& iter) const
80{
81
82 iter.GetOneItem(ent->SweptFace());
83 iter.GetOneItem(ent->ExtrudedDirection());
84}
85