From: eficas <> Date: Fri, 31 Mar 2006 14:46:48 +0000 (+0000) Subject: PN : correction de bug X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d94aff50c461470ccade216433ac3a550dc84f1f;p=tools%2Feficas.git PN : correction de bug --- diff --git a/Editeur/TroisDPal.py b/Editeur/TroisDPal.py index 28a92944..c0cc0d07 100644 --- a/Editeur/TroisDPal.py +++ b/Editeur/TroisDPal.py @@ -38,6 +38,7 @@ class TroisDPilote: if generator.plugins.has_key(format): # Le generateur existe on l'utilise g=generator.plugins[format]() + g.init_jdc(self.node.get_jdc()) texte=g.gener(self.node) else: print "Le generateur n a pas ete trouvé" diff --git a/generator/generator_vers3DSalome.py b/generator/generator_vers3DSalome.py index 3ead9a95..d4cad291 100644 --- a/generator/generator_vers3DSalome.py +++ b/generator/generator_vers3DSalome.py @@ -79,6 +79,9 @@ class vers3DSalomeGenerator(PythonGenerator): self.init_ligne() + def init_jdc(self,jdc) : + self.jdc=jdc + def init_ligne (self) : self.boolGpMa = 0 self.commande = "" @@ -176,15 +179,23 @@ class vers3DSalomeGenerator(PythonGenerator): self.clefs=(obj.val,) def VALE(self,obj) : + atraiter=obj.val if len(self.clefs) > 1 : - assert (len(obj.val) == len(self.clefs)) + assert (len(atraiter) == len(self.clefs)) else : - obj.val=(obj.val,) - for k in range(len(obj.val)) : + atraiter=(atraiter,) + for k in range(len(atraiter)) : clef=self.clefs[k] - val =obj.val[k] + val =atraiter[k] if isinstance (val, Extensions.parametre.PARAMETRE): val=val.valeur + print val.__class__ + context={} + if type(val) == type("aaa") : + for p in self.jdc.params: + context[p.nom]=eval(p.val,self.jdc.const_context, context) + res=eval(val,self.jdc.const_context, context) + val=res self.dict_attributs[clef]=val def ANGL_REP(self,obj) :