Domanda

I'm reading an IES file, here is a little blurb about them...

"The photometric data is stored in an ASCII file. Each line in the file must be less than 132 characters long and must be terminated by a carriage return/line-feed character sequence. Longer lines can be continued by inserting a carriage return/line-feed character sequence."

after a bunch of header information, the line i'm after is 14 lines down. But it can extend any number of lines down from there because of the 123 character restriction. And if you end and continue lines with a carriage return, how can I tell where to stop reading the data? And the following chunk of data is the exact format, a series of angles. Each set may or may not begin and/or end with 0, 90 & 180. What am I missing, how can I collect this data? Below is an example, starting at line 14. Thanks.

0 2.5 5 7.5 10 12.5 15 17.5 20 22.5 25 27.5 30 32.5 35 37.5
40 42.5 45 47.5 50 52.5 55 57.5 60 62.5 65 67.5 70 72.5 75
77.5 80 82.5 85 87.5 90

[no space]

0 22.5 45 67.5 90 112.5 135 157.5 180 202.5 225 247.5
270 292.5 315 337.5 360
È stato utile?

Soluzione

Google and the amazing people that post their open source code are your friends :) https://github.com/kmorin/IESparser/blob/master/IESParser.cs

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top