# $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
  menuItem "New Project..." aie_newProject
  menuItem "Open Project..." aie_openProject
  menuItem "Save Project..." aie_saveProject
  menuItem "Save Project As..." "aie_saveProject 1"
  menuItem "Close Project..." aie_closeProject
  menuItem "Change Working Dir..." aie_change_workdir
  separator

  menu Geometry
    menuItem "Open Geometry..." aie_open_geom
ifdef AI_ENV_IN_WB
    menu "Update Geometry..."
        menuItem "Replace Geometry..." "aie_wb_brep_load 0"
        menuItem "Merge Geometry..." "aie_wb_brep_load 1"
    menu END
endif
    menuItem "Save Geometry..." "aie_save_geom 0"
    menuItem "Save Geometry As..." "aie_save_geom 1"
    menuItem "Save Visible Geometry As..." "aie_save_geom 2"
    menuItem "Save Geometry As Version 4 File..." "aie_save_geom 1 1"
    menuItem "Close Geometry..." "aie_close_geom 2"
  menu END

ifndef AI_ENV_LSTC
  menu Mesh
    menuItem "Open Mesh..." aie_open_Mesh
    menuItem "Save Mesh..." aie_save_Mesh
    menuItem "Save Mesh As..." "aie_save_Meshas 0"
    menuItem "Save Visible Mesh As..." "aie_save_Meshas 1"
    menuItem "Close Mesh..." aie_close_Mesh
  menu END
endif



  separator

include menusFileImGeo.ttkrf

ifndef AI_ENV_LSTC
  menu "Import Mesh"
ifdef AI_ENV_CFD
      menuItem "From Acusolve" "aie_mesh_import acusolve"
endif
      menuItem "From Ansys" "aie_mesh_import ansys"
ifdef AI_ENV_CFD
      menuItem "From CFD++" "aie_mesh_import cfdxx"
      menuItem "From CFX4" "aie_mesh_import cfx4"
      menuItem "From CFX5" "aie_mesh_import cfx5"
      menuItem "From CGNS" "aie_mesh_import cgns"
#      menuItem "From Fast" "aie_mesh_import fast"
#      menuItem "From Fenfloss" "aie_mesh_import fenfloss"
#      menuItem "From Fensap" "aie_mesh_import fensap"
#      menuItem "From Fidap" "aie_mesh_import fidap"
      menuItem "From Fieldview" "aie_mesh_import fieldview"
      menuItem "From Fluent" "aie_mesh_import fluent"
endif
ifndef AI_ENV_CFD_ONLY
      menuItem "From LS-Dyna" "aie_import_lsdyna"
endif
      menuItem "From Nastran" aie_import_nastran_new
      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 Tascflow" "aie_mesh_import tascflow"
      menuItem "From TecPlot" "aie_mesh_import tecplot"
#      menuItem "From UH3D" "aie_mesh_import uh3d"
endif
  menu END
endif

  menu "Export Geometry"
#      menuItem "To IGES" "geoExportIgesDEZ show"
      menuItem "To IGES" "geoExportIgesDoit"
	menuItem "To Parasolid" "geoExportPsDoit"
#      menuItem "To STEP" "geoExportStepDoit"
      menuItem "To DDN..." geoExportDDNDoit
ifdef AI_ENV_BETA
      menuItem "To 3DM" "geoExport3DMDEZ show"
endif
  menu END

ifndef AI_ENV_LSTC
ifndef AI_ENV_CFD_ONLY
  menu "Export Mesh"
      menuItem "To Abaqus" aie_abaqus_file
#      menu "To Abaqus (old style)"
#          menuItem "Abaqus Family attributes" "aie_famboco_edit ABAQUS"
#          menuItem "Abaqus parameters" "aie_params_edit ABAQUS"
#          menuItem "Write Abaqus input file" "aie_mesh_export abaqus ABAQUS"
#      menu END

     menu "To Exodus"
          menuItem "Exodus Family attributes" "aie_famboco_edit EXODUS-II"
#          menuItem "Exodus parameters" "aie_params_edit EXODUS-II"
          menuItem "Write Exodus input file" "aie_mesh_export exodus Exodus"
      menu END

      menu "To Ideas"
          menuItem "Ideas Family attributes" "aie_famboco_edit IDEAS"
