Subject:
|
Re: Previous step color scaling
|
Newsgroups:
|
lugnet.cad
|
Date:
|
Wed, 17 Oct 2007 13:37:08 GMT
|
Viewed:
|
7309 times
|
| |
![Post a public reply to this message](/news/icon-reply.gif) | |
In lugnet.cad, Travis Cobbs wrote:
|
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
prevfile=''
for thisfile in $*; do
if [ "$prevfile" = "" ]; then
echo 0 !PREL3P -ldconfig normal.ldr > faded.$thisfile
cat $thisfile >> faded.$thisfile
else
echo 0 !PREL3P +codes none > faded.$thisfile
echo 0 !PREL3P -ldconfig faded.ldr >> faded.$thisfile
cat $prevfile >> faded.$thisfile
echo 0 !PREL3P -ldconfig normal.ldr >> faded.$thisfile
diff $prevfile $thisfile | egrep ^\> | cut -c3- >> faded.$thisfile
fi
prevfile=$thisfile
done
|
|
Example usage:
./fadesteps.sh CAR*.ldr
|
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 cant be sure it works.
- The output is a mixture of DOS and Unix line endings. The files generated by MLCAD have DOS line endings, and the extra lines added by the script have Unix line endings. LDView doesnt have a problem with this, but prel3p might. In cygwin, this can be corrected by adding | unix2dos at the end of each echo command (right before the > or >>). The output files are then in pure DOS format.
- The script would be a lot more useful if it actually included the prel3p execution as part of the script so that the output files were really faded, instead of just having prel3p meta-statements inside.
- On that note, adding an LDView command line to the script would likely also be useful, assuming you want to use LDView to generate the step images.
I think prel3p 1.3 needs to be released before the script can be updated to
automate things further.
--Travis
|
|
Message has 2 Replies: ![](/news/x.gif) | | 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)
| ![](/news/x.gif) | | 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)
|
Message is in Reply To:
![](/news/x.gif) | | 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)
|
34 Messages in This Thread: ![Previous step color scaling -Jaco van der Molen (15-Oct-07 to lugnet.cad)](/news/x.gif) ![](/news/246.gif) ![Re: Previous step color scaling -Travis Cobbs (15-Oct-07 to lugnet.cad)](/news/x.gif) ![](/news/246.gif) ![Re: Previous step color scaling -Jaco van der Molen (15-Oct-07 to lugnet.cad)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/268.gif) ![Re: Previous step color scaling -Don Heyse (15-Oct-07 to lugnet.cad)](/news/x.gif) ![](/news/46.gif) ![Re: Previous step color scaling -Travis Cobbs (17-Oct-07 to lugnet.cad)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: Previous step color scaling -Kevin L. Clague (16-Oct-07 to lugnet.cad)](/news/x.gif) ![](/news/46.gif) ![Re: Previous step color scaling -Jim DeVona (16-Oct-07 to lugnet.cad)](/news/x.gif) ![](/news/46.gif) ![Re: Previous step color scaling -Jaco van der Molen (16-Oct-07 to lugnet.cad)](/news/x.gif) ![](/news/46.gif) ![Re: Previous step color scaling -Jim DeVona (16-Oct-07 to lugnet.cad)](/news/x.gif) ![](/news/246.gif) ![Re: Previous step color scaling -Jim DeVona (16-Oct-07 to lugnet.cad)](/news/x.gif) ![](/news/46.gif) ![Re: Previous step color scaling -Timothy Gould (16-Oct-07 to lugnet.cad)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: Previous step color scaling -Jaco van der Molen (16-Oct-07 to lugnet.cad)](/news/x.gif) ![](/news/46.gif) ![Re: Previous step color scaling -Jim DeVona (17-Oct-07 to lugnet.cad)](/news/x.gif) ![](/news/46.gif) ![Re: Previous step color scaling -Travis Cobbs (17-Oct-07 to lugnet.cad)](/news/x.gif) ![](/news/46.gif) ![You are here](/news/here.gif) ![](/news/246.gif) ![Re: Previous step color scaling -Jim DeVona (17-Oct-07 to lugnet.cad)](/news/x.gif) ![](/news/46.gif) ![Re: Previous step color scaling -Jaco van der Molen (18-Oct-07 to lugnet.cad)](/news/x.gif) ![](/news/46.gif) ![PreL3P 1.3 -Jim DeVona (18-Oct-07 to lugnet.cad)](/news/x.gif) ![](/news/46.gif) ![Re: PreL3P 1.3 -help :) -Tore Eriksson (22-Oct-07 to lugnet.cad)](/news/x.gif) ![](/news/46.gif) ![Re: PreL3P 1.3 -help :) -Jim DeVona (22-Oct-07 to lugnet.cad)](/news/x.gif) ![](/news/46.gif) ![Re: PreL3P 1.3 -help :) -Jim DeVona (25-Oct-07 to lugnet.cad)](/news/x.gif) ![](/news/246.gif) ![Re: PreL3P 1.3 -help :) -Don Heyse (25-Oct-07 to lugnet.cad)](/news/x.gif) ![](/news/46.gif) ![Re: PreL3P 1.3 -help :) -Jim DeVona (25-Oct-07 to lugnet.cad, lugnet.cad.dev)](/news/x.gif) ![](/news/46.gif) ![PreL3P 1.4 -Jim DeVona (5-Nov-07 to lugnet.cad)](/news/x.gif) ![](/news/46.gif) ![Re: PreL3P 1.4 -Jim DeVona (6-Nov-07 to lugnet.cad, lugnet.cad.dev.mac)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: PreL3P 1.3 -help :) -Tore Eriksson (25-Oct-07 to lugnet.cad)](/news/x.gif) ![](/news/46.gif) ![Re: PreL3P 1.3 -help :) -Jim DeVona (25-Oct-07 to lugnet.cad)](/news/x.gif)
![](/news/x.gif) ![](/news/28.gif) ![](/news/x.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: Previous step color scaling -Jaco van der Molen (30-Oct-07 to lugnet.cad)](/news/x.gif) ![](/news/46.gif) ![Re: Previous step color scaling -Jim DeVona (30-Oct-07 to lugnet.cad)](/news/x.gif) ![](/news/46.gif) ![Re: Previous step color scaling -Jaco van der Molen (30-Oct-07 to lugnet.cad)](/news/x.gif) ![](/news/46.gif) ![Re: Previous step color scaling -Travis Cobbs (31-Oct-07 to lugnet.cad)](/news/x.gif) ![](/news/46.gif) ![Re: Previous step color scaling -Don Heyse (31-Oct-07 to lugnet.cad)](/news/x.gif) ![](/news/46.gif) ![Re: Previous step color scaling -Jaco van der Molen (2-Nov-07 to lugnet.cad)](/news/x.gif)
![](/news/x.gif) ![](/news/68.gif) ![Re: Previous step color scaling -Jaco van der Molen (2-Nov-07 to lugnet.cad)](/news/x.gif)
- 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
|
|
|
|