Salome HOME
Merge master branch into V9_dev.
[modules/geom.git] / src / OBJECT / GEOM_AISDimension.cxx
1 // Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 //  GEOM OBJECT : interactive object for Geometry entities visualization
24 //  File   : GEOM_AISDimension.cxx
25 //  Module : GEOM
26
27 #include "GEOM_AISDimension.hxx"
28
29 IMPLEMENT_STANDARD_RTTIEXT(GEOM_AISLength,   AIS_LengthDimension)
30 IMPLEMENT_STANDARD_RTTIEXT(GEOM_AISDiameter, AIS_DiameterDimension)
31 IMPLEMENT_STANDARD_RTTIEXT(GEOM_AISAngle,    AIS_AngleDimension)
32
33 /* ****************************************************************************** *
34  *                                                                                *
35  *                                GEOM_AISLength                                  *
36  *                                                                                *
37  * ****************************************************************************** */
38
39 //=================================================================================
40 // function : Constructor
41 // purpose  : 
42 //=================================================================================
43 GEOM_AISLength::GEOM_AISLength( const Standard_Integer theId ) 
44 : AIS_LengthDimension( gp::Origin(),
45                        gp::Origin(),
46                        gp_Pln( gp::XOY() ) ),
47   myId( theId )
48 {
49 }
50
51 //=================================================================================
52 // function : GetId
53 // purpose  : 
54 //=================================================================================
55 Standard_Integer GEOM_AISLength::GetId() const
56 {
57   return myId;
58 }
59
60 //=================================================================================
61 // function : SetId
62 // purpose  : 
63 //=================================================================================
64 void GEOM_AISLength::SetId( const Standard_Integer theId )
65 {
66   myId = theId;
67 }
68
69
70 /* ****************************************************************************** *
71  *                                                                                *
72  *                              GEOM_AISDiameter                                  *
73  *                                                                                *
74  * ****************************************************************************** */
75
76 //=================================================================================
77 // function : Constructor
78 // purpose  : 
79 //=================================================================================
80 GEOM_AISDiameter::GEOM_AISDiameter( const Standard_Integer theId )
81 : AIS_DiameterDimension( gp_Circ( gp_Ax2( gp::Origin(), gp::DZ() ), 0.0 ) ),
82   myId( theId )
83 {
84 }
85
86 //=================================================================================
87 // function : GetId
88 // purpose  : 
89 //=================================================================================
90 Standard_Integer GEOM_AISDiameter::GetId() const
91 {
92   return myId;
93 }
94
95 //=================================================================================
96 // function : SetId
97 // purpose  : 
98 //=================================================================================
99 void GEOM_AISDiameter::SetId( const Standard_Integer theId )
100 {
101   myId = theId;
102 }
103
104 /* ****************************************************************************** *
105  *                                                                                *
106  *                              GEOM_AISAngle                                     *
107  *                                                                                *
108  * ****************************************************************************** */
109
110 //=================================================================================
111 // function : Constructor
112 // purpose  : 
113 //=================================================================================
114 GEOM_AISAngle::GEOM_AISAngle( const Standard_Integer theId ) 
115 : AIS_AngleDimension( gp::Origin(),
116                       gp::Origin(),
117                       gp::Origin() ),
118   myId( theId )
119 {
120 }
121
122 //=================================================================================
123 // function : GetId
124 // purpose  : 
125 //=================================================================================
126 Standard_Integer GEOM_AISAngle::GetId() const
127 {
128   return myId;
129 }
130
131 //=================================================================================
132 // function : SetId
133 // purpose  : 
134 //=================================================================================
135 void GEOM_AISAngle::SetId( const Standard_Integer theId )
136 {
137   myId = theId;
138 }