Merge branch 'remove_tix2' into 'master'

Remove tix2



See merge request !12
This commit is contained in:
Joachim Schöberl 2016-11-10 15:19:54 +01:00
commit 862af5057d
4 changed files with 240 additions and 200 deletions

View File

@ -893,7 +893,6 @@ proc viewingoptionsdialog { } {
# stl geometry
set f $w.nb.stl
ttk::labelframe $f.show -relief groove -borderwidth 3 -text "STL viewing options"
pack $f.show -fill x -pady 15
ttk::checkbutton $f.show.showtrias -text "Show STL-Triangles" \
@ -935,7 +934,7 @@ proc viewingoptionsdialog { } {
-validatecommand "Ng_SetVisParameters; redraw;my_validate %W [$f.fn.scale3 cget -from] [$f.fn.scale3 cget -to] %P 0" \
-invalidcommand "my_invalid %W;Ng_SetVisParameters; redraw;"
grid $f.fn.scale3 $f.fn.ent3 $f.fn.lab3 -stick nw -padx 4
grid $f.fn.scale3 $f.fn.ent3 $f.fn.lab3 -sticky nw -padx 4
#frame $f.fo -relief groove -borderwidth 3
@ -2229,17 +2228,17 @@ proc stloptionsdialog { } {
}
proc stldoctordialog { } {
Ng_STLDoctor 0 0
set wd .stldoctor_dlg
if {[winfo exists .stldoctor_dlg] == 1} {
wm withdraw $wd
wm deiconify $wd
focus $wd
} {
toplevel $wd
pack [ttk::notebook $wd.nb] -fill both -fill both -side top
$wd.nb add [ttk::frame $wd.nb.general] -text "General" -underline 0
$wd.nb add [ttk::frame $wd.nb.topology] -text "Edit Topology" -underline 5
@ -2695,45 +2694,52 @@ proc meshdoctordialog { } {
Ng_MeshDoctor;
frame $w.vis -relief groove -borderwidth 3
ttk::frame $w.vis -relief groove -borderwidth 3
pack $w.vis
checkbutton $w.vis.showfilledtrigs -text "Show filled triangles" \
ttk::checkbutton $w.vis.showfilledtrigs -text "Show filled triangles" \
-variable viewoptions.drawfilledtrigs \
-command { Ng_SetVisParameters; redraw }
checkbutton $w.vis.showedges -text "Show edges" \
ttk::checkbutton $w.vis.showedges -text "Show edges" \
-variable viewoptions.drawedges \
-command { Ng_SetVisParameters; redraw }
checkbutton $w.vis.showoutline -text "Show Triangle Outline" \
ttk::checkbutton $w.vis.showoutline -text "Show Triangle Outline" \
-variable viewoptions.drawoutline \
-command { Ng_SetVisParameters; redraw }
pack $w.vis.showfilledtrigs $w.vis.showoutline $w.vis.showedges
tixControl $w.markedgedist -label "Mark edge dist: " -integer true \
-min 0 -max 999 \
-variable meshdoc.markedgedist \
-options {
entry.width 3
label.width 20
label.anchor e
} \
-command {
Ng_MeshDoctor markedgedist ${meshdoc.markedgedist}
redraw
}
ttk::frame $w.markedgedist
ttk::label $w.markedgedist.l -text "Mark edge dist: "
ttk::spinbox $w.markedgedist.s -from 0 -to 999 -width 5 -increment 1 -validate focus -validatecommand "my_validatespinbox %W %P 0" \
-invalidcommand "my_invalidspinbox %W" -command {Ng_MeshDoctor markedgedist ${meshdoc.markedgedist};redraw} -textvariable meshdoc.markedgedist
#pack $f.grading -fill x
pack $w.markedgedist.l $w.markedgedist.s -side left
# tixControl $w.markedgedist -label "Mark edge dist: " -integer true \
# -min 0 -max 999 \
# -variable meshdoc.markedgedist \
# -options {
# entry.width 3
# label.width 20
# label.anchor e
# } \
# -command {
# Ng_MeshDoctor markedgedist ${meshdoc.markedgedist}
# redraw
# }
pack $w.markedgedist
button $w.deledge -text "Delete marked segments" -command {
ttk::button $w.deledge -text "Delete marked segments" -command {
Ng_MeshDoctor deletemarkedsegments
redraw
}
pack $w.deledge
button $w.close -text "Close" -command {
ttk::button $w.close -text "Close" -command {
set meshdoctor.active 0;
Ng_MeshDoctor;
destroy .meshdoc_dlg

View File

@ -54,7 +54,7 @@ proc show_menu_help { entry } {
}
tixBalloon .balloon -statusbar .helpline
#tixBalloon .balloon -statusbar .helpline
proc set_control_help { control helpmsg } {
bind $control <Enter> "show_control_help {$helpmsg}"

View File

@ -727,13 +727,33 @@ proc fieldlinesdialog { } {
tixOptionMenu $f.vecfun -label "Vector Function: " \
-options {
label.width 18
label.anchor e
menubutton.width 12
}
$f.vecfun add command none -label None
# tixOptionMenu $f.vecfun -label "Vector Function: " \
# -options {
# label.width 18
# label.anchor e
# menubutton.width 12
# }
# $f.vecfun add command none -label None
# for { set i 1 } { $i <= [Ng_Vis_Field getnfieldnames] } { incr i } {
# set fname [Ng_Vis_Field getfieldname $i]
# set fcomp [Ng_Vis_Field getfieldcomponents $i]
# set iscomplex [Ng_Vis_Field iscomplex $i]
# set sdim [Ng_Vis_Field getdimension]
# if { $iscomplex == 1 } { set fcomp [expr $fcomp / 2] }
# if { ($fcomp == $sdim) || ($fcomp == 3) } {
# $f.vecfun add command $fname -label $fname
# }
# }
# $f.vecfun configure -variable visoptions.fieldlinesvecfunction
# $f.vecfun configure -command { Ng_Vis_Set parameters; redraw }
ttk::frame $f.vecfun
ttk::label $f.vecfun.lab -text "Vector Function: "
ttk::menubutton $f.vecfun.but -menu $f.vecfun.menu -text "" -width 12
menu $f.vecfun.menu -tearoff 0
# for {set i 0} {$i < [llength ${visoptions.evaluatefilenames}]} {incr i} {
# $w.filesettings.latestevals.menu add command -label $i\
# -command "set visoptions.lineplotselectedeval $i ; $w.filesettings.latestevals.but configure -text \"[lindex ${visoptions.evaluatefiledescriptions} $i] ([lindex ${visoptions.evaluatefilenames} $i])\""
# }
for { set i 1 } { $i <= [Ng_Vis_Field getnfieldnames] } { incr i } {
set fname [Ng_Vis_Field getfieldname $i]
set fcomp [Ng_Vis_Field getfieldcomponents $i]
@ -741,12 +761,9 @@ proc fieldlinesdialog { } {
set sdim [Ng_Vis_Field getdimension]
if { $iscomplex == 1 } { set fcomp [expr $fcomp / 2] }
if { ($fcomp == $sdim) || ($fcomp == 3) } {
$f.vecfun add command $fname -label $fname
$f.vecfun.menu add command -label $fname -command "set visoptions.fieldlinesvecfunction $fname;Ng_Vis_Set parameters; redraw;$f.vecfun.but configure -text \"$fname\" " }
}
}
$f.vecfun configure -variable visoptions.fieldlinesvecfunction
$f.vecfun configure -command { Ng_Vis_Set parameters; redraw }
grid $f.vecfun.lab $f.vecfun.but -sticky nw
pack $f.vecfun
@ -951,18 +968,29 @@ proc fieldlinesdialog { } {
grid $g.odesettings.tol.lab $g.odesettings.tol.sp -stick nw
tixOptionMenu $g.odesettings.rktype -label "RK-Type " \
-options {
label.width 20
label.anchor e
menubutton.width 25
}
$g.odesettings.rktype add command euler -label "Euler, order 1"
$g.odesettings.rktype add command eulercauchy -label "Euler-Cauchy, order 2"
$g.odesettings.rktype add command simpson -label "Simpson, order 3"
$g.odesettings.rktype add command crungekutta -label "classical Runge-Kutta, order 4"
$g.odesettings.rktype configure -variable visoptions.fieldlinesrktype
$g.odesettings.rktype configure -command { Ng_Vis_Set parameters; redraw }
# tixOptionMenu $g.odesettings.rktype -label "RK-Type " \
# -options {
# label.width 20
# label.anchor e
# menubutton.width 25
# }
# $g.odesettings.rktype add command euler -label "Euler, order 1"
# $g.odesettings.rktype add command eulercauchy -label "Euler-Cauchy, order 2"
# $g.odesettings.rktype add command simpson -label "Simpson, order 3"
# $g.odesettings.rktype add command crungekutta -label "classical Runge-Kutta, order 4"
# $g.odesettings.rktype configure -variable visoptions.fieldlinesrktype
# $g.odesettings.rktype configure -command { Ng_Vis_Set parameters; redraw }
ttk::frame $g.odesettings.rktype
ttk::label $g.odesettings.rktype.lab -text "RK-Type "
ttk::menubutton $g.odesettings.rktype.but -menu $g.odesettings.rktype.menu -text "" -width 25
menu $g.odesettings.rktype.menu -tearoff 0
$g.odesettings.rktype.menu add command -label "Euler, order 1" -command "set visoptions.fieldlinesrktype \"euler\" ;Ng_Vis_Set parameters; redraw;$g.odesettings.rktype.but configure -text \"Euler,order 1\" "
$g.odesettings.rktype.menu add command -label "Euler-Cauchy, order 2" -command "set visoptions.fieldlinesrktype \"eulercauchy\" ;Ng_Vis_Set parameters; redraw;$g.odesettings.rktype.but configure -text \"Euler-Cauchy,order 2\" "
$g.odesettings.rktype.menu add command -label "Simpson, order 3" -command "set visoptions.fieldlinesrktype \"simpson\" ;Ng_Vis_Set parameters; redraw;$g.odesettings.rktype.but configure -text \"Simpson,order 3\""
$g.odesettings.rktype.menu add command -label "classical Runge-Kutta, order 4" -command "set visoptions.fieldlinesrktype \"crungekutta\" ;Ng_Vis_Set parameters; redraw; $g.odesettings.rktype.but configure -text \"classical Runge-Kutta,order 4\""
$g.odesettings.rktype.menu invoke "classical Runge-Kutta, order 4"
grid $g.odesettings.rktype.lab $g.odesettings.rktype.but -sticky nw
pack $g.odesettings.title $g.odesettings.tol $g.odesettings.rktype
@ -1626,177 +1654,177 @@ proc visual_dialog { } {
proc reset_visual_dialog { } {
# proc reset_visual_dialog { } {
set w .visoptions_dlg
# set w .visoptions_dlg
if {[winfo exists .visoptions_dlg] == 1} {
# if {[winfo exists .visoptions_dlg] == 1} {
destroy $w.scalfun $w.vecfun $w.evaluate $w.multidimcomp
destroy $w.imaginary $w.logscale $w.texframe.usetexture $w.texframe.lintexture
destroy $w.texframe
destroy $w.invcolor $w.redrawperiodic
destroy $w.bu -pady 5
destroy $w.bu.showsol $w.bu.clipping $w.bu.fieldlines $w.bu.lineplot $w.bu.done -side left -expand yes
# destroy $w.scalfun $w.vecfun $w.evaluate $w.multidimcomp
# destroy $w.imaginary $w.logscale $w.texframe.usetexture $w.texframe.lintexture
# destroy $w.texframe
# destroy $w.invcolor $w.redrawperiodic
# destroy $w.bu -pady 5
# destroy $w.bu.showsol $w.bu.clipping $w.bu.fieldlines $w.bu.lineplot $w.bu.done -side left -expand yes
checkbutton $w.imaginary -text "Imaginary Part" \
-variable visoptions.imaginary \
-command { Ng_Vis_Set parameters; redraw }
# checkbutton $w.imaginary -text "Imaginary Part" \
# -variable visoptions.imaginary \
# -command { Ng_Vis_Set parameters; redraw }
frame $w.texframe
# frame $w.texframe
checkbutton $w.texframe.usetexture -text "Use Textures (" \
-variable visoptions.usetexture \
-command { Ng_Vis_Set parameters; redraw }
# 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 parameters; redraw }
# checkbutton $w.texframe.lintexture -text "Linear )" \
# -variable visoptions.lineartexture \
# -command { Ng_Vis_Set parameters; redraw }
checkbutton $w.invcolor -text "Inverse Color" \
-variable visoptions.invcolor \
-command { Ng_Vis_Set parameters; redraw }
# 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.logscale -text "Log Scale" \
# -variable visoptions.logscale \
# -command { Ng_Vis_Set parameters; redraw }
checkbutton $w.redrawperiodic -text "Animate periodic" \
-variable visoptions.redrawperiodic \
-command {
redrawperiodic
Ng_Vis_Set parameters;
redraw
}
# checkbutton $w.redrawperiodic -text "Animate periodic" \
# -variable visoptions.redrawperiodic \
# -command {
# redrawperiodic
# Ng_Vis_Set parameters;
# redraw
# }
tixOptionMenu $w.scalfun -label "Scalar Function: " \
-options {
label.width 18
label.anchor e
menubutton.width 12
}
# tixOptionMenu $w.scalfun -label "Scalar Function: " \
# -options {
# label.width 18
# label.anchor e
# menubutton.width 12
# }
tixOptionMenu $w.vecfun -label "Vector Function: " \
-options {
label.width 18
label.anchor e
menubutton.width 12
}
# tixOptionMenu $w.vecfun -label "Vector Function: " \
# -options {
# label.width 18
# label.anchor e
# menubutton.width 12
# }
$w.scalfun add command none -label None
for { set i 1 } { $i <= [Ng_Vis_Field getnfieldnames] } { incr i } {
set fname [Ng_Vis_Field getfieldname $i]
set fcomp [Ng_Vis_Field getfieldcomponents $i]
if { $fcomp == 1 } {
$w.scalfun add command $fname.1 -label $fname
} {
for { set j 1 } { $j <= $fcomp } { incr j } {
$w.scalfun add command $fname.$j -label "$fname ($j)"
}
$w.scalfun add command $fname.0 -label "func ($fname)"
}
}
# $w.scalfun add command none -label None
# for { set i 1 } { $i <= [Ng_Vis_Field getnfieldnames] } { incr i } {
# set fname [Ng_Vis_Field getfieldname $i]
# set fcomp [Ng_Vis_Field getfieldcomponents $i]
# if { $fcomp == 1 } {
# $w.scalfun add command $fname.1 -label $fname
# } {
# for { set j 1 } { $j <= $fcomp } { incr j } {
# $w.scalfun add command $fname.$j -label "$fname ($j)"
# }
# $w.scalfun add command $fname.0 -label "func ($fname)"
# }
# }
$w.vecfun add command none -label None
for { set i 1 } { $i <= [Ng_Vis_Field getnfieldnames] } { incr i } {
set fname [Ng_Vis_Field getfieldname $i]
set fcomp [Ng_Vis_Field getfieldcomponents $i]
set iscomplex [Ng_Vis_Field iscomplex $i]
set sdim [Ng_Vis_Field getdimension]
if { $iscomplex == 1 } { set fcomp [expr $fcomp / 2] }
if { ($fcomp == $sdim) || ($fcomp == 3) } {
$w.vecfun add command $fname -label $fname
}
}
# $w.vecfun add command none -label None
# for { set i 1 } { $i <= [Ng_Vis_Field getnfieldnames] } { incr i } {
# set fname [Ng_Vis_Field getfieldname $i]
# set fcomp [Ng_Vis_Field getfieldcomponents $i]
# set iscomplex [Ng_Vis_Field iscomplex $i]
# set sdim [Ng_Vis_Field getdimension]
# if { $iscomplex == 1 } { set fcomp [expr $fcomp / 2] }
# if { ($fcomp == $sdim) || ($fcomp == 3) } {
# $w.vecfun add command $fname -label $fname
# }
# }
$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 }
# $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}"
# # puts "sclfunction = ${visoptions.scalfunction}"
tixOptionMenu $w.evaluate -label "Evaluate: " \
-options {
label.width 18
label.anchor e
menubutton.width 12
}
$w.evaluate add command abs -label "|.|"
$w.evaluate add command abstens -label "|tensor|"
$w.evaluate add command mises -label "Mises"
$w.evaluate add command main -label "Main"
$w.evaluate configure -variable visoptions.evaluate
$w.evaluate configure -command {
Ng_Vis_Set parameters;
redraw
}
# tixOptionMenu $w.evaluate -label "Evaluate: " \
# -options {
# label.width 18
# label.anchor e
# menubutton.width 12
# }
# $w.evaluate add command abs -label "|.|"
# $w.evaluate add command abstens -label "|tensor|"
# $w.evaluate add command mises -label "Mises"
# $w.evaluate add command main -label "Main"
# $w.evaluate configure -variable visoptions.evaluate
# $w.evaluate configure -command {
# Ng_Vis_Set parameters;
# redraw
# }
pack $w.scalfun $w.vecfun $w.evaluate
# pack $w.scalfun $w.vecfun $w.evaluate
tixControl $w.multidimcomp -label "multidim-component: " -integer true \
-variable visoptions.multidimcomponent -min 0 \
-command { Ng_Vis_Set parameters; redraw } \
-options {
entry.width 6
label.width 18
label.anchor e
}
# tixControl $w.multidimcomp -label "multidim-component: " -integer true \
# -variable visoptions.multidimcomponent -min 0 \
# -command { Ng_Vis_Set parameters; redraw } \
# -options {
# entry.width 6
# label.width 18
# label.anchor e
# }
pack $w.multidimcomp
# pack $w.multidimcomp
pack $w.imaginary $w.logscale $w.texframe $w.invcolor $w.redrawperiodic
pack $w.texframe.usetexture $w.texframe.lintexture -side left -expand yes
# 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
# frame $w.bu
# pack $w.bu -pady 5
button $w.bu.showsol -text "Show Solution" -command {
set selectvisual solution
Ng_SetVisParameters
redraw
}
button $w.bu.clipping -text "Clipping" -command {
clippingdialog;
}
button $w.bu.fieldlines -text "Fieldlines" -command {
fieldlinesdialog;
}
# button $w.bu.showsol -text "Show Solution" -command {
# set selectvisual solution
# Ng_SetVisParameters
# redraw
# }
# button $w.bu.clipping -text "Clipping" -command {
# clippingdialog;
# }
# button $w.bu.fieldlines -text "Fieldlines" -command {
# fieldlinesdialog;
# }
button $w.bu.lineplot -text "2D Lineplot" -command {
lineplotdialog;
}
# button $w.bu.lineplot -text "2D Lineplot" -command {
# lineplotdialog;
# }
button $w.bu.done -text "Close" -command {
destroy .visoptions_dlg
}
# button $w.bu.done -text "Close" -command {
# destroy .visoptions_dlg
# }
pack $w.bu.showsol $w.bu.clipping $w.bu.fieldlines $w.bu.lineplot $w.bu.done -side left -expand yes
# pack $w.bu.showsol $w.bu.clipping $w.bu.fieldlines $w.bu.lineplot $w.bu.done -side left -expand yes
wm withdraw $w
wm deiconify $w
# wm withdraw $w
# wm deiconify $w
}
# }
}
# }

View File

@ -237,11 +237,11 @@ proc occdialog { } {
}
}
button $w.cl -text "Close" -command {
ttk::button $w.cl -text "Close" -command {
destroy .occ_dlg
}
button $w.show -text "Show" -command {
ttk::button $w.show -text "Show" -command {
set solname [[.occ_dlg.mtre subwidget hlist] info selection]
set entityname [[.occ_dlg.mtre subwidget hlist] info data $solname]
set spacepos [string first " " $entityname]
@ -255,7 +255,7 @@ proc occdialog { } {
# Ng_SetVisParameters
redraw
}
button $w.hide -text "Hide" -command {
ttk::button $w.hide -text "Hide" -command {
set solname [[.occ_dlg.mtre subwidget hlist] info selection]
set entityname [[.occ_dlg.mtre subwidget hlist] info data $solname]
set spacepos [string first " " $entityname]
@ -288,7 +288,7 @@ proc occdialog { } {
occdialogbuildtree
}
button $w.marksingular -text "Mark/Unmark as singular" -command {
ttk::button $w.marksingular -text "Mark/Unmark as singular" -command {
set solname [[.occ_dlg.mtre subwidget hlist] info selection]
set entityname [[.occ_dlg.mtre subwidget hlist] info data $solname]
set spacepos [string first " " $entityname]
@ -337,7 +337,7 @@ proc occdialog { } {
}
checkbutton $w.zoomtohighlightedentity -text "Zoom to highlighted entity" \
ttk::checkbutton $w.zoomtohighlightedentity -text "Zoom to highlighted entity" \
-variable occoptions.zoomtohighlightedentity \
-command {
Ng_SetOCCVisParameters
@ -353,9 +353,9 @@ proc occdialog { } {
frame $w.healing -relief groove -borderwidth 3
ttk::frame $w.healing -relief groove -borderwidth 3
button $w.healing.checkentities -text "Analyze geometry" -command {
ttk::button $w.healing.checkentities -text "Analyze geometry" -command {
set irregent [Ng_OCCCommand findsmallentities]
set w .occ_dlg
@ -377,30 +377,36 @@ proc occdialog { } {
$w.mtre autosetmode
}
tixControl $w.healing.tolerance -label "Healing tolerance: " -integer false \
-variable occoptions.tolerance -min 1e-9 -max 1e6 \
-options {
entry.width 6
label.width 25
label.anchor e
}
# tixControl $w.healing.tolerance -label "Healing tolerance: " -integer false \
# -variable occoptions.tolerance -min 1e-9 -max 1e6 \
# -options {
# entry.width 6
# label.width 25
# label.anchor e
# }
checkbutton $w.healing.fixsmalledges -text "Fix small edges" \
ttk::frame $w.healing.tolerance
ttk::label $w.healing.tolerance.label -text "Healing tolerance: "
ttk::spinbox $w.healing.tolerance.sp -textvariable occoptions.tolerance -width 6 -increment 0.01 -validate focus -validatecommand "my_validatespinbox %W %P 12" \
-invalidcommand "my_invalidspinbox %W" -from -1e-9 -to 1e6
grid $w.healing.tolerance.label $w.healing.tolerance.sp
ttk::checkbutton $w.healing.fixsmalledges -text "Fix small edges" \
-variable occoptions.fixsmalledges
checkbutton $w.healing.fixspotstripfaces -text "Fix spot/strip faces" \
ttk::checkbutton $w.healing.fixspotstripfaces -text "Fix spot/strip faces" \
-variable occoptions.fixspotstripfaces
checkbutton $w.healing.sewfaces -text "Sew faces" \
ttk::checkbutton $w.healing.sewfaces -text "Sew faces" \
-variable occoptions.sewfaces
checkbutton $w.healing.makesolids -text "Make solids" \
ttk::checkbutton $w.healing.makesolids -text "Make solids" \
-variable occoptions.makesolids
checkbutton $w.healing.splitpartitions -text "Split partitions" \
ttk::checkbutton $w.healing.splitpartitions -text "Split partitions" \
-variable occoptions.splitpartitions
button $w.healing.heal -text "Heal geometry" -command {
ttk::button $w.healing.heal -text "Heal geometry" -command {
.occ_dlg.healing.tolerance invoke
Ng_OCCCommand shapehealing
redraw