gmhelp.tcl

来自「算断裂的」· TCL 代码 · 共 88 行

TCL
88
字号
proc gmhelp {{cmdname ""}} {    ##   gmhelp cmdname    ##   provides brief help message on qmg commands    if {$cmdname == ""} {	puts "You are running QMG 2.0 in the Tcl/Tk shell.  For general information"	puts "and some tips on Tcl/Tk, see the QMG home page"	puts "http://www.cs.cornell.edu/home/vavasis/qmg-home.html"	puts "For information on a specific QMG command, type gmhelp <cmdname> where"	puts "<cmdname> is one of:"	puts "Mesh generation and related ops:"	puts "   gmboundary gmchecktri gmdouble gm_mcompo gmmeshgen"	puts "Graphics:"	puts "  gmviz gmvizgui gmrndcolor gmshowcolor"	puts "Creating/modifying breps and meshes:"	puts "  gm_addpropval gmapply gmcavity gmcoarsetopo gmmake_circ"        puts "  gmmake_cyl gmmake_torus gmmouse gmpolygon gm_cpoly gm_polytri"	puts "Information about objects:"	puts "  gmchecknormals gm_lookup_prop gmsummary gmmeshsize gm_objtype"	puts "Conversion and object I/O:"	puts "  gm_obj2list gm_list2obj gm_write gm_read gmxdr_write"        puts "  gmxdr_read gmq11read  gmoffread"	puts "Logging and utilities:"	puts "  gmevallog gmhelp gmset gm_url"	return    }    set cmd1 [info commands $cmdname]    set found no    if {[llength $cmd1] > 1} {	error "Ambiguous command name"    }    if {[llength $cmd1] == 1} {	set cmd1 [info procs $cmdname]	if {[llength $cmd1] >= 1} {	    set found proc	} else {	    set found builtin	}    } else {  ## not in info command	error "Command '$cmdname' not found"    }    set help {}    if {$found == "proc"} {	set body [info body $cmdname]	set split1 [split $body \n]	foreach line $split1 {	    set linet [string trim $line]	    if {[string length $linet] == 0} {		continue	    }	    if {[string range $linet 0 0] == "#"} {		append help $linet\n	    } else {		break	    }	}    } else {	global qmg_library	set fi [open $qmg_library/built_in_help r]	while 1 {	    set ret [gets $fi line]	    if {[string compare $line $cmdname:] == 0} {		break	    }	    if {$ret < 0} {		close $fi		error "Command '$cmdname' not found in built-in help file"	    }	}	while 1 {	    gets $fi line	    if {[string length [string trim $line]] <= 0} break	    append help $line\n	}    }    return $help}	    # ------------------------------------------------------------------# Copyright (c) 1999 by Cornell University.  All rights reserved# See the accompanying file 'Copyright' for authorship information,# the terms of the license governing this software, and disclaimers# concerning this software.# ------------------------------------------------------------------# This file is part of the QMG software.  # Version 2.0 of QMG, release date September 3, 1999# ------------------------------------------------------------------

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?