#          menuItem "Ideas parameters" "aie_params_edit IDEAS"
          menuItem "Write Ideas input file" "aie_mesh_export ideas Ideas"
      menu END

      menuItem "To LS-Dyna" aie_lsdyna_file

      menu "To Patran"
          menuItem "Patran Family attributes" "aie_famboco_edit Patran"
#          menuItem "Patran parameters" "aie_params_edit Patran"
          menuItem "Write Patran input file" "aie_mesh_export wpatran Patran"
      menu END

      menu "To Radioss"
          menuItem "Radioss Family attributes" "aie_famboco_edit RADIOSS"
#          menuItem "Radioss parameters" "aie_params_edit RADIOSS"
          menuItem "Write Radioss input file" "aie_mesh_export radioss Radioss"
      menu END

      menuItem "To Ansys" aie_ansys_file
#      menu "To Ansys (old style)"
#          menuItem "Ansys Family attributes" "aie_famboco_edit ANSYS"
#          menuItem "Ansys parameters" "aie_params_edit ANSYS"
#          menuItem "Write Ansys input file" "aie_mesh_export ansys Ansys"
#      menu END

      menuItem "Write STL file" "aie_mesh_export stl Stl"

ifdef AI_ENV_CFX
      menuItem "To CFX-5" "aie_mesh_export cfx5 CFX-5"
endif

  menu END
endif
endif

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

include menusFileReplay.ttkrf

ifndef AI_ENV_IN_WB
  menuItem Exit exitProgram
endif
topMenu END
  
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
topMenu Edit
  menuItem Undo "aie_undo 0"
  menuItem Redo "aie_undo 1"
  menuItem Delete "deleteEntityDEZ show"
  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"
ifdef AI_ENV_CART3D
# no cart3d anymore for version icemcfd 14.0 or higher
#  menuItem "Domain file->Cart3D Tri file" cart3d_convert_df2c3dtri
#  menuItem "Cart3D Tri file->Domain file" cart3d_convert_c3dtri2df
endif	
# separator
#  menu "Mesh Thickness"
#    menuItem "Calculate" "aie_thickness create"
#    menuItem "Remove" "aie_thickness clear"
#  menu END
endif

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

include meshpro/menusViewStd.ttkrf
  separator
  menuItem "Rotate" "mpRotateViewDEZ show"
  separator
  menu "View Control"
  menuItem "Save Current View" "va_display_set_view"
  menuItem "Edit/Save Views" "va_ezcad_load lib.tcl val_set_screen_position"
 menu END  
  menuItem "Save Hardcopy" "hardcopyDEZ show"
#  menu "Change Background for"
#    menuItem "Whole Screen" "aie_set_background both"
#    menuItem "Top of Screen" "aie_set_background top"
#    menuItem "Bottom of Screen" "aie_set_background bottom"
#  menu END
  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_marker
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" "ic_run_frontal dir [lindex [\$tdv_default screen2world 100 100] 1] tol 0.01"
  menuItem "Curve Length" "aie_viewInfo curve_length"
ifndef AI_ENV_LSTC
separator
  menuItem "Mesh Info" "aie_viewInfo mesh"
  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

#menu END
separator
  menuItem "Location" med_check_location
  menuItem "Distance" med_check_distance
  menuItem "Angle" med_check_angle
separator
  menuItem "Variables" vid_gui
ifndef AI_ENV_LSTC
separator
  menuItem "Domain File" "unstruct_print_info domain"
  menuItem "Mesh Report" "meshReportDEZ show"
endif
topMenu END
    
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
topMenu Settings
    menuItem "General" "setGeneralDEZ show"
ifndef AI_ENV_LSTC
ifndef AI_ENV_CFX
ifdef AI_ENV_FEA
    menuItem "Solver" aie_solver_setup
endif
endif
endif
    menuItem "Display" "setDisplayDEZ show"
    menuItem "Lighting" "setLightingDEZ show"
	menuItem "Background Style" "setBackgroundStyleDEZ show"
    menuItem "Mouse Bindings" "aie_mouse_bindings"
    menuItem "Selection" "setSelectDEZ show"
    menuItem "Memory" "setMemoryDEZ show"
    menuItem "Remote" "setRemoteDEZ show"
    menuItem "Speed" "setSpeedDEZ show"
    menuItem "Reset" aie_reset_project_defaults
    menu "Meshing"	
        menuItem "Hexa/Mixed" "hexMeshOptsDEZ show"
    menu END
topMenu END

