1 // Created on: 2004-11-23
2 // Created by: Pavel TELKOV
3 // Copyright (c) 2004-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
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
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.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 // The original implementation Copyright: (C) RINA S.p.A
18 #include <TObj_TXYZ.hxx>
19 #include <Standard_GUID.hxx>
20 #include <TDF_Label.hxx>
23 IMPLEMENT_STANDARD_RTTIEXT(TObj_TXYZ,TDF_Attribute)
25 //=======================================================================
26 //function : TObj_TXYZ
28 //=======================================================================
30 TObj_TXYZ::TObj_TXYZ()
34 //=======================================================================
37 //=======================================================================
39 const Standard_GUID& TObj_TXYZ::GetID()
41 static Standard_GUID theGUID ("3bbefb50-e618-11d4-ba38-0060b0ee18ea");
45 //=======================================================================
48 //=======================================================================
50 const Standard_GUID& TObj_TXYZ::ID() const
55 //=======================================================================
58 //=======================================================================
60 Handle(TObj_TXYZ) TObj_TXYZ::Set (const TDF_Label& theLabel,
64 if (!theLabel.FindAttribute(TObj_TXYZ::GetID(), A))
67 theLabel.AddAttribute(A);
73 //=======================================================================
76 //=======================================================================
78 void TObj_TXYZ::Set (const gp_XYZ& theXYZ)
84 //=======================================================================
87 //=======================================================================
89 gp_XYZ TObj_TXYZ::Get () const
94 //=======================================================================
97 //=======================================================================
99 Handle(TDF_Attribute) TObj_TXYZ::NewEmpty () const
101 return new TObj_TXYZ();
104 //=======================================================================
107 //=======================================================================
109 void TObj_TXYZ::Restore (const Handle(TDF_Attribute)& theWith)
111 Handle(TObj_TXYZ) R = Handle(TObj_TXYZ)::DownCast(theWith);
115 //=======================================================================
118 //=======================================================================
120 void TObj_TXYZ::Paste (const Handle(TDF_Attribute)& theInto,
121 const Handle(TDF_RelocationTable)& /* RT */) const
123 Handle(TObj_TXYZ) R = Handle(TObj_TXYZ)::DownCast (theInto);
127 //=======================================================================
130 //=======================================================================
132 Standard_OStream& TObj_TXYZ::Dump(Standard_OStream& theOS) const
135 Standard_OStream& anOS = TDF_Attribute::Dump( theOS );
136 anOS << "X: " << aXYZ.X() << "\tY: " << aXYZ.Y() << "\tZ: " << aXYZ.Z();