Version: 9.12.0
GEOMImpl_ICurveParametric.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 // File : GEOMImpl_ICurveParametric.hxx
23 // Created : Mon Jun 17 14:14:08 2013
24 // Author : Edward AGAPOV (eap)
25 
26 #ifndef __GEOMImpl_ICurveParametric_HXX__
27 #define __GEOMImpl_ICurveParametric_HXX__
28 
29 #include "GEOM_Function.hxx"
30 
54 {
55  enum {
62  CP_ARG_NBSTEP = 4
63  };
64  GEOMImpl_ICurveParametric(Handle(GEOM_Function) theFunction): _func(theFunction) {}
65 
66  bool HasData() const { return !GetExprZ().IsEmpty(); }
67 
68  void SetExprX (const char* theExpr) { _func->SetString( CP_ARG_EXPR_X, theExpr ) ; }
69  void SetExprY (const char* theExpr) { _func->SetString( CP_ARG_EXPR_Y, theExpr ) ; }
70  void SetExprZ (const char* theExpr) { _func->SetString( CP_ARG_EXPR_Z, theExpr ) ; }
71  void SetParamMin (double theMin ) { _func->SetReal( CP_ARG_MIN , theMin ) ; }
72  void SetParamMax (double theMax ) { _func->SetReal( CP_ARG_MAX , theMax ) ; }
73  void SetParamStep (double theStep ) { _func->SetReal( CP_ARG_STEP , theStep ) ; }
74  void SetParamNbStep(double theNbStep) { _func->SetReal( CP_ARG_NBSTEP, theNbStep) ; }
75 
76  TCollection_AsciiString GetExprX() const { return _func->GetString( CP_ARG_EXPR_X ) ; }
77  TCollection_AsciiString GetExprY() const { return _func->GetString( CP_ARG_EXPR_Y ) ; }
78  TCollection_AsciiString GetExprZ() const { return _func->GetString( CP_ARG_EXPR_Z ) ; }
79  double GetParamMin () const { return _func->GetReal( CP_ARG_MIN ) ; }
80  double GetParamMax () const { return _func->GetReal( CP_ARG_MAX ) ; }
81  double GetParamStep () const { return _func->GetReal( CP_ARG_STEP ) ; }
82  double GetParamNbStep() const { return _func->GetReal( CP_ARG_NBSTEP ) ; }
83 
84  Handle(GEOM_Function) _func;
85 };
86 
87 #endif
Interface to data of analytically defined curve.
Definition: GEOMImpl_ICurveParametric.hxx:54
TCollection_AsciiString GetExprX() const
Definition: GEOMImpl_ICurveParametric.hxx:76
double GetParamStep() const
Definition: GEOMImpl_ICurveParametric.hxx:81
TCollection_AsciiString GetExprZ() const
Definition: GEOMImpl_ICurveParametric.hxx:78
void SetExprZ(const char *theExpr)
Definition: GEOMImpl_ICurveParametric.hxx:70
double GetParamMax() const
Definition: GEOMImpl_ICurveParametric.hxx:80
double GetParamMin() const
Definition: GEOMImpl_ICurveParametric.hxx:79
void SetExprX(const char *theExpr)
Definition: GEOMImpl_ICurveParametric.hxx:68
@ CP_ARG_STEP
Definition: GEOMImpl_ICurveParametric.hxx:61
@ CP_ARG_EXPR_Z
Definition: GEOMImpl_ICurveParametric.hxx:58
@ CP_ARG_EXPR_X
Definition: GEOMImpl_ICurveParametric.hxx:56
@ CP_ARG_EXPR_Y
Definition: GEOMImpl_ICurveParametric.hxx:57
@ CP_ARG_MAX
Definition: GEOMImpl_ICurveParametric.hxx:60
@ CP_ARG_NBSTEP
Definition: GEOMImpl_ICurveParametric.hxx:62
@ CP_ARG_MIN
Definition: GEOMImpl_ICurveParametric.hxx:59
double GetParamNbStep() const
Definition: GEOMImpl_ICurveParametric.hxx:82
void SetParamMax(double theMax)
Definition: GEOMImpl_ICurveParametric.hxx:72
void SetExprY(const char *theExpr)
Definition: GEOMImpl_ICurveParametric.hxx:69
TCollection_AsciiString GetExprY() const
Definition: GEOMImpl_ICurveParametric.hxx:77
bool HasData() const
Definition: GEOMImpl_ICurveParametric.hxx:66
void SetParamNbStep(double theNbStep)
Definition: GEOMImpl_ICurveParametric.hxx:74
void SetParamMin(double theMin)
Definition: GEOMImpl_ICurveParametric.hxx:71
Handle(GEOM_Function) _func
GEOMImpl_ICurveParametric(Handle(GEOM_Function) theFunction)
Definition: GEOMImpl_ICurveParametric.hxx:64
void SetParamStep(double theStep)
Definition: GEOMImpl_ICurveParametric.hxx:73