0023948: Wrong intersection between a surface of revolution and a plane.
[occt.git] / src / RWStepBasic / RWStepBasic_RWGroupRelationship.cxx
CommitLineData
b311480e 1// Created on: 2000-05-10
2// Created by: Andrey BETENEV
973c2be1 3// Copyright (c) 2000-2014 OPEN CASCADE SAS
b311480e 4//
973c2be1 5// This file is part of Open CASCADE Technology software library.
b311480e 6//
d5f74e42 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
973c2be1 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 <RWStepBasic_RWGroupRelationship.ixx>
19
20//=======================================================================
21//function : RWStepBasic_RWGroupRelationship
22//purpose :
23//=======================================================================
24
25RWStepBasic_RWGroupRelationship::RWStepBasic_RWGroupRelationship ()
26{
27}
28
29//=======================================================================
30//function : ReadStep
31//purpose :
32//=======================================================================
33
34void RWStepBasic_RWGroupRelationship::ReadStep (const Handle(StepData_StepReaderData)& data,
35 const Standard_Integer num,
36 Handle(Interface_Check)& ach,
37 const Handle(StepBasic_GroupRelationship) &ent) const
38{
39 // Check number of parameters
40 if ( ! data->CheckNbParams(num,4,ach,"group_relationship") ) return;
41
42 // Own fields of GroupRelationship
43
44 Handle(TCollection_HAsciiString) aName;
45 data->ReadString (num, 1, "name", ach, aName);
46
47 Handle(TCollection_HAsciiString) aDescription;
48 Standard_Boolean hasDescription = Standard_True;
49 if ( data->IsParamDefined (num,2) ) {
50 data->ReadString (num, 2, "description", ach, aDescription);
51 }
52 else {
53 hasDescription = Standard_False;
54 }
55
56 Handle(StepBasic_Group) aRelatingGroup;
57 data->ReadEntity (num, 3, "relating_group", ach, STANDARD_TYPE(StepBasic_Group), aRelatingGroup);
58
59 Handle(StepBasic_Group) aRelatedGroup;
60 data->ReadEntity (num, 4, "related_group", ach, STANDARD_TYPE(StepBasic_Group), aRelatedGroup);
61
62 // Initialize entity
63 ent->Init(aName,
64 hasDescription,
65 aDescription,
66 aRelatingGroup,
67 aRelatedGroup);
68}
69
70//=======================================================================
71//function : WriteStep
72//purpose :
73//=======================================================================
74
75void RWStepBasic_RWGroupRelationship::WriteStep (StepData_StepWriter& SW,
76 const Handle(StepBasic_GroupRelationship) &ent) const
77{
78
79 // Own fields of GroupRelationship
80
81 SW.Send (ent->Name());
82
83 if ( ent->HasDescription() ) {
84 SW.Send (ent->Description());
85 }
86 else SW.SendUndef();
87
88 SW.Send (ent->RelatingGroup());
89
90 SW.Send (ent->RelatedGroup());
91}
92
93//=======================================================================
94//function : Share
95//purpose :
96//=======================================================================
97
98void RWStepBasic_RWGroupRelationship::Share (const Handle(StepBasic_GroupRelationship) &ent,
99 Interface_EntityIterator& iter) const
100{
101
102 // Own fields of GroupRelationship
103
104 iter.AddItem (ent->RelatingGroup());
105
106 iter.AddItem (ent->RelatedGroup());
107}