1 // Copyright (C) 2007-2016 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
22 // File : GEOMImpl_ICurveParametric.hxx
23 // Created : Mon Jun 17 14:14:08 2013
24 // Author : Edward AGAPOV (eap)
26 #ifndef __GEOMImpl_ICurveParametric_HXX__
27 #define __GEOMImpl_ICurveParametric_HXX__
29 #include "GEOM_Function.hxx"
32 * \brief Interface to data of analitically defined curve
34 * WARNING: this data co-exists with data of either GEOMImpl_IPolyline
37 * GEOMImpl_IPolyline data scheme:
38 * - POLY_ARG_LENG 1 (int)
39 * - POLY_ARG_LAST 1 (GEOM_Function)
40 * - POLY_ARG_CLOS 2 (int)
41 * - POLY_CONSTRUCTOR 3 (int)
42 * - POLY_ARG_ARRAY 4 (HArray1OfReal)
44 * GEOMImpl_ISpline data scheme:
45 * - ARG_POINTS = 1, (HSequenceOfTransient)
46 * - ARG_CLOSED = 2, (int)
47 * - ARG_REORDER = 3, (int)
48 * - CONSTRUCTOR = 4, (int)
49 * - ARG_ARRAY = 5, (HArray1OfReal)
50 * - ARG_VEC_1 = 6, (GEOM_Function)
51 * - ARG_VEC_2 = 7 (GEOM_Function)
53 struct GEOMImpl_ICurveParametric
64 GEOMImpl_ICurveParametric(Handle(GEOM_Function) theFunction): _func(theFunction) {}
66 bool HasData() const { return !GetExprZ().IsEmpty(); }
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) ; }
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 ) ; }
84 Handle(GEOM_Function) _func;