1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
3 // This file is part of Open CASCADE Technology software library.
5 // This library is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU Lesser General Public License version 2.1 as published
7 // by the Free Software Foundation, with special exception defined in the file
8 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 // distribution for complete text of the license and disclaimer of any warranty.
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
15 #include <Interface_Check.hxx>
16 #include <Interface_EntityIterator.hxx>
17 #include <RWStepGeom_RWRectangularTrimmedSurface.hxx>
18 #include <StepData_StepReaderData.hxx>
19 #include <StepData_StepWriter.hxx>
20 #include <StepGeom_RectangularTrimmedSurface.hxx>
21 #include <StepGeom_Surface.hxx>
23 RWStepGeom_RWRectangularTrimmedSurface::RWStepGeom_RWRectangularTrimmedSurface () {}
25 void RWStepGeom_RWRectangularTrimmedSurface::ReadStep
26 (const Handle(StepData_StepReaderData)& data,
27 const Standard_Integer num,
28 Handle(Interface_Check)& ach,
29 const Handle(StepGeom_RectangularTrimmedSurface)& ent) const
33 // --- Number of Parameter Control ---
35 if (!data->CheckNbParams(num,8,ach,"rectangular_trimmed_surface")) return;
37 // --- inherited field : name ---
39 Handle(TCollection_HAsciiString) aName;
40 //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
41 data->ReadString (num,1,"name",ach,aName);
43 // --- own field : basisSurface ---
45 Handle(StepGeom_Surface) aBasisSurface;
46 //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
47 data->ReadEntity(num, 2,"basis_surface", ach, STANDARD_TYPE(StepGeom_Surface), aBasisSurface);
49 // --- own field : u1 ---
52 //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
53 data->ReadReal (num,3,"u1",ach,aU1);
55 // --- own field : u2 ---
58 //szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
59 data->ReadReal (num,4,"u2",ach,aU2);
61 // --- own field : v1 ---
64 //szv#4:S4163:12Mar99 `Standard_Boolean stat5 =` not needed
65 data->ReadReal (num,5,"v1",ach,aV1);
67 // --- own field : v2 ---
70 //szv#4:S4163:12Mar99 `Standard_Boolean stat6 =` not needed
71 data->ReadReal (num,6,"v2",ach,aV2);
73 // --- own field : usense ---
75 Standard_Boolean aUsense;
76 //szv#4:S4163:12Mar99 `Standard_Boolean stat7 =` not needed
77 data->ReadBoolean (num,7,"usense",ach,aUsense);
79 // --- own field : vsense ---
81 Standard_Boolean aVsense;
82 //szv#4:S4163:12Mar99 `Standard_Boolean stat8 =` not needed
83 data->ReadBoolean (num,8,"vsense",ach,aVsense);
85 //--- Initialisation of the read entity ---
88 ent->Init(aName, aBasisSurface, aU1, aU2, aV1, aV2, aUsense, aVsense);
92 void RWStepGeom_RWRectangularTrimmedSurface::WriteStep
93 (StepData_StepWriter& SW,
94 const Handle(StepGeom_RectangularTrimmedSurface)& ent) const
97 // --- inherited field name ---
101 // --- own field : basisSurface ---
103 SW.Send(ent->BasisSurface());
105 // --- own field : u1 ---
109 // --- own field : u2 ---
113 // --- own field : v1 ---
117 // --- own field : v2 ---
121 // --- own field : usense ---
123 SW.SendBoolean(ent->Usense());
125 // --- own field : vsense ---
127 SW.SendBoolean(ent->Vsense());
131 void RWStepGeom_RWRectangularTrimmedSurface::Share(const Handle(StepGeom_RectangularTrimmedSurface)& ent, Interface_EntityIterator& iter) const
134 iter.GetOneItem(ent->BasisSurface());