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.
14 #include <RWStepShape_RWOrientedFace.ixx>
15 #include <StepShape_Face.hxx>
16 #include <StepShape_HArray1OfFaceBound.hxx>
17 #include <StepShape_FaceBound.hxx>
20 #include <Interface_EntityIterator.hxx>
23 #include <StepShape_OrientedFace.hxx>
26 RWStepShape_RWOrientedFace::RWStepShape_RWOrientedFace () {}
28 void RWStepShape_RWOrientedFace::ReadStep
29 (const Handle(StepData_StepReaderData)& data,
30 const Standard_Integer num,
31 Handle(Interface_Check)& ach,
32 const Handle(StepShape_OrientedFace)& ent) const
36 // --- Number of Parameter Control ---
38 if (!data->CheckNbParams(num,4,ach,"oriented_face")) return;
40 // --- inherited field : name ---
42 Handle(TCollection_HAsciiString) aName;
43 //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
44 data->ReadString (num,1,"name",ach,aName);
46 // --- inherited field : bounds ---
47 // --- this field is redefined ---
48 //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
49 data->CheckDerived(num,2,"bounds",ach,Standard_False);
51 // --- own field : faceElement ---
53 Handle(StepShape_Face) aFaceElement;
54 //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
55 data->ReadEntity(num, 3,"face_element", ach, STANDARD_TYPE(StepShape_Face), aFaceElement);
57 // --- own field : orientation ---
59 Standard_Boolean aOrientation;
60 //szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
61 data->ReadBoolean (num,4,"orientation",ach,aOrientation);
63 //--- Initialisation of the read entity ---
66 ent->Init(aName, aFaceElement, aOrientation);
70 void RWStepShape_RWOrientedFace::WriteStep
71 (StepData_StepWriter& SW,
72 const Handle(StepShape_OrientedFace)& ent) const
75 // --- inherited field name ---
79 // --- inherited field bounds ---
83 // --- own field : faceElement ---
85 SW.Send(ent->FaceElement());
87 // --- own field : orientation ---
89 SW.SendBoolean(ent->Orientation());
93 void RWStepShape_RWOrientedFace::Share(const Handle(StepShape_OrientedFace)& ent, Interface_EntityIterator& iter) const
96 iter.GetOneItem(ent->FaceElement());