To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cadOpen lugnet.cad in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / 10023
10022  |  10024
Subject: 
Re: Getting complete set of Ldraw parts images
Newsgroups: 
lugnet.cad
Date: 
Fri, 16 May 2003 11:34:35 GMT
Viewed: 
611 times
  
Orion Pobursky wrote:

Like something that will take a supplied part .DAT file and make a label of
specified diminsions?  This would be insanely useful for me.  I actually
toyed with the idea myself.

That's pretty trivial to do with LDGLite and NetPBM/PBMplus.

    ldraw_file=some_lego_model.mpd
    rendering=`ldglite -l3 -ms -q -s1 -w1 ${ldraw_file} \
      | grep '^Write BMP8' | tail -1 | cut -d' ' -f3-`
    bmptoppm ${rendering} \
      | pnmscale -width 120 \
      | pnmtopng \
      > `basename ${ldraw_file} .mpd`.png

Play well,

Jacob

PS: I have a POSIX Shell script version of the above code, which
     includes some error checking and _maximum_ dimensions instead of
     fixed width. Should I publish it somewhere?  Where?
--
LEGO boats:
                 http://jacob.sparre.dk/LEGO/Transport/Skibe/



Message has 3 Replies:
  Re: Getting complete set of Ldraw parts images
 
Jacob I haven't tried LDGLite and NetPBM - could it be made to run through the entire LDraw parts directory and generate an image for each part? Thanks, James (...) (21 years ago, 16-May-03, to lugnet.cad)
  Re: Getting complete set of Ldraw parts images
 
(...) Hmm, this sounds really attractive. And you're able to run this under Unix? (...) I think I'd find that useful. I'm looking for ways to relieve some of the burden on Steve with respect to Partsref images. (...) You could start by posting it (...) (21 years ago, 16-May-03, to lugnet.cad)
  Re: Getting complete set of Ldraw parts images
 
(...) I'm interested in your method but I'm not all that well versed in the code you put up. I assume your not using MS OS to do this. Can you explain or point me somewhere I can find out about what you suggested. -Orion (21 years ago, 16-May-03, to lugnet.cad)

Message is in Reply To:
  Re: Getting complete set of Ldraw parts images
 
(...) <snip> Like something that will take a supplied part .DAT file and make a label of specified diminsions? This would be insanely useful for me. I actually toyed with the idea myself. -Orion (21 years ago, 15-May-03, to lugnet.cad)

18 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