0023948: Wrong intersection between a surface of revolution and a plane.
[occt.git] / src / RWStepShape / RWStepShape_RWRightAngularWedge.cxx
CommitLineData
973c2be1 1// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 2//
973c2be1 3// This file is part of Open CASCADE Technology software library.
b311480e 4//
d5f74e42 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
973c2be1 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.
b311480e 10//
973c2be1 11// Alternatively, this file may be used under the terms of Open CASCADE
12// commercial license or contractual agreement.
7fd59977 13
14#include <RWStepShape_RWRightAngularWedge.ixx>
15#include <StepGeom_Axis2Placement3d.hxx>
16
17
18#include <Interface_EntityIterator.hxx>
19
20
21#include <StepShape_RightAngularWedge.hxx>
22
23
24RWStepShape_RWRightAngularWedge::RWStepShape_RWRightAngularWedge () {}
25
26void RWStepShape_RWRightAngularWedge::ReadStep
27 (const Handle(StepData_StepReaderData)& data,
28 const Standard_Integer num,
29 Handle(Interface_Check)& ach,
30 const Handle(StepShape_RightAngularWedge)& ent) const
31{
32
33
34 // --- Number of Parameter Control ---
35
36 if (!data->CheckNbParams(num,6,ach,"right_angular_wedge")) return;
37
38 // --- inherited field : name ---
39
40 Handle(TCollection_HAsciiString) aName;
41 //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
42 data->ReadString (num,1,"name",ach,aName);
43
44 // --- own field : position ---
45
46 Handle(StepGeom_Axis2Placement3d) aPosition;
47 //szv#4:S4163:12Mar99 `Standard_Boolean stat2 =` not needed
48 data->ReadEntity(num, 2,"position", ach, STANDARD_TYPE(StepGeom_Axis2Placement3d), aPosition);
49
50 // --- own field : x ---
51
52 Standard_Real aX;
53 //szv#4:S4163:12Mar99 `Standard_Boolean stat3 =` not needed
54 data->ReadReal (num,3,"x",ach,aX);
55
56 // --- own field : y ---
57
58 Standard_Real aY;
59 //szv#4:S4163:12Mar99 `Standard_Boolean stat4 =` not needed
60 data->ReadReal (num,4,"y",ach,aY);
61
62 // --- own field : z ---
63
64 Standard_Real aZ;
65 //szv#4:S4163:12Mar99 `Standard_Boolean stat5 =` not needed
66 data->ReadReal (num,5,"z",ach,aZ);
67
68 // --- own field : ltx ---
69
70 Standard_Real aLtx;
71 //szv#4:S4163:12Mar99 `Standard_Boolean stat6 =` not needed
72 data->ReadReal (num,6,"ltx",ach,aLtx);
73
74 //--- Initialisation of the read entity ---
75
76
77 ent->Init(aName, aPosition, aX, aY, aZ, aLtx);
78}
79
80
81void RWStepShape_RWRightAngularWedge::WriteStep
82 (StepData_StepWriter& SW,
83 const Handle(StepShape_RightAngularWedge)& ent) const
84{
85
86 // --- inherited field name ---
87
88 SW.Send(ent->Name());
89
90 // --- own field : position ---
91
92 SW.Send(ent->Position());
93
94 // --- own field : x ---
95
96 SW.Send(ent->X());
97
98 // --- own field : y ---
99
100 SW.Send(ent->Y());
101
102 // --- own field : z ---
103
104 SW.Send(ent->Z());
105
106 // --- own field : ltx ---
107
108 SW.Send(ent->Ltx());
109}
110
111
112void RWStepShape_RWRightAngularWedge::Share(const Handle(StepShape_RightAngularWedge)& ent, Interface_EntityIterator& iter) const
113{
114
115 iter.GetOneItem(ent->Position());
116}
117