Warning, /epic/scripts/view50/generate_eps is written in an unsupported language. File is not indexed.
0001 #!/usr/bin/env bash
0002
0003 #export DAWN_PS_PREVIEWER="derp"
0004
0005 function print_the_help {
0006 echo "USAGE: $0 <PRIM_FILE> "
0007 echo " OPTIONS: "
0008 echo " -t,--tag filename tag (default: view1)"
0009 exit
0010 }
0011
0012 FILE_TAG="view01"
0013 INPUT_FILE="../../g4_0000.prim"
0014
0015
0016 POSITIONAL=()
0017 while [[ $# -gt 0 ]]
0018 do
0019 key="$1"
0020
0021 case $key in
0022 -h|--help)
0023 shift # past argument
0024 print_the_help
0025 ;;
0026 -t|--tag)
0027 FILE_TAG="$2"
0028 shift # past argument
0029 shift # past value
0030 ;;
0031 -i|--input)
0032 INPUT_FILE="$2"
0033 shift # past argument
0034 shift # past value
0035 ;;
0036 *) # unknown option
0037 #POSITIONAL+=("$1") # save it in an array for later
0038 echo "unknown option $1"
0039 print_the_help
0040 shift # past argument
0041 ;;
0042 esac
0043 done
0044 set -- "${POSITIONAL[@]}" # restore positional parameters
0045
0046
0047 #cp ${INPUT_FILE} ${FILE_TAG}.prim
0048 dawncut 0 1 0 1 ${INPUT_FILE} ${FILE_TAG}.prim
0049 #dawncut 0 -1 0 1 ${FILE_TAG}_temp0.prim ${FILE_TAG}.prim
0050 #dawncut -1 0 0 1 ${INPUT_FILE} ${FILE_TAG}.prim
0051 # dawncut 1 0 0 1 ${INPUT_FILE} ${FILE_TAG}_temp0.prim
0052 # dawncut -1 0 0 1 ${FILE_TAG}_temp0.prim ${FILE_TAG}.prim
0053 ../../bin/dawn_tweak --mag 4 -z 15000 --draw 3 --theta 90 --phi 40 --light-theta 180 --light-phi 90
0054
0055 dawn -d ${FILE_TAG}.prim
0056 ps2pdf ${FILE_TAG}.eps ${FILE_TAG}_full.pdf
0057 gs -o ${FILE_TAG}.pdf -sDEVICE=pdfwrite \
0058 -c "[/CropBox [51 250 550 590] /PAGES pdfmark" \
0059 -f ${FILE_TAG}_full.pdf
0060
0061 pdftoppm ${FILE_TAG}.pdf ${FILE_TAG} -png -singlefile -cropbox -thinlinemode solid -aaVector yes -r 600
0062
0063 # Top view
0064 #dawncut 0 -1 0 1 ${INPUT_FILE} ${FILE_TAG}.prim
0065 dawncut 0 1 0 1 ${INPUT_FILE} ${FILE_TAG}_temp0.prim
0066 dawncut 0 -1 0 1 ${FILE_TAG}_temp0.prim ${FILE_TAG}.prim
0067 ../../bin/dawn_tweak --mag 10 --draw 1 --theta 270 --phi 90
0068 dawn -d ${FILE_TAG}.prim
0069 ps2pdf ${FILE_TAG}.eps ${FILE_TAG}_top_full.pdf
0070 gs -o ${FILE_TAG}_top.pdf -sDEVICE=pdfwrite \
0071 -c "[/CropBox [51 250 550 590] /PAGES pdfmark" \
0072 -f ${FILE_TAG}_top_full.pdf
0073
0074 pdftoppm ${FILE_TAG}_top.pdf ${FILE_TAG}_top -png -singlefile -cropbox -thinlinemode solid -aaVector yes