Salome HOME
Bug 0020228: [CEA 331] the geompy.RemoveExtraEdges crash with the attached brep shape...
[modules/geom.git] / src / GEOMImpl / GEOMImpl_IBlockTrsf.hxx
1 //  Copyright (C) 2007-2008  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.
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 //NOTE: This is an interface to a functions for the Blocks Multi-Transformations and repairing
23
24 #include "GEOM_Function.hxx"
25
26 #define TRSF_ORIGIN  1
27
28 #define TRSF_FACE_1_U  2
29 #define TRSF_FACE_2_U  3
30 #define TRSF_NBITER_U  4
31 #define TRSF_FACE_1_V  5
32 #define TRSF_FACE_2_V  6
33 #define TRSF_NBITER_V  7
34
35 #define TRSF_NB_FACES  8
36
37 class GEOMImpl_IBlockTrsf
38 {
39  public:
40
41   GEOMImpl_IBlockTrsf (Handle(GEOM_Function) theFunction): _func(theFunction) {}
42
43   void SetOriginal (Handle(GEOM_Function) theOriginal) { _func->SetReference(TRSF_ORIGIN, theOriginal); }
44
45   Handle(GEOM_Function) GetOriginal() { return _func->GetReference(TRSF_ORIGIN); }
46
47   void SetFace1U  (int theFaceId) { _func->SetInteger(TRSF_FACE_1_U, theFaceId); }
48   void SetFace2U  (int theFaceId) { _func->SetInteger(TRSF_FACE_2_U, theFaceId); }
49   void SetFace1V  (int theFaceId) { _func->SetInteger(TRSF_FACE_1_V, theFaceId); }
50   void SetFace2V  (int theFaceId) { _func->SetInteger(TRSF_FACE_2_V, theFaceId); }
51   void SetNbIterU (int theNbIter) { _func->SetInteger(TRSF_NBITER_U, theNbIter); }
52   void SetNbIterV (int theNbIter) { _func->SetInteger(TRSF_NBITER_V, theNbIter); }
53
54   void SetOptimumNbFaces (int theNbFaces) { _func->SetInteger(TRSF_NB_FACES, theNbFaces); }
55
56   int GetFace1U () { return _func->GetInteger(TRSF_FACE_1_U); }
57   int GetFace2U () { return _func->GetInteger(TRSF_FACE_2_U); }
58   int GetFace1V () { return _func->GetInteger(TRSF_FACE_1_V); }
59   int GetFace2V () { return _func->GetInteger(TRSF_FACE_2_V); }
60   int GetNbIterU() { return _func->GetInteger(TRSF_NBITER_U); }
61   int GetNbIterV() { return _func->GetInteger(TRSF_NBITER_V); }
62
63   int GetOptimumNbFaces() { return _func->GetInteger(TRSF_NB_FACES); }
64
65  private:
66
67   Handle(GEOM_Function) _func;
68 };