b311480e |
1 | // Created on: 2002-01-04 |
2 | // Created by: data exchange team |
973c2be1 |
3 | // Copyright (c) 2002-2014 OPEN CASCADE SAS |
b311480e |
4 | // |
973c2be1 |
5 | // This file is part of Open CASCADE Technology software library. |
b311480e |
6 | // |
973c2be1 |
7 | // This library is free software; you can redistribute it and / or modify it |
8 | // under the terms of the GNU Lesser General Public 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. |
b311480e |
12 | // |
973c2be1 |
13 | // Alternatively, this file may be used under the terms of Open CASCADE |
14 | // commercial license or contractual agreement. |
b311480e |
15 | |
7fd59977 |
16 | // Generator: ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1 |
7fd59977 |
17 | |
18 | #include <RWStepShape_RWSeamEdge.ixx> |
19 | |
20 | //======================================================================= |
21 | //function : RWStepShape_RWSeamEdge |
22 | //purpose : |
23 | //======================================================================= |
24 | |
25 | RWStepShape_RWSeamEdge::RWStepShape_RWSeamEdge () |
26 | { |
27 | } |
28 | |
29 | //======================================================================= |
30 | //function : ReadStep |
31 | //purpose : |
32 | //======================================================================= |
33 | |
34 | void RWStepShape_RWSeamEdge::ReadStep (const Handle(StepData_StepReaderData)& data, |
35 | const Standard_Integer num, |
36 | Handle(Interface_Check)& ach, |
37 | const Handle(StepShape_SeamEdge) &ent) const |
38 | { |
39 | // Check number of parameters |
40 | if ( ! data->CheckNbParams(num,6,ach,"seam_edge") ) return; |
41 | |
42 | // Inherited fields of RepresentationItem |
43 | |
44 | Handle(TCollection_HAsciiString) aRepresentationItem_Name; |
45 | data->ReadString (num, 1, "representation_item.name", ach, aRepresentationItem_Name); |
46 | |
47 | // Inherited fields of Edge |
48 | |
49 | Handle(StepShape_Vertex) aEdge_EdgeStart; |
50 | data->CheckDerived(num, 2, "edge.edge_start", ach,Standard_False); |
51 | |
52 | Handle(StepShape_Vertex) aEdge_EdgeEnd; |
53 | data->CheckDerived (num, 3, "edge.edge_end", ach, Standard_False); |
54 | |
55 | // Inherited fields of OrientedEdge |
56 | |
57 | Handle(StepShape_Edge) aOrientedEdge_EdgeElement; |
58 | data->ReadEntity (num, 4, "oriented_edge.edge_element", ach, STANDARD_TYPE(StepShape_Edge), aOrientedEdge_EdgeElement); |
59 | |
60 | Standard_Boolean aOrientedEdge_Orientation; |
61 | data->ReadBoolean (num, 5, "oriented_edge.orientation", ach, aOrientedEdge_Orientation); |
62 | |
63 | // Own fields of SeamEdge |
64 | |
65 | Handle(StepGeom_Pcurve) aPcurveReference; |
66 | data->ReadEntity (num, 6, "pcurve_reference", ach, STANDARD_TYPE(StepGeom_Pcurve), aPcurveReference); |
67 | |
68 | // Initialize entity |
69 | |
70 | ent->Init(aRepresentationItem_Name, |
71 | aOrientedEdge_EdgeElement, |
72 | aOrientedEdge_Orientation, |
73 | aPcurveReference); |
74 | } |
75 | |
76 | //======================================================================= |
77 | //function : WriteStep |
78 | //purpose : |
79 | //======================================================================= |
80 | |
81 | void RWStepShape_RWSeamEdge::WriteStep (StepData_StepWriter& SW, |
82 | const Handle(StepShape_SeamEdge) &ent) const |
83 | { |
84 | |
85 | // Inherited fields of RepresentationItem |
86 | |
87 | SW.Send (ent->StepRepr_RepresentationItem::Name()); |
88 | |
89 | // Inherited fields of Edge |
90 | |
91 | SW.Send (ent->StepShape_Edge::EdgeStart()); |
92 | |
93 | SW.Send (ent->StepShape_Edge::EdgeEnd()); |
94 | |
95 | // Inherited fields of OrientedEdge |
96 | |
97 | SW.Send (ent->StepShape_OrientedEdge::EdgeElement()); |
98 | |
99 | SW.SendBoolean (ent->StepShape_OrientedEdge::Orientation()); |
100 | |
101 | // Own fields of SeamEdge |
102 | |
103 | SW.Send (ent->PcurveReference()); |
104 | } |
105 | |
106 | //======================================================================= |
107 | //function : Share |
108 | //purpose : |
109 | //======================================================================= |
110 | |
111 | void RWStepShape_RWSeamEdge::Share (const Handle(StepShape_SeamEdge) &ent, |
112 | Interface_EntityIterator& iter) const |
113 | { |
114 | |
115 | // Inherited fields of RepresentationItem |
116 | |
117 | // Inherited fields of Edge |
118 | |
119 | iter.AddItem (ent->StepShape_Edge::EdgeStart()); |
120 | |
121 | iter.AddItem (ent->StepShape_Edge::EdgeEnd()); |
122 | |
123 | // Inherited fields of OrientedEdge |
124 | |
125 | iter.AddItem (ent->StepShape_OrientedEdge::EdgeElement()); |
126 | |
127 | // Own fields of SeamEdge |
128 | |
129 | iter.AddItem (ent->PcurveReference()); |
130 | } |