# $Revision$ on $Date$
# The above revision line needs to be the first line for ttkrf files
# Copyright (c) 2006 Ansys Inc

# The main, common menus at the start

topMenu File
ifndef AI_ENV_IN_WB2
  menuItem "New Project..." aie_newProject
  menuItem "Open Project..." aie_openProject
  menuItem "Save Project..." aie_saveProject
endif
ifdef AI_ENV_IN_WB2
ifndef AI_ENV_IN_WB
      menuItem "Save Project..." aie_wb2_save_project
endif
endif
ifndef AI_ENV_IN_WB2
  menuItem "Save Project As..." "aie_saveProject 1"
  menuItem "Close Project..." aie_closeProject
endif
ifndef AI_ENV_IN_WB2
ifndef AI_ENV_IN_WB
  menuItem "Change Working Dir..." aie_change_workdir
endif
endif
ifdef AI_ENV_IN_WB2
ifndef AI_ENV_IN_WB
    menuItem "Refresh Project..." "aie_wb2_refresh_upstream_data"
    menuItem "Update Project..." "aie_wb2_update"
endif
endif
  separator
  menu Geometry
ifdef AI_ENV_IN_WB2
    menuItem "Open Geometry..." "aie_open_geom 1 {} 1"
endif
ifndef AI_ENV_IN_WB2
    menuItem "Open Geometry..." aie_open_geom
endif
ifdef AI_ENV_IN_WB
ifndef AI_ENV_IN_WB2
    menu "Update Geometry..."
        menuItem "Replace Geometry..." "aie_wb_tetin_load 0 1"
        menuItem "Merge Geometry..." "aie_wb_tetin_load 1 1"
    menu END
endif
endif
ifdef AI_ENV_IN_WB2
ifndef AI_ENV_IN_WB
    menuItem "Save Geometry..." "aie_save_geom 0 0 1"
endif
endif
ifndef AI_ENV_IN_WB2
    menuItem "Save Geometry..." "aie_save_geom 0"
endif
    menuItem "Save Geometry As..." "aie_save_geom 1"
    menuItem "Save Visible Geometry As..." "aie_save_geom 2"
    menuItem "Save Only Some Geometry Parts As..." "aie_save_geom 3"
    menu "Save Geometry As Version..."
        menuItem "Version 4 File" "aie_save_geom 1 4"
        menuItem "Version 10 File" "aie_save_geom 1 10"
        menuItem "Version 13 File" "aie_save_geom 1 13"
        menuItem "Version 14.5 File" "aie_save_geom 1 14.5"
        menuItem "Version 15.0 File" "aie_save_geom 1 15"
        menuItem "Version 16.0 File" "aie_save_geom 1 16"
        menuItem "Version 18.0 File" "aie_save_geom 1 18"
    menu END
    menuItem "Import Parameters..." aie_import_parameters
    menuItem "Close Geometry..." "aie_close_geom 2"
menu END

ifndef AI_ENV_LSTC
  menu Mesh
ifdef AI_ENV_IN_WB2
    menuItem "Open Mesh..." "aie_open_Mesh 1 {} {} {} 1"
endif
ifndef AI_ENV_IN_WB2
    menuItem "Open Mesh..." aie_open_Mesh
endif
    menuItem "Open Mesh Shells Only..." "aie_open_Mesh 1 {} only_surface"    
ifdef AI_ENV_IN_WB
    menu "Update Mesh..."
        menuItem "Replace Mesh..." "aie_wb_dsmesh_load 1 1"
        menuItem "Merge Mesh..." "aie_wb_dsmesh_load 0 1"
    menu END
endif
    menuItem "Load from Blocking" "aie_convert_hexa_mesh uns"
ifdef AI_ENV_IN_WB2
    menuItem "Save Mesh..." "aie_save_Mesh {} {} 1"
endif
ifndef AI_ENV_IN_WB2
    menuItem "Save Mesh..." aie_save_Mesh
endif
    menuItem "Save Mesh As..." "aie_save_Meshas 0"
    menuItem "Save Visible Mesh As..." "aie_save_Meshas 1"
    menuItem "Save Only Some Mesh As..." aie_save_mesh_some
    menuItem "Close Mesh..." aie_close_Mesh
  menu END
endif

ifndef AI_NO_BLOCKING
  menu Blocking
ifdef AI_ENV_IN_WB2
    menuItem "Open Blocking..." "aie_open_blocking 1 {} 1"
