0023948: Wrong intersection between a surface of revolution and a plane.
[occt.git] / src / RWStepBasic / RWStepBasic_RWLengthUnit.cxx
1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
2 //
3 // This file is part of Open CASCADE Technology software library.
4 //
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
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.
10 //
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
13
14 #include <RWStepBasic_RWLengthUnit.ixx>
15 #include <StepBasic_DimensionalExponents.hxx>
16
17
18 #include <Interface_EntityIterator.hxx>
19
20
21 #include <StepBasic_LengthUnit.hxx>
22
23
24 RWStepBasic_RWLengthUnit::RWStepBasic_RWLengthUnit () {}
25
26 void RWStepBasic_RWLengthUnit::ReadStep
27         (const Handle(StepData_StepReaderData)& data,
28          const Standard_Integer num,
29          Handle(Interface_Check)& ach,
30          const Handle(StepBasic_LengthUnit)& ent) const
31 {
32
33
34         // --- Number of Parameter Control ---
35
36         if (!data->CheckNbParams(num,1,ach,"length_unit")) return;
37
38         // --- inherited field : dimensions ---
39
40         Handle(StepBasic_DimensionalExponents) aDimensions;
41         //szv#4:S4163:12Mar99 `Standard_Boolean stat1 =` not needed
42         data->ReadEntity(num, 1,"dimensions", ach, STANDARD_TYPE(StepBasic_DimensionalExponents), aDimensions);
43
44         //--- Initialisation of the read entity ---
45
46
47         ent->Init(aDimensions);
48 }
49
50
51 void RWStepBasic_RWLengthUnit::WriteStep
52         (StepData_StepWriter& SW,
53          const Handle(StepBasic_LengthUnit)& ent) const
54 {
55
56         // --- inherited field dimensions ---
57
58         SW.Send(ent->Dimensions());
59 }
60
61
62 void RWStepBasic_RWLengthUnit::Share(const Handle(StepBasic_LengthUnit)& ent, Interface_EntityIterator& iter) const
63 {
64
65         iter.GetOneItem(ent->Dimensions());
66 }
67