Subject:
|
Re: Previous step color scaling
|
Newsgroups:
|
lugnet.cad
|
Date:
|
Wed, 31 Oct 2007 14:17:40 GMT
|
Viewed:
|
8730 times
|
| |
| |
In lugnet.cad, Travis Cobbs wrote:
|
In lugnet.cad, Jaco van der Molen wrote:
|
In lugnet.cad, Jim DeVona wrote:
|
In lugnet.cad, Jaco van der Molen wrote:
|
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?
|
Well, thats what LPub does, right?
|
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 :-)
|
Try the following (assumes Win2K/WinXP):
- Download cygwin from http://www.cygwin.com/ (click the Install or update now! link)
- Run cygwins setup.exe file that you downloaded
- Follow the instructions for a default install and choose a working mirror. (I used mirror.rhsmith.umd.edu after much trial and error.)
- Start->Run: cmd
- Note the directory that youre in, and explore to there in Windows Explorer
- Create a file named StepFade.sh (or whatever you want to call the script) in that directory, and paste the contents of my script text into that file. Modify the bits that I said to modify to suit your setup
- Start->All Programs->Cygwin->Cygwin Bash Shell
- Change into the directory containing your step files using the cd command. Note that cygwin is very strange with paths, so instead of C:, you use /cygdrive/c. Also, instead of \ (back slash) in paths, you use / (forward slash). So to go to C:\ldraw\models\TestModel, you would type the following:
cd /cygdrive/c/ldraw/models/TestModel
|
|
- (Replace Model above with the base filename of your model.)
Let me know if you have any questions or problems.
Some notes about the above:
- The directory you start out in when you run cmd is your USERPROFILE directory in Windows. In cygwin, this is considered to be your home directory.
- In the bash shell (and all other unix shells), ~ maps to your home directory, so ~/StepFade.sh tells it to run the StepFade.sh script thats located in your home directory. Thats why I had you place the script there. Alternatively, you can place it in C:\cygwin\usr\local\bin, and it will be in the path in cygwin, allowing you to just run it. (This assumes that you install cygwin into the C:\cygwin directory. If you put it elsewhere, adjust accordingly.)
|
Or if youre really, really scared of cygwin, this StepFade.bat file might
work on XP. But I didnt test it all that much, and I dont claim to know
all the nuances of the old DOS fc and find commands. The unix diff and
grep commands are so much easier to use.
@ECHO OFF
:Expand wildcard args and create a real file list.
IF EXIST #files.txt DEL #files.txt
:makelist
IF "%1."=="." GOTO gotlist
FOR %%i IN (%1) DO ECHO %%i >> #files.txt
SHIFT
GOTO makelist
:gotlist
:Process the files in that list and then clean up.
SET prevfile=
:fileloop
FOR /F %%f IN (#files.txt) DO CALL :eachfile %%f
IF EXIST #files.txt DEL #files.txt
IF EXIST tmpfile.txt DEL tmpfile.txt
IF EXIST tmpfile2.txt DEL tmpfile2.txt
GOTO done
:Subroutine to process each file in the list.
:eachfile
IF "%prevfile%."=="." GOTO firstfile
GOTO nextfile
:firstfile
ECHO Firstfile "%1"
ECHO 0 !PREL3P -ldconfig normal.ldr > faded.%1
TYPE %1 >> faded.%1
SET prevfile=%1
GOTO :eof
:nextfile
ECHO Nextfile "%1"
ECHO 0 !PREL3P +codes none > faded.%1
ECHO 0 !PREL3P -ldconfig faded.ldr >> faded.%1
TYPE %prevfile% >> faded.%1
ECHO 0 !PREL3P -ldconfig normal.ldr >> faded.%1
FC %prevfile% %1 > tmpfile.txt
FIND /i /v "FC: no differences encountered" <tmpfile.txt >tmpfile2.txt
FIND /i /v "Comparing files " <tmpfile2.txt >tmpfile.txt
FIND /i /v "*****" <tmpfile.txt >tmpfile2.txt
TYPE tmpfile2.txt >> faded.%1
SET prevfile=%1
GOTO :eof
:done
|
|
Have fun,
Don
|
|
Message has 1 Reply: | | 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)
|
Message is in Reply To:
| | 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)
|
34 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
|
|
|
|