Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.ruby > #3375

Re: Binary file: SAT

X-FeedAbuse http://nntpfeed.proxad.net/abuse.pl feeded by 88.191.16.109
Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.dougwise.org!nntpfeed.proxad.net!nospam.fr.eu.org!talisker.lacave.net!lacave.net!not-for-mail
From Alessandro Barracco <bomastudio@gmail.com>
Newsgroups comp.lang.ruby
Subject Re: Binary file: SAT
Date Fri, 22 Apr 2011 04:51:28 -0500
Organization Service de news de lacave.net
Lines 50
Message-ID <a9a17c857d094cdaea68f811a6bdfa1c@ruby-forum.com> (permalink)
References <f82185e10f19c74e1962c03aeccd4771@ruby-forum.com> <4fa8adc3b92c44287a399f6cb1aab3ff@ruby-forum.com> <e003a225f227d13a192196cfde414b7c@ruby-forum.com> <BANLkTimZvkXz=7bTAcdnwdU2AsH6MzYd8w@mail.gmail.com> <2cddb6943b03d69eca28d3dffeba1374@ruby-forum.com> <b1b002b0b933deeeb92ca664c4f7b79f@ruby-forum.com>
NNTP-Posting-Host bristol.highgroove.com
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 7bit
X-Trace talisker.lacave.net 1303466121 73439 65.111.164.187 (22 Apr 2011 09:55:21 GMT)
X-Complaints-To abuse@lacave.net
NNTP-Posting-Date Fri, 22 Apr 2011 09:55:21 +0000 (UTC)
In-Reply-To <b1b002b0b933deeeb92ca664c4f7b79f@ruby-forum.com>
X-Received-From This message has been automatically forwarded from the ruby-talk mailing list by a gateway at comp.lang.ruby. If it is SPAM, it did not originate at comp.lang.ruby. Please report the original sender, and not us. Thanks! For more details about this gateway, please visit: http://blog.grayproductions.net/categories/the_gateway
X-Mail-Count 382062
X-Ml-Name ruby-talk
X-Rubymirror Yes
X-Ruby-Talk <a9a17c857d094cdaea68f811a6bdfa1c@ruby-forum.com>
Xref x330-a1.tempe.blueboxinc.net comp.lang.ruby:3375

Show key headers only | View raw


> Do not think of binary files as containing lines.  A binary file is a
> long continuous sequence of integers contained in a varying number of
> bytes.

That's OK. but the file I need to parse is a special txt file (DXF 
format) that consist of couple-of-line: the 1st is a code, that specify 
an objectt-property (the colour of a line, the center of a circle, the 
hieght of a text, etc), the 2nd is the value associated with it.
Well, there is a special object, the 3dsolid, that have 4 or 5 copules 
like above, and a long series of couple that have the 1st line always 1 
and the 2nd one as binary data.

Group code         Description
8                  Layer name
70                 Modeler format version number (currently = 1)
..                ....
1                  Proprietary data (multiple lines < 255 characters 
each)
3                  Additional lines of proprietary data (if previous 
group 1 string is greater than 255 characters)(optional)

For exanple, the following draws a line, in the layer "Walls", from the 
point (16.5, 12.5,0.0) to (46.5,12.5,0.0).

 0
LINE
  8
Walls
 10
16.5
 20
12.5
 30
0.0
 11
46.5
 21
12.5
 31
0.0


My task is to "understand" the object "3dsolid" that have also the 
"Proprietary data", ie the binary data. Searching in Google I found that 
this data are set according to the ACIS *.sab standard (the link in the 
first post), so I think I can read that binary..... isn't it?

-- 
Posted via http://www.ruby-forum.com/.

Back to comp.lang.ruby | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Binary file: SAT Alessandro Barracco <bomastudio@gmail.com> - 2011-04-20 17:00 -0500
  Re: Binary file: SAT 7stud -- <bbxx789_05ss@yahoo.com> - 2011-04-20 19:02 -0500
    Re: Binary file: SAT 7stud -- <bbxx789_05ss@yahoo.com> - 2011-04-20 19:45 -0500
      Re: Binary file: SAT Roger Braun <roger@rogerbraun.net> - 2011-04-20 21:53 -0500
        Re: Binary file: SAT Alessandro Barracco <bomastudio@gmail.com> - 2011-04-21 03:06 -0500
          Re: Binary file: SAT 7stud -- <bbxx789_05ss@yahoo.com> - 2011-04-21 12:25 -0500
            Re: Binary file: SAT Alessandro Barracco <bomastudio@gmail.com> - 2011-04-22 04:51 -0500
              Re: Binary file: SAT 7stud -- <bbxx789_05ss@yahoo.com> - 2011-04-22 13:49 -0500
                Re: Binary file: SAT William Rutiser <wruyahoo05@comcast.net> - 2011-04-23 13:20 -0500
  Re: Binary file: SAT 7stud -- <bbxx789_05ss@yahoo.com> - 2011-04-21 12:53 -0500

csiph-web