To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.dat.partsOpen lugnet.cad.dat.parts in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / LDraw Files / Parts / 4723
4722  |  4724
Subject: 
Re: POV in Part
Newsgroups: 
lugnet.cad.dat.parts, lugnet.admin.suggestions
Date: 
Wed, 11 Jun 2003 23:18:58 GMT
Viewed: 
3778 times
  
In lugnet.cad.dat.parts, Don Heyse wrote:
In lugnet.cad.dat.parts, Don Heyse wrote:
Since L3P already supports the LGEO part library, is it possible
to just add new LGEO parts and have L3P automatically use them?
The only problem I see with this is that the .tab files in the
LGEO library are binary files, but the format of the files seem
fairly simple.  For example, the l2p_elmt.tab file seems to have
an entry for each POV .inc element file.  These entries consist
of a 32 bit counter, an unknown 8 bit number, and a NULL terminated
string with the base filename of the .inc file containing the POV
code for the element.  If we knew what the unknown 8 bit number
was, it'd be a fairly simple matter to write a small program to
add new elements to the .tab file.

Yes, L3P would automatically support new LGEO parts if they were added
to the binary l2p_elmt.tab.

Here's a small program to dump the file out as text so we can
examine the unknown 8 bit value.

You can use the -d option to L3P to see the contents of LGEO's *.TAB files:
   l3p -d -lgeo somefile.dat | more
(mentioned a couple of years ago in http://news.lugnet.com/cad/?n=5526 :-)

   It looks to me like it contains
some flag bits.  Only 3 bits seem to be used (0x01, 0x02, and 0x80).
From the output it appears as if bit 0x80 indicates an element who's
ldraw part number was moved to a new number.  Bit 0x01 seems to
indicate a slope brick.  Perhaps this is a hint to pull use the
rough texture?  I'm not so sure about bit 0x02.  It seems to be used
on parts that may have old versions like the minifig head with a
solid stud.

I think you got it right. I also had to hack and guess the meaning.

I plan to begin using a plain text version l2p_elmt.txt
because the current binary format is inadequate,
please see http://news.lugnet.com/cad/dev/?n=6041

I didn't do it when I added LGEO support, because I thought Lutz would
still make updates to the LGEO library, and I felt he should take the initiative.
But he has been silent for two years and I think it's time to move on
to the plain text format.

Another possibility is Anton Raves's library.
But it will take a huge effort to get started, because we need a big conversion
table including transformations.
It's easier to add a new part to the LGEO library,
but which library to use, I think will depend on the preference of POV coding style
of the coming POV part authors, LGEO style or Anton Raves style.
http://news.lugnet.com/cad/?n=5525
http://news.lugnet.com/cad/ray/?n=1726
/Lars



Message has 2 Replies:
  Re: POV in Part
 
Could folks please trim lugnet.admin.suggestions from this thread? Frank (21 years ago, 11-Jun-03, to lugnet.cad.dat.parts, lugnet.admin.suggestions)
  Re: POV in Part
 
(...) Are there any significant differences between the two libraries? I assume they both use solid modeling, not surface modeling. I don't think either library offers rounded edges on bricks (something I still miss from the L3G0 library). I've only (...) (21 years ago, 21-Jun-03, to lugnet.cad.dat.parts)

Message is in Reply To:
  Re: POV in Part
 
(...) Here's a small program to dump the file out as text so we can examine the unknown 8 bit value. It looks to me like it contains some flag bits. Only 3 bits seem to be used (0x01, 0x02, and 0x80). From the output it appears as if bit 0x80 (...) (21 years ago, 11-Jun-03, to lugnet.cad.dat.parts, lugnet.admin.suggestions)

42 Messages in This Thread:
















Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR