Salome HOME
0020695: EDF 1076 GEOM: Add a new shape in GEOM: T-shape
[modules/geom.git] / src / GEOMImpl / GEOMImpl_IPipeTShape.hxx
1 //  Copyright (C) 2007-2008  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.
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 #ifndef _GEOMImpl_IPipeTShape_HXX_
23 #define _GEOMImpl_IPipeTShape_HXX_
24
25 #include "GEOM_Function.hxx"
26
27 #define TSHAPE_ARG_R1   1
28 #define TSHAPE_ARG_W1   2
29 #define TSHAPE_ARG_L1   3
30 #define TSHAPE_ARG_R2   4
31 #define TSHAPE_ARG_W2   5
32 #define TSHAPE_ARG_L2   6
33
34 // chamfer
35 #define TSHAPE_ARG_H    7
36 #define TSHAPE_ARG_W    8
37
38 // fillet
39 #define TSHAPE_ARG_RF   9
40
41 // partition
42 #define TSHAPE_ARG_HEXMESH 10
43
44 // junction points
45 #define TSHAPE_ARG_P1 11
46 #define TSHAPE_ARG_P2 12
47 #define TSHAPE_ARG_P3 13
48
49 class GEOMImpl_IPipeTShape
50 {
51 public:
52   GEOMImpl_IPipeTShape(Handle(GEOM_Function) theFunction): _func(theFunction) {}
53
54   void SetR1(double theR1) { _func->SetReal(TSHAPE_ARG_R1, theR1); }
55   double GetR1() { return _func->GetReal(TSHAPE_ARG_R1); }
56
57   void SetW1(double theW1) { _func->SetReal(TSHAPE_ARG_W1, theW1); }
58   double GetW1() { return _func->GetReal(TSHAPE_ARG_W1); }
59
60   void SetL1(double theL1) { _func->SetReal(TSHAPE_ARG_L1, theL1); }
61   double GetL1() { return _func->GetReal(TSHAPE_ARG_L1); }
62
63   void SetR2(double theR2) { _func->SetReal(TSHAPE_ARG_R2, theR2); }
64   double GetR2() { return _func->GetReal(TSHAPE_ARG_R2); }
65
66   void SetW2(double theW2) { _func->SetReal(TSHAPE_ARG_W2, theW2); }
67   double GetW2() { return _func->GetReal(TSHAPE_ARG_W2); }
68
69   void SetL2(double theL2) { _func->SetReal(TSHAPE_ARG_L2, theL2); }
70   double GetL2() { return _func->GetReal(TSHAPE_ARG_L2); }
71
72   void SetH(double theH) { _func->SetReal(TSHAPE_ARG_H, theH); }
73   double GetH() { return _func->GetReal(TSHAPE_ARG_H); }
74
75   void SetW(double theW) { _func->SetReal(TSHAPE_ARG_W, theW); }
76   double GetW() { return _func->GetReal(TSHAPE_ARG_W); }
77
78   void SetRF(double theRF) { _func->SetReal(TSHAPE_ARG_RF, theRF); }
79   double GetRF() { return _func->GetReal(TSHAPE_ARG_RF); }
80
81   void SetHexMesh(int theHexMesh) { _func->SetInteger(TSHAPE_ARG_HEXMESH, theHexMesh); }
82   int GetHexMesh() { return _func->GetInteger(TSHAPE_ARG_HEXMESH); }
83
84   void SetP1(const Handle(GEOM_Function)& theP1){_func->SetReference(TSHAPE_ARG_P1, theP1); }
85   Handle(GEOM_Function) GetP1() { return _func->GetReference(TSHAPE_ARG_P1); }
86
87   void SetP2(const Handle(GEOM_Function)& theP2){_func->SetReference(TSHAPE_ARG_P2, theP2); }
88   Handle(GEOM_Function) GetP2() { return _func->GetReference(TSHAPE_ARG_P2); }
89
90   void SetP3(const Handle(GEOM_Function)& theP3){_func->SetReference(TSHAPE_ARG_P3, theP3); }
91   Handle(GEOM_Function) GetP3() { return _func->GetReference(TSHAPE_ARG_P3); }
92
93 private:
94   Handle(GEOM_Function) _func;
95 };
96
97 #endif // _GEOMImpl_IPipeTShape_HXX_