1 // Created on: 2002-01-04
2 // Created by: data exchange team
3 // Copyright (c) 2002-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1
18 #include <RWStepShape_RWSeamEdge.ixx>
19 #include <StepShape_Edge.hxx>
20 #include <StepGeom_Pcurve.hxx>
22 //=======================================================================
23 //function : RWStepShape_RWSeamEdge
25 //=======================================================================
27 RWStepShape_RWSeamEdge::RWStepShape_RWSeamEdge ()
31 //=======================================================================
34 //=======================================================================
36 void RWStepShape_RWSeamEdge::ReadStep (const Handle(StepData_StepReaderData)& data,
37 const Standard_Integer num,
38 Handle(Interface_Check)& ach,
39 const Handle(StepShape_SeamEdge) &ent) const
41 // Check number of parameters
42 if ( ! data->CheckNbParams(num,6,ach,"seam_edge") ) return;
44 // Inherited fields of RepresentationItem
46 Handle(TCollection_HAsciiString) aRepresentationItem_Name;
47 data->ReadString (num, 1, "representation_item.name", ach, aRepresentationItem_Name);
49 // Inherited fields of Edge
51 Handle(StepShape_Vertex) aEdge_EdgeStart;
52 data->CheckDerived(num, 2, "edge.edge_start", ach,Standard_False);
54 Handle(StepShape_Vertex) aEdge_EdgeEnd;
55 data->CheckDerived (num, 3, "edge.edge_end", ach, Standard_False);
57 // Inherited fields of OrientedEdge
59 Handle(StepShape_Edge) aOrientedEdge_EdgeElement;
60 data->ReadEntity (num, 4, "oriented_edge.edge_element", ach, STANDARD_TYPE(StepShape_Edge), aOrientedEdge_EdgeElement);
62 Standard_Boolean aOrientedEdge_Orientation;
63 data->ReadBoolean (num, 5, "oriented_edge.orientation", ach, aOrientedEdge_Orientation);
65 // Own fields of SeamEdge
67 Handle(StepGeom_Pcurve) aPcurveReference;
68 data->ReadEntity (num, 6, "pcurve_reference", ach, STANDARD_TYPE(StepGeom_Pcurve), aPcurveReference);
72 ent->Init(aRepresentationItem_Name,
73 aOrientedEdge_EdgeElement,
74 aOrientedEdge_Orientation,
78 //=======================================================================
79 //function : WriteStep
81 //=======================================================================
83 void RWStepShape_RWSeamEdge::WriteStep (StepData_StepWriter& SW,
84 const Handle(StepShape_SeamEdge) &ent) const
87 // Inherited fields of RepresentationItem
89 SW.Send (ent->StepRepr_RepresentationItem::Name());
91 // Inherited fields of Edge
93 SW.Send (ent->StepShape_Edge::EdgeStart());
95 SW.Send (ent->StepShape_Edge::EdgeEnd());
97 // Inherited fields of OrientedEdge
99 SW.Send (ent->StepShape_OrientedEdge::EdgeElement());
101 SW.SendBoolean (ent->StepShape_OrientedEdge::Orientation());
103 // Own fields of SeamEdge
105 SW.Send (ent->PcurveReference());
108 //=======================================================================
111 //=======================================================================
113 void RWStepShape_RWSeamEdge::Share (const Handle(StepShape_SeamEdge) &ent,
114 Interface_EntityIterator& iter) const
117 // Inherited fields of RepresentationItem
119 // Inherited fields of Edge
121 iter.AddItem (ent->StepShape_Edge::EdgeStart());
123 iter.AddItem (ent->StepShape_Edge::EdgeEnd());
125 // Inherited fields of OrientedEdge
127 iter.AddItem (ent->StepShape_OrientedEdge::EdgeElement());
129 // Own fields of SeamEdge
131 iter.AddItem (ent->PcurveReference());