endif
ifndef AI_ENV_IN_WB2
    menuItem "Open Blocking..." aie_open_blocking
endif
ifdef AI_ENV_IN_WB
    menuItem "Update Blocking" "aie_wb_update_blocking"
endif
    menuItem "Create from Unstruct Mesh" "aie_convert_uns_to_blocking"
    menuItem "Create Pipe Blocking from File" "aie_hex_show_piping_dez"
ifdef AI_ENV_IN_WB2
    menuItem "Save Blocking..." "aie_save_blocking 0 {} 1"
endif
ifndef AI_ENV_IN_WB2
    menuItem "Save Blocking..." "aie_save_blocking 0 {}"
endif
    menuItem "Save Blocking As..." "aie_save_blocking 1"
    menuItem "Save Blocking - 4.0 format..." "aie_save_blocking 1 format40"
ifdef AI_ENV_CFD
    menuItem "Save Unstruct Mesh" aie_save_unstruct_mesh
    menuItem "Save Multiblock Mesh" aie_save_multiblock_mesh
    menuItem "Write Super Domain" aie_write_super_domain
endif

ifdef AI_ENV_BETA
    menuItem "Update Reference Mesh" "aie_hex_ref_uns_mesh"
endif
    menuItem "Write Cartesian Grid" aie_hex_write_global_cart
    menuItem "Close Blocking..." aie_close_blocking
  menu END
endif

ifndef AI_ENV_LSTC
  menu Attributes
    menuItem "Open Attributes..." aie_open_attr
    menuItem "Save Attributes..." aie_save_attr
    menuItem "Save Attributes As..." aie_saveas_attr
    menuItem "Close Attributes..." aie_close_attr
  menu END

  menu Parameters
    menuItem "Open Parameters..." aie_open_params
    menuItem "Save Parameters..." aie_save_params
    menuItem "Save Parameters As..." aie_saveas_params
    menuItem "Close Parameters..." aie_close_params
  menu END

ifdef AI_ENV_GLOBAL
  menu Cartesian
	menuItem "Load Cartesian..." aie_open_cart
	menuItem "Save Cartesian..." aie_save_cart
	menuItem "Save Cartesian As..." aie_saveas_cart
	menuItem "Close Cartesian..." aie_close_cart
  menu END
endif

endif
separator

menuItem "Import Model" "aie_wb_load_import_wb_readers_gui"

include menusFileImGeo.ttkrf

ifndef AI_ENV_LSTC
  menu "Import Mesh"

ifdef AI_ENV_COMMONSTRUCT
include commonstruct/commonstruct_import_menu.ttkrf
endif

ifndef AI_ENV_COMMONSTRUCT
ifdef AI_ENV_CFD
ifndef AI_ENV_CFX
ifdef AI_ENV_IN_LINUX
      menuItem "From Acusolve" "aie_mesh_import acusolve"
endif
endif
endif
      menuItem "From ANSYS" "aie_mesh_import ansys"
      menuItem "From Abaqus" "aie_mesh_import abaqus"
ifdef AI_ENV_CART3D
      menuItem "From Cart3d" "aie_mesh_import cart3d"
endif
ifdef AI_ENV_CFD
      menuItem "From CFX" "aie_mesh_import cfx5"
      menuItem "From CGNS" "aie_mesh_import cgns"
      menuItem "From Fluent" "aie_mesh_import fluent"
endif
      menuItem "From LS-Dyna" "aie_mesh_import lsdyna"
      menuItem "From Nastran" "aie_mesh_import nastran"
      menuItem "From Patran" "aie_mesh_import patran"
ifdef AI_ENV_CFD
      menuItem "From Plot3d" "aie_mesh_import plot3d"
      menuItem "From Starcd" "aie_mesh_import starcd"
endif
      menuItem "From STL" "aie_mesh_import stl"
ifdef AI_ENV_CFD
      menuItem "From TecPlot" "aie_mesh_import tecplot"
ifdef AI_ENV_IN_LINUX
      menuItem "From Vectis" "aie_mesh_import vectis"
endif
endif
endif
      menuItem "From UGrid" "aie_mesh_import ugrid"
  menu END
endif

separator

menu "Export Geometry"
ifdef AI_ENV_IN_WIN
ifdef AI_ENV_BETA
        menuItem "To DDN..." "geoExportDDNDoit"
        menuItem "To IGES" "geoExportIgesDoit"
        menuItem "To Parasolid" "geoExportPsDoit"
