Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-09 07:48:57

0001 #!/bin/bash -l 
0002 
0003 usage(){ cat << EOU
0004 CSGMakerTest.sh : Creates CSGFoundry directories of CSGSolid/CSGPrim/CSGNode using CSG/tests/CSGMakerTest.cc
0005 ===============================================================================================================
0006 
0007 Used to create small test geometries, often with single solids.::
0008 
0009    cd ~/opticks/CSG         ## OR "c" shortcut function
0010 
0011    vi ~/.opticks/GEOM.txt   ## OR "geom" shortcut function 
0012                             ## uncomment or add GEOM name with projection suffix _XY etc..  
0013 
0014    ./CSGMakerTest.sh        ## sources bin/GEOM.sh to set GEOM envvar and runs CSGMakerTest to create the CSGFoundry  
0015 
0016 Subsequenly visualize the geometry with::
0017 
0018     cd ~/opticks/CSGOptiX   ## OR "cx" shortcut 
0019     EYE=-1,-1,-1 ./cxr_geochain.sh       ##  reads the GEOM.txt file to pick the CSGFoundry to load
0020 
0021 EOU
0022 }
0023 
0024 source $(dirname $BASH_SOURCE)/../bin/GEOM.sh trim 
0025 
0026 export CSGMaker_makeBoxedSphere_FACTOR=10
0027 
0028 bin=CSGMakerTest 
0029 echo === $BASH_SOURCE :  GEOM $GEOM bin $bin which $(which $bin)
0030 defarg="run"
0031 arg=${1:-$defarg}
0032 
0033 if [ "$arg" == "run" ]; then 
0034     $bin
0035     [ $? -ne 0 ] && echo $BASH_SOURCE run error && exit 1 
0036 fi 
0037 
0038 if [ "$arg" == "dbg" ]; then 
0039     case $(uname) in 
0040       Darwin) lldb__ $bin ;;
0041       Linux)  gdb__ $bin ;; 
0042     esac
0043     [ $? -ne 0 ] && echo $BASH_SOURCE dbg error && exit 2 
0044 fi 
0045 
0046 exit 0