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 / 14894
  Previous step color scaling
 
Hi all, I am looking for a way to render fast top view images and thus creating images like the original LEGO instructions they use in the Statue of Liberty. To do top view rendering was answered in another question I asked. Would it be possible to (...) (17 years ago, 15-Oct-07, to lugnet.cad)
 
  Re: Previous step color scaling
 
(...) I can't be sure, but it appears that LPub modifies the POV files that come out of L3P in order to get that effect, instead of modifying the LDraw files it sends to L3P/LDView/LDGLite. So until this is changed in LPub, it doesn't appear that (...) (17 years ago, 15-Oct-07, to lugnet.cad)
 
  Re: Previous step color scaling
 
(...) Pitty. Then the images MLCad produce will have to do. Thanks! (17 years ago, 15-Oct-07, to lugnet.cad)
 
  Re: Previous step color scaling
 
(...) That's too bad. I was just reading an article the other day that would've been perfect for this. (URL) was actually looking for something better than glzoompixels to rescale the image buffer, not the colors in the buffer.) Oh well, Don (17 years ago, 15-Oct-07, to lugnet.cad)
 
  Re: Previous step color scaling
 
(...) Travis, You are correct. LPub does this as a POV post-process. LPub could instead, do this in the step-dats with hexidecimal coloring, but I've not gotten that done (yet?) Kevin (17 years ago, 16-Oct-07, to lugnet.cad)
 
  Re: Previous step color scaling
 
(...) Yeah, that's a workable strategy. It's what I did here: (URL) assume LPub makes it easier for the user by coming up with the scaled colors automatically. Jim (17 years ago, 16-Oct-07, to lugnet.cad)
 
  Re: Previous step color scaling
 
(...) Wow. That looks nice. Can I do this too? You mentioned creating separate files for each cumulative step in the model - as Bricksmith exports. Isn't Bricksmith Mac software? I have a PC with MLCad... Jaco (17 years ago, 16-Oct-07, to lugnet.cad)
 
  Re: Previous step color scaling
 
(...) Sure, you will be able to. I used a modified version of PreL3P, my little tool for replacing color codes. I'll post version 1.3 which will include this ability (loading different configurations partway through a model) soon, once I take care (...) (17 years ago, 16-Oct-07, to lugnet.cad)
 
  Re: Previous step color scaling
 
(...) Until then, here's another little example. (URL) 1>> (URL) 2>> (URL) 3>> (URL) 4>> (URL) 5>> (URL) 6>> (URL) 7>> (URL) 8>> (URL) 9>> (URL) 10>> (URL) 11>> (URL) The current step is drawn with (URL) colors> (the defaults) and previous steps are (...) (17 years ago, 16-Oct-07, to lugnet.cad, FTX)
 
  Re: Previous step color scaling
 
--snip-- (...) That's an excellent trick. I may have to bookmark this thread and download the program when I have CAD running again. Tim (17 years ago, 16-Oct-07, to lugnet.cad, FTX)
 
  Re: Previous step color scaling  [DAT]
 
(...) Thank you! I will eagerly await and try it. (...) MLCad is able to export every step, but it exports steps without information at which line the previous step ends and were the next step begins. For example when I export the CAR (still a great (...) (17 years ago, 16-Oct-07, to lugnet.cad)
 
  Re: Previous step color scaling
 
(...) think it would be easier to just futz with the data during parsing. --Travis (17 years ago, 17-Oct-07, to lugnet.cad)
 
  Re: Previous step color scaling  [DAT]
 
(...) Correct. Technically, the prel3p commands affect color substitution on following lines, so you'll need to insert code in two places: once at the beginning of the model to use the "faded" colors, and again at whatever point you wish to restore (...) (17 years ago, 17-Oct-07, to lugnet.cad)
 
  Re: Previous step color scaling
 
(...) If you have access to a *nix machine, or have installed the appropriate cygwin components on a Windows box, the following script should take a bunch of step files spit out from MLCad and insert the appropriate PREL3P commands in. #! /bin/sh (...) (17 years ago, 17-Oct-07, to lugnet.cad, FTX)
 
  Re: Previous step color scaling
 
(...) I tried the script out in Windows using cygwin, and it seems to work. Some observations: Until prel3p 1.3 is released by Jim, I can't be sure it works. The output is a mixture of DOS and Unix line endings. The files generated by MLCAD have DOS (...) (17 years ago, 17-Oct-07, to lugnet.cad, FTX)
 
  Re: Previous step color scaling
 
Here's a slightly tweaked version that seems to work OK with paths and filenames containing spaces: #! /bin/sh prevfile='' for thisfile in "$@"; do if "$prevfile" = "" ; then echo 0 !PREL3P -ldconfig normal.ldr > "faded.$thisfile" cat "$thisfile" >> (...) (17 years ago, 17-Oct-07, to lugnet.cad, FTX)
 
  Re: Previous step color scaling
 
All previous posts look promising! If you guys could use your precious time to write some Windows tools to do things like executing the script and stuff I can't wait to try it out! (17 years ago, 18-Oct-07, to lugnet.cad, FTX)
 
  PreL3P 1.3
 
I posted the new version of PreL3P today. The only addition, of course, is support for meta commands at any point in the model. (URL) commands at the beginning of the model are still "special" in that they override the default command line options. (...) (17 years ago, 18-Oct-07, to lugnet.cad)
 
  Re: PreL3P 1.3 -help :)
 
