1 // Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 //NOTE: This is an intreface to a function for the Pipe creation.
25 #ifndef _GEOMImpl_IPIPE_HXX_
26 #define _GEOMImpl_IPIPE_HXX_
28 #include "GEOM_Function.hxx"
30 #include <TColStd_HArray1OfInteger.hxx>
32 // ---- GEOMImpl_IPipe
33 #define PIPE_ARG_BASE 1
34 #define PIPE_ARG_PATH 2
36 // ---- GEOMImpl_IPipeBiNormal
37 #define PIPE_ARG_VEC 3
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
46 // ---- GEOMImpl_IPipeShellSect
47 #define PIPEDS_LIST_SUBBASES 6
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
62 GEOMImpl_IPipe(Handle(GEOM_Function) theFunction): _func(theFunction) {}
63 virtual ~GEOMImpl_IPipe() {}
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); }
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); }
96 Handle(GEOM_Function) _func;