To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 227
226  |  228
Subject: 
Re: Noting gaps in parts sequences
Newsgroups: 
lugnet.cad.dev
Date: 
Mon, 22 Feb 1999 20:18:08 GMT
Viewed: 
1572 times
  
On Mon, 22 Feb 1999 21:06:49 GMT, lehman@javanet.com (Todd Lehman)
wrote:

Cool -- that's a neat and extremely low-effort way to get labels!  Here's one
way to write the program in Perl (also handling spaces and Æ=>AE):

$ cat datstart
#!/usr/local/bin/perl5 -w

my %brick = ( ' ' => "3005",
             'Æ' => "3005-AE",
             map {$_ => "3005-$_"} ('0'..'9', 'A'..'Z') );

'8' and '9' aren't currently defined. Also, don't forget to handle other
undefined characters (maybe the above does this?)

print "0 @ARGV (needs work)\n",
     "0 File: {part number}.dat\n",
     "0 Author: {author name}\n",
     "0 Unofficial Element\n\n";

Could {part number} and {author name} be turned into arguments, as well?
Actually, if you have a generic app which generate message-images
on-the-fly, you could skip the Author: line entirely.

my @letters = map {$brick{uc($_)} || $brick{' '}} split(//, join(' ', @ARGV));

for my $I (0..$#letters)
{
  print "1 16 @{[$I*20]} 0 0 1 0 0 0 1 0 0 0 1 $letters[$I].dat\n";
}


$ datstart steve bliss

^ Oops.  How'd that $ sneak in there?

0 steve bliss (needs work)
0 File: {part number}.dat
0 Author: {author name}
0 Unofficial Element

1 16 0 0 0 1 0 0 0 1 0 0 0 1 3005-S.dat
1 16 20 0 0 1 0 0 0 1 0 0 0 1 3005-T.dat
1 16 40 0 0 1 0 0 0 1 0 0 0 1 3005-E.dat
1 16 60 0 0 1 0 0 0 1 0 0 0 1 3005-V.dat
1 16 80 0 0 1 0 0 0 1 0 0 0 1 3005-E.dat
1 16 100 0 0 1 0 0 0 1 0 0 0 1 3005.dat
1 16 120 0 0 1 0 0 0 1 0 0 0 1 3005-B.dat
1 16 140 0 0 1 0 0 0 1 0 0 0 1 3005-L.dat
1 16 160 0 0 1 0 0 0 1 0 0 0 1 3005-I.dat
1 16 180 0 0 1 0 0 0 1 0 0 0 1 3005-S.dat
1 16 200 0 0 1 0 0 0 1 0 0 0 1 3005-S.dat


If you wanted to use simplified mockup files, just use the header:

0 {Part Name} (needs work)
0 File: {part number}.dat
0 Author: {Author name}
0 Unofficial Element

If there's no obvious part number stamped on the part, you'd want to
coordinate with the part-numbering police squad to avoid mis-matches.

Oops, you're getting ahead of me.  :)  I just wanted to toss out a general
suggestion that I thought people might find useful.  I wish I could help do
some of the actual work toward this, but I'll have to leave it to someone who
understands the in's and out's better (assuming they find it useful, which
they may not).

Consider it as being a bit of 'just in case' information.  There are a
number of different unofficial parts floating around, which could be
incorporated in a reference image-base.

Steve



Message has 1 Reply:
  Re: Noting gaps in parts sequences
 
(...) Oh. OK, then the '0'..'9' would be '0'..'7'. (Any idea why 8 & 9 aren't defined? Did LEGO forget to include them or has no one gotten around to DAT-ifying them yet?) (...) These are handled, and mapped into spaces (plain 3005.dat) brick by: my (...) (26 years ago, 22-Feb-99, to lugnet.cad.dev)

Message is in Reply To:
  Re: Noting gaps in parts sequences  [DAT]
 
(...) Cool -- that's a neat and extremely low-effort way to get labels! Here's one way to write the program in Perl (also handling spaces and Æ=>AE): $ cat datstart #!/usr/local/bin/perl5 -w my %brick = ( ' ' => "3005", 'Æ' => "3005-AE", map {$_ => (...) (26 years ago, 22-Feb-99, to lugnet.cad.dev)

9 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