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