Version: 9.12.0
GEOMImpl_ITranslate.hxx
Go to the documentation of this file.
1 // Copyright (C) 2007-2023 CEA, EDF, 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 function for the Translate creation.
24 //
25 #include "GEOM_Function.hxx"
26 
27 #define TRANSLATE_ARG_POINT1 1
28 #define TRANSLATE_ARG_POINT2 2
29 #define TRANSLATE_ARG_VECTOR 3
30 #define TRANSLATE_ARG_ORIGINAL 6
31 #define TRANSLATE_ARG_STEP1 7
32 #define TRANSLATE_ARG_NBITER1 8
33 #define TRANSLATE_ARG_STEP2 9
34 #define TRANSLATE_ARG_NBITER2 10
35 #define TRANSLATE_ARG_VECTOR2 11
36 #define TRANSLATE_ARG_DX 12
37 #define TRANSLATE_ARG_DY 13
38 #define TRANSLATE_ARG_DZ 14
39 #define TRANSLATE_ARG_DISTANCE 15
40 
42 {
43  public:
44 
45  GEOMImpl_ITranslate(Handle(GEOM_Function) theFunction): _func(theFunction) {}
46 
47  void SetPoint1(Handle(GEOM_Function) thePoint1) { _func->SetReference(TRANSLATE_ARG_POINT1, thePoint1); }
48 
49  Handle(GEOM_Function) GetPoint1() { return _func->GetReference(TRANSLATE_ARG_POINT1); }
50 
51  void SetPoint2(Handle(GEOM_Function) thePoint2) { _func->SetReference(TRANSLATE_ARG_POINT2, thePoint2); }
52 
53  Handle(GEOM_Function) GetPoint2() { return _func->GetReference(TRANSLATE_ARG_POINT2); }
54 
55  void SetVector(Handle(GEOM_Function) theVector) { _func->SetReference(TRANSLATE_ARG_VECTOR, theVector); }
56 
57  Handle(GEOM_Function) GetVector() { return _func->GetReference(TRANSLATE_ARG_VECTOR); }
58 
59  void SetOriginal(Handle(GEOM_Function) theOriginal) { _func->SetReference(TRANSLATE_ARG_ORIGINAL, theOriginal); }
60 
61  Handle(GEOM_Function) GetOriginal() { return _func->GetReference(TRANSLATE_ARG_ORIGINAL); }
62 
63  void SetStep1(double theStep) { return _func->SetReal(TRANSLATE_ARG_STEP1, theStep); }
64 
65  double GetStep1() { return _func->GetReal(TRANSLATE_ARG_STEP1); }
66 
67  void SetNbIter1(int theNbIter) { _func->SetInteger(TRANSLATE_ARG_NBITER1, theNbIter); }
68 
69  int GetNbIter1() { return _func->GetInteger(TRANSLATE_ARG_NBITER1); }
70 
71  void SetStep2(double theStep) { return _func->SetReal(TRANSLATE_ARG_STEP2, theStep); }
72 
73  double GetStep2() { return _func->GetReal(TRANSLATE_ARG_STEP2); }
74 
75  void SetNbIter2(int theNbIter) { _func->SetInteger(TRANSLATE_ARG_NBITER2, theNbIter); }
76 
77  int GetNbIter2() { return _func->GetInteger(TRANSLATE_ARG_NBITER2); }
78 
79  void SetVector2(Handle(GEOM_Function) theVector) { _func->SetReference(TRANSLATE_ARG_VECTOR2, theVector); }
80 
81  Handle(GEOM_Function) GetVector2() { return _func->GetReference(TRANSLATE_ARG_VECTOR2); }
82 
83  void SetDX(double theDX) { return _func->SetReal(TRANSLATE_ARG_DX, theDX); }
84 
85  double GetDX() { return _func->GetReal(TRANSLATE_ARG_DX); }
86 
87  void SetDistance(double theDistance) { return _func->SetReal(TRANSLATE_ARG_DISTANCE, theDistance); }
88 
89  double GetDistance() { return _func->GetReal(TRANSLATE_ARG_DISTANCE); }
90 
91  void SetDY(double theDY) { return _func->SetReal(TRANSLATE_ARG_DY, theDY); }
92 
93  double GetDY() { return _func->GetReal(TRANSLATE_ARG_DY); }
94 
95  void SetDZ(double theDZ) { return _func->SetReal(TRANSLATE_ARG_DZ, theDZ); }
96 
97  double GetDZ() { return _func->GetReal(TRANSLATE_ARG_DZ); }
98 
99  private:
100 
101  Handle(GEOM_Function) _func;
102 };
#define TRANSLATE_ARG_ORIGINAL
Definition: GEOMImpl_ITranslate.hxx:30
#define TRANSLATE_ARG_NBITER2
Definition: GEOMImpl_ITranslate.hxx:34
#define TRANSLATE_ARG_VECTOR
Definition: GEOMImpl_ITranslate.hxx:29
#define TRANSLATE_ARG_VECTOR2
Definition: GEOMImpl_ITranslate.hxx:35
#define TRANSLATE_ARG_STEP1
Definition: GEOMImpl_ITranslate.hxx:31
#define TRANSLATE_ARG_DX
Definition: GEOMImpl_ITranslate.hxx:36
#define TRANSLATE_ARG_NBITER1
Definition: GEOMImpl_ITranslate.hxx:32
#define TRANSLATE_ARG_DY
Definition: GEOMImpl_ITranslate.hxx:37
#define TRANSLATE_ARG_STEP2
Definition: GEOMImpl_ITranslate.hxx:33
#define TRANSLATE_ARG_DISTANCE
Definition: GEOMImpl_ITranslate.hxx:39
#define TRANSLATE_ARG_POINT2
Definition: GEOMImpl_ITranslate.hxx:28
#define TRANSLATE_ARG_POINT1
Definition: GEOMImpl_ITranslate.hxx:27
#define TRANSLATE_ARG_DZ
Definition: GEOMImpl_ITranslate.hxx:38
Definition: GEOMImpl_ITranslate.hxx:42
double GetDistance()
Definition: GEOMImpl_ITranslate.hxx:89
void SetStep2(double theStep)
Definition: GEOMImpl_ITranslate.hxx:71
void SetDZ(double theDZ)
Definition: GEOMImpl_ITranslate.hxx:95
Handle(GEOM_Function) GetVector2()
Definition: GEOMImpl_ITranslate.hxx:81
Handle(GEOM_Function) _func
int GetNbIter1()
Definition: GEOMImpl_ITranslate.hxx:69
double GetDZ()
Definition: GEOMImpl_ITranslate.hxx:97
double GetStep1()
Definition: GEOMImpl_ITranslate.hxx:65
double GetDY()
Definition: GEOMImpl_ITranslate.hxx:93
void SetVector(Handle(GEOM_Function) theVector)
Definition: GEOMImpl_ITranslate.hxx:55
double GetStep2()
Definition: GEOMImpl_ITranslate.hxx:73
GEOMImpl_ITranslate(Handle(GEOM_Function) theFunction)
Definition: GEOMImpl_ITranslate.hxx:45
void SetNbIter1(int theNbIter)
Definition: GEOMImpl_ITranslate.hxx:67
void SetPoint1(Handle(GEOM_Function) thePoint1)
Definition: GEOMImpl_ITranslate.hxx:47
Handle(GEOM_Function) GetVector()
Definition: GEOMImpl_ITranslate.hxx:57
void SetNbIter2(int theNbIter)
Definition: GEOMImpl_ITranslate.hxx:75
int GetNbIter2()
Definition: GEOMImpl_ITranslate.hxx:77
void SetDistance(double theDistance)
Definition: GEOMImpl_ITranslate.hxx:87
void SetPoint2(Handle(GEOM_Function) thePoint2)
Definition: GEOMImpl_ITranslate.hxx:51
void SetStep1(double theStep)
Definition: GEOMImpl_ITranslate.hxx:63
void SetDY(double theDY)
Definition: GEOMImpl_ITranslate.hxx:91
Handle(GEOM_Function) GetPoint2()
Definition: GEOMImpl_ITranslate.hxx:53
Handle(GEOM_Function) GetOriginal()
Definition: GEOMImpl_ITranslate.hxx:61
double GetDX()
Definition: GEOMImpl_ITranslate.hxx:85
Handle(GEOM_Function) GetPoint1()
Definition: GEOMImpl_ITranslate.hxx:49
void SetVector2(Handle(GEOM_Function) theVector)
Definition: GEOMImpl_ITranslate.hxx:79
void SetOriginal(Handle(GEOM_Function) theOriginal)
Definition: GEOMImpl_ITranslate.hxx:59
void SetDX(double theDX)
Definition: GEOMImpl_ITranslate.hxx:83
Standard_EXPORT gp_Vec GetVector(const TopoDS_Shape &theShape, Standard_Boolean doConsiderOrientation)
Get vector, defined by the given edge.
Definition: GEOMUtils.cxx:402