1 // Created on: 2013-11-11
2 // Created by: Anastasia BORISOVA
3 // Copyright (c) 2013-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
8 // under the terms of the GNU Lesser General Public 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 #ifndef _Prs3d_DimensionUnits_Header
17 #define _Prs3d_DimensionUnits_Header
19 #include <TCollection_AsciiString.hxx>
21 //! This class provides units for two dimension groups:
22 //! - lengthes (length, radius, diameter)
24 class Prs3d_DimensionUnits
28 //! Default constructor. Sets meters as default length units
29 //! and radians as default angle units.
30 Prs3d_DimensionUnits()
31 : myLengthUnits ("m"),
35 Prs3d_DimensionUnits (const Prs3d_DimensionUnits& theUnits)
36 : myLengthUnits (theUnits.GetLengthUnits()),
37 myAngleUnits (theUnits.GetAngleUnits())
41 Standard_EXPORT void SetAngleUnits (const TCollection_AsciiString& theUnits);
43 //! @return angle units
44 const TCollection_AsciiString& GetAngleUnits() const { return myAngleUnits; }
47 Standard_EXPORT void SetLengthUnits (const TCollection_AsciiString& theUnits);
49 //! @return length units
50 const TCollection_AsciiString& GetLengthUnits() const { return myLengthUnits; }
54 TCollection_AsciiString myLengthUnits;
55 TCollection_AsciiString myAngleUnits;