#!/bin/ksh ## ## SCRIPT NAME: feinp_nas2stl_bygui ## in $FEDIR/scripts ## where FEDIR=/apps/nns_com/fea ## ######################################################################## ## PURPOSE: ## ** This script ## ** translates a NASTRAN input file containing GRID & element records ## ** --- like CTRIAx,CQUADx,CTETRA,CPENTA,CHEXA and many others --- ## ** into an STL file. ## ## ------- ## ## Makes 1 STL triangle (and its normal) from each CTRIAx element. ## ## Makes 2 STL triangles (and their normals) from each CQUADx element. ## ## Makes 4 STL triangles (and their normals) from each CTETRA element. ## ## Makes 8 STL triangles (and their normals) from each CPENTA element. ## ## Makes 12 STL triangles (and their normals) from each CHEXA element. ## ## etc. ## ------- ## NOTE: For FE models with solid elements, ## this is not a normal STL file which is usually triangles ## covering just the surfaces of an object. This STL file has pairs ## of 'interfacing' triangles (with normals in opposite directions) ## throughout the interior of the FE model --- as well as triangles ## on the surface of the model. ######################################################################## ## PROCESSING LOGIC: ## ## This script utility ## ## 0) SHOW INFO FOR THE OCCASIONAL USER: ## Presents a window describing this utility. The user continues ## by pressing a 'Proceed' button. This popup is presented via ## a Tcl-Tk 'confirm' (message-and-button(s)) utility. ## ## 1) GET NASTRAN FILENAME: ## Prompts for a fully-qulified NASTRAN input filename -- ## using a Tcl-Tk GUI interface for file navigation-and-selection. ## $FEDIR/tkGUIs/file_select_gui_ver2.tk ##----------- ## STEPS 2 & 3 CONVERT the NASTRAN FILE TO TWO FILES -- ## 1) a 'generic', 'free-format' grids=nodes file ## 2) a 'generic', 'free-format' elements file. ##----------- ## 2) GRID INFO EXTRACTION: ## ## Reads sequentially through the NASTRAN file and ## extracts the 'grid' records from the NASTRAN input file and creates ## a 'generic', 'free-format' grids-file (= nodes-file) in ## ${LOCDIR}/temp_freeform_nodeinfo.txt. ## ## The record-extraction and data-reformatting are done by an 'awk' ## program in the script ## $FEDIR/scripts/feinp_nas2freeform_nodeinfo ## There is a relatively small 'awk' program in-line within this script. ## ## 3) ELEMENT INFO EXTRACTION: ## ## Reads the NASTRAN file a second time and ## extracts most (if not all) of the various types of element records ## from the NASTRAN input file and creates ## a 'generic', 'free-format' elements-file in ## ${LOCDIR}/temp_freeform_elinfo.txt. ## ## The record-extraction and data-reformatting are done by an 'awk' ## program in the script ## $FEDIR/scripts/feinp_nas2freeform_elinfo ## To avoid a 'too big' error from 'awk', the 'awk' program for all ## this element reformatting was put in a separate file ## $FEDIR/scripts/feinp_nas2freeform_elinfo_awkprog. ## ## 4) SORT GRIDS & PASTE THE TWO 'generic' FE-GEOMETRY-INFO FILES TOGETHER: ## ## a) Sorts the 'generic' nodes/grids file by nodeid (2nd field) --- ## into file ${LOCDIR}/temp_freeform_nodes_els_info.txt ## ## b) Concatenates the 'free-format' elements-file onto this file. ## ## (In steps a & b, removes comment lines, which begin with '#'.) ## ## ## 5) TRANSLATE THE 'generic' FE-GEOMETRY-INFO FILE INTO AN STL file: ## ## Runs the 'awk' command in this script using the awk-program in ## $FEDIR/scripts/feinp_generic2stl_awkprog. ## ## Input is the 'generic' FE-geometry-info file. Output is an Ascii ## STL file. ## ## NOTE1: THE 'feinp_generic2stl_awkprog' PROGRAM LOGIC DEPENDS ON ## *ALL* THE 'GRID' RECORDS BEING BEFORE ## *ALL* THE 'CTRIAx' & 'CQUADx' ELEMENT RECORDS. ## ## NOTE2: THE (awk) PROGRAM LOGIC ASSUMES THE DATA IN THE NODE & ELEMENT ## RECORDS ARE IN FREE-FORMAT, SEPARATED BY SPACE(S). [This ## facilitates use of the default field separators used by Unix ## utilities like 'sort' and 'awk'.] ## ## NOTE3: The input could have been created from ABAQUS or SDRC Simulation ## Universal (or other FE) ASCII input files. I.e. in place of the ## utility scripts ## $FEDIR/scripts/feinp_nas2freeform_nodeinfo ## $FEDIR/scripts/feinp_nas2freeform_elinfo ## which uses ## $FEDIR/scripts/feinp_nas2freeform_elinfo_awkprog ## of steps 2 & 3, utility scripts ## $FEDIR/scripts/feinp_abq2freeform_nodeinfo ## $FEDIR/scripts/feinp_abq2freeform_elinfo ## which uses ## $FEDIR/scripts/feinp_abq2freeform_elinfo_awkprog ## could be devised to create the generic FE-geometry-info file ## that 'feinp_generic2stl_awkprog' processes. ## ## See the statements like if ($1=="CHEXA" || $1=="chexa") ## in 'feinp_nas2freeform_elinfo_awkprog' (and in ## 'feinp_generic2stl_awkprog') to see the supported elements ## --- and how the NASTRAN records are read and parsed. ## ## 6) Shows the resulting STL-format file with 'nedit -read', with ## a confirm-popup window indicating how to look for ## ######################################################################### ## HISTORICAL NOTE: ## The mathematics in 'feinp_generic2stl_awkprog' ## (for calculating the 'normal' info in STL records) is based ## on a NASTRAN(CTRIA3)-to-STL 'awk' script ## found in a 1998 ICCON mail from ## "Bronislav Plemenitas" of SLOVENIA ## to Harland Mayes of (?). ## Ref: ICCON STL-related e-mails in file ## /apps/simtec_2000/doc/STL_and_FEM_HELP_ICCON ## ------- ## ## The 'bronch' script was for CTRIA3 recs -- not CTRIAxs, CQUADs, CTETRAs, ## CPENTAs, CHEXAs, and some 1-dimensional elements like CBARs, CBEAMs, etc. ## ## This 'feinp_nas2stl_bygui' utility has been extended to create ## STL triangle data for those 2D, 3D, and 1D elements. ## ## Also, this utility uses a MUCH MORE EFFICIENT GRID-XYZ-INFO ARRAY-LOOKUP ## ROUTINE ('binary search') than the simple linear-scan routine used ## in the 'bronch' example. This makes it feasible to use on very ## large NASTRAN input files. ## ######################################################################## ## CALLED BY: 'nasview_tools' toolchest in $FEDIR/scripts, ## actually 'nasview_tools.chestdef' in $FEDIR/scripts. ## ## And 'nasview_tools' may be an option in the ## 'nasmain' script in $FEDIR/scripts ## i.e. by NASTRAN menu in nnsFEAmenu system. ######################################################################## ## TEST FILES: Test NASTRAN files with various elements are ## in directory /apps/nns_com/fea/demos_nas2stl ## and/or /apps/simtec_2000/test_files_nas2stl. ## Some of these NASTRAN input files are from ## /apps/msc/msc70/msc70/nast/demo ## and /apps/msc/msc70/msc70/nast/tpl. ## Others may be from NNS NASTRAN users. ######################################################################## ## MAINTENANCE HISTORY: ## Written by: B.Montandon O06 14Aug2000 Based on 'simtec_nastria2stl_bygui' ## and 'simtec_nastetra2stl_bygui' ## in $FEDIR/scripts ## See test scripts for various element types ## in /usr/people/bmo01/Dscrtest/test_nasinp2stl* ## Updated by: B.Montandon O06 15Aug2000 Put the large awk program ## in separate file ## $FEDIR/scripts/nasinp2stl_awkprog ## to avoid 'awk: too many args' msg. ## Updated by: B.Montandon O06 21Aug2000 Add new 'generic' extract scripts ## 'nasinp2freeform_nodeinfo' ## & 'nasinp2freeform_elinfo' ## based on NNS-Simtec scripts ## 'simtec_nas_tria_quad2stl_bygui' ## and 'simtec_nas_tetra_penta_hexa2stl_bygui' ## Updated by: B.Montandon O06 12Sep2000 Chg names of 'nasinp2*' scripts ## including this script, to ## 'feinp_nas2*' and 'feinp_generic*'. ## Updated by: B.Montandon O06 13Sep2000 Remove 'feinp_nas2freeform_nodeinfo' ## & 'feinp_nas2freeform_elinfo' and ## call all 3 awk-progs directly: ## 1) 'feinp_nas2freeform_nodeinfo_awkprog' ## 2) 'feinp_nas2freeform_elinfo_awkprog' ## 3) 'feinp_generic2stl_awkprog' ## like in ## 'feinp_nas2stl_nogui_TESTawkprogs' ######################################################################## ############################################################################# ## DEFINE VARS to allow running outside of the nnsFEAmenu system. ############################################################################# if test "$FEDIR" = "" then FEDIR="/apps/nns_com/fea" fi # . $FEDIR/scripts/clearnns ############################################################################# ## SAVE 'this hostname' for host-checks and form titles. ############################################################################# THISHOST=`hostname` ######################################################################## ## Popup a message via 'xconfirm'. A SAMPLE to use in case this ## utility is de-activated for a period --- or to provide an ## informational message via 'xconfirm' rather than 'confirm.tk', which ## follows. ######################################################################## ## ## xconfirm -c -header "NNS NAS-Geom-to-STL - Warning" -B DISMISS \ ## -t " NASTAN-input-Geometry-to-STL File Translator:" \ ## -t " " \ ## -t " This NASTRAN-to-STL translator" \ ## -t " is unavailable at this time. " \ ## -t " " \ ## -t " Exiting." \ ## -icon warning > /dev/null ## ## exit ## ######################################################################## ######################################################################### ## INFORM THE USER ABOUT HOW THIS UTILITY WORKS --- ## via a pop-up message window (a foreground process) ## that can be dismissed when the user is ready to continue. ######################################################################### CONFIRM_TEXT="\ NAS-Geom-to-STL File Translator: This utility uses GRID records and various 'element-connectivity' records of an MSC/NASTRAN input file to create an STL (stereolithography, triangulated geometry) file corresponding to faces of the elements. Examples: CTRIAx, CQUADx, CTETRA, CPENTA, CHEXA, etc. --- 1 triangle per CTRIAx, 2 triangles per CQUADx, 4 per CTETRA, 8 per CPENTA, 12 per CHEXA. Beam, bar, rod, and rigid elements could be translated to triangle representations also. ------------ The output 'temp.stl' file is put in local directory /local/scratch/$USER, if possible, to keep down network traffic and give a little faster startup of large image files. (Alternative: user's home directory) You can view the file with an NNS-SGI 'STL Viewer' utility. If it looks like a 'keeper', move the STL file to an appropriate /data directory. NNS-SGI STL Viewers are available --- in an NNS 'stltools' toolchest, which is aavailable as a command and in an NNS 'simtec toolchest'. Refs: $FEDIR/scripts/stltools $FEDIR/scripts/simtec NOTE: The interior of a solid NAS-STL model will be composed of 'coincident' triangular faces. If this STL file is read by the STL-Import option of a FEM modeler, the FEM modeler software may need to deal with the 'duplicate' faces/nodes to create a FEM model successfully. ------------ This NASTRAN-Geom-to-STL translator is based on an 'awk' script for a NASTRAN(CTRIA3)-to-STL translator found in a 1998 ICCON (I-DEAS User Group) e-mail from 'Bronislav Plemenitas' of SLOVENIA. Business address: AVL-AST d.o.o., Strossmayerjeva 30, 2000 Maribor, SLOVENIA tel.: +386 62 229452 11, fax.: +386 62 229452 22 This utility uses a MUCH MORE EFFICIENT GRID-XYZ-INFO ARRAY-LOOKUP ROUTINE ('binary search') than the simple linear-scan routine used in the 'bronch' example. This makes it feasible to use on very large NASTRAN input files. This utility will convert much more than 8,000 CTRIAx elements per minute, to 1 triangle per CTRIAx element --- much more than 120,000 elements/15-minutes. ------------ An attempt has been made to make this utility robust in the sense that it will automatically handle the different MSC/NASTRAN record formats: 1) FREE format, 2) SHORT-FIELD-FIXED format, and 3) LONG-FIELD-FIXED format. It is meant to support the MSC-recommended record syntax (for example, comma-separators in Free-Format and no imbedded blanks in any data field). A Nastran file of solid/shell elements can be produced from an I-DEAS Simulation solid/surface-FE-mesh, via the I-DEAS Mesh Generation task and the I-DEAS Write-Nastran Translator. ------------ If you have suggestions for improvement of this utility, please inform NNS dept O06, Distributed Engineering Applications Support. To continue, click the 'Proceed' button." export CONFIRM_TEXT CONFIRM_GEOM="+080+080" CONFIRM_MINSIZE="150 100" CONFIRM_TITLE="NAS-Geom-to-STL File Translator" # CONFIRM_COLOR="plum2" # CONFIRM_COLOR="#EEAEEE" # CONFIRM_COLOR="#CC99CC" CONFIRM_COLOR="#AA77AA" export CONFIRM_COLOR CONFIRM_TITLE CONFIRM_MINSIZE CONFIRM_GEOM JUNK=`$FEDIR/tkGUIs/confirm.tk PROCEED` ######################################################################### ## SET var LOCDIR to /local/scratch/$USER --- if possible -- ## for output STL file(s). ######################################################################### . $FEDIR/scripts/set_localuserdir ## cd $LOCDIR ######################################################################### ## Logic similar to the contents of 'set_localuserdir': ######################################################################### # if test ! -d /local/scratch/$USER # then # mkdir /local/scratch/$USER # fi # # if test -d /local/scratch/$USER # then # CURDIR="/local/scratch/$USER" # cd $CURDIR # else # echo " # PROBLEM: Cannot create directory /local/scratch/$USER under /local/scratch. # # Call 8-HELP and have SGI Systems Administration open up permission # on the /local/scratch directory." # read NNS_JUNK # # continue # exit # fi ######################################################################### ######################################################################### ## INITIALIZE A DIRECTORY-NAVIGATOR/FILE-SELECTOR, for the user ## to specify the input file. ######################################################################### ################################### ## OLD File Selector: ################################### ## . $FEDIR/scripts/set_filnam ## FILEIN=$filename1 ## ## if test "${FILEIN}" = "" ## then ## # continue ## # break ## exit ## fi ## ## FILEIN2=$FILEIN ## FIRSTCHAR=`echo $FILEIN2 | cut -c1-1` ## if test ! "${FIRSTCHAR}" = "/" ## then ## FILEIN=`pwd`/$FILEIN2 ## fi ################################### FILSEL_MSG="\ SELECT YOUR NASTRAN INPUT FILE -OR- PASTE A NASTRAN INPUT FILENAME INTO THE 'File Selection' FIELD ... for *TRANSLATION* to an STL file. -OR- click 'Cancel' to exit. Some test files are in $FEDIR/demos_nas2stl and /apps/simtec_2000/test_files_nas2stl" FILSEL_NUMLINES="6" ####################### ## SET FILE DIR & MASK. ####################### ## FOR TESTING: # set -x ## FOR TESTING: # FILSEL_MASK='/apps/simtec_2000/test_files_nas2stl/*.dat*' ## FOR TESTING: ## WORKS ALSO: FILSEL_MASK="$FEDIR/demos_nas2stl/*.dat*" # FILSEL_MASK="$FEDIR/demos_nas2stl/*.dat*" # FILSEL_MASK="${LOCDIR}/*.dat*" # FILSEL_MASK="${LOCDIR}/*.d*" # FILSEL_MASK="${LOCDIR}/*" # FILSEL_MASK="/data/xxxxx/${USER}/*.dat*" FILSEL_MASK="/data/xxxxx/${USER}/*.d*" # FILSEL_MASK="/data/xxxxx/${USER}/*" ####################################### ## IF THE SPECIFIED DIR IN THE MASK ## DOES NOT EXIST, SET A DEFAULT/EXAMPLE. ####################################### ## DOES NOT WORK: DIRTEMP=`dirname $FILSEL_MASK` ####################################### # # DIRTEMP=`dirname "$FILSEL_MASK"` # # if test ! -d $DIRTEMP # then # FILSEL_MASK="/data/xxxxx/${USER}/*.dat*" # fi ####################################### export FILSEL_MASK FILSEL_MSG FILSEL_NUMLINES # FILTER_AT_STARTUP=YES # export FILTER_AT_STARTUP ######################################################################## ## START OF PROMPTING LOOP, FOR FILE SELECTION. ######################################################################## # while true while : do ######################################################################## ## GET NASTRAN FILE NAME. ######################################################################## FILEIN=`$FEDIR/tkGUIs/file_select_gui_ver2.tk` if test "${FILEIN}" = "" then # continue # break exit fi ######################################################################### ## CHECK USER-SELECTED FILE FOR PROPER FILE TYPE. ######################################################################### NAS_CHECK=`file $FILEIN | grep ascii` if test "$NAS_CHECK" = "" then xconfirm -c -header "NAS-Geom-to-STL - Warning" \ -B DISMISS \ -t "The file" \ -t " $FILEIN" \ -t "is not an 'ascii text' file." \ -t " " \ -t "Try another file or exit (Cancel)." \ -icon warning > /dev/null ## -t "Exiting." \ ## -icon warning > /dev/null ## ## exit ############################################ ## AFTER WARNING USER OF IMPROPER FILE TYPE, ## RETURN TO FILE-SELECTION PROMPT. ############################################ CURDIRNAME=`dirname "$FILEIN"` # FILSEL_MASK="${CURDIRNAME}/*.dat*" FILSEL_MASK="${CURDIRNAME}/*.d*" # FILSEL_MASK="${CURDIRNAME}/*" export FILSEL_MASK # FILTER_AT_STARTUP=YES # export FILTER_AT_STARTUP continue fi ######################################################################### ## CONVERT the NASTRAN FILE TO TWO FILES -- ## 1) a 'generic', 'free-format' grids=nodes file ## 2) a 'generic', 'free-format' elements file ######################################################################### ######################################################################### ## AWK-PROG#1: ## CREATE THE 'GENERIC' GRIDS=NODES FILE. ######################################################################### NODESFILE="${LOCDIR}/temp_freeform_nodeinfo.txt" rm -f $NODESFILE ## $FEDIR/scripts/feinp_nas2freeform_nodeinfo $FILEIN $NODESFILE ## FOR TESTING: ## set -x ## FOR TESTING: Use awk-var DE_BUG to SET DEBUG=1 in the BEGIN section of ## $FEDIR/scripts/feinp_nas2freeform_elinfo_awkprog . # DEBUG=1 DEBUG=0 awk -v FILE_IN="$FILEIN" -v DE_BUG="$DEBUG" \ -f $FEDIR/scripts/feinp_nas2freeform_nodeinfo_awkprog \ $FILEIN > $NODESFILE ## FOR TESTING: ## set - ## FOR TESTING: ## SHOW the generic,free-form GRID-info file -- via 'nedit' in read-only mode. if test "$DEBUG" = "1" then nedit -read $NODESFILE & fi ######################################################################### ## AWK-PROG#2: ## CREATE THE 'GENERIC' ELEMENTS FILE. ######################################################################### ELSFILE="${LOCDIR}/temp_freeform_elinfo.txt" rm -f $ELSFILE ## $FEDIR/scripts/feinp_nas2freeform_elinfo $FILEIN $ELSFILE ## FOR TESTING: ## set -x ## FOR TESTING: Use awk-var DE_BUG to SET DEBUG=1 in the BEGIN section of ## $FEDIR/scripts/feinp_nas2freeform_elinfo_awkprog . # DEBUG=1 DEBUG=0 awk -v FILE_IN="$FILEIN" -v DE_BUG="$DEBUG" \ -f $FEDIR/scripts/feinp_nas2freeform_elinfo_awkprog \ $FILEIN > $ELSFILE ## FOR TESTING: ## set - ## FOR TESTING: ## SHOW the generic,free-form ELS-info file -- via 'nedit' in read-only mode. if test "$DEBUG" = "1" then nedit -read $ELSFILE & fi ######################################################################### ## PASTE THE TWO 'generic' FE-GEOMETRY-INFO FILES TOGETHER. ## (Remove the comment lines, which begin with '#' --- and sort ## the nodes/grids file by nodeid.) ######################################################################### GENERIC_FE_FILE="${LOCDIR}/temp_freeform_nodes_els_info.txt" rm -f $GENERIC_FE_FILE grep -v '^#' $NODESFILE | sort -k2n > $GENERIC_FE_FILE grep -v '^#' $ELSFILE >> $GENERIC_FE_FILE ######################################################################### ## AWK-PROG#3: ## TRANSLATE THE 'generic' FE-GEOMETRY-INFO FILE INTO AN STL file. ######################################################################### ## NOTE1: ## THE 'awk3' PROGRAM LOGIC DEPENDS ON *ALL* THE 'GENERIC' GRID RECORDS ## BEING BEFORE *ALL* THE 'GENERIC' ELEMENT RECORDS. ## NOTE2: ## THE 'awk3' PROGRAM LOGIC ASSUMES THE DATA IN THE NODE & ELEMENT ## RECORDS ARE IN FREE-FORMAT, SEPARATED BY SPACE(S). [This ## facilitates use of the default field separators used by Unix ## utilities like 'sort' and 'awk'.] ######################################################################### OUTFILE="${LOCDIR}/temp.stl" rm -f $OUTFILE ## FOR TESTING: ## set -x ## FOR TESTING: SET DEBUG=1 awk -v FILE_IN="$FILEIN" \ -f $FEDIR/scripts/feinp_generic2stl_awkprog \ $GENERIC_FE_FILE > $OUTFILE ## FOR PRODUCTION (all print to OUTFILE): # $GENERIC_FE_FILE > $OUTFILE ## OPTION FOR TESTING (all print to stdout): # $GENERIC_FE_FILE ## FOR TESTING: ## set - ######################################################################### ## ADD SOME HOW/WHEN-GENERATED INFO TO THE END OF THE STL FILE. ######################################################################### echo "\ ENDSOLID - created via $FEDIR/scripts/feinp_nas2stl_bygui ENDSOLID - `date '+%Y %b %d %a %T%p %Z'` on host $THISHOST ENDSOLID - Generated via 'generic,free-format' FE file $GENERIC_FE_FILE ENDSOLID - which was built from sorting the nodes file $NODESFILE ENDSOLID - and attaching the elements file $ELSFILE " >> $OUTFILE ######################################################################### ## SHOW the STL file -- via 'nedit' in read-only mode. ######################################################################### nedit -read $OUTFILE & ######################################################################### ## TELL THE USER WHAT TO LOOK FOR IN the STL file. ######################################################################### # xconfirm -c -header "NAS-Geom-to-STL - NOTE" -B DISMISS \ # -t "The full name of the STL file is" \ # -t " $OUTFILE" \ # -t " " \ # -t "If it contains no '*ERROR:' statements and" \ # -t "there is no x,y,z missing data in 'vertex' statements, you" \ # -t "can try viewing its shaded image in a 'NNS-SGI STL Viewer'." \ # -t " " \ # -t "To continue (translate another NASTRAN file or exit)," \ # -t "click the 'Dismiss' button." \ # -icon warning > /dev/null CONFIRM_TEXT="\ The full name of the STL file is $OUTFILE If it contains no '*ERROR:' statements and there is no missing x,y,z data in 'vertex' statements, you can try viewing its shaded image in a 'NNS-SGI STL Viewer'. To continue (translate another NASTRAN file or exit), click the 'Dismiss' button." export CONFIRM_TEXT CONFIRM_GEOM="+700+080" CONFIRM_MINSIZE="150 100" CONFIRM_TITLE="NAS-Geom-to-STL File Translator" CONFIRM_COLOR="plum2" # CONFIRM_COLOR="#EEAEEE" # CONFIRM_COLOR="#CC99CC" # CONFIRM_COLOR="#996699" export CONFIRM_COLOR CONFIRM_TITLE CONFIRM_MINSIZE CONFIRM_GEOM JUNK=`$FEDIR/tkGUIs/confirm.tk DISMISS` ######################################################################## ## RETURN TO FILE-SELECTION PROMPT. ######################################################################## CURDIRNAME=`dirname "$FILEIN"` # FILSEL_MASK="${CURDIRNAME}/*.dat*" FILSEL_MASK="${CURDIRNAME}/*.d*" # FILSEL_MASK="${CURDIRNAME}/*" export FILSEL_MASK FILSEL_MSG="\ SELECT ANOTHER NASTRAN INPUT FILE ... for *TRANSLATION* to an STL file. OR click 'Cancel' to exit." # FILTER_AT_STARTUP=YES # export FILTER_AT_STARTUP done ######################################################################## ## END OF prompting loop, for directory name. ########################################################################