Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
GEOMImpl_IBlockTrsf.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 interface to a functions for the Blocks Multi-Transformations and repairing
24 //
25 #include "GEOM_Function.hxx"
26 
27 #define TRSF_ORIGIN 1
28 
29 #define TRSF_FACE_1_U 2
30 #define TRSF_FACE_2_U 3
31 #define TRSF_NBITER_U 4
32 #define TRSF_FACE_1_V 5
33 #define TRSF_FACE_2_V 6
34 #define TRSF_NBITER_V 7
35 
36 #define TRSF_NB_FACES 8
37 
39 {
40  public:
41 
42  GEOMImpl_IBlockTrsf (Handle(GEOM_Function) theFunction): _func(theFunction) {}
43 
44  void SetOriginal (Handle(GEOM_Function) theOriginal) { _func->SetReference(TRSF_ORIGIN, theOriginal); }
45 
46  Handle(GEOM_Function) GetOriginal() { return _func->GetReference(TRSF_ORIGIN); }
47 
48  void SetFace1U (int theFaceId) { _func->SetInteger(TRSF_FACE_1_U, theFaceId); }
49  void SetFace2U (int theFaceId) { _func->SetInteger(TRSF_FACE_2_U, theFaceId); }
50  void SetFace1V (int theFaceId) { _func->SetInteger(TRSF_FACE_1_V, theFaceId); }
51  void SetFace2V (int theFaceId) { _func->SetInteger(TRSF_FACE_2_V, theFaceId); }
52  void SetNbIterU (int theNbIter) { _func->SetInteger(TRSF_NBITER_U, theNbIter); }
53  void SetNbIterV (int theNbIter) { _func->SetInteger(TRSF_NBITER_V, theNbIter); }
54 
55  void SetOptimumNbFaces (int theNbFaces) { _func->SetInteger(TRSF_NB_FACES, theNbFaces); }
56 
57  int GetFace1U () { return _func->GetInteger(TRSF_FACE_1_U); }
58  int GetFace2U () { return _func->GetInteger(TRSF_FACE_2_U); }
59  int GetFace1V () { return _func->GetInteger(TRSF_FACE_1_V); }
60  int GetFace2V () { return _func->GetInteger(TRSF_FACE_2_V); }
61  int GetNbIterU() { return _func->GetInteger(TRSF_NBITER_U); }
62  int GetNbIterV() { return _func->GetInteger(TRSF_NBITER_V); }
63 
64  int GetOptimumNbFaces() { return _func->GetInteger(TRSF_NB_FACES); }
65 
66  private:
67 
68  Handle(GEOM_Function) _func;
69 };