File indexing completed on 2026-04-10 07:49:33
0001
0002
0003 usage(){ cat << EOU
0004 cxr_solid.sh
0005 ============
0006
0007 ::
0008
0009 SLA=r0@ EYE=0,-0.5,0.75 TMIN=0.5 ./cxr_solid.sh
0010
0011
0012 Single solid renders of standard solids selected by solid label eg r1@
0013 the "@" is an alternate for "$" meaning to match the end of the string::
0014
0015 SLA=r0@ ./cxr_solid.sh
0016 SLA=r1@ ./cxr_solid.sh
0017 SLA=r2@ ./cxr_solid.sh
0018 SLA=r3@ ./cxr_solid.sh
0019 SLA=r4@ ./cxr_solid.sh
0020
0021
0022 For multiple invokations of this script see::
0023
0024 ./cxr_solids.sh
0025
0026
0027 Below need a non-standard CSGFoundry geometry and have not been tested recently
0028 ---------------------------------------------------------------------------------
0029
0030 Renders selecting special debug ONE_PRIM_SOLID selected by solid labels starting with r1p r2p
0031 etc... These typically select multiple solids that are presented with an IAS using
0032 Y shifts of twice the maximum extent of the selected solids. Hence the below
0033 show all the Prim in the corresponding standard solid arranged side by side::
0034
0035 SLA=r1p ./cxr_solid.sh
0036 SLA=r2p ./cxr_solid.sh
0037 SLA=r3p ./cxr_solid.sh
0038
0039 Renders selecting the special debug ONE_NODE_SOLID selected by solid labels starting with R2P0N etc::
0040
0041 SLA=R2P0N ./cxr_solid.sh
0042 SLA=R8P0N11,R8P0N13,R8P0N14,R8P0N16,R8P0N17,R8P0N18,R8P0N19,R8P0N20,R8P0N21,R8P0N22,R8P0N15,R8P0N26 ./cxr_solid.sh
0043
0044
0045
0046 EOU
0047 }
0048
0049 sla="r0@"
0050 export SLA=${SLA:-$sla}
0051
0052 eye="0,-5,0,1"
0053 look="0,0,0,1"
0054 tmin=0.1
0055 zoom=1.0
0056 quality=50
0057 cam=1
0058
0059 [ "${SLA:(-1)}" == "@" ] && eye="0,-1,0,1"
0060 [ "${SLA:(-1)}" == "@" ] && tmin=1.0
0061
0062 if [ "$SLA" == "r0@" ]; then
0063 zoom=2.0
0064 quality=80
0065 fi
0066
0067 export EYE=${EYE:-$eye}
0068 export LOOK=${LOOK:-$look}
0069 export ZOOM=${ZOOM:-$zoom}
0070 export TMIN=${TMIN:-$tmin}
0071
0072 nameprefix=cxr_solid_${SLA}_
0073
0074 if [ "$EYE" != "$eye" ]; then
0075 nameprefix=${nameprefix}_eye_${EYE}_
0076 fi
0077 if [ "$LOOK" != "$look" ]; then
0078 nameprefix=${nameprefix}_look_${LOOK}_
0079 fi
0080 if [ "$ZOOM" != "$zoom" ]; then
0081 nameprefix=${nameprefix}_zoom_${ZOOM}_
0082 fi
0083 if [ "$TMIN" != "$tmin" ]; then
0084 nameprefix=${nameprefix}_tmin_${TMIN}_
0085 fi
0086
0087 export CAM=${CAM:-$cam}
0088 export QUALITY=${QUALITY:-$quality}
0089
0090
0091
0092 export NAMEPREFIX=$nameprefix
0093 export OPTICKS_RELDIR=cam_${CAM}
0094 export OPTICKS_GEOM=cxr_solid_$SLA
0095
0096 stamp=$(date +"%Y-%m-%d %H:%M")
0097 version=$(CSGOptiXVersion 2>/dev/null)
0098
0099 export TOPLINE="./cxr_solid.sh $SLA # EYE $EYE TMIN $TMIN $stamp $version "
0100
0101 ./cxr.sh
0102
0103 exit 0