
# 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

proc edit_copymove {} {
    global data_available
    if $data_available(unstruct) {
	unstruct_copymove
    } elseif $data_available(struct) {
	struct_copymove
    } else {
	error "No mesh data is available"
    }
}

proc edit_smooth {} {
    global data_available
    
    if $data_available(unstruct) {
	unstruct_smooth
    } elseif $data_available(struct) {
	struct_smooth
    } else {
	error "No mesh data is available"
    }
}

proc edit_refine {} {
    global data_available
    if $data_available(unstruct) {
	unstruct_refine
    } elseif $data_available(struct) {
	struct_refine
    } else {
	error "No mesh data is available"
    }
}

proc edit_repair {} {
    global data_available
    if $data_available(unstruct) {
	unstruct_remesh
    } else {
	error "No mesh data is available"
    }
}

proc edit_coarsen {} {
    global data_available
    if $data_available(unstruct) {
	unstruct_coarsen
    } elseif $data_available(struct) {
	struct_coarsen
    } else {
	error "No mesh data is available"
    }
}

proc edit_merge {} {
    global data_available
    if $data_available(unstruct) {
	unstruct_merge
    } elseif $data_available(struct) {
	struct_merge
    } else {
	error "No mesh data is available"
    }
}

proc edit_extrude {} {
    global data_available
    if $data_available(unstruct) {
	unstruct_extrude
    } elseif $data_available(struct) {
	struct_extrude
    } else {
	error "No mesh data is available"
    }
}
