[Bf-python] svg2obj script.
jmsoler at free.fr
jmsoler at free.fr
Thu Mar 29 12:32:17 CEST 2007
Selon jmsoler at free.fr:
> Selon jmsoler at free.fr:
>
> > Selon jmsoler at free.fr:
> >
> > > ok, i will post a 059a soon...
> > >
> > > jms
> >
> > hum,
> > it seems that something in these changes make the script fail
> > in some cases.
> >
> > Traceback (most recent call last):
> > File "svg2obj_059a.py", line 1356, in functionSELECT
> > File "svg2obj_059a.py", line 1331, in scan_FILE
> > File "svg2obj_059a.py", line 1298, in build_HIERARCHY
> > File "svg2obj_059a.py", line 871, in draw_line_l
> > ValueError: invalid literal for float(): -0.085-0.396
>
>
> More exactly, the problem was already in the 059 version.
>
>
A "not" was missing in the lines :
i = ndata.find('-')
if i != -1 and ndata[i-1] not in ' ,e':
I also did a lot of tests and it seems that this code, at least in this
script, is often slower than :
if ndata.find('-')!=-1 and ndata[ndata.find('-')-1] not in [' ', ',', 'e']:
jms
More information about the Bf-python
mailing list