]> SALOME platform Git repositories - modules/geom.git/blob - src/GEOMImpl/GEOMImpl_IPipe.hxx
Salome HOME
0022869: EDF 7482 GEOM: Automatically create groups with the generation operations
[modules/geom.git] / src / GEOMImpl / GEOMImpl_IPipe.hxx
1 // Copyright (C) 2007-2015  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 //NOTE: This is an intreface to a function for the Pipe creation.
24 //
25 #ifndef _GEOMImpl_IPIPE_HXX_
26 #define _GEOMImpl_IPIPE_HXX_
27
28 #include "GEOM_Function.hxx"
29
30 #include <TColStd_HArray1OfInteger.hxx>
31
32 // ---- GEOMImpl_IPipe
33 #define PIPE_ARG_BASE          1
34 #define PIPE_ARG_PATH          2
35
36 // ---- GEOMImpl_IPipeBiNormal
37 #define PIPE_ARG_VEC           3
38
39 // ---- GEOMImpl_IPipeDiffSect
40 #define PIPEDS_LIST_BASES      1
41 //#define PIPEDS_ARG_PATH      2
42 #define PIPEDS_LIST_LOCATIONS  3
43 #define PIPEDS_ARG_WITHCONTACT 4
44 #define PIPEDS_ARG_WITHCORRECT 5
45
46 // ---- GEOMImpl_IPipeShellSect
47 #define PIPEDS_LIST_SUBBASES   6
48
49 // ---- Generate groups block (common)
50 #define PIPE_GENERATE_GROUPS   7
51 #define PIPE_GROUP_DOWN        8
52 #define PIPE_GROUP_UP          9
53 #define PIPE_GROUP_SIDE1       10
54 #define PIPE_GROUP_SIDE2       11
55 #define PIPE_GROUP_OTHER       12
56
57
58 class GEOMImpl_IPipe
59 {
60  public:
61
62   GEOMImpl_IPipe(Handle(GEOM_Function) theFunction): _func(theFunction) {}
63   virtual ~GEOMImpl_IPipe() {}
64
65   void SetBase (Handle(GEOM_Function) theBase) { _func->SetReference(PIPE_ARG_BASE, theBase); }
66   void SetPath (Handle(GEOM_Function) thePath) { _func->SetReference(PIPE_ARG_PATH, thePath); }
67   void SetGenerateGroups (int theGenerateGroups)
68   { _func->SetInteger(PIPE_GENERATE_GROUPS, theGenerateGroups); }
69   void SetGroupDown (const Handle(TColStd_HArray1OfInteger) &theGroup)
70   { _func->SetIntegerArray(PIPE_GROUP_DOWN, theGroup); }
71   void SetGroupUp (const Handle(TColStd_HArray1OfInteger) &theGroup)
72   { _func->SetIntegerArray(PIPE_GROUP_UP, theGroup); }
73   void SetGroupSide1 (const Handle(TColStd_HArray1OfInteger) &theGroup)
74   { _func->SetIntegerArray(PIPE_GROUP_SIDE1, theGroup); }
75   void SetGroupSide2 (const Handle(TColStd_HArray1OfInteger) &theGroup)
76   { _func->SetIntegerArray(PIPE_GROUP_SIDE2, theGroup); }
77   void SetGroupOther (const Handle(TColStd_HArray1OfInteger) &theGroup)
78   { _func->SetIntegerArray(PIPE_GROUP_OTHER, theGroup); }
79
80   Handle(GEOM_Function) GetBase() { return _func->GetReference(PIPE_ARG_BASE); }
81   Handle(GEOM_Function) GetPath() { return _func->GetReference(PIPE_ARG_PATH); }
82   int GetGenerateGroups () { return _func->GetInteger(PIPE_GENERATE_GROUPS); }
83   Handle(TColStd_HArray1OfInteger) GetGroupDown ()
84   { return _func->GetIntegerArray(PIPE_GROUP_DOWN); }
85   Handle(TColStd_HArray1OfInteger) GetGroupUp ()
86   { return _func->GetIntegerArray(PIPE_GROUP_UP); }
87   Handle(TColStd_HArray1OfInteger) GetGroupSide1 ()
88   { return _func->GetIntegerArray(PIPE_GROUP_SIDE1); }
89   Handle(TColStd_HArray1OfInteger) GetGroupSide2 ()
90   { return _func->GetIntegerArray(PIPE_GROUP_SIDE2); }
91   Handle(TColStd_HArray1OfInteger) GetGroupOther ()
92   { return _func->GetIntegerArray(PIPE_GROUP_OTHER); }
93
94  protected:
95
96   Handle(GEOM_Function) _func;
97 };
98
99 #endif