
# This code creates the user interface for the mesh editor.
#
# Copyright (c) 1997 Pacific Marketing and Consulting, Inc,
#       and ICEM Systems, GmbH.  All rights reserved.
# Author:  Wayne A. Christopher, wayne@icemcfd.com

foreach file {
    display_funcs
    unstruct_funcs
    file_funcs
    geometry_funcs
    geom_vid_funcs
    meshing_funcs
    misc_funcs
    output_funcs
    translation_funcs
    utility_funcs
    struct_funcs
    cart_funcs
    boco_funcs
    params_funcs
    rmi_funcs
    meshdirect_funcs
    regression_funcs
    reports_funcs
    hex_funcs
    wb_funcs
    
    geometry_subs
    meshing_subs
    file_subs
    diag_subs
    unstruct_subs
    struct_subs
    geoclean
    rmi_subs
    meshdirect_subs
    cart3d_funcs
} {
    source $batch_dir/$file.tcl
}

foreach file {
    poll
    exec_cmds
    projlib
    run_application
    regression
    misc
    colormap
    family_boco
} {
    source $guibase_dir/$file.tcl
}
#    select_geom
#    select_sub
#    batch_glue

set source_dirs [list $batch_dir $guibase_dir]

if ![info exists tdv_default] { set tdv_default .v.view }

set projlib ""
set uns_cur ""
set str_cur ""
set cart_file ""
set famboco_obj ""
set blank_family_color \#ff8000


#------ batch meshing scripting library (~cvs/scrib/lib) --jka
if {"" == [info commands scrib_lib_*]} {
    # note that med/Makefile does this: -ln -sf ../../scrib/lib lib/scrib
    global env
    # CVS directory structure
    set scribpath [file join $env(MED_ROOT) .. scrib lib scriblib.tcl]
    if [file exists $scribpath] {
        set env(ICEM_SCRIB) [file join $env(MED_ROOT) .. scrib]
        if ![catch {source $scribpath}] {
            if ![catch {::ScribLib}] {
                uplevel \#0 ::ScribLib::get_exported_procs
            }
        }
    } else {
        # customer directory structure
        set scribpath [file join $env(ICEM_ACN) lib scrib lib scriblib.tcl]
        if [file exists $scribpath] {
            if ![catch {source $scribpath}] {
                if ![catch {::ScribLib}] {
                    uplevel \#0 ::ScribLib::get_exported_procs
                }
            }
        }
    }
}
#------ xml-report generation library (~cvs/ic_xml/lib) --jka
if {"" == [info commands ic_xml_*]} {
    global env
    set icxmlpath [file join  $env(ICEM_ACN) lib ic_xml lib ic_xml_setup.tcl]
    if [file exists $icxmlpath] {
	catch { source $icxmlpath }
    }
}
