Salome HOME
PAL9166. Add possibility to make sketcher on an existing plane
[modules/geom.git] / src / GEOMImpl / GEOMImpl_ISketcher.hxx
1 //NOTE: This is an interface to a function for the Sketcher creation.
2
3
4 #include "GEOM_Function.hxx"
5
6 #define SKETCH_ARG_CMD 1
7 #define SKETCH_ARG_DOUBLE 2
8 #define SKETCH_ARG_WPLANE 12
9
10 class GEOMImpl_ISketcher
11 {
12  public:
13
14   GEOMImpl_ISketcher(Handle(GEOM_Function) theFunction): _func(theFunction) {}
15
16   void SetCommand(const TCollection_AsciiString& theCommand)
17   { _func->SetString(SKETCH_ARG_CMD, theCommand); }
18
19   TCollection_AsciiString GetCommand() { return _func->GetString(SKETCH_ARG_CMD); }
20
21   void SetWorkingPlane(int theInd, double theValue)
22               { _func->SetReal(SKETCH_ARG_DOUBLE + theInd, theValue); }
23
24   double GetWorkingPlane(int theInd) { return _func->GetReal(SKETCH_ARG_DOUBLE + theInd); }
25
26   void SetWorkingPlane(Handle(GEOM_Function) thePlane)
27               { _func->SetReference(SKETCH_ARG_WPLANE, thePlane); }
28
29   Handle(GEOM_Function) GetWorkingPlane() { return _func->GetReference(SKETCH_ARG_WPLANE); }
30
31  private:
32
33   Handle(GEOM_Function) _func;
34 };