no space between two data in ep file

Post processing utility for Elmer
Post Reply
shirazbj
Posts: 27
Joined: 22 May 2010, 14:08

no space between two data in ep file

Post 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
raback
Site Admin
Posts: 4812
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: no space between two data in ep file

Post 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
shirazbj
Posts: 27
Joined: 22 May 2010, 14:08

Re: no space between two data in ep file

Post 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
Post Reply