From: eficas <> Date: Wed, 30 Nov 2005 07:33:16 +0000 (+0000) Subject: CCAR: ajout classe Variable dans le module param2 X-Git-Tag: CC_param_poursuite~50 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7281d8b0679f0adf09352c02d2a4e8653a34bf90;p=modules%2Feficas.git CCAR: ajout classe Variable dans le module param2 --- diff --git a/Extensions/param2.py b/Extensions/param2.py index d02aa46d..b5a9113e 100644 --- a/Extensions/param2.py +++ b/Extensions/param2.py @@ -74,5 +74,13 @@ class Constant(Formula): def eval(self): return self._value def __str__(self): return str(self._value) +class Variable(Formula): + def __init__(self,name,value): + self._name=name + self._value=value + def eval(self): return self._value + def __repr__(self): return "Variable('%s',%s)" % (self._name, self._value) + def __str__(self): return self._name + def cos(f): return Unop('cos', f) def sin(f): return Unop('sin', f)