Page 1 of 1

no space between two data in ep file

Posted: 01 Apr 2011, 07:26
by shirazbj
Hi,

I am tring to read an ep file with Ruby in SketchUP under Windows like this:

b = file.gets()
c=b.split(" ")

but the result section of the ep file is like this:

0.208646094863E+000-0.513313617099E-001-0.915625940530E-003
0.180604789668E+000-0.240882759294E-001-0.872767876563E-003

no space between two data if the value is negative. What format (in C?) is used to output like this?

Could I get a space or How could I split them in Ruby now?

Thanks in advance

Cean

Re: no space between two data in ep file

Posted: 01 Apr 2011, 16:51
by raback
Hi Cean

I added a fix to svn it will be active in the Windows installer after it is updated. Thanx for reporting.

-Peter

Re: no space between two data in ep file

Posted: 02 Apr 2011, 15:48
by shirazbj
I got an answer at sketchucation like this:

b = file.gets()
vx = b[0..19].strip.to_f
vy = b[20..38].strip.to_f
vz = b[39..-1].strip.to_f

It works for me.

Thanks Peter