(...) ==== 8< - - - (...) Too busy with my latest project, I haven't tried PreL3P that much yet. I may have misunderstood the -help option, because I tried the v1.3.1 both from DOS Prompt Box as well as from a batch file, with same result: ---...--- (...) (17 years ago, 22-Oct-07, to lugnet.cad)
 
  Re: PreL3P 1.3 -help :)
 
(...) For what it's worth, that is the error message that version 1.1 would report given the -help argument. Otherwise, you appear to be using it correctly. Do either of the synonyms "-h" or "--help" work? I can't seem to reproduce the problem. (...) (17 years ago, 22-Oct-07, to lugnet.cad)
 
  Re: PreL3P 1.3 -help :)
 
(...) I've added the ability to process multiple files in one run, but before I release that I'd like to check whether there's any more information regarding this -help issue. Can you confirm whether either of the alternate help options (-h or (...) (17 years ago, 25-Oct-07, to lugnet.cad)
 
  Re: PreL3P 1.3 -help :)
 
(...) Just curious, how'd you end up implementing that? If I recall, unix shells will expand a *.ldr arg for you, but on Windows it's left to the program to do it. Don (17 years ago, 25-Oct-07, to lugnet.cad)
 
  Re: PreL3P 1.3 -help :)
 
(...) Sorry, my wrong! I thought I used the latest version, but I didn't. All variants of the -help switch work on 1.3.1. Time to delete all outdated versions from my HD. :) /Tore (17 years ago, 25-Oct-07, to lugnet.cad)
 
  Re: PreL3P 1.3 -help :)
 
(...) Ah, thanks for bringing that to my attention. I was not aware of the difference. My addition currently understands multiple arguments with this syntax: prel3p 1.ldr 2.ldr 3.ldr Each ldr file is processed in place and the originals are copied (...) (17 years ago, 25-Oct-07, to lugnet.cad, lugnet.cad.dev)
 
  Re: PreL3P 1.3 -help :)
 
(...) No problem. Thanks for the clarification - I thought it was entirely possible that something else might have been intercepting the -help argument. Jim (17 years ago, 25-Oct-07, to lugnet.cad)
 
  Re: Previous step color scaling
 
And how can one create building instructions without access to a *nix machine (what is that anyway :-) and no cygwin components on a Windows PC? I am desperately looking for a way to create smooth building step images top view for a very large (...) (17 years ago, 30-Oct-07, to lugnet.cad, FTX)
 
  Re: Previous step color scaling
 
(...) Well, that's what LPub does, right? Anyway, PreL3P should work at a Windows DOS prompt (or whatever you call it), so the PreL3P-LDView technique we talk about here should be possible in Windows. The shell script does require unix or cygwin, (...) (17 years ago, 30-Oct-07, to lugnet.cad)
 
  Re: Previous step color scaling
 
(...) LOL! I know (ofcourse). I wrote it wrong. I ment: how can one use the script Travis provided to insert the PreL3P codes into the LDraw files :-) (...) No it won't be fun at all :-( (...) I am still a bit confused how to work things out with (...) (17 years ago, 30-Oct-07, to lugnet.cad)
 
  Re: Previous step color scaling
 
(...) Try the following (assumes Win2K/WinXP): Download cygwin from (URL) (click the "Install or update now!" link) Run cygwin's setup.exe file that you downloaded Follow the instructions for a default install and choose a working mirror. (I used (...) (17 years ago, 31-Oct-07, to lugnet.cad, FTX)
 
  Re: Previous step color scaling
 
(...) Or if you're really, really scared of cygwin, this StepFade.bat file might work on XP. But I didn't test it all that much, and I don't claim to know all the nuances of the old DOS fc and find commands. The unix diff and grep commands are so (...) (17 years ago, 31-Oct-07, to lugnet.cad, FTX)
 
  Re: Previous step color scaling
 
(...) Me? Scared? No :-) I have succesfully installed Cygwin on my XP PC and Vista Laptop. After some errors and Travis helping me solve those, I am now able to run his script and create LDraw files with the PreL3P commands in them. Thanks for your (...) (17 years ago, 2-Nov-07, to lugnet.cad, FTX)
 
  Re: Previous step color scaling
 
With much help of all the people who wrote replies in this thread, I was able to come close to a result I am going to be happy with. Special thanks goes to Travis Cobbs for his effort and patience in helping me out. And ofcourse Jim DeVona for his (...) (17 years ago, 2-Nov-07, to lugnet.cad)
 
  PreL3P 1.4
 
PreL3P 1.4 can process multiple files. It understands wildcard characters, too, so you can easily process many files at once in environments that don't perform wildcard expansion automatically (ie, "prel3p *.ldr"). (URL) always, please report any (...) (17 years ago, 5-Nov-07, to lugnet.cad)
 
  Re: PreL3P 1.4
 
(...) I've posted a Mac "Service" version, too. You put it in ~/Library/Services/, and then you can process any selected LDraw text by selecting "PreL3P" from the Services submenu of the current application menu. I haven't tested it much. Although (...) (17 years ago, 6-Nov-07, to lugnet.cad, lugnet.cad.dev.mac)

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