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 / 4737
4736  |  4738
Subject: 
LDraw-to-Raves (was: POV in Part)
Newsgroups: 
lugnet.cad.dat.parts
Date: 
Wed, 25 Jun 2003 03:10:59 GMT
Viewed: 
1937 times
  
In lugnet.cad.dat.parts, Steve Bliss wrote:
However, getting an L3P-type interface to Anton Raves' library of parts
would be very nice, too.  I've got an LDraw2Raves translation table for
pages 1-5 of Anton's parts index, and I'm about halfway done writing
transforms for page 1.

OK, I've generated a complete translation list, matching up as many
parts from Anton's library to LDraw as possible.  I also worked through
the colors/textures/materials, making as many matches as I could.  I've
started creating POV-Ray include files for each part, defining an
ldraw-compatible wrapper for them.  They go something like this:

file 3001.arp
=====================================================
#macro ar_3001(color_tex)
h_block2_4(color_tex)
matrix <-2.5,0,0, 0,-2.5,0, 0,0,2.5, 30,24,-10>
#end
=====================================================

The 'arp' extension is for Anton Raves Part.  I suppose it could just as
well be .inc. Likewise, the ar prefix on the macro name is for Anton
Raves.

This ar_3001 macro is a drop-in replacement for the 3001_dot_dat object
that L3P generates (well, almost -- the color/texture is handled
differently).

I'm defining each wrapper in a separate file to make it easier for
POV-generating programs (like L3P) to determine whether any given LDraw
part has a counterpart in Anton's library, but without requiring a
separate parts list file.  Of course, this means there will be some 700
<1Kb files sitting around in a directory.  If that seems like a waate or
a bother, we could add a clear meta-tag to each macro, identifying the
translation, then put all the macros in one file.  Something like:

translate.inc
=====================================================
// LDRAW2RAVES FROM 3001.dat TO ar_3001 WITH color_parm
#macro ar_3001(color_tex)
h_block2_4(color_tex)
matrix <-2.5,0,0, 0,-2.5,0, 0,0,2.5, 30,24,-10>
#end

// LDRAW2RAVES FROM 3002.dat TO ar_3002 WITH color_parm
#macro ar_3002(color_tex)
h_block2_3(color_tex)
matrix <-2.5,0,0, 0,-2.5,0, 0,0,2.5, 20,24,-10>
#end
=====================================================

I realize the FROM, TO and WITH tags aren't necessary.  It's easier to
include them than to explain the proposed syntax.

Comments?  Interest?  Is this a good idea?  Bad idea?  Not any sort of
idea?

Steve



Message has 2 Replies:
  Re: LDraw-to-Raves (was: POV in Part)
 
In lugnet.cad.dat.parts, Steve Bliss wrote: <snip> (...) I like this quite a bit and if Lar's implements the request I made for L3P to wrap all the part defines in #IFNDEF statments, then these files should be drop in and go --Orion (21 years ago, 25-Jun-03, to lugnet.cad.dat.parts)
  Re: LDraw-to-Raves (was: POV in Part)
 
Just to drop in my 2 cents, I think putting them into one file would be better. Also, could you put up a quality comparison chart? Three shots of a couple of parts, each, so we can compare? Thanks, Mike (21 years ago, 15-Jul-03, to lugnet.cad.dat.parts)

Message is in Reply To:
  Re: POV in Part
 
(...) The 'dedicating ourselves to one tool' aspect is why I'd rather not allow POV-Ray code to be embedded in official LDraw part files. What I was suggesting was a separate library of POV-Ray parts that was designed from the start to be fully (...) (21 years ago, 21-Jun-03, to lugnet.cad.dat.parts)

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