Salome HOME
c2b0d4efd84c16f91e0b1fb391ebb622ff7f9792
[modules/geom.git] / src / GEOMImpl / GEOMImpl_IChamfer.hxx
1 //NOTE: This is an interface to a function for the Chamfer and creation.
2
3
4 #include "GEOM_Function.hxx"
5
6 #define CHAM_ARG_SH   1
7 #define CHAM_ARG_D1   2
8 #define CHAM_ARG_D2   3
9 #define CHAM_ARG_LENG 4
10 #define CHAM_ARG_LAST 4
11
12 class GEOMImpl_IChamfer
13 {
14  public:
15
16   GEOMImpl_IChamfer(Handle(GEOM_Function) theFunction): _func(theFunction) {}
17
18   void SetShape(Handle(GEOM_Function) theRef) { _func->SetReference(CHAM_ARG_SH, theRef); }
19
20   Handle(GEOM_Function) GetShape() { return _func->GetReference(CHAM_ARG_SH); }
21
22   void SetD (double theD) { _func->SetReal(CHAM_ARG_D1, theD); }
23   void SetD1(double theD) { _func->SetReal(CHAM_ARG_D1, theD); }
24   void SetD2(double theD) { _func->SetReal(CHAM_ARG_D2, theD); }
25
26   double GetD () { return _func->GetReal(CHAM_ARG_D1); }
27   double GetD1() { return _func->GetReal(CHAM_ARG_D1); }
28   double GetD2() { return _func->GetReal(CHAM_ARG_D2); }
29
30   void SetLength(int theLen) { _func->SetInteger(CHAM_ARG_LENG, theLen); }
31
32   int GetLength() { return _func->GetInteger(CHAM_ARG_LENG); }
33
34   void SetFace(int theInd, int theFace)
35               { _func->SetInteger(CHAM_ARG_LAST + theInd, theFace); }
36   void SetFace1(int theFace)
37               { _func->SetInteger(CHAM_ARG_LAST + 1, theFace); }
38   void SetFace2(int theFace)
39               { _func->SetInteger(CHAM_ARG_LAST + 2, theFace); }
40
41   int GetFace(int theInd) { return _func->GetInteger(CHAM_ARG_LAST + theInd); }
42   int GetFace1() { return _func->GetInteger(CHAM_ARG_LAST + 1); }
43   int GetFace2() { return _func->GetInteger(CHAM_ARG_LAST + 2); }
44
45  private:
46
47   Handle(GEOM_Function) _func;
48 };