From: eap Date: Mon, 17 Jun 2013 12:41:01 +0000 (+0000) Subject: 0021684: EDF 2221 : Display the arguments and the name of the operations X-Git-Tag: BR_hydro_v_0_3_1~192 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c0b87081f9dd1a9766a419664be4ec09bcc86948;p=modules%2Fgeom.git 0021684: EDF 2221 : Display the arguments and the name of the operations + GEOMImpl_ICurveParametric.hxx \ --- diff --git a/src/GEOMImpl/GEOMImpl_ICurveParametric.hxx b/src/GEOMImpl/GEOMImpl_ICurveParametric.hxx new file mode 100644 index 000000000..cd6aaa774 --- /dev/null +++ b/src/GEOMImpl/GEOMImpl_ICurveParametric.hxx @@ -0,0 +1,87 @@ +// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// File : GEOMImpl_ICurveParametric.hxx +// Created : Mon Jun 17 14:14:08 2013 +// Author : Edward AGAPOV (eap) + +#ifndef __GEOMImpl_ICurveParametric_HXX__ +#define __GEOMImpl_ICurveParametric_HXX__ + +#include "GEOM_Function.hxx" + +/*! + * \brief Interface to data of analitically defined curve + * + * WARNING: this data co-exists with data of either GEOMImpl_IPolyline + * or GEOMImpl_ISpline + * + * GEOMImpl_IPolyline data scheme: + * - POLY_ARG_LENG 1 (int) + * - POLY_ARG_LAST 1 (GEOM_Function) + * - POLY_ARG_CLOS 2 (int) + * - POLY_CONSTRUCTOR 3 (int) + * - POLY_ARG_ARRAY 4 (HArray1OfReal) + * + * GEOMImpl_ISpline data scheme: + * - ARG_POINTS = 1, (HSequenceOfTransient) + * - ARG_CLOSED = 2, (int) + * - ARG_REORDER = 3, (int) + * - CONSTRUCTOR = 4, (int) + * - ARG_ARRAY = 5, (HArray1OfReal) + * - ARG_VEC_1 = 6, (GEOM_Function) + * - ARG_VEC_2 = 7 (GEOM_Function) + */ +struct GEOMImpl_ICurveParametric +{ + enum { + ARG_EXPR_X = 1, + ARG_EXPR_Y = 2, + ARG_EXPR_Z = 3, + ARG_MIN = 1, + ARG_MAX = 2, + ARG_STEP = 3, + ARG_NBSTEP = 4 + }; + GEOMImpl_ICurveParametric(Handle(GEOM_Function) theFunction): _func(theFunction) {} + + bool HasData() const { return !GetExprZ().IsEmpty(); } + + void SetExprX (const char* theExpr) { _func->SetString( ARG_EXPR_X, theExpr ) ; } + void SetExprY (const char* theExpr) { _func->SetString( ARG_EXPR_Y, theExpr ) ; } + void SetExprZ (const char* theExpr) { _func->SetString( ARG_EXPR_Z, theExpr ) ; } + void SetParamMin (double theMin ) { _func->SetReal( ARG_MIN , theMin ) ; } + void SetParamMax (double theMax ) { _func->SetReal( ARG_MAX , theMax ) ; } + void SetParamStep (double theStep ) { _func->SetReal( ARG_STEP , theStep ) ; } + void SetParamNbStep(double theNbStep) { _func->SetReal( ARG_NBSTEP, theNbStep) ; } + + TCollection_AsciiString GetExprX() const { return _func->GetString( ARG_EXPR_X ) ; } + TCollection_AsciiString GetExprY() const { return _func->GetString( ARG_EXPR_Y ) ; } + TCollection_AsciiString GetExprZ() const { return _func->GetString( ARG_EXPR_Z ) ; } + double GetParamMin () const { return _func->GetReal( ARG_MIN ) ; } + double GetParamMax () const { return _func->GetReal( ARG_MAX ) ; } + double GetParamStep () const { return _func->GetReal( ARG_STEP ) ; } + double GetParamNbStep() const { return _func->GetReal( ARG_NBSTEP ) ; } + + Handle(GEOM_Function) _func; +}; + +#endif diff --git a/src/GEOMImpl/Makefile.am b/src/GEOMImpl/Makefile.am index ff5e1e2d3..f4a04e8d7 100644 --- a/src/GEOMImpl/Makefile.am +++ b/src/GEOMImpl/Makefile.am @@ -94,6 +94,7 @@ salomeinclude_HEADERS = \ GEOMImpl_IPipeDiffSect.hxx \ GEOMImpl_IPipeShellSect.hxx \ GEOMImpl_IPipeBiNormal.hxx \ + GEOMImpl_ICurveParametric.hxx \ GEOMImpl_VectorDriver.hxx \ GEOMImpl_LineDriver.hxx \ GEOMImpl_DiskDriver.hxx \