![]() |
|
|||
File indexing completed on 2024-06-26 07:05:16
0001 #!/bin/bash 0002 0003 echo "view2 produces a series of XY slices a different z locations." 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="view13" 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 # everthing downstream of z = 5 m 0048 dawncut 0 0 -1 -5000 ${INPUT_FILE} ${FILE_TAG}b.prim 0049 dawn -d ${FILE_TAG}b.prim 0050 ps2pdf ${FILE_TAG}b.eps ${FILE_TAG}b_full.pdf 0051 gs -o ${FILE_TAG}b.pdf -sDEVICE=pdfwrite \ 0052 -c "[/CropBox [50 175 550 675] /PAGES pdfmark" \ 0053 -f ${FILE_TAG}b_full.pdf 0054 pdftoppm ${FILE_TAG}b.pdf ${FILE_TAG}b -png -singlefile -cropbox 0055 0056 # 0057 #dawncut 0 1 0 10 ${INPUT_FILE} ${FILE_TAG}c_temp0.prim 0058 #dawncut 0 -1 0 0 ${FILE_TAG}c_temp0.prim ${FILE_TAG}c.prim 0059 #dawn -d ${FILE_TAG}c.prim 0060 #ps2pdf ${FILE_TAG}c.eps ${FILE_TAG}c_full.pdf 0061 #gs -o ${FILE_TAG}c.pdf -sDEVICE=pdfwrite \ 0062 # -c "[/CropBox [50 175 550 675] /PAGES pdfmark" \ 0063 # -f ${FILE_TAG}c_full.pdf 0064 #pdftoppm ${FILE_TAG}c.pdf ${FILE_TAG}c -png -singlefile -cropbox 0065 # 0066 ## slice at z = -1m 0067 #dawncut 0 0 1 -1000 ${INPUT_FILE} ${FILE_TAG}d_temp0.prim 0068 #dawncut 0 0 -1 1001 ${FILE_TAG}d_temp0.prim ${FILE_TAG}d.prim 0069 #dawn -d ${FILE_TAG}d.prim 0070 #ps2pdf ${FILE_TAG}d.eps ${FILE_TAG}d_full.pdf 0071 #gs -o ${FILE_TAG}d.pdf -sDEVICE=pdfwrite \ 0072 # -c "[/CropBox [50 175 550 675] /PAGES pdfmark" \ 0073 # -f ${FILE_TAG}d_full.pdf 0074 #pdftoppm ${FILE_TAG}d.pdf ${FILE_TAG}d -png -singlefile -cropbox 0075 # 0076 ## slice at z = -2m 0077 #dawncut 0 0 1 -2000 ${INPUT_FILE} ${FILE_TAG}e_temp0.prim 0078 #dawncut 0 0 -1 2001 ${FILE_TAG}e_temp0.prim ${FILE_TAG}e.prim 0079 #dawn -d ${FILE_TAG}e.prim 0080 #ps2pdf ${FILE_TAG}e.eps ${FILE_TAG}e_full.pdf 0081 #gs -o ${FILE_TAG}e.pdf -sDEVICE=pdfwrite \ 0082 # -c "[/CropBox [50 175 550 675] /PAGES pdfmark" \ 0083 # -f ${FILE_TAG}e_full.pdf 0084 #pdftoppm ${FILE_TAG}e.pdf ${FILE_TAG}e -png -singlefile -cropbox 0085 # 0086 0087 #https://geant4.kek.jp/~tanaka/DAWN/About_DAWNCUT.html 0088 # % dawncut a b c d input-file [output-file] 0089 # 0090 # input-file : Source DAWN-format file describing a 3D scene. 0091 # 0092 # output-file: Output DAWN-format file describing a plane-clipped 0093 # 3D scene. The default output stream is stdout. 0094 # 0095 # a, b, c, d : Parameters a, b, c, and d are double values to 0096 # define a clipping plane described with the following 0097 # equation: 0098 # 0099 # ax + by + cz + d = 0. 0100 # 0101 # Vector (a,b,c) defines the normal vector of 0102 # the clipping plane. 0103 # 3D scene data in the half space at the front side 0104 # of the clipping plane are clipped out and erased. 0105 # The normal vector (a,b,c) needs not be a unit vector. 0106 # If it is a unit vector, parameter "d" gives distance 0107 # between the clipping plane and origin (0,0,0).
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.5 LXR engine. The LXR team |
![]() ![]() |