Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
GEOMImpl_IPipe.hxx
Go to the documentation of this file.
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 //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 #define PIPEDS_ARG_BY_STEPS 6
46 
47 // ---- GEOMImpl_IPipeShellSect
48 #define PIPEDS_LIST_SUBBASES 6
49 
50 // ---- Generate groups block (common)
51 #define PIPE_GENERATE_GROUPS 7
52 #define PIPE_GROUP_DOWN 8
53 #define PIPE_GROUP_UP 9
54 #define PIPE_GROUP_SIDE1 10
55 #define PIPE_GROUP_SIDE2 11
56 #define PIPE_GROUP_OTHER 12
57 
58 
60 {
61  public:
62 
63  GEOMImpl_IPipe(Handle(GEOM_Function) theFunction): _func(theFunction) {}
64  virtual ~GEOMImpl_IPipe() {}
65 
66  void SetBase (Handle(GEOM_Function) theBase) { _func->SetReference(PIPE_ARG_BASE, theBase); }
67  void SetPath (Handle(GEOM_Function) thePath) { _func->SetReference(PIPE_ARG_PATH, thePath); }
68  void SetGenerateGroups (int theGenerateGroups)
69  { _func->SetInteger(PIPE_GENERATE_GROUPS, theGenerateGroups); }
70  void SetGroupDown (const Handle(TColStd_HArray1OfInteger) &theGroup)
71  { _func->SetIntegerArray(PIPE_GROUP_DOWN, theGroup); }
72  void SetGroupUp (const Handle(TColStd_HArray1OfInteger) &theGroup)
73  { _func->SetIntegerArray(PIPE_GROUP_UP, theGroup); }
74  void SetGroupSide1 (const Handle(TColStd_HArray1OfInteger) &theGroup)
75  { _func->SetIntegerArray(PIPE_GROUP_SIDE1, theGroup); }
76  void SetGroupSide2 (const Handle(TColStd_HArray1OfInteger) &theGroup)
77  { _func->SetIntegerArray(PIPE_GROUP_SIDE2, theGroup); }
78  void SetGroupOther (const Handle(TColStd_HArray1OfInteger) &theGroup)
79  { _func->SetIntegerArray(PIPE_GROUP_OTHER, theGroup); }
80 
81  Handle(GEOM_Function) GetBase() { return _func->GetReference(PIPE_ARG_BASE); }
82  Handle(GEOM_Function) GetPath() { return _func->GetReference(PIPE_ARG_PATH); }
83  int GetGenerateGroups () { return _func->GetInteger(PIPE_GENERATE_GROUPS); }
84  Handle(TColStd_HArray1OfInteger) GetGroupDown ()
85  { return _func->GetIntegerArray(PIPE_GROUP_DOWN); }
86  Handle(TColStd_HArray1OfInteger) GetGroupUp ()
87  { return _func->GetIntegerArray(PIPE_GROUP_UP); }
88  Handle(TColStd_HArray1OfInteger) GetGroupSide1 ()
89  { return _func->GetIntegerArray(PIPE_GROUP_SIDE1); }
90  Handle(TColStd_HArray1OfInteger) GetGroupSide2 ()
91  { return _func->GetIntegerArray(PIPE_GROUP_SIDE2); }
92  Handle(TColStd_HArray1OfInteger) GetGroupOther ()
93  { return _func->GetIntegerArray(PIPE_GROUP_OTHER); }
94 
95  protected:
96 
97  Handle(GEOM_Function) _func;
98 };
99 
100 #endif