visualization dialog box

This commit is contained in:
Joachim Schoeberl 2010-04-04 06:25:23 +00:00
parent 9b6e013ca0
commit 4b71358839
6 changed files with 89 additions and 88 deletions

View File

@ -3518,12 +3518,10 @@ proc runtestdialog { } {
if {[winfo exists .runtest_dlg] == 1} {
wm withdraw $w
wm deiconify $w
# wm geometry $w =270x100
focus $w
} {
toplevel $w
# wm geometry $w =270x100
# in2d testing #
frame $w.in2dframe

View File

@ -27,7 +27,7 @@ menu .ngmenu.file
.ngmenu.file add command -label "Load Geometry..." -accelerator "<l><g>" \
-command {
set types {
{"All Geometry types" { .stl .stlb .step .stp .geo .in2d .igs .iges .brep .in2dnew .sat} }
{"All Geometry types" { .stl .stlb .step .stp .geo .in2d .igs .iges .brep .sat} }
{"IGES Geometry" {.igs .iges} }
{"BREP OpenCascade Geometry" {.brep} }
{"STL Geometry" {.stl} }
@ -35,7 +35,6 @@ menu .ngmenu.file
{"STEP Geometry" {.step .stp} }
{"Geometry file" {.geo} }
{"2D Geometry" {.in2d } }
{"2D Geometry New" {.in2dnew } }
}
set ACISavailable [Ng_ACISCommand isACISavailable]
@ -43,10 +42,6 @@ menu .ngmenu.file
lappend types {"ACIS Geometry" {.sat} }
}
# {"All Geometry types" {.stl .stlb .step .stp .geo .in2d .igs .iges .brep .in2dnew} }
# {"Naomi Geometry" {.nao} }
# {"New Geometry file" {.ngg} }
if {[catch {
set file [tk_getOpenFile -filetypes $types -initialdir $dirname -typevariable loadgeomtypevar]
@ -398,10 +393,10 @@ set videoactive 0
## herbert tcl load menue
.ngmenu.file add command -label "Run tests ..." \
-command { runtestdialog }
# .ngmenu.file add command -label "Run tests ..." \
\# -command { runtestdialog }
##
.ngmenu.file add separator
# .ngmenu.file add separator
.ngmenu.file add command -label "Quit" -accelerator "<q>" \
-command { puts "Thank you for using $progname"; Ng_Exit; destroy . }

View File

@ -20,9 +20,12 @@ proc Ng_RunShell {} {
}
## global list for help index
set cmdindex {}
set hlpindex {}
set secindex {}
# ---> global var in variables.tcl
# set cmdindex {}
# set hlpindex {}
# set secindex {}
# print comd list
proc Ng_PrintCmdIndex { } {
@ -51,6 +54,9 @@ proc Ng_RegisterCmd { cmd section syntax {help ""} } {
global hlpindex
global cmdindex
global secindex
puts "register command $cmd"
if { [lsearch $cmdindex cmd] != -1 } {
puts "command '$cmd' already defined"
} else {
@ -64,6 +70,7 @@ proc Ng_RegisterCmd { cmd section syntax {help ""} } {
}
}
# general purpose commands
Ng_RegisterCmd "exit" "general" "exit" "exit Netgen shell mode"
#Ng_RegisterCmd "Ng_LoadGeometry" "netgen" "Ng_LoadGeometry <file>" "load geometry file"
@ -247,7 +254,5 @@ proc ngssolvepde {} {
NGS_SolvePDE
}
catch {source "${::ngdir}/ngtcltk/ngtesting.tcl"} errcode
catch {source "${::ngdir}/ngtesting.tcl"} errcode
# puts "errcode = $errcode"

View File

@ -64,7 +64,7 @@ proc ngtest { {t all} {f ""}} {
}
puts "\n ** testing in2d files in tutorials/ **"
set testdir "$::ngdir/../tutorials"
set testdir "$::ngdir/../share/netgen"
set in2dfiles { demo2d newin2d square v2in2d }
foreach {tfile} $in2dfiles {
if {$f != ""} { puts " * meshing file tutorials/$tfile.in2d..." }
@ -89,7 +89,7 @@ proc ngtest { {t all} {f ""}} {
}
puts "\n ** testing geo files in tutorials/ **"
set testdir "$::ngdir/../tutorials"
set testdir "$::ngdir/../share/netgen"
set geofiles { boxcyl cubemcyl extrusion revolution trafo
circle_on_cube cubemsphere fichera sculpture twobricks
cone cylinder lshape3d shaft twocubes

View File

@ -1005,59 +1005,8 @@ proc visual_dialog { } {
toplevel $w
checkbutton $w.imaginary -text "Imaginary Part" \
-variable visoptions.imaginary \
-command { Ng_Vis_Set parameters; redraw }
frame $w.texframe
checkbutton $w.texframe.usetexture -text "Use Textures (" \
-variable visoptions.usetexture \
-command { Ng_Vis_Set parameters; redraw }
checkbutton $w.texframe.lintexture -text "Linear )" \
-variable visoptions.lineartexture \
-command { Ng_Vis_Set parametersrange; redraw }
# pack $w.texframe.usetexture $w.texframe.lintexture -side left -expand yes
checkbutton $w.invcolor -text "Inverse Color" \
-variable visoptions.invcolor \
-command { Ng_Vis_Set parametersrange; redraw }
checkbutton $w.redrawperiodic -text "Animate periodic" \
-variable visoptions.redrawperiodic \
-command {
redrawperiodic
Ng_Vis_Set parameters;
redraw
}
checkbutton $w.logscale -text "Log Scale" \
-variable visoptions.logscale \
-command { Ng_Vis_Set parameters; redraw }
checkbutton $w.lineartexture -text "Use Linear Texture" \
-variable visoptions.lineartexture \
-command { Ng_Vis_Set parameters; redraw }
scale $w.numcols -orient horizontal -length 100 -from 0 -to 50 \
-resolution 1 \
-variable visoptions.numtexturecols \
-command { popupcheckredraw visual_dialog_pop1 }
checkbutton $w.showclipsolution -text "Draw Clipping Plane Solution" \
-variable visoptions.showclipsolution \
-command { Ng_Vis_Set parameters; redraw }
checkbutton $w.showsurfsolution -text "Draw Surface Solution" \
-variable visoptions.showsurfacesolution \
-command { Ng_Vis_Set parameters; redraw }
frame $w.grid -relief groove -borderwidth 3
@ -1084,7 +1033,6 @@ proc visual_dialog { } {
# pack $w.showclipsolution
pack $w.showsurfsolution
pack $w.grid -fill x -ipady 3
pack $w.grid.size $w.grid.xoffset $w.grid.yoffset -side left -expand yes
@ -1235,11 +1183,6 @@ proc visual_dialog { } {
# pack $w.iso.zpos -side right
checkbutton $w.showcurves -text "Show Curves" \
-variable visoptions.drawpointcurves \
-command { Ng_Vis_Set parameters; redraw }
pack $w.showcurves
frame $w.redraw -relief groove -borderwidth 3
checkbutton $w.redraw.auto -text "Auto-redraw" \
@ -1335,16 +1278,12 @@ proc visual_dialog { } {
}
}
$w.scalfun configure -variable visoptions.scalfunction
$w.scalfun configure -command { Ng_Vis_Set parameters; redraw }
$w.vecfun configure -variable visoptions.vecfunction
$w.vecfun configure -command { Ng_Vis_Set parameters; redraw }
# puts "sclfunction = ${visoptions.scalfunction}"
tixOptionMenu $w.evaluate -label "Evaluate: " \
-options {
label.width 18
@ -1372,13 +1311,72 @@ proc visual_dialog { } {
label.anchor e
}
pack $w.multidimcomp
checkbutton $w.showsurfsolution -text "Draw Surface Vectors" \
-variable visoptions.showsurfacesolution \
-command { Ng_Vis_Set parameters; redraw }
checkbutton $w.showcurves -text "Show Curves" \
-variable visoptions.drawpointcurves \
-command { Ng_Vis_Set parameters; redraw }
checkbutton $w.imaginary -text "Imaginary Part" \
-variable visoptions.imaginary \
-command { Ng_Vis_Set parameters; redraw }
checkbutton $w.logscale -text "Log Scale" \
-variable visoptions.logscale \
-command { Ng_Vis_Set parameters; redraw }
checkbutton $w.invcolor -text "Inverse Color" \
-variable visoptions.invcolor \
-command { Ng_Vis_Set parametersrange; redraw }
frame $w.texframe
checkbutton $w.texframe.usetexture -text "Use Textures (" \
-variable visoptions.usetexture \
-command { Ng_Vis_Set parameters; redraw }
checkbutton $w.texframe.lintexture -text "Linear )" \
-variable visoptions.lineartexture \
-command { Ng_Vis_Set parametersrange; redraw }
checkbutton $w.lineartexture -text "Use Linear Texture" \
-variable visoptions.lineartexture \
-command { Ng_Vis_Set parameters; redraw }
scale $w.numcols -orient horizontal -length 100 -from 0 -to 50 \
-resolution 1 \
-variable visoptions.numtexturecols \
-command { popupcheckredraw visual_dialog_pop1 }
checkbutton $w.showclipsolution -text "Draw Clipping Plane Solution" \
-variable visoptions.showclipsolution \
-command { Ng_Vis_Set parameters; redraw }
checkbutton $w.redrawperiodic -text "Animate periodic" \
-variable visoptions.redrawperiodic \
-command {
redrawperiodic
Ng_Vis_Set parameters;
redraw
}
pack $w.showsurfsolution $w.showcurves
pack $w.imaginary $w.logscale $w.texframe $w.invcolor $w.redrawperiodic
pack $w.texframe.usetexture $w.texframe.lintexture -side left -expand yes
frame $w.bu
pack $w.bu -pady 5
@ -1445,13 +1443,17 @@ proc reset_visual_dialog { } {
checkbutton $w.invcolor -text "Inverse Color" \
-variable visoptions.invcolor \
-command { Ng_Vis_Set parameters; redraw }
checkbutton $w.logscale -text "Log Scale" \
-variable visoptions.logscale \
-command { Ng_Vis_Set parameters; redraw }
checkbutton $w.redrawperiodic -text "Animate periodic" \
-variable visoptions.redrawperiodic \
@ -1462,11 +1464,6 @@ proc reset_visual_dialog { } {
}
checkbutton $w.logscale -text "Log Scale" \
-variable visoptions.logscale \
-command { Ng_Vis_Set parameters; redraw }
tixOptionMenu $w.scalfun -label "Scalar Function: " \
-options {
label.width 18

View File

@ -691,3 +691,9 @@ proc loadmeshinifile { } {
}
set cmdindex {}
set hlpindex {}
set secindex {}