summaryrefslogtreecommitdiff
path: root/src/RWStepShape/RWStepShape_RWSeamEdge.cxx
blob: 579e023e89580c6e9e033da3755ec08266945b16 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
// File:	RWStepShape_RWSeamEdge.cxx
// Created:	Fri Jan  4 17:42:44 2002 
// Author:	data exchange team
// Generator:	ExpToCas (EXPRESS -> CASCADE/XSTEP Translator) V1.1
// Copyright:	Matra Datavision 2000

#include <RWStepShape_RWSeamEdge.ixx>

//=======================================================================
//function : RWStepShape_RWSeamEdge
//purpose  : 
//=======================================================================

RWStepShape_RWSeamEdge::RWStepShape_RWSeamEdge ()
{
}

//=======================================================================
//function : ReadStep
//purpose  : 
//=======================================================================

void RWStepShape_RWSeamEdge::ReadStep (const Handle(StepData_StepReaderData)& data,
                                       const Standard_Integer num,
                                       Handle(Interface_Check)& ach,
                                       const Handle(StepShape_SeamEdge) &ent) const
{
  // Check number of parameters
  if ( ! data->CheckNbParams(num,6,ach,"seam_edge") ) return;

  // Inherited fields of RepresentationItem

  Handle(TCollection_HAsciiString) aRepresentationItem_Name;
  data->ReadString (num, 1, "representation_item.name", ach, aRepresentationItem_Name);

  // Inherited fields of Edge

  Handle(StepShape_Vertex) aEdge_EdgeStart;
  data->CheckDerived(num, 2, "edge.edge_start", ach,Standard_False);

  Handle(StepShape_Vertex) aEdge_EdgeEnd;
  data->CheckDerived (num, 3, "edge.edge_end", ach, Standard_False);

  // Inherited fields of OrientedEdge

  Handle(StepShape_Edge) aOrientedEdge_EdgeElement;
  data->ReadEntity (num, 4, "oriented_edge.edge_element", ach, STANDARD_TYPE(StepShape_Edge), aOrientedEdge_EdgeElement);

  Standard_Boolean aOrientedEdge_Orientation;
  data->ReadBoolean (num, 5, "oriented_edge.orientation", ach, aOrientedEdge_Orientation);

  // Own fields of SeamEdge

  Handle(StepGeom_Pcurve) aPcurveReference;
  data->ReadEntity (num, 6, "pcurve_reference", ach, STANDARD_TYPE(StepGeom_Pcurve), aPcurveReference);

  // Initialize entity
 
  ent->Init(aRepresentationItem_Name,
            aOrientedEdge_EdgeElement,
            aOrientedEdge_Orientation,
            aPcurveReference);
}

//=======================================================================
//function : WriteStep
//purpose  : 
//=======================================================================

void RWStepShape_RWSeamEdge::WriteStep (StepData_StepWriter& SW,
                                        const Handle(StepShape_SeamEdge) &ent) const
{

  // Inherited fields of RepresentationItem

  SW.Send (ent->StepRepr_RepresentationItem::Name());

  // Inherited fields of Edge

  SW.Send (ent->StepShape_Edge::EdgeStart());

  SW.Send (ent->StepShape_Edge::EdgeEnd());

  // Inherited fields of OrientedEdge

  SW.Send (ent->StepShape_OrientedEdge::EdgeElement());

  SW.SendBoolean (ent->StepShape_OrientedEdge::Orientation());

  // Own fields of SeamEdge

  SW.Send (ent->PcurveReference());
}

//=======================================================================
//function : Share
//purpose  : 
//=======================================================================

void RWStepShape_RWSeamEdge::Share (const Handle(StepShape_SeamEdge) &ent,
                                    Interface_EntityIterator& iter) const
{

  // Inherited fields of RepresentationItem

  // Inherited fields of Edge

  iter.AddItem (ent->StepShape_Edge::EdgeStart());

  iter.AddItem (ent->StepShape_Edge::EdgeEnd());

  // Inherited fields of OrientedEdge

  iter.AddItem (ent->StepShape_OrientedEdge::EdgeElement());

  // Own fields of SeamEdge

  iter.AddItem (ent->PcurveReference());
}