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
no space between two data in ep file
-
- Site Admin
- Posts: 4823
- Joined: 22 Aug 2009, 11:57
- Antispam: Yes
- Location: Espoo, Finland
- Contact:
Re: no space between two data in ep file
Hi Cean
I added a fix to svn it will be active in the Windows installer after it is updated. Thanx for reporting.
-Peter
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
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
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