endif
endif
ifdef AI_ENV_IN_LINUX
        menuItem "To IGES" "geoExportIgesDoit"
        menuItem "To Parasolid" "geoExportPsDoit"
endif
        menuItem "To Rhino 3DM" "geoExport3DMDEZ show"
        menuItem "To STL" geoExportSTLDoit
menu END

ifdef I_WANT_TO_KEEP_THE_ICEM_CFD_EXPORT_MESH_MENU
ifndef AI_ENV_LSTC
ifndef AI_ENV_ANSYS_SOLVERS
  menu "Export Mesh"
ifdef AI_ENV_COMMONSTRUCT
include commonstruct/commonstruct_export_menu.ttkrf
endif

ifndef AI_ENV_COMMONSTRUCT
      menuItem "To Abaqus" aie_abaqus_file
      menuItem "To ANSYS" aie_ansys_file
ifdef AI_ENV_AUTODYN
      menuItem "To AUTODYN" aie_autodyn_file
endif

ifdef AI_ENV_CFX
      menuItem "To CFX-5" "aie_mesh_export cfx5 CFX-5"
endif
     menu "To Exodus"
ifdef AI_ENV_CFD_ONLY
          menuItem "Exodus Part Attributes" "geo_famboco_edit EXODUS-II"
endif
ifndef AI_ENV_CFD_ONLY
          menuItem "Exodus Part Attributes" "aie_famboco_edit EXODUS-II"
endif
          menuItem "Write Exodus Input File" "aie_mesh_export exodus Exodus"
      menu END
      menu "To Ideas"
ifdef AI_ENV_CFD_ONLY
          menuItem "Ideas Part Attributes" "geo_famboco_edit IDEAS"
endif
ifndef AI_ENV_CFD_ONLY
          menuItem "Ideas Part Attributes" "aie_famboco_edit IDEAS"
endif
          menuItem "Write Ideas Input File" "aie_mesh_export ideas Ideas"
      menu END
      menuItem "To LS-Dyna" aie_lsdyna_file
      menuItem "To Nastran" aie_nastran_file_export_doit
      menu "To Patran"
ifdef AI_ENV_CFD_ONLY
          menuItem "Patran Part Attributes" "geo_famboco_edit Patran"
endif
ifndef AI_ENV_CFD_ONLY
          menuItem "Patran Part Attributes" "aie_famboco_edit Patran"
endif
          menuItem "Write Patran Input File" "aie_mesh_export wpatran Patran"
      menu END
      menu "To Radioss"
ifdef AI_ENV_CFD_ONLY
          menuItem "Radioss Part Attributes" "geo_famboco_edit RADIOSS"
endif
ifndef AI_ENV_CFD_ONLY
          menuItem "Radioss Part Attributes" "aie_famboco_edit RADIOSS"
endif
          menuItem "Write Radioss Input File" "aie_mesh_export radioss Radioss"
      menu END

      menuItem "To FE Modeler" aie_fe_modeler_file_export
      menuItem "Write STL File" "aie_mesh_export stl Stl"
      menuItem "Spectral Elements" "exportSpectralElementsDEZ show"

endif
  menu END
endif
endif
endif

ifdef I_WANT_TO_KEEP_THE_ICEM_CFD_EXPORT_MESH_MENU
ifdef AI_ENV_ANSYS_SOLVERS
   menu "Export Mesh"
      menuItem "To ANSYS" aie_ansys_file
      menuItem "To LS-Dyna" aie_lsdyna_file
ifdef AI_ENV_AUTODYN
      menuItem "To AUTODYN" aie_autodyn_file
endif
      menuItem "To CFX-5" "aie_mesh_export cfx5 CFX-5"
      menuItem "To CFX-4" "aie_mesh_export cfx4 CFX-4"
      menuItem "To CFX-TASCflow" "aie_mesh_export tascflow tascflow"
      menuItem "To Fluent V6" "aie_mesh_export fluent6 fluent6"
   menu END	
endif
endif

ifdef I_WANT_TO_KEEP_THE_ICEM_CFD_EXPORT_MESH_MENU
ifdef AI_ENV_LSTC
   menu "Export Mesh"
	menuItem "LS-Pre" "aie_export_mesh_lspre"
   menu END	
endif
endif

separator

include menusFileReplay.ttkrf

ifndef AI_ENV_IN_WB
ifndef AI_ENV_IN_WB2
  menuItem Exit exitProgram
endif
ifdef AI_ENV_IN_WB2 
  menuItem Exit "aie_wb2_exit_icemcfd"
endif
endif
topMenu END
  
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

topMenu Edit
  menuItem Undo "aie_undo 0"
  menuItem Redo "aie_undo 1"
  menuItem "Clear Undo" "aie_undo_clear"
  menuItem Shell "file_shell ."
ifndef AI_ENV_LSTC
 separator
  menuItem "Facets -> Mesh" "aie_facets_to_mesh"
  menuItem "Mesh -> Facets" "aie_mesh_to_facets"
  menuItem "Struct mesh->CAD Surfaces" "aie_str_mesh_to_cad"
  menuItem "Struct mesh->Unstruct Mesh" "aie_str_mesh_to_uns"
  menuItem "Struct mesh->Super Domain" "aie_str_mesh_to_superdomain"
  separator
  menuItem "Shrink tetin file" aie_remove_header_lines_tetinfile
endif

topMenu END
    
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

topMenu View

include menusViewStd.ttkrf
  separator
  menu "View Control"
  menuItem "Save Current View" "va_display_set_view"
  menuItem "Edit/Load/Save Views" "va_ezcad_load lib.tcl val_set_screen_position"
  menu END  
  menuItem "Save Picture" "hardcopyDEZ show"
  menuItem "Mirrors and Replicates" "aie_symmetry_view_fm set_win"

  separator
include menusViewAnno.ttkrf

  menuItem "Add Marker" disp_add_marker
  menuItem "Clear Markers" disp_clear_markers
ifndef AI_ENV_LSTC
  menuItem "Mesh Cut Plane" "cutPlaneDEZ show"
endif

topMenu END

topMenu "Info "
  menuItem "Geometry Info" "aie_viewInfo geometry"
  menuItem "Surface Area" "aie_viewInfo surface_area"
  menuItem "Frontal Area" aie_run_frontal
  menuItem "Curve Length" "aie_viewInfo curve_length"
  menuItem "Curve Direction" "aie_viewInfo curve_direction"
ifndef AI_ENV_LSTC
separator
  menuItem "Mesh Info" "aie_viewInfo mesh"
  menuItem "Mesh Area/Volume" "aie_viewInfo area_volume"
  menuItem "Element Info" "aie_viewInfo element"
  menuItem "Node Info" "aie_viewInfo node"
ifndef AI_ENV_CFD_ONLY
  menuItem "Element Type / Property Info" aie_element_summary
endif
endif

separator
	menuItem "Toolbox" aie_val_calc_dialog
ifndef AI_ENV_LSTC
separator
  menuItem "Project File" "aie_print_project_info"
  menuItem "Domain File" "unstruct_print_info domain"
  menuItem "Mesh Report" "meshReportDEZ show"
endif
topMenu END
    
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

topMenu Settings
    menuItem "General" "setGeneralDEZ show"
    menuItem "Tools" "setProductDEZ show"
    menuItem "Display" "setDisplayDEZ show"
    menuItem "Speed" "setSpeedDEZ show"
    menuItem "Memory" "setMemoryDEZ show"
    menuItem "Lighting" "setLightingDEZ show"
    menuItem "Background Style" "setBackgroundStyleDEZ show"
    menuItem "Mouse Bindings/Spaceball" "aie_mouse_bindings"
    menuItem "Selection" "setSelectDEZ show"
    menuItem "Remote" "setRemoteDEZ show"
    separator
    menuItem "Model/Units" "setModelOptionsDEZ show"
    menuItem "Geometry Options" "setGOptionsDEZ show"
    menu "Meshing Options"
        menuItem "Hexa Meshing" "hexMeshOptsDEZ show"
        menuItem "Quality/Histogram Info" "setQualityInfoDEZ show"
        menuItem "Edge Info" "setDetailInfoDEZ show"
    menu END
        menuItem "Import Model Options" "setImportModelOptionsDEZ show"
ifndef AI_ENV_LSTC
ifndef AI_ENV_CFX
    menuItem "Solver" aie_solver_setup
endif
endif
ifdef AI_ENV_IN_WB2
    separator
    menu "Workbench Parameters"
        menuItem "Workbench User Defined Parameters" "setWorkbenchInputDEZ show"
        menuItem "Workbench Output Parameters" "setWorkbenchOutputDEZ show"
    menu END
ifndef AI_ENV_BETA
    separator
endif
endif
ifdef AI_ENV_BETA
    separator
    menuItem "Restore" aie_restore_project_defaults
endif
    menuItem "Reset" aie_reset_project_defaults
topMenu END




