Changeset 4797 for branches/uq


Ignore:
Timestamp:
Nov 26, 2014 4:45:43 PM (7 years ago)
Author:
gah
Message:

sync with 1.4-pre

Location:
branches/uq
Files:
24 edited

Legend:

Unmodified
Added
Removed
  • branches/uq/configure

    r4522 r4797  
    672672OCTAVE_VERSION_MAJOR
    673673OCTAVE_VERSION
     674SVN_URL
    674675SVN_VERSION
    675676MKOCTFILE3
     
    72977298
    72987299SVN_VERSION=`svnversion $srcdir | sed 's/Unversioned directory/unknown/'`
     7300SVN_URL=`svn info $srcdir | sed -ne 's/^URL: //p'`
    72997301
    73007302make_command=""
     
    1013510137
    1013610138MAKE=${make_command}
     10139
    1013710140
    1013810141
  • branches/uq/configure.in

    r4522 r4797  
    108108
    109109SVN_VERSION=`svnversion $srcdir | sed 's/Unversioned directory/unknown/'`
     110SVN_URL=`svn info $srcdir | sed -ne 's/^URL: //p'`
    110111
    111112make_command=""
     
    401402AC_SUBST(MKOCTFILE3)
    402403AC_SUBST(SVN_VERSION)
     404AC_SUBST(SVN_URL)
    403405AC_SUBST(OCTAVE_VERSION)
    404406AC_SUBST(OCTAVE_VERSION_MAJOR)
  • branches/uq/gui/apps/rappture.use.in

    r4522 r4797  
    3333prepend TK_LIBRARY ${libdir}/tk${tcl_version}
    3434
     35prepend CLASSPATH ${libdir}/java
     36
    3537prepend R_LIBS ${libdir}/R
    3638
  • branches/uq/gui/configure

    r4516 r4797  
    11#! /bin/sh
    22# Guess values for system-dependent variables and create Makefiles.
    3 # Generated by GNU Autoconf 2.69 for RapptureGUI 1.4.
     3# Generated by GNU Autoconf 2.69 for RapptureGUI 1.3.
    44#
    55# Report bugs to <rappture@nanohub.org>.
     
    580580PACKAGE_NAME='RapptureGUI'
    581581PACKAGE_TARNAME='rappturegui'
    582 PACKAGE_VERSION='1.4'
    583 PACKAGE_STRING='RapptureGUI 1.4'
     582PACKAGE_VERSION='1.3'
     583PACKAGE_STRING='RapptureGUI 1.3'
    584584PACKAGE_BUGREPORT='rappture@nanohub.org'
    585585PACKAGE_URL=''
     
    12231223  # This message is too long to be a string in the A/UX 3.1 sh.
    12241224  cat <<_ACEOF
    1225 \`configure' configures RapptureGUI 1.4 to adapt to many kinds of systems.
     1225\`configure' configures RapptureGUI 1.3 to adapt to many kinds of systems.
    12261226
    12271227Usage: $0 [OPTION]... [VAR=VALUE]...
     
    12891289if test -n "$ac_init_help"; then
    12901290  case $ac_init_help in
    1291      short | recursive ) echo "Configuration of RapptureGUI 1.4:";;
     1291     short | recursive ) echo "Configuration of RapptureGUI 1.3:";;
    12921292   esac
    12931293  cat <<\_ACEOF
     
    13801380if $ac_init_version; then
    13811381  cat <<\_ACEOF
    1382 RapptureGUI configure 1.4
     1382RapptureGUI configure 1.3
    13831383generated by GNU Autoconf 2.69
    13841384
     
    14351435running configure, to aid debugging if configure makes a mistake.
    14361436
    1437 It was created by RapptureGUI $as_me 1.4, which was
     1437It was created by RapptureGUI $as_me 1.3, which was
    14381438generated by GNU Autoconf 2.69.  Invocation command line was
    14391439
     
    36853685# values after options handling.
    36863686ac_log="
    3687 This file was extended by RapptureGUI $as_me 1.4, which was
     3687This file was extended by RapptureGUI $as_me 1.3, which was
    36883688generated by GNU Autoconf 2.69.  Invocation command line was
    36893689
     
    37383738ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
    37393739ac_cs_version="\\
    3740 RapptureGUI config.status 1.4
     3740RapptureGUI config.status 1.3
    37413741configured by $0, generated by GNU Autoconf 2.69,
    37423742  with options \\"\$ac_cs_config\\"
  • branches/uq/gui/configure.in

    r4516 r4797  
    11
    2 AC_INIT([RapptureGUI],[1.4],[rappture@nanohub.org])
     2AC_INIT([RapptureGUI],[1.3],[rappture@nanohub.org])
    33AC_CONFIG_AUX_DIR(cf)
    44#------------------------------------------------------------------------
  • branches/uq/gui/scripts/bugreport.tcl

    r4571 r4797  
    490490    package require http
    491491    package require tls
    492     http::register https 443 ::tls::socket
     492    http::register https 443 [list ::tls::socket -tls1 1]
    493493
    494494    set report $details(stackTrace)
  • branches/uq/gui/scripts/field.tcl

    r4520 r4797  
    427427    set min ""
    428428    set max ""
    429     blt::vector tmp zero
    430429
    431430    foreach cname [array names _comp2dims] {
     
    453452
    454453                if {$log} {
    455                     # on a log scale, use abs value and ignore 0's
     454                    blt::vector tmp zero
     455                    # on a log scale, use abs value and ignore zeros
    456456                    $vname dup tmp
    457457                    $vname dup zero
    458                     zero expr {tmp == 0}            ;# find the 0's
     458                    zero expr {tmp == 0}            ;# find the zeros
    459459                    tmp expr {abs(tmp)}             ;# get the abs value
    460                     tmp expr {tmp + zero*max(tmp)}  ;# replace 0's with abs max
     460                    tmp expr {tmp + zero*max(tmp)}  ;# replace 0s with abs max
    461461                    set axisMin [blt::vector expr min(tmp)]
    462462                    set axisMax [blt::vector expr max(tmp)]
     463                    blt::vector destroy tmp zero
    463464                } else {
    464465                    set axisMin [$vname min]
     
    477478                }
    478479            }
    479             2D - 3D {
     480            default {
    480481                if {[info exists _comp2limits($cname)]} {
    481482                    array set limits $_comp2limits($cname)
     
    519520        }
    520521    }
    521     blt::vector destroy tmp zero
    522522    set val [$_field get "${axis}axis.min"]
    523523    if {"" != $val && "" != $min} {
     
    536536    return [list $min $max]
    537537}
    538 
    539538
    540539# ----------------------------------------------------------------------
     
    15131512        set dim 0
    15141513        foreach axis {x y z} {
    1515             foreach {min max} [$mesh limits $axis] { 
     1514            foreach {min max} [$mesh limits $axis] {
    15161515                if { $min < $max } {
    15171516                    incr dim
     
    17021701    }
    17031702
    1704     foreach key [array names data] {
    1705         if {$key == "vtkdata"} {
    1706             if {1} {
    1707                 set f [open /tmp/$cname.vtk "w"]
    1708                 fconfigure $f -translation binary -encoding binary
    1709                 puts -nonewline $f $data(vtkdata)
    1710                 close $f
    1711             }
    1712         } else {
    1713             puts stderr "$key = \"$data($key)\""
     1703    if 0 {
     1704        foreach key [array names data] {
     1705            if {$key == "vtkdata"} {
     1706                if 0 {
     1707                    set f [open /tmp/$cname.vtk "w"]
     1708                    fconfigure $f -translation binary -encoding binary
     1709                    puts -nonewline $f $data(vtkdata)
     1710                    close $f
     1711                }
     1712            } else {
     1713                puts stderr "$key = \"$data($key)\""
     1714            }
    17141715        }
    17151716    }
  • branches/uq/gui/scripts/flowvisviewer.tcl

    r4557 r4797  
    884884                set session $env(SESSION)
    885885            }
     886            lappend info "version" "$Rappture::version"
     887            lappend info "build" "$Rappture::build"
     888            lappend info "svnurl" "$Rappture::svnurl"
     889            lappend info "installdir" "$Rappture::installdir"
    886890            lappend info "hub" [exec hostname]
    887891            lappend info "client" "flowvisviewer"
  • branches/uq/gui/scripts/mapviewer.tcl

    r4512 r4797  
    6060    public method get {args}
    6161    public method isconnected {}
    62     public method limits { colormap }
    6362    public method parameters {title args} {
    6463        # do nothing
     
    13891388        #SendCmd "color background $r $g $b"
    13901389    }
    1391 }
    1392 
    1393 itcl::body Rappture::MapViewer::limits { dataobj } {
    1394     error "no limits"
    13951390}
    13961391
  • branches/uq/gui/scripts/mesh.tcl

    r4512 r4797  
    518518            set ${axis}Max $max
    519519            set ${axis}Num $num
     520            if {$min > $max} {
     521                puts stderr "ERROR: grid $axis axis minimum larger than maximum"
     522                return 0
     523            }
    520524            incr numUniform
    521525        } elseif { $coords != "" } {
     
    557561            set _dim 3
    558562            set _numPoints [expr $xNum * $yNum * $zNum]
    559             set _numCells [expr ($xNum - 1) * ($yNum - 1) * ($zNum - 1)]
     563            set _numCells [expr ($xNum > 1 ? ($xNum - 1) : 1) * ($yNum > 1 ? ($yNum - 1) : 1) * ($zNum > 1 ? ($zNum - 1) : 1)]
    560564            if { ($_numPoints*3) != $numCoords } {
    561565                puts stderr "WARNING: bad grid \"$path\": invalid grid: \# of points does not match dimensions <xdim> * <ydim> * <zdim>"
     
    580584            set _dim 2
    581585            set _numPoints [expr $xNum * $yNum]
    582             set _numCells [expr ($xNum - 1) * ($yNum - 1)]
     586            set _numCells [expr ($xNum > 1 ? ($xNum - 1) : 1) * ($yNum > 1 ? ($yNum - 1) : 1)]
    583587            if { ($_numPoints*2) != $numCoords } {
    584588                puts stderr "WARNING: bad grid \"$path\": \# of points does not match dimensions <xdim> * <ydim>"
     
    630634        # This results in a STRUCTURED_POINTS
    631635        if { $_dim == 1 } {
    632             set xSpace [expr ($xMax - $xMin) / double($xNum - 1)]
     636            if {$xNum == 1} {
     637                set xSpace 0
     638            } else {
     639                set xSpace [expr ($xMax - $xMin) / double($xNum - 1)]
     640            }
    633641            set _numPoints $xNum
    634642            set _numCells [expr $xNum - 1]
     
    642650            set _limits(z) [list 0 0]
    643651        } elseif { $_dim == 2 } {
    644             set xSpace [expr ($xMax - $xMin) / double($xNum - 1)]
    645             set ySpace [expr ($yMax - $yMin) / double($yNum - 1)]
     652            if {$xNum == 1} {
     653                set xSpace 0
     654            } else {
     655                set xSpace [expr ($xMax - $xMin) / double($xNum - 1)]
     656            }
     657            if {$yNum == 1} {
     658                set ySpace 0
     659            } else {
     660                set ySpace [expr ($yMax - $yMin) / double($yNum - 1)]
     661            }
    646662            set _numPoints [expr $xNum * $yNum]
    647             set _numCells [expr ($xNum - 1) * ($yNum - 1)]
     663            set _numCells [expr ($xNum > 1 ? ($xNum - 1) : 1) * ($yNum > 1 ? ($yNum - 1) : 1)]
    648664            append out "DATASET STRUCTURED_POINTS\n"
    649665            append out "DIMENSIONS $xNum $yNum 1\n"
     
    656672            set _limits(z) [list 0 0]
    657673        } elseif { $_dim == 3 } {
    658             set xSpace [expr ($xMax - $xMin) / double($xNum - 1)]
    659             set ySpace [expr ($yMax - $yMin) / double($yNum - 1)]
    660             set zSpace [expr ($zMax - $zMin) / double($zNum - 1)]
     674            if {$xNum == 1} {
     675                set xSpace 0
     676            } else {
     677                set xSpace [expr ($xMax - $xMin) / double($xNum - 1)]
     678            }
     679            if {$yNum == 1} {
     680                set ySpace 0
     681            } else {
     682                set ySpace [expr ($yMax - $yMin) / double($yNum - 1)]
     683            }
     684            if {$zNum == 1} {
     685                set zSpace 0
     686            } else {
     687                set zSpace [expr ($zMax - $zMin) / double($zNum - 1)]
     688            }
    661689            set _numPoints [expr $xNum * $yNum * $zNum]
    662             set _numCells [expr ($xNum - 1) * ($yNum - 1) * ($zNum - 1)]
     690            set _numCells [expr ($xNum > 1 ? ($xNum - 1) : 1) * ($yNum > 1 ? ($yNum - 1) : 1) * ($zNum > 1 ? ($zNum - 1) : 1)]
    663691            append out "DATASET STRUCTURED_POINTS\n"
    664692            append out "DIMENSIONS $xNum $yNum $zNum\n"
     
    713741    if { $_dim == 3 } {
    714742        set _numPoints [expr $xNum * $yNum * $zNum]
    715         set _numCells [expr ($xNum - 1) * ($yNum - 1) * ($zNum - 1)]
     743        set _numCells [expr ($xNum > 1 ? ($xNum - 1) : 1) * ($yNum > 1 ? ($yNum - 1) : 1) * ($zNum > 1 ? ($zNum - 1) : 1)]
    716744        append out "DATASET RECTILINEAR_GRID\n"
    717745        append out "DIMENSIONS $xNum $yNum $zNum\n"
     
    733761    } elseif { $_dim == 2 } {
    734762        set _numPoints [expr $xNum * $yNum]
    735         set _numCells [expr ($xNum - 1) * ($yNum - 1)]
     763        set _numCells [expr ($xNum > 1 ? ($xNum - 1) : 1) * ($yNum > 1 ? ($yNum - 1) : 1)]
    736764        append out "DATASET RECTILINEAR_GRID\n"
    737765        append out "DIMENSIONS $xNum $yNum 1\n"
  • branches/uq/gui/scripts/molvisviewer.tcl

    r4439 r4797  
    691691                set session $env(SESSION)
    692692            }
     693            lappend info "version" "$Rappture::version"
     694            lappend info "build" "$Rappture::build"
     695            lappend info "svnurl" "$Rappture::svnurl"
     696            lappend info "installdir" "$Rappture::installdir"
    693697            lappend info "hub" [exec hostname]
    694698            lappend info "client" "molvisviewer"
  • branches/uq/gui/scripts/nanovisviewer.tcl

    r4580 r4797  
    150150    private variable _transferFunctionEditors
    151151    private variable _settings
    152     private variable _alphamap
    153152    private variable _widget
    154153
     
    251250    }
    252251    array set _widget {
    253         -volumeopacity          0.5
     252        -volumeopacity          50
    254253    }
    255254    itk_component add 3dview {
     
    676675                set session $env(SESSION)
    677676            }
     677            lappend info "version" "$Rappture::version"
     678            lappend info "build" "$Rappture::build"
     679            lappend info "svnurl" "$Rappture::svnurl"
     680            lappend info "installdir" "$Rappture::installdir"
    678681            lappend info "hub" [exec hostname]
    679682            lappend info "client" "nanovisviewer"
     
    12871290            set val $_settings($what)
    12881291            foreach tag [GetDatasetsWithComponent $_current] {
    1289                 SendCmd "volume shading light2side $val"
     1292                SendCmd "volume shading light2side $val $tag"
    12901293            }
    12911294        }
     
    16831686    $inner configure -borderwidth 4
    16841687
    1685     set font [option get $itk_component(hull) font Font]
    16861688    set fg [option get $itk_component(hull) font Font]
    16871689    #set bfg [option get $itk_component(hull) boldFont Font]
    16881690
    1689     checkbutton $inner.vol -text "Show volume" -font $fg \
    1690         -variable [itcl::scope _settings(-volumevisible)] \
    1691         -command [itcl::code $this AdjustSetting -volumevisible]
    16921691    label $inner.shading -text "Shading:" -font $fg
    16931692
     
    16951694        -variable [itcl::scope _settings(-light2side)] \
    16961695        -command [itcl::code $this AdjustSetting -light2side]
     1696
     1697    checkbutton $inner.visibility -text "Visible" -font $fg \
     1698        -variable [itcl::scope _settings(-volumevisible)] \
     1699        -command [itcl::code $this AdjustSetting -volumevisible]
    16971700
    16981701    label $inner.dim -text "Glow" -font $fg
     
    17201723
    17211724    # Colormap
    1722     label $inner.colormap_l -text "Colormap" -font "Arial 9"
     1725    label $inner.colormap_l -text "Colormap" -font $fg
    17231726    itk_component add colormap {
    17241727        Rappture::Combobox $inner.colormap -width 10 -editable no
     
    17321735
    17331736    # Component
    1734     label $inner.volcomponents_l -text "Component" -font $font
     1737    label $inner.volcomponents_l -text "Component" -font $fg
    17351738    itk_component add volcomponents {
    17361739        Rappture::Combobox $inner.volcomponents -editable no
     
    17441747        1,0 $inner.shading -cspan 4 -anchor w -pady {10 2} \
    17451748        2,0 $inner.light2side -cspan 4 -anchor w -pady 2 \
    1746         3,0 $inner.dim -anchor e -pady 2 \
    1747         3,1 $inner.light -cspan 2 -pady 2 -fill x \
    1748         3,3 $inner.bright -anchor w -pady 2 \
    1749         4,0 $inner.fog -anchor e -pady 2 \
    1750         4,1 $inner.transp -cspan 2 -pady 2 -fill x \
    1751         4,3 $inner.plastic -anchor w -pady 2 \
    1752         5,0 $inner.thin -anchor e -pady 2 \
    1753         5,1 $inner.thickness -cspan 2 -pady 2 -fill x\
    1754         5,3 $inner.thick -anchor w -pady 2
     1749        3,0 $inner.visibility -cspan 4 -anchor w -pady 2 \
     1750        4,0 $inner.dim -anchor e -pady 2 \
     1751        4,1 $inner.light -cspan 2 -pady 2 -fill x \
     1752        4,3 $inner.bright -anchor w -pady 2 \
     1753        5,0 $inner.fog -anchor e -pady 2 \
     1754        5,1 $inner.transp -cspan 2 -pady 2 -fill x \
     1755        5,3 $inner.plastic -anchor w -pady 2 \
     1756        6,0 $inner.thin -anchor e -pady 2 \
     1757        6,1 $inner.thickness -cspan 2 -pady 2 -fill x\
     1758        6,3 $inner.thick -anchor w -pady 2
    17551759
    17561760    blt::table configure $inner c0 c1 c3 r* -resize none
    1757     blt::table configure $inner r6 -resize expand
     1761    blt::table configure $inner r7 -resize expand
    17581762}
    17591763
     
    17691773        -command [itcl::code $this AdjustSetting -cutplanesvisible] \
    17701774        -font "Arial 9"
    1771    
     1775
    17721776    # X-value slicer...
    17731777    itk_component add xCutButton {
     
    18541858
    18551859    blt::table $inner \
    1856         1,1 $itk_component(xCutButton) \
    1857         1,2 $itk_component(yCutButton) \
    1858         1,3 $itk_component(zCutButton) \
    1859         0,1 $itk_component(xCutScale) \
    1860         0,2 $itk_component(yCutScale) \
    1861         0,3 $itk_component(zCutScale)
    1862 
    1863     blt::table configure $inner r0 r1 c* -resize none
    1864     blt::table configure $inner r2 c4 -resize expand
     1860        0,1 $inner.visible              -anchor w -pady 2 -cspan 4 \
     1861        1,1 $itk_component(xCutScale) \
     1862        1,2 $itk_component(yCutScale) \
     1863        1,3 $itk_component(zCutScale) \
     1864        2,1 $itk_component(xCutButton) \
     1865        2,2 $itk_component(yCutButton) \
     1866        2,3 $itk_component(zCutButton)
     1867
     1868    blt::table configure $inner r0 r1 r2 c* -resize none
     1869    blt::table configure $inner r3 c4 -resize expand
    18651870    blt::table configure $inner c0 -width 2
    18661871    blt::table configure $inner c1 c2 c3 -padx 2
     
    21032108        -light2side        1
    21042109        -thickness         350
    2105         -volumeopacity     0.5
     2110        -volumeopacity     1.0
    21062111        -volumevisible     1
    21072112    } {
     
    21242129        InitComponentSettings $cname
    21252130    }
     2131    if { $_settings(-colormap) != $_settings($cname-colormap) } {
     2132        set _settings(-colormap)         $_settings($cname-colormap)
     2133        EventuallyRedrawLegend
     2134    }
    21262135    # _settings variables change widgets, except for colormap
    2127     set _settings(-colormap)         $_settings($cname-colormap)
    21282136    set _settings(-light)            $_settings($cname-light)
    21292137    set _settings(-light2side)       $_settings($cname-light2side)
     
    21722180# GetDatasetsWithComponents --
    21732181#
    2174 #     Returns a list of all the datasets (known by the combination of their
    2175 #     data object and component name) that match the given component name.
    2176 #     For example, this is used where we want to change the settings of
    2177 #     volumes that have the current component.
     2182#    Returns a list of all the datasets (known by the combination of their
     2183#    data object and component name) that match the given component name.
     2184#    For example, this is used where we want to change the settings of
     2185#    volumes that have the current component.
    21782186#
    21792187itcl::body Rappture::NanovisViewer::GetDatasetsWithComponent { cname } {
     
    21942202# HideAllMarkers --
    21952203#
    2196 #   Hide all the markers in all the transfer functions.  Can't simply
    2197 #   delete and recreate markers from the <style> since the user may have
    2198 #   create, deleted, or moved markers.
     2204#    Hide all the markers in all the transfer functions.  Can't simply
     2205#    delete and recreate markers from the <style> since the user may have
     2206#    created, deleted, or moved markers.
    21992207#
    22002208itcl::body Rappture::NanovisViewer::HideAllMarkers {} {
     
    22402248    set isovalues [$_transferFunctionEditors($cname) values]
    22412249
    2242     # Currently using volume shading opacity to scale opacity in
    2243     # the volume shader. The transfer function always sets full
    2244     # opacity
     2250    # Transfer function should be normalized with [0,1] range
     2251    # The volume shading opacity setting is used to scale opacity
     2252    # in the volume shader.
    22452253    set max 1.0
    22462254
     
    22922300    return $wmap
    22932301}
    2294 
    22952302
    22962303itcl::body Rappture::NanovisViewer::NameToAlphamap { name } {
     
    24622469}
    24632470
    2464 
    24652471itcl::body Rappture::NanovisViewer::SetObjectStyle { dataobj cname } {
    24662472    array set styles {
    2467         -opacity  0.6
     2473        -opacity  0.5
    24682474    }
    24692475    array set styles [lindex [$dataobj components -style $cname] 0]
    24702476    set _settings($cname-volumeopacity) $styles(-opacity)
     2477    set tag $dataobj-$cname
     2478    SendCmd "volume shading opacity $_settings($cname-volumeopacity) $tag"
    24712479    NameTransferFunction $dataobj $cname
    24722480}
    2473 
    2474 
    2475 
    2476 
  • branches/uq/gui/scripts/vtkglyphviewer.tcl

    r4481 r4797  
    5757    public method get {args}
    5858    public method isconnected {}
    59     public method limits { colormap }
    6059    public method parameters {title args} {
    6160        # do nothing
     
    144143    private variable _legendPending 0
    145144    private variable _field      ""
    146     private variable _colorMode "vmag"; #  Mode of colormap (vmag or scalar)
     145    private variable _colorMode "vmag"; #  Mode of colormap (vmag or scalar)
    147146    private variable _fieldNames {}
    148147    private variable _fields
     
    182181    $_dispatcher register !xcutplane
    183182    $_dispatcher dispatch $this !xcutplane \
    184         "[itcl::code $this AdjustSetting cutplaneXPosition]; list"
     183        "[itcl::code $this AdjustSetting -cutplanexposition]; list"
    185184
    186185    # Y-Cutplane event
    187186    $_dispatcher register !ycutplane
    188187    $_dispatcher dispatch $this !ycutplane \
    189         "[itcl::code $this AdjustSetting cutplaneYPosition]; list"
     188        "[itcl::code $this AdjustSetting -cutplaneyposition]; list"
    190189
    191190    # Z-Cutplane event
    192191    $_dispatcher register !zcutplane
    193192    $_dispatcher dispatch $this !zcutplane \
    194         "[itcl::code $this AdjustSetting cutplaneZPosition]; list"
     193        "[itcl::code $this AdjustSetting -cutplanezposition]; list"
    195194
    196195    #
     
    217216
    218217    array set _settings [subst {
    219         background              black
    220         colormap                BCGYR
    221         colormapVisible         1
    222         field                   "Default"
    223         axesVisible             1
    224         axisLabelsVisible       1
    225         axisXGrid               0
    226         axisYGrid               0
    227         axisZGrid               0
    228         cutplaneEdges           0
    229         cutplaneLighting        1
    230         cutplanePreinterp       1
    231         cutplaneOpacity         100
    232         cutplaneVisible         0
    233         cutplaneWireframe       0
    234         cutplaneXPosition       50
    235         cutplaneXVisible        1
    236         cutplaneYPosition       50
    237         cutplaneYVisible        1
    238         cutplaneZPosition       50
    239         cutplaneZVisible        1
    240         glyphEdges              0
    241         glyphLighting           1
    242         glyphOpacity            100
    243         saveGlyphOpacity        100
    244         glyphOutline            0
    245         glyphVisible            1
    246         glyphWireframe          0
    247         legendVisible           1
     218        -axesvisible            1
     219        -axislabels             1
     220        -axisminorticks         1
     221        -axismode               "static"
     222        -background             black
     223        -colormap               BCGYR
     224        -colormapvisible        1
     225        -cutplaneedges          0
     226        -cutplanelighting       1
     227        -cutplanepreinterp      1
     228        -cutplaneopacity        100
     229        -cutplanevisible        0
     230        -cutplanewireframe      0
     231        -cutplanexposition      50
     232        -cutplanexvisible       1
     233        -cutplaneyposition      50
     234        -cutplaneyvisible       1
     235        -cutplanezposition      50
     236        -cutplanezvisible       1
     237        -field                  "Default"
     238        -glyphedges             0
     239        -glyphlighting          1
     240        -glyphopacity           100
     241        -glyphoutline           0
     242        -glyphscale             1
     243        -glyphvisible           1
     244        -glyphwireframe         0
     245        -legendvisible          1
     246        -saveglyphopacity       100
     247        -xgrid                  0
     248        -ygrid                  0
     249        -zgrid                  0
    248250    }]
    249251    array set _changed {
    250         glyphOpacity            0
    251         colormap                0
     252        -colormap               0
     253        -glyphopacity           0
    252254    }
    253255
     
    329331            -onimage [Rappture::icon volume-on] \
    330332            -offimage [Rappture::icon volume-off] \
    331             -variable [itcl::scope _settings(glyphVisible)] \
    332             -command [itcl::code $this AdjustSetting glyphVisible]
     333            -variable [itcl::scope _settings(-glyphvisible)] \
     334            -command [itcl::code $this AdjustSetting -glyphvisible]
    333335    }
    334336    $itk_component(glyphs) select
     
    342344            -onimage [Rappture::icon cutbutton] \
    343345            -offimage [Rappture::icon cutbutton] \
    344             -variable [itcl::scope _settings(cutplaneVisible)] \
    345             -command [itcl::code $this AdjustSetting cutplaneVisible]
     346            -variable [itcl::scope _settings(-cutplanevisible)] \
     347            -command [itcl::code $this AdjustSetting -cutplanevisible]
    346348    }
    347349    Rappture::Tooltip::for $itk_component(cutplane) \
     
    540542}
    541543
    542 
    543544# ----------------------------------------------------------------------
    544545# USAGE: delete ?<dataobj1> <dataobj2> ...?
    545546#
    546 #       Clients use this to delete a dataobj from the plot.  If no dataobjs
    547 #       are specified, then all dataobjs are deleted.  No data objects are
    548 #       deleted.  They are only removed from the display list.
     547#    Clients use this to delete a dataobj from the plot.  If no dataobjs
     548#    are specified, then all dataobjs are deleted.  No data objects are
     549#    deleted.  They are only removed from the display list.
    549550#
    550551# ----------------------------------------------------------------------
     
    775776                set session $env(SESSION)
    776777            }
     778            lappend info "version" "$Rappture::version"
     779            lappend info "build" "$Rappture::build"
     780            lappend info "svnurl" "$Rappture::svnurl"
     781            lappend info "installdir" "$Rappture::installdir"
    777782            lappend info "hub" [exec hostname]
    778783            lappend info "client" "vtkglyphviewer"
     
    792797# isconnected --
    793798#
    794 #       Indicates if we are currently connected to the visualization server.
     799#    Indicates if we are currently connected to the visualization server.
    795800#
    796801itcl::body Rappture::VtkGlyphViewer::isconnected {} {
     
    809814# Disconnect --
    810815#
    811 #       Clients use this method to disconnect from the current rendering
    812 #       server.
     816#    Clients use this method to disconnect from the current rendering
     817#    server.
    813818#
    814819itcl::body Rappture::VtkGlyphViewer::Disconnect {} {
     
    948953        PanCamera
    949954        set _first ""
    950         InitSettings axisXGrid axisYGrid axisZGrid axisMode \
    951             axesVisible axisLabelsVisible
    952         foreach axis { x y z } {
    953             SendCmd "axis lformat $axis %g"
    954         }
     955        InitSettings -xgrid -ygrid -zgrid -axismode \
     956            -axesvisible -axislabels -axisminorticks
     957        #SendCmd "axis lformat all %g"
    955958        StopBufferingCommands
    956959        SendCmd "imgflush"
     
    968971            if { ![info exists _datasets($tag)] } {
    969972                set bytes [$dataobj vtkdata $comp]
    970                 if 0 {
    971                     set f [open "/tmp/glyph.vtk" "w"]
    972                     puts $f $bytes
    973                     close $f
     973                if 0 {
     974                    set f [open "/tmp/glyph.vtk" "w"]
     975                    puts $f $bytes
     976                    close $f
    974977                }
    975978                set length [string length $bytes]
     
    985988                    SendCmd "clientinfo [list $info]"
    986989                }
    987                 append _outbuf "dataset add $tag data follows $length\n"
     990                SendCmd "dataset add $tag data follows $length"
    988991                append _outbuf $bytes
    989992                set _datasets($tag) 1
     
    994997                # Setting dataset visible enables outline
    995998                # and glyphs
    996                 SendCmd "dataset visible 1 $tag"
     999                SendCmd "dataset visible 1 $tag"
    9971000            }
    9981001        }
     
    10001003
    10011004    if { $_first != "" } {
    1002         $itk_component(field) choices delete 0 end
    1003         $itk_component(fieldmenu) delete 0 end
    1004         array unset _fields
     1005        $itk_component(field) choices delete 0 end
     1006        $itk_component(fieldmenu) delete 0 end
     1007        array unset _fields
    10051008        set _curFldName ""
    10061009        foreach cname [$_first components] {
     
    10281031        $itk_component(field) value $_curFldLabel
    10291032    }
    1030     InitSettings glyphOutline
    1031         #cutplaneVisible
     1033    InitSettings -glyphoutline
     1034        #-cutplanevisible
    10321035    if { $_reset } {
    1033         # These are settings that rely on a dataset being loaded.
     1036        # These are settings that rely on a dataset being loaded.
    10341037        InitSettings \
    1035             glyphLighting \
    1036             field \
    1037             glyphEdges glyphLighting glyphOpacity \
    1038             glyphWireframe
    1039 
    1040         #cutplaneXPosition cutplaneYPosition cutplaneZPosition \
    1041             cutplaneXVisible cutplaneYVisible cutplaneZVisible \
    1042             cutplanePreinterp
     1038            -glyphlighting \
     1039            -field \
     1040            -glyphedges -glyphlighting -glyphopacity \
     1041            -glyphwireframe
     1042
     1043        #-cutplanexposition -cutplaneyposition -cutplanezposition \
     1044            -cutplanexvisible -cutplaneyvisible -cutplanezvisible \
     1045            -cutplanepreinterp
    10431046
    10441047        Zoom reset
    1045         foreach axis { x y z } {
     1048        foreach axis { x y z } {
    10461049            # Another problem fixed by a <view>. We looking into a data
    10471050            # object for the name of the axes. This should be global to
    10481051            # the viewer itself.
    1049             set label [$_first hints ${axis}label]
    1050             if { $label == "" } {
     1052            set label [$_first hints ${axis}label]
     1053            if { $label == "" } {
    10511054                set label [string toupper $axis]
    1052             }
    1053             # May be a space in the axis label.
    1054             SendCmd [list axis name $axis $label]
     1055            }
     1056            # May be a space in the axis label.
     1057            SendCmd [list axis name $axis $label]
    10551058        }
    10561059        if { [array size _fields] < 2 } {
    1057             blt::table forget $itk_component(field) $itk_component(field_l)
     1060            catch {blt::table forget $itk_component(field) $itk_component(field_l)}
    10581061        }
    10591062        set _reset 0
     
    11591162    SendCmd "camera pan $x $y"
    11601163}
    1161 
    11621164
    11631165# ----------------------------------------------------------------------
     
    12801282itcl::body Rappture::VtkGlyphViewer::InitSettings { args } {
    12811283    foreach spec $args {
    1282         if { [info exists _settings($_first-$spec)] } {
     1284        if { [info exists _settings($_first${spec})] } {
    12831285            # Reset global setting with dataobj specific setting
    1284             set _settings($spec) $_settings($_first-$spec)
     1286            set _settings($spec) $_settings($_first${spec})
    12851287        }
    12861288        AdjustSetting $spec
     
    12911293# AdjustSetting --
    12921294#
    1293 #       Changes/updates a specific setting in the widget.  There are
    1294 #       usually user-setable option.  Commands are sent to the render
    1295 #       server.
     1295#    Changes/updates a specific setting in the widget.  There are
     1296#    usually user-setable option.  Commands are sent to the render
     1297#    server.
    12961298#
    12971299itcl::body Rappture::VtkGlyphViewer::AdjustSetting {what {value ""}} {
     
    13001302    }
    13011303    switch -- $what {
    1302         "background" {
     1304        "-background" {
    13031305            set bgcolor [$itk_component(background) value]
    1304             array set fgcolors {
    1305                 "black" "white"
    1306                 "white" "black"
    1307                 "grey"  "black"
    1308             }
     1306            array set fgcolors {
     1307                "black" "white"
     1308                "white" "black"
     1309                "grey"  "black"
     1310            }
    13091311            configure -plotbackground $bgcolor \
    1310                 -plotforeground $fgcolors($bgcolor)
    1311             $itk_component(view) delete "legend"
    1312             DrawLegend
    1313         }
    1314         "axesVisible" {
    1315             set bool $_settings(axesVisible)
     1312                -plotforeground $fgcolors($bgcolor)
     1313            $itk_component(view) delete "legend"
     1314            DrawLegend
     1315        }
     1316        "-axesvisible" {
     1317            set bool $_settings($what)
    13161318            SendCmd "axis visible all $bool"
    13171319        }
    1318         "axisLabelsVisible" {
    1319             set bool $_settings(axisLabelsVisible)
     1320        "-axislabels" {
     1321            set bool $_settings($what)
    13201322            SendCmd "axis labels all $bool"
    13211323        }
    1322         "axisXGrid" - "axisYGrid" - "axisZGrid" {
    1323             set axis [string tolower [string range $what 4 4]]
     1324        "-axisminorticks" {
     1325            set bool $_settings($what)
     1326            SendCmd "axis minticks all $bool"
     1327        }
     1328        "-xgrid" - "-ygrid" - "-zgrid" {
     1329            set axis [string tolower [string range $what 1 1]]
    13241330            set bool $_settings($what)
    13251331            SendCmd "axis grid $axis $bool"
    13261332        }
    1327         "axisMode" {
     1333        "-axismode" {
    13281334            set mode [$itk_component(axisMode) value]
    13291335            set mode [$itk_component(axisMode) translate $mode]
     
    13311337            SendCmd "axis flymode $mode"
    13321338        }
    1333         "cutplaneEdges" {
     1339        "-cutplaneedges" {
    13341340            set bool $_settings($what)
    13351341            SendCmd "cutplane edges $bool"
    13361342        }
    1337         "cutplaneVisible" {
     1343        "-cutplanevisible" {
    13381344            set bool $_settings($what)
    13391345            SendCmd "cutplane visible $bool"
    13401346        }
    1341         "cutplaneWireframe" {
     1347        "-cutplanewireframe" {
    13421348            set bool $_settings($what)
    13431349            SendCmd "cutplane wireframe $bool"
    13441350        }
    1345         "cutplaneLighting" {
     1351        "-cutplanelighting" {
    13461352            set bool $_settings($what)
    13471353            SendCmd "cutplane lighting $bool"
    13481354        }
    1349         "cutplaneOpacity" {
     1355        "-cutplaneopacity" {
    13501356            set val $_settings($what)
    13511357            set sval [expr { 0.01 * double($val) }]
    13521358            SendCmd "cutplane opacity $sval"
    13531359        }
    1354         "cutplanePreinterp" {
     1360        "-cutplanepreinterp" {
    13551361            set bool $_settings($what)
    13561362            SendCmd "cutplane preinterp $bool"
    13571363        }
    1358         "cutplaneXVisible" - "cutplaneYVisible" - "cutplaneZVisible" {
    1359             set axis [string tolower [string range $what 8 8]]
     1364        "-cutplanexvisible" - "-cutplaneyvisible" - "-cutplanezvisible" {
     1365            set axis [string tolower [string range $what 9 9]]
    13601366            set bool $_settings($what)
    13611367            if { $bool } {
     
    13661372                    -troughcolor grey82
    13671373            }
    1368             SendCmd "cutplane axis $axis $bool"
    1369         }
    1370         "cutplaneXPosition" - "cutplaneYPosition" - "cutplaneZPosition" {
    1371             set axis [string tolower [string range $what 8 8]]
     1374            SendCmd "cutplane axis $axis $bool"
     1375        }
     1376        "-cutplanexposition" - "-cutplaneyposition" - "-cutplanezposition" {
     1377            set axis [string tolower [string range $what 9 9]]
    13721378            set pos [expr $_settings($what) * 0.01]
    13731379            SendCmd "cutplane slice ${axis} ${pos}"
    13741380            set _cutplanePending 0
    13751381        }
    1376         "colormap" {
    1377             set _changed(colormap) 1
     1382        "-colormap" {
     1383            set _changed($what) 1
    13781384            StartBufferingCommands
    13791385            set color [$itk_component(colormap) value]
    1380             set _settings(colormap) $color
    1381             if { $color == "none" } {
    1382                 if { $_settings(colormapVisible) } {
    1383                     SendCmd "glyphs colormode constant {}"
    1384                     set _settings(colormapVisible) 0
    1385                 }
    1386             } else {
    1387                 if { !$_settings(colormapVisible) } {
    1388                     SendCmd "glyphs colormode $_colorMode $_curFldName"
    1389                     set _settings(colormapVisible) 1
    1390                 }
    1391                 SetCurrentColormap $color
    1392             }
     1386            set _settings($what) $color
     1387            if { $color == "none" } {
     1388                if { $_settings(-colormapvisible) } {
     1389                    SendCmd "glyphs colormode constant {}"
     1390                    set _settings(-colormapvisible) 0
     1391                }
     1392            } else {
     1393                if { !$_settings(-colormapvisible) } {
     1394                    SendCmd "glyphs colormode $_colorMode $_curFldName"
     1395                    set _settings(-colormapvisible) 1
     1396                }
     1397                SetCurrentColormap $color
     1398            }
    13931399            StopBufferingCommands
    1394             EventuallyRequestLegend
    1395         }
    1396         "glyphWireframe" {
    1397             set bool $_settings(glyphWireframe)
    1398             SendCmd "glyphs wireframe $bool"
    1399         }
    1400         "glyphVisible" {
    1401             set bool $_settings(glyphVisible)
    1402             SendCmd "glyphs visible $bool"
     1400            EventuallyRequestLegend
     1401        }
     1402        "-glyphwireframe" {
     1403            set bool $_settings($what)
     1404            SendCmd "glyphs wireframe $bool"
     1405        }
     1406        "-glyphvisible" {
     1407            set bool $_settings($what)
     1408            SendCmd "glyphs visible $bool"
    14031409            if { $bool } {
    14041410                Rappture::Tooltip::for $itk_component(glyphs) \
     
    14081414                    "Show the glyph"
    14091415            }
    1410             DrawLegend
    1411         }
    1412         "glyphLighting" {
    1413             set bool $_settings(glyphLighting)
    1414             SendCmd "glyphs lighting $bool"
    1415         }
    1416         "glyphEdges" {
    1417             set bool $_settings(glyphEdges)
    1418             SendCmd "glyphs edges $bool"
    1419         }
    1420         "glyphOutline" {
    1421             set bool $_settings(glyphOutline)
    1422             SendCmd "outline visible $bool"
    1423         }
    1424         "glyphOpacity" {
    1425             set val $_settings(glyphOpacity)
     1416            DrawLegend
     1417        }
     1418        "-glyphlighting" {
     1419            set bool $_settings($what)
     1420            SendCmd "glyphs lighting $bool"
     1421        }
     1422        "-glyphedges" {
     1423            set bool $_settings($what)
     1424            SendCmd "glyphs edges $bool"
     1425        }
     1426        "-glyphoutline" {
     1427            set bool $_settings($what)
     1428            SendCmd "outline visible $bool"
     1429        }
     1430        "-glyphopacity" {
     1431            set val $_settings($what)
    14261432            set sval [expr { 0.01 * double($val) }]
    1427             SendCmd "glyphs opacity $sval"
    1428         }
    1429         "field" {
     1433            SendCmd "glyphs opacity $sval"
     1434        }
     1435        "-glyphscale" {
     1436            set val $_settings($what)
     1437            if { [string is double $val] } {
     1438                SendCmd "glyphs gscale $val"
     1439            }
     1440        }
     1441        "-field" {
    14301442            set label [$itk_component(field) value]
    14311443            set fname [$itk_component(field) translate $label]
    1432             set _settings(field) $fname
     1444            set _settings($what) $fname
    14331445            if { [info exists _fields($fname)] } {
    14341446                foreach { label units components } $_fields($fname) break
     
    14441456                return
    14451457            }
    1446             #SendCmd "dataset maprange explicit $_limits($_curFldName) $_curFldName"
     1458            #if { ![info exists _limits($_curFldName)] } {
     1459            #    SendCmd "dataset maprange all"
     1460            #} else {
     1461            #    SendCmd "dataset maprange explicit $_limits($_curFldName) $_curFldName"
     1462            #}
    14471463            #SendCmd "cutplane colormode $_colorMode $_curFldName"
    14481464            SendCmd "glyphs colormode $_colorMode $_curFldName"
    14491465            DrawLegend
    14501466        }
    1451         "legendVisible" {
    1452             if { !$_settings(legendVisible) } {
     1467        "-legendvisible" {
     1468            if { !$_settings($what) } {
    14531469                $itk_component(view) delete legend
    1454             }
    1455             DrawLegend
     1470            }
     1471            DrawLegend
    14561472        }
    14571473        default {
     
    14611477}
    14621478
    1463 
    14641479#
    14651480# RequestLegend --
    14661481#
    1467 #       Request a new legend from the server.  The size of the legend
    1468 #       is determined from the height of the canvas. 
     1482#    Request a new legend from the server.  The size of the legend
     1483#    is determined from the height of the canvas. 
    14691484#
    14701485# This should be called when
    1471 #       1.  A new current colormap is set.
    1472 #       2.  Window is resized.
    1473 #       3.  The limits of the data have changed.  (Just need a redraw).
    1474 #       4.  Number of glyph have changed. (Just need a redraw).
    1475 #       5.  Legend becomes visible (Just need a redraw).
     1486#    1.  A new current colormap is set.
     1487#    2.  Window is resized.
     1488#    3.  The limits of the data have changed.  (Just need a redraw).
     1489#    4.  Number of glyph have changed. (Just need a redraw).
     1490#    5.  Legend becomes visible (Just need a redraw).
    14761491#
    14771492itcl::body Rappture::VtkGlyphViewer::RequestLegend {} {
     
    14851500    set fname $_curFldName
    14861501    if { [string match "component*" $fname] } {
    1487         set title ""
     1502        set title ""
    14881503    } else {
    1489         if { [info exists _fields($fname)] } {
    1490             foreach { title units } $_fields($fname) break
    1491             if { $units != "" } {
    1492                 set title [format "%s (%s)" $title $units]
    1493             }
    1494         } else {
    1495             set title $fname
    1496         }
     1504        if { [info exists _fields($fname)] } {
     1505            foreach { title units } $_fields($fname) break
     1506            if { $units != "" } {
     1507                set title [format "%s (%s)" $title $units]
     1508            }
     1509        } else {
     1510            set title $fname
     1511        }
    14971512    }
    14981513    # If there's a title too, substract one more line
     
    15051520    # Set the legend on the first heightmap dataset.
    15061521    if { $_currentColormap != ""  } {
    1507         set cmap $_currentColormap
    1508         SendCmdNoWait "legend $cmap $_colorMode $_curFldName {} $w $h 0"
     1522        set cmap $_currentColormap
     1523        SendCmdNoWait "legend $cmap $_colorMode $_curFldName {} $w $h 0"
    15091524    }
    15101525}
     
    15261541    if { [isconnected] } {
    15271542        set rgb [Color2RGB $itk_option(-plotforeground)]
    1528         SendCmd "axis color all $rgb"
     1543        SendCmd "axis color all $rgb"
    15291544        SendCmd "outline color $rgb"
    15301545        #SendCmd "cutplane color $rgb"
    15311546    }
    1532 }
    1533 
    1534 itcl::body Rappture::VtkGlyphViewer::limits { dataobj } {
    1535     foreach { limits(xmin) limits(xmax) } [$dataobj limits x] break
    1536     foreach { limits(ymin) limits(ymax) } [$dataobj limits y] break
    1537     foreach { limits(zmin) limits(zmax) } [$dataobj limits z] break
    1538     foreach { limits(vmin) limits(vmax) } [$dataobj limits v] break
    1539     return [array get limits]
    15401547}
    15411548
     
    15521559    checkbutton $inner.glyphs \
    15531560        -text "Glyphs" \
    1554         -variable [itcl::scope _settings(glyphVisible)] \
    1555         -command [itcl::code $this AdjustSetting glyphVisible] \
     1561        -variable [itcl::scope _settings(-glyphvisible)] \
     1562        -command [itcl::code $this AdjustSetting -glyphvisible] \
    15561563        -font "Arial 9"
    15571564
    15581565    checkbutton $inner.wireframe \
    15591566        -text "Wireframe" \
    1560         -variable [itcl::scope _settings(glyphWireframe)] \
    1561         -command [itcl::code $this AdjustSetting glyphWireframe] \
     1567        -variable [itcl::scope _settings(-glyphwireframe)] \
     1568        -command [itcl::code $this AdjustSetting -glyphwireframe] \
    15621569        -font "Arial 9"
    15631570
    15641571    checkbutton $inner.lighting \
    15651572        -text "Enable Lighting" \
    1566         -variable [itcl::scope _settings(glyphLighting)] \
    1567         -command [itcl::code $this AdjustSetting glyphLighting] \
     1573        -variable [itcl::scope _settings(-glyphlighting)] \
     1574        -command [itcl::code $this AdjustSetting -glyphlighting] \
    15681575        -font "Arial 9"
    15691576
    15701577    checkbutton $inner.edges \
    15711578        -text "Edges" \
    1572         -variable [itcl::scope _settings(glyphEdges)] \
    1573         -command [itcl::code $this AdjustSetting glyphEdges] \
     1579        -variable [itcl::scope _settings(-glyphedges)] \
     1580        -command [itcl::code $this AdjustSetting -glyphedges] \
    15741581        -font "Arial 9"
    15751582
    15761583    checkbutton $inner.outline \
    15771584        -text "Outline" \
    1578         -variable [itcl::scope _settings(glyphOutline)] \
    1579         -command [itcl::code $this AdjustSetting glyphOutline] \
     1585        -variable [itcl::scope _settings(-glyphoutline)] \
     1586        -command [itcl::code $this AdjustSetting -glyphoutline] \
    15801587        -font "Arial 9"
    15811588
    15821589    checkbutton $inner.legend \
    15831590        -text "Legend" \
    1584         -variable [itcl::scope _settings(legendVisible)] \
    1585         -command [itcl::code $this AdjustSetting legendVisible] \
     1591        -variable [itcl::scope _settings(-legendvisible)] \
     1592        -command [itcl::code $this AdjustSetting -legendvisible] \
    15861593        -font "Arial 9"
    15871594
     
    15951602        "grey"               "grey"             
    15961603
    1597     $itk_component(background) value $_settings(background)
    1598     bind $inner.background <<Value>> [itcl::code $this AdjustSetting background]
     1604    $itk_component(background) value $_settings(-background)
     1605    bind $inner.background <<Value>> [itcl::code $this AdjustSetting -background]
    15991606
    16001607    label $inner.opacity_l -text "Opacity" -font "Arial 9"
    16011608    ::scale $inner.opacity -from 0 -to 100 -orient horizontal \
    1602         -variable [itcl::scope _settings(glyphOpacity)] \
     1609        -variable [itcl::scope _settings(-glyphopacity)] \
    16031610        -width 10 \
    16041611        -showvalue off \
    1605         -command [itcl::code $this AdjustSetting glyphOpacity]
    1606 
    1607     label $inner.scale_l -text "Scale" -font "Arial 9"
    1608     ::scale $inner.scale -from 1 -to 100 -orient horizontal \
    1609         -variable [itcl::scope _settings(glyphs-scale)] \
     1612        -command [itcl::code $this AdjustSetting -glyphopacity]
     1613
     1614    label $inner.gscale_l -text "Scale factor" -font "Arial 9"
     1615    ::scale $inner.gscale -from 1 -to 100 -orient horizontal \
     1616        -variable [itcl::scope _settings(-glyphscale)] \
    16101617        -width 10 \
    16111618        -showvalue off \
    1612         -command [itcl::code $this AdjustSetting glyphs-scale]
     1619        -command [itcl::code $this AdjustSetting -glyphscale]
     1620    Rappture::Tooltip::for $inner.gscale "Set scaling multiplier (or constant size)"
    16131621
    16141622    itk_component add field_l {
     
    16211629    }
    16221630    bind $inner.field <<Value>> \
    1623         [itcl::code $this AdjustSetting field]
     1631        [itcl::code $this AdjustSetting -field]
    16241632
    16251633    label $inner.colormap_l -text "Colormap" -font "Arial 9"
     
    16311639    $itk_component(colormap) value "BCGYR"
    16321640    bind $inner.colormap <<Value>> \
    1633         [itcl::code $this AdjustSetting colormap]
     1641        [itcl::code $this AdjustSetting -colormap]
    16341642
    16351643    blt::table $inner \
    1636         0,0 $inner.field_l   -anchor w -pady 2  \
    1637         0,1 $inner.field     -anchor w -pady 2  -fill x \
    1638         1,0 $inner.colormap_l -anchor w -pady 2  \
    1639         1,1 $inner.colormap   -anchor w -pady 2  -fill x \
    1640         3,0 $inner.background_l -anchor w -pady 2 \
    1641         3,1 $inner.background -anchor w -pady 2  -fill x \
    1642         5,0 $inner.wireframe -anchor w -pady 2 -cspan 2 \
    1643         6,0 $inner.lighting  -anchor w -pady 2 -cspan 2 \
    1644         7,0 $inner.edges     -anchor w -pady 2 -cspan 2 \
    1645         8,0 $inner.outline   -anchor w -pady 2 -cspan 2 \
    1646         9,0 $inner.legend    -anchor w -pady 2 \
    1647         10,0 $inner.opacity_l -anchor w -pady 2 \
    1648         10,1 $inner.opacity   -fill x   -pady 2 -fill x \
     1644        0,0 $inner.field_l      -anchor w -pady 2  \
     1645        0,1 $inner.field        -anchor w -pady 2  -fill x \
     1646        1,0 $inner.colormap_l   -anchor w -pady 2  \
     1647        1,1 $inner.colormap     -anchor w -pady 2  -fill x \
     1648        3,0 $inner.background_l -anchor w -pady 2 \
     1649        3,1 $inner.background  -anchor w -pady 2  -fill x \
     1650        5,0 $inner.wireframe    -anchor w -pady 2 -cspan 2 \
     1651        6,0 $inner.lighting     -anchor w -pady 2 -cspan 2 \
     1652        7,0 $inner.edges        -anchor w -pady 2 -cspan 2 \
     1653        8,0 $inner.outline      -anchor w -pady 2 -cspan 2 \
     1654        9,0 $inner.legend       -anchor w -pady 2 \
     1655        10,0 $inner.opacity_l   -anchor w -pady 2 \
     1656        10,1 $inner.opacity     -fill x   -pady 2 -fill x \
    16491657
    16501658    blt::table configure $inner r* c* -resize none
     
    16631671
    16641672    checkbutton $inner.visible \
    1665         -text "Show Axes" \
    1666         -variable [itcl::scope _settings(axesVisible)] \
    1667         -command [itcl::code $this AdjustSetting axesVisible] \
     1673        -text "Axes" \
     1674        -variable [itcl::scope _settings(-axesvisible)] \
     1675        -command [itcl::code $this AdjustSetting -axesvisible] \
    16681676        -font "Arial 9"
    16691677
    16701678    checkbutton $inner.labels \
    1671         -text "Show Axis Labels" \
    1672         -variable [itcl::scope _settings(axisLabelsVisible)] \
    1673         -command [itcl::code $this AdjustSetting axisLabelsVisible] \
     1679        -text "Axis Labels" \
     1680        -variable [itcl::scope _settings(-axislabels)] \
     1681        -command [itcl::code $this AdjustSetting -axislabels] \
    16741682        -font "Arial 9"
    1675 
    1676     checkbutton $inner.gridx \
    1677         -text "Show X Grid" \
    1678         -variable [itcl::scope _settings(axisXGrid)] \
    1679         -command [itcl::code $this AdjustSetting axisXGrid] \
     1683    label $inner.grid_l -text "Grid" -font "Arial 9"
     1684    checkbutton $inner.xgrid \
     1685        -text "X" \
     1686        -variable [itcl::scope _settings(-xgrid)] \
     1687        -command [itcl::code $this AdjustSetting -xgrid] \
    16801688        -font "Arial 9"
    1681     checkbutton $inner.gridy \
    1682         -text "Show Y Grid" \
    1683         -variable [itcl::scope _settings(axisYGrid)] \
    1684         -command [itcl::code $this AdjustSetting axisYGrid] \
     1689    checkbutton $inner.ygrid \
     1690        -text "Y" \
     1691        -variable [itcl::scope _settings(-ygrid)] \
     1692        -command [itcl::code $this AdjustSetting -ygrid] \
    16851693        -font "Arial 9"
    1686     checkbutton $inner.gridz \
    1687         -text "Show Z Grid" \
    1688         -variable [itcl::scope _settings(axisZGrid)] \
    1689         -command [itcl::code $this AdjustSetting axisZGrid] \
     1694    checkbutton $inner.zgrid \
     1695        -text "Z" \
     1696        -variable [itcl::scope _settings(-zgrid)] \
     1697        -command [itcl::code $this AdjustSetting -zgrid] \
     1698        -font "Arial 9"
     1699    checkbutton $inner.minorticks \
     1700        -text "Minor Ticks" \
     1701        -variable [itcl::scope _settings(-axisminorticks)] \
     1702        -command [itcl::code $this AdjustSetting -axisminorticks] \
    16901703        -font "Arial 9"
    16911704
     
    17001713        "furthest_triad"  "farthest" \
    17011714        "outer_edges"     "outer"         
    1702     $itk_component(axisMode) value "static"
    1703     bind $inner.mode <<Value>> [itcl::code $this AdjustSetting axisMode]
     1715    $itk_component(axisMode) value $_settings(-axismode)
     1716    bind $inner.mode <<Value>> [itcl::code $this AdjustSetting -axismode]
    17041717
    17051718    blt::table $inner \
    1706         0,0 $inner.visible -anchor w -cspan 2 \
    1707         1,0 $inner.labels  -anchor w -cspan 2 \
    1708         2,0 $inner.gridx   -anchor w -cspan 2 \
    1709         3,0 $inner.gridy   -anchor w -cspan 2 \
    1710         4,0 $inner.gridz   -anchor w -cspan 2 \
    1711         5,0 $inner.mode_l  -anchor w -cspan 2 -padx { 2 0 } \
    1712         6,0 $inner.mode    -fill x   -cspan 2
     1719        0,0 $inner.visible    -anchor w -cspan 4 \
     1720        1,0 $inner.labels     -anchor w -cspan 4 \
     1721        2,0 $inner.minorticks -anchor w -cspan 4 \
     1722        4,0 $inner.grid_l     -anchor w \
     1723        4,1 $inner.xgrid      -anchor w \
     1724        4,2 $inner.ygrid      -anchor w \
     1725        4,3 $inner.zgrid      -anchor w \
     1726        5,0 $inner.mode_l     -anchor w -padx { 2 0 } \
     1727        5,1 $inner.mode       -fill x   -cspan 3
    17131728
    17141729    blt::table configure $inner r* c* -resize none
    1715     blt::table configure $inner r7 c1 -resize expand
    1716 }
    1717 
     1730    blt::table configure $inner r7 c6 -resize expand
     1731    blt::table configure $inner r3 -height 0.125i
     1732}
    17181733
    17191734itcl::body Rappture::VtkGlyphViewer::BuildCameraTab {} {
     
    17771792    checkbutton $inner.visible \
    17781793        -text "Cutplanes" \
    1779         -variable [itcl::scope _settings(cutplaneVisible)] \
    1780         -command [itcl::code $this AdjustSetting cutplaneVisible] \
     1794        -variable [itcl::scope _settings(-cutplanevisible)] \
     1795        -command [itcl::code $this AdjustSetting -cutplanevisible] \
    17811796        -font "Arial 9"
    17821797
    17831798    checkbutton $inner.wireframe \
    17841799        -text "Wireframe" \
    1785         -variable [itcl::scope _settings(cutplaneWireframe)] \
    1786         -command [itcl::code $this AdjustSetting cutplaneWireframe] \
     1800        -variable [itcl::scope _settings(-cutplanewireframe)] \
     1801        -command [itcl::code $this AdjustSetting -cutplanewireframe] \
    17871802        -font "Arial 9"
    17881803
    17891804    checkbutton $inner.lighting \
    17901805        -text "Enable Lighting" \
    1791         -variable [itcl::scope _settings(cutplaneLighting)] \
    1792         -command [itcl::code $this AdjustSetting cutplaneLighting] \
     1806        -variable [itcl::scope _settings(-cutplanelighting)] \
     1807        -command [itcl::code $this AdjustSetting -cutplanelighting] \
    17931808        -font "Arial 9"
    17941809
    17951810    checkbutton $inner.edges \
    17961811        -text "Edges" \
    1797         -variable [itcl::scope _settings(cutplaneEdges)] \
    1798         -command [itcl::code $this AdjustSetting cutplaneEdges] \
     1812        -variable [itcl::scope _settings(-cutplaneedges)] \
     1813        -command [itcl::code $this AdjustSetting -cutplaneedges] \
    17991814        -font "Arial 9"
    18001815
    18011816    checkbutton $inner.preinterp \
    18021817        -text "Interpolate Scalars" \
    1803         -variable [itcl::scope _settings(cutplanePreinterp)] \
    1804         -command [itcl::code $this AdjustSetting cutplanePreinterp] \
     1818        -variable [itcl::scope _settings(-cutplanepreinterp)] \
     1819        -command [itcl::code $this AdjustSetting -cutplanepreinterp] \
    18051820        -font "Arial 9"
    18061821
    18071822    label $inner.opacity_l -text "Opacity" -font "Arial 9"
    18081823    ::scale $inner.opacity -from 0 -to 100 -orient horizontal \
    1809         -variable [itcl::scope _settings(cutplaneOpacity)] \
     1824        -variable [itcl::scope _settings(-cutplaneopacity)] \
    18101825        -width 10 \
    18111826        -showvalue off \
    1812         -command [itcl::code $this AdjustSetting cutplaneOpacity]
    1813     $inner.opacity set $_settings(cutplaneOpacity)
     1827        -command [itcl::code $this AdjustSetting -cutplaneopacity]
     1828    $inner.opacity set $_settings(-cutplaneopacity)
    18141829
    18151830    # X-value slicer...
     
    18181833            -onimage [Rappture::icon x-cutplane-red] \
    18191834            -offimage [Rappture::icon x-cutplane-red] \
    1820             -command [itcl::code $this AdjustSetting cutplaneXVisible] \
    1821             -variable [itcl::scope _settings(cutplaneXVisible)] \
     1835            -command [itcl::code $this AdjustSetting -cutplanexvisible] \
     1836            -variable [itcl::scope _settings(-cutplanexvisible)] \
    18221837    }
    18231838    Rappture::Tooltip::for $itk_component(xbutton) \
     
    18291844            -borderwidth 1 -highlightthickness 0 \
    18301845            -command [itcl::code $this EventuallySetCutplane x] \
    1831             -variable [itcl::scope _settings(cutplaneXPosition)] \
    1832             -foreground red2 -font "Arial 9 bold"
     1846            -variable [itcl::scope _settings(-cutplanexposition)] \
     1847            -foreground red2 -font "Arial 9 bold"
    18331848    } {
    18341849        usual
     
    18461861            -onimage [Rappture::icon y-cutplane-green] \
    18471862            -offimage [Rappture::icon y-cutplane-green] \
    1848             -command [itcl::code $this AdjustSetting cutplaneYVisible] \
    1849             -variable [itcl::scope _settings(cutplaneYVisible)] \
     1863            -command [itcl::code $this AdjustSetting -cutplaneyvisible] \
     1864            -variable [itcl::scope _settings(-cutplaneyvisible)] \
    18501865    }
    18511866    Rappture::Tooltip::for $itk_component(ybutton) \
     
    18581873            -borderwidth 1 -highlightthickness 0 \
    18591874            -command [itcl::code $this EventuallySetCutplane y] \
    1860             -variable [itcl::scope _settings(cutplaneYPosition)] \
    1861             -foreground green3 -font "Arial 9 bold"
     1875            -variable [itcl::scope _settings(-cutplaneyposition)] \
     1876            -foreground green3 -font "Arial 9 bold"
    18621877    } {
    18631878        usual
     
    18751890            -onimage [Rappture::icon z-cutplane-blue] \
    18761891            -offimage [Rappture::icon z-cutplane-blue] \
    1877             -command [itcl::code $this AdjustSetting cutplaneZVisible] \
    1878             -variable [itcl::scope _settings(cutplaneZVisible)] \
     1892            -command [itcl::code $this AdjustSetting -cutplanezvisible] \
     1893            -variable [itcl::scope _settings(-cutplanezvisible)] \
    18791894    } {
    1880         usual
    1881         ignore -foreground
     1895        usual
     1896        ignore -foreground
    18821897    }
    18831898    Rappture::Tooltip::for $itk_component(zbutton) \
     
    18901905            -borderwidth 1 -highlightthickness 0 \
    18911906            -command [itcl::code $this EventuallySetCutplane z] \
    1892             -variable [itcl::scope _settings(cutplaneZPosition)] \
    1893             -foreground blue3 -font "Arial 9 bold"
     1907            -variable [itcl::scope _settings(-cutplanezposition)] \
     1908            -foreground blue3 -font "Arial 9 bold"
    18941909    } {
    18951910        usual
     
    19021917
    19031918    blt::table $inner \
    1904         0,0 $inner.visible              -anchor w -pady 2 -cspan 3 \
    1905         1,0 $inner.lighting             -anchor w -pady 2 -cspan 3 \
    1906         2,0 $inner.wireframe            -anchor w -pady 2 -cspan 3 \
    1907         3,0 $inner.edges                -anchor w -pady 2 -cspan 3 \
    1908         4,0 $inner.preinterp            -anchor w -pady 2 -cspan 3 \
    1909         5,0 $inner.opacity_l            -anchor w -pady 2 -cspan 1 \
    1910         5,1 $inner.opacity              -fill x   -pady 2 -cspan 3 \
    1911         6,0 $inner.xbutton              -anchor w -padx 2 -pady 2 \
    1912         7,0 $inner.ybutton              -anchor w -padx 2 -pady 2 \
    1913         8,0 $inner.zbutton              -anchor w -padx 2 -pady 2 \
    1914         6,1 $inner.xval                 -fill y -rspan 4 \
    1915         6,2 $inner.yval                 -fill y -rspan 4 \
    1916         6,3 $inner.zval                 -fill y -rspan 4 \
    1917 
     1919        0,0 $inner.visible   -anchor w -pady 2 -cspan 3 \
     1920        1,0 $inner.lighting  -anchor w -pady 2 -cspan 3 \
     1921        2,0 $inner.wireframe -anchor w -pady 2 -cspan 3 \
     1922        3,0 $inner.edges     -anchor w -pady 2 -cspan 3 \
     1923        4,0 $inner.preinterp -anchor w -pady 2 -cspan 3 \
     1924        5,0 $inner.opacity_l -anchor w -pady 2 -cspan 1 \
     1925        5,1 $inner.opacity   -fill x   -pady 2 -cspan 3 \
     1926        6,0 $inner.xbutton   -anchor w -padx 2 -pady 2 \
     1927        7,0 $inner.ybutton   -anchor w -padx 2 -pady 2 \
     1928        8,0 $inner.zbutton   -anchor w -padx 2 -pady 2 \
     1929        6,1 $inner.xval      -fill y -rspan 4 \
     1930        6,2 $inner.yval      -fill y -rspan 4 \
     1931        6,3 $inner.zval      -fill y -rspan 4 \
    19181932
    19191933    blt::table configure $inner r* c* -resize none
    19201934    blt::table configure $inner r9 c4 -resize expand
    19211935}
    1922 
    1923 
    19241936
    19251937#
     
    20732085    # the code to handle aberrant cases.
    20742086
    2075     if { $_changed(glyphOpacity) } {
    2076         set style(-opacity) [expr $_settings(glyphOpacity) * 0.01]
    2077     }
    2078     if { $_changed(colormap) } {
    2079         set style(-color) $_settings(colormap)
     2087    if { $_changed(-glyphopacity) } {
     2088        set style(-opacity) [expr $_settings(-glyphopacity) * 0.01]
     2089    }
     2090    if { $_changed(-colormap) } {
     2091        set style(-color) $_settings(-colormap)
    20802092    }
    20812093    if { $_currentColormap == "" } {
    20822094        $itk_component(colormap) value $style(-color)
    20832095    }
     2096
     2097    SendCmd "outline add $tag"
     2098    SendCmd "outline color [Color2RGB $itk_option(-plotforeground)] $tag"
     2099    SendCmd "outline visible $style(-outline) $tag"
     2100    set _settings(-glyphoutline) $style(-outline)
     2101
    20842102    SendCmd "glyphs add $style(-shape) $tag"
    20852103    SendCmd "glyphs edges $style(-edges) $tag"
     2104    set _settings(-glyphedges) $style(-edges)
     2105
    20862106    # normscale=1 and gscale=1 are defaults
    20872107    if {$style(-normscale) != 1} {
     
    20912111        SendCmd "glyphs gscale $style(-gscale) $tag"
    20922112    }
    2093     SendCmd "outline add $tag"
    2094     SendCmd "outline color [Color2RGB $itk_option(-plotforeground)] $tag"
    2095     SendCmd "outline visible $style(-outline) $tag"
    2096     set _settings(glyphOutline) $style(-outline)
    2097     set _settings(glyphEdges) $style(-edges)
     2113
    20982114    # constant color only used if colormode set to constant
    20992115    SendCmd "glyphs color [Color2RGB $itk_option(-plotforeground)] $tag"
     
    21042120    SendCmd "glyphs quality $style(-quality) $tag"
    21052121    SendCmd "glyphs lighting $style(-lighting) $tag"
    2106     set _settings(glyphLighting) $style(-lighting)
     2122    set _settings(-glyphlighting) $style(-lighting)
    21072123    SendCmd "glyphs linecolor [Color2RGB $style(-edgecolor)] $tag"
    21082124    SendCmd "glyphs linewidth $style(-linewidth) $tag"
    21092125    SendCmd "glyphs ptsize $style(-ptsize) $tag"
    21102126    SendCmd "glyphs opacity $style(-opacity) $tag"
    2111     set _settings(glyphOpacity) [expr $style(-opacity) * 100.0]
     2127    set _settings(-glyphopacity) [expr $style(-opacity) * 100.0]
    21122128    SetCurrentColormap $style(-color)
    21132129    SendCmd "glyphs wireframe $style(-wireframe) $tag"
    2114     set _settings(glyphWireframe) $style(-wireframe)
     2130    set _settings(-glyphwireframe) $style(-wireframe)
    21152131}
    21162132
     
    21662182
    21672183    if { [string match "component*" $fname] } {
    2168         set title ""
     2184        set title ""
    21692185    } else {
    2170         if { [info exists _fields($fname)] } {
    2171             foreach { title units } $_fields($fname) break
    2172             if { $units != "" } {
    2173                 set title [format "%s (%s)" $title $units]
    2174             }
    2175         } else {
    2176             set title $fname
    2177         }
     2186        if { [info exists _fields($fname)] } {
     2187            foreach { title units } $_fields($fname) break
     2188            if { $units != "" } {
     2189                set title [format "%s (%s)" $title $units]
     2190            }
     2191        } else {
     2192            set title $fname
     2193        }
    21782194    }
    21792195    # If there's a legend title, increase the offset by the line height.
     
    22072223}
    22082224
    2209 
    22102225# ----------------------------------------------------------------------
    22112226# USAGE: Slice move x|y|z <newval>
     
    22412256# ReceiveLegend --
    22422257#
    2243 #       Invoked automatically whenever the "legend" command comes in from
    2244 #       the rendering server.  Indicates that binary image data with the
    2245 #       specified <size> will follow.
     2258#    Invoked automatically whenever the "legend" command comes in from
     2259#    the rendering server.  Indicates that binary image data with the
     2260#    specified <size> will follow.
    22462261#
    22472262itcl::body Rappture::VtkGlyphViewer::ReceiveLegend { colormap title min max size } {
     
    22572272        #puts stderr "read $size bytes for [image width $_image(legend)]x[image height $_image(legend)] legend>"
    22582273        if { [catch {DrawLegend} errs] != 0 } {
    2259             global errorInfo
    2260             puts stderr "errs=$errs errorInfo=$errorInfo"
     2274            global errorInfo
     2275            puts stderr "errs=$errs errorInfo=$errorInfo"
    22612276        }
    22622277    }
     
    22662281# DrawLegend --
    22672282#
    2268 #       Draws the legend in the own canvas on the right side of the plot area.
     2283#    Draws the legend in the own canvas on the right side of the plot area.
    22692284#
    22702285itcl::body Rappture::VtkGlyphViewer::DrawLegend {} {
     
    22772292   
    22782293    if { [string match "component*" $fname] } {
    2279         set title ""
     2294        set title ""
    22802295    } else {
    2281         if { [info exists _fields($fname)] } {
    2282             foreach { title units } $_fields($fname) break
    2283             if { $units != "" } {
    2284                 set title [format "%s (%s)" $title $units]
    2285             }
    2286         } else {
    2287             set title $fname
    2288         }
     2296        if { [info exists _fields($fname)] } {
     2297            foreach { title units } $_fields($fname) break
     2298            if { $units != "" } {
     2299                set title [format "%s (%s)" $title $units]
     2300            }
     2301        } else {
     2302            set title $fname
     2303        }
    22892304    }
    22902305    set x [expr $w - 2]
    2291     if { !$_settings(legendVisible) } {
    2292         $c delete legend
    2293         return
     2306    if { !$_settings(-legendvisible) } {
     2307        $c delete legend
     2308        return
    22942309    }
    22952310    if { [$c find withtag "legend"] == "" } {
    2296         set y 2
    2297         # If there's a legend title, create a text item for the title.
     2311        set y 2
     2312        # If there's a legend title, create a text item for the title.
    22982313        $c create text $x $y \
    2299             -anchor ne \
    2300             -fill $itk_option(-plotforeground) -tags "title legend" \
    2301             -font $font
     2314            -anchor ne \
     2315            -fill $itk_option(-plotforeground) -tags "title legend" \
     2316            -font $font
    23022317        if { $title != "" } {
    23032318            incr y $lineht
    23042319        }
    2305         $c create text $x $y \
     2320        $c create text $x $y \
    23062321            -anchor ne \
    23072322            -fill $itk_option(-plotforeground) -tags "vmax legend" \
    23082323            -font $font
    2309         incr y $lineht
    2310         $c create image $x $y \
     2324        incr y $lineht
     2325        $c create image $x $y \
    23112326            -anchor ne \
    23122327            -image $_image(legend) -tags "colormap legend"
    2313         $c create rectangle $x $y 1 1 \
     2328        $c create rectangle $x $y 1 1 \
    23142329            -fill "" -outline "" -tags "sensor legend"
    2315         $c create text $x [expr {$h-2}] \
     2330        $c create text $x [expr {$h-2}] \
    23162331            -anchor se \
    23172332            -fill $itk_option(-plotforeground) -tags "vmin legend" \
    23182333            -font $font
    2319         $c bind sensor <Enter> [itcl::code $this EnterLegend %x %y]
    2320         $c bind sensor <Leave> [itcl::code $this LeaveLegend]
    2321         $c bind sensor <Motion> [itcl::code $this MotionLegend %x %y]
     2334        $c bind sensor <Enter> [itcl::code $this EnterLegend %x %y]
     2335        $c bind sensor <Leave> [itcl::code $this LeaveLegend]
     2336        $c bind sensor <Motion> [itcl::code $this MotionLegend %x %y]
    23222337    }
    23232338    set x2 $x
     
    23332348    if { [info exists _limits($_curFldName)] } {
    23342349        foreach { vmin vmax } $_limits($_curFldName) break
    2335         $c itemconfigure vmin -text [format %g $vmin]
    2336         $c itemconfigure vmax -text [format %g $vmax]
     2350        $c itemconfigure vmin -text [format %g $vmin]
     2351        $c itemconfigure vmax -text [format %g $vmax]
    23372352    }
    23382353    set y 2
     
    23402355    if { $title != "" } {
    23412356        $c itemconfigure title -text $title
    2342         $c coords title $x $y
    2343         incr y $lineht
     2357        $c coords title $x $y
     2358        incr y $lineht
    23442359        $c raise title
    23452360    }
     
    23832398        invoke {
    23842399            $itk_component(field) value $_curFldLabel
    2385             AdjustSetting field
     2400            AdjustSetting -field
    23862401        }
    23872402        default {
     
    24072422# BuildColormap --
    24082423#
    2409 #       Build the designated colormap on the server.
     2424#    Build the designated colormap on the server.
    24102425#
    24112426itcl::body Rappture::VtkGlyphViewer::BuildColormap { name } {
     
    24382453    set _view(zoom) 1.0
    24392454}
    2440 
  • branches/uq/gui/scripts/vtkheightmapviewer.tcl

    r4533 r4797  
    5858    public method get {args}
    5959    public method isconnected {}
    60     public method limits3 { dataobj }
    6160    public method parameters {title args} {
    6261        # do nothing
     
    767766                set session $env(SESSION)
    768767            }
     768            lappend info "version" "$Rappture::version"
     769            lappend info "build" "$Rappture::build"
     770            lappend info "svnurl" "$Rappture::svnurl"
     771            lappend info "installdir" "$Rappture::installdir"
    769772            lappend info "hub" [exec hostname]
    770773            lappend info "client" "vtkheightmapviewer"
     
    934937        InitSettings -isheightmap -background
    935938
    936         # Let's see how this goes.  I think it's preferable to overloading the
    937         # axis title with the exponent.
    938         SendCmd "axis exp 0 0 0 1"
     939        # Setting a custom exponent and label format for axes is causing
     940        # a problem with rounding.  Near zero ticks aren't rounded by
     941        # the %g format.  The VTK CubeAxes seem to currently work best
     942        # when allowed to automatically set the exponent and precision
     943        # based on the axis ranges.  This does tend to result in less
     944        # visual clutter, so I think it is best to use the automatic
     945        # settings by default.  We can test more fine-grained
     946        # controls on the axis settings tab if necessary.
     947        # -Leif
     948        #SendCmd "axis exp 0 0 0 1"
    939949
    940950        SendCmd "axis lrot z 90"
     
    10371047    if { $_reset } {
    10381048        SendCmd "axis tickpos outside"
    1039         foreach axis { x y z } {
    1040             SendCmd "axis lformat $axis %g"
    1041         }
     1049        #SendCmd "axis lformat all %g"
    10421050       
    10431051        foreach axis { x y z } {
     
    10911099            -numisolines
    10921100        if { [array size _fields] < 2 } {
    1093             blt::table forget $itk_component(field) $itk_component(field_l)
     1101            catch {blt::table forget $itk_component(field) $itk_component(field_l)}
    10941102        }
    10951103        RequestLegend
     
    13621370        "-axisminorticks" {
    13631371            set bool $_settings($what)
    1364             foreach axis { x y z } {
    1365                 SendCmd "axis minticks ${axis} $bool"
    1366             }
     1372            SendCmd "axis minticks all $bool"
    13671373        }
    13681374        "-axisvisible" {
     
    18281834        }
    18291835    }
    1830 }
    1831 
    1832 itcl::body Rappture::VtkHeightmapViewer::limits3 { dataobj } {
    1833     lappend limits x [$dataobj limits x]
    1834     lappend limits y [$dataobj limits y]
    1835     if { [catch { $dataobj limits $_curFldName } vlim] != 0 } {
    1836         set vlim [$dataobj limits v]
    1837     }
    1838     lappend limits v $vlim
    1839     return $limits
    18401836}
    18411837
     
    20632059        -font "Arial 9"
    20642060
    2065 
    20662061    label $inner.mode_l -text "Mode" -font "Arial 9"
    20672062
  • branches/uq/gui/scripts/vtkimageviewer.tcl

    r4512 r4797  
    5858    public method get {args}
    5959    public method isconnected {}
    60     public method limits3 { dataobj }
    6160    public method parameters {title args} {
    6261        # do nothing
     
    755754                set session $env(SESSION)
    756755            }
     756            lappend info "version" "$Rappture::version"
     757            lappend info "build" "$Rappture::build"
     758            lappend info "svnurl" "$Rappture::svnurl"
     759            lappend info "installdir" "$Rappture::installdir"
    757760            lappend info "hub" [exec hostname]
    758761            lappend info "client" "vtkimageviewer"
     
    921924        #
    922925        InitSettings view3D background
    923 
    924         # Let's see how this goes.  I think it's preferable to overloading the
    925         # axis title with the exponent.
    926         SendCmd "axis exp 0 0 0 1"
    927926
    928927        SendCmd "axis lrot z 90"
     
    10191018    if { $_reset } {
    10201019        SendCmd "axis tickpos outside"
    1021         foreach axis { x y z } {
    1022             SendCmd "axis lformat $axis %g"
    1023         }
     1020        #SendCmd "axis lformat all %g"
    10241021       
    10251022        foreach axis { x y z } {
     
    10591056            axisVisible axisLabels field view3D
    10601057        if { [array size _fields] < 2 } {
    1061             blt::table forget $itk_component(field) $itk_component(field_l)
     1058            catch {blt::table forget $itk_component(field) $itk_component(field_l)}
    10621059        }
    10631060        RequestLegend
     
    13211318        "axisMinorTicks" {
    13221319            set bool $_settings($what)
    1323             foreach axis { x y z } {
    1324                 SendCmd "axis minticks ${axis} $bool"
    1325             }
     1320            SendCmd "axis minticks all $bool"
    13261321        }
    13271322        "axisVisible" {
     
    16321627        }
    16331628    }
    1634 }
    1635 
    1636 itcl::body Rappture::VtkImageViewer::limits3 { dataobj } {
    1637     lappend limits x [$dataobj limits x]
    1638     lappend limits y [$dataobj limits y]
    1639     if { [catch { $dataobj limits $_curFldName } vlim] != 0 } {
    1640         set vlim [$dataobj limits v]
    1641     }
    1642     lappend limits v $vlim
    1643     return $limits
    16441629}
    16451630
     
    18441829        -font "Arial 9"
    18451830
    1846 
    18471831    label $inner.mode_l -text "Mode" -font "Arial 9"
    18481832
  • branches/uq/gui/scripts/vtkisosurfaceviewer.tcl

    r4533 r4797  
    5757    public method get {args}
    5858    public method isconnected {}
    59     public method limits { colormap }
    6059    public method parameters {title args} {
    6160        # do nothing
     
    103102    private method Rotate {option x y}
    104103    private method SetCurrentColormap { color }
     104    private method SetCurrentFieldName { dataobj }
    105105    private method SetLegendTip { x y }
    106     private method SetObjectStyle { dataobj comp } 
     106    private method SetObjectStyle { dataobj comp }
    107107    private method SetOrientation { side }
    108     private method Slice {option args} 
     108    private method Slice {option args}
    109109    private method Zoom {option}
    110110    private method ViewToQuaternion {} {
     
    239239    array set _settings {
    240240        -axesvisible                    1
    241         -axislabelsvisible              1
     241        -axislabels                     1
     242        -axisminorticks                 1
    242243        -axismode                       "static"
    243244        -background                     black
     
    822823                set session $env(SESSION)
    823824            }
     825            lappend info "version" "$Rappture::version"
     826            lappend info "build" "$Rappture::build"
     827            lappend info "svnurl" "$Rappture::svnurl"
     828            lappend info "installdir" "$Rappture::installdir"
    824829            lappend info "hub" [exec hostname]
    825830            lappend info "client" "vtkisosurfaceviewer"
     
    871876    # disconnected -- no more data sitting on server
    872877    set _outbuf ""
    873     array unset _datasets
    874     array unset _data
    875     array unset _colormaps
    876     array unset _seeds
    877     array unset _dataset2style
    878     array unset _obj2datasets
     878    array unset _datasets
     879    array unset _data
     880    array unset _colormaps
     881    array unset _dataset2style
     882    array unset _obj2datasets
    879883}
    880884
     
    990994        set _first ""
    991995        InitSettings -xgrid -ygrid -zgrid -axismode \
    992             -axesvisible -axislabelsvisible -ortho
    993         SendCmd "axis lformat all %g"
    994         # Too many major ticks, so turn off minor ticks
    995         SendCmd "axis minticks all 0"
     996            -axesvisible -axislabels -axisminorticks -ortho
     997        #SendCmd "axis lformat all %g"
    996998        StopBufferingCommands
    997999        SendCmd "imgflush"
     
    10001002    set _first ""
    10011003    SendCmd "dataset visible 0"
     1004    eval scale $_dlist
    10021005    foreach dataobj [get -objects] {
    10031006        if { [info exists _obj2ovride($dataobj-raise)] &&  $_first == "" } {
    10041007            set _first $dataobj
     1008            SetCurrentFieldName $dataobj
    10051009        }
    10061010        set _obj2datasets($dataobj) ""
     
    10261030                    SendCmd "clientinfo [list $info]"
    10271031                }
    1028                 append _outbuf "dataset add $tag data follows $length\n"
     1032                SendCmd "dataset add $tag data follows $length"
    10291033                append _outbuf $bytes
    10301034                set _datasets($tag) 1
     
    10381042    }
    10391043
    1040     if { $_first != "" } {
    1041         $itk_component(field) choices delete 0 end
    1042         $itk_component(fieldmenu) delete 0 end
    1043         array unset _fields
    1044         set _curFldName ""
    1045         foreach cname [$_first components] {
    1046             foreach fname [$_first fieldnames $cname] {
    1047                 if { [info exists _fields($fname)] } {
    1048                     continue
    1049                 }
    1050                 foreach { label units components } \
    1051                     [$_first fieldinfo $fname] break
    1052                 $itk_component(field) choices insert end "$fname" "$label"
    1053                 $itk_component(fieldmenu) add radiobutton -label "$label" \
    1054                     -value $label -variable [itcl::scope _curFldLabel] \
    1055                     -selectcolor red \
    1056                     -activebackground $itk_option(-plotbackground) \
    1057                     -activeforeground $itk_option(-plotforeground) \
    1058                     -font "Arial 8" \
    1059                     -command [itcl::code $this Combo invoke]
    1060                 set _fields($fname) [list $label $units $components]
    1061                 if { $_curFldName == "" } {
    1062                     set _curFldName $fname
    1063                     set _curFldLabel $label
    1064                 }
    1065             }
    1066         }
    1067         $itk_component(field) value $_curFldLabel
    1068 
    1069         if { ![info exists _limits($_curFldName)] } {
    1070             SendCmd "dataset maprange all"
    1071         } else {
    1072             set limits $_limits($_curFldName)
    1073             SendCmd "dataset maprange explicit $limits $_curFldName"
    1074             if { $limits != $_currentLimits } {
    1075                 set _currentLimits $limits
    1076                 EventuallyChangeContourLevels
    1077             }
    1078         }
    1079     }
    10801044    InitSettings -cutplanesvisible -isosurfacevisible -outline
    10811045    if { $_reset } {
     
    11041068        }
    11051069        if { [array size _fields] < 2 } {
    1106             blt::table forget $itk_component(field) $itk_component(field_l)
     1070            catch {blt::table forget $itk_component(field) $itk_component(field_l)}
    11071071        }
    11081072        set _reset 0
     
    13551319            SendCmd "axis visible all $bool"
    13561320        }
    1357         "-axislabelsvisible" {
     1321        "-axislabels" {
    13581322            set bool $_settings($what)
    13591323            SendCmd "axis labels all $bool"
     1324        }
     1325        "-axisminorticks" {
     1326            set bool $_settings($what)
     1327            SendCmd "axis minticks all $bool"
    13601328        }
    13611329        "-axismode" {
     
    14641432        "-isolinecolor" {
    14651433            set color [$itk_component(isolineColor) value]
    1466             set _settings(-isolinecolor) $color
    14671434            set _settings($what) $color
    14681435            DrawLegend
     
    16311598}
    16321599
    1633 itcl::body Rappture::VtkIsosurfaceViewer::limits { dataobj } {
    1634     foreach { limits(xmin) limits(xmax) } [$dataobj limits x] break
    1635     foreach { limits(ymin) limits(ymax) } [$dataobj limits y] break
    1636     foreach { limits(zmin) limits(zmax) } [$dataobj limits z] break
    1637     foreach { limits(vmin) limits(vmax) } [$dataobj limits v] break
    1638     return [array get limits]
    1639 }
    1640 
    16411600itcl::body Rappture::VtkIsosurfaceViewer::BuildIsosurfaceTab {} {
    16421601
     
    17241683        -showvalue off \
    17251684        -command [itcl::code $this AdjustSetting -isosurfaceopacity]
    1726     set _widget(-isosurfaceopacity) \
    1727         [expr $_settings(-isosurfaceopacity) * 100.0]
     1685    $inner.opacity set [expr $_settings(-isosurfaceopacity) * 100.0]
    17281686
    17291687    itk_component add field_l {
     
    17911749
    17921750    checkbutton $inner.visible \
    1793         -text "Show Axes" \
     1751        -text "Axes" \
    17941752        -variable [itcl::scope _settings(-axesvisible)] \
    17951753        -command [itcl::code $this AdjustSetting -axesvisible] \
     
    17971755
    17981756    checkbutton $inner.labels \
    1799         -text "Show Axis Labels" \
    1800         -variable [itcl::scope _settings(-axislabelsvisible)] \
    1801         -command [itcl::code $this AdjustSetting -axislabelsvisible] \
     1757        -text "Axis Labels" \
     1758        -variable [itcl::scope _settings(-axislabels)] \
     1759        -command [itcl::code $this AdjustSetting -axislabels] \
    18021760        -font "Arial 9"
    1803 
    1804     checkbutton $inner.gridx \
    1805         -text "Show X Grid" \
     1761    label $inner.grid_l -text "Grid" -font "Arial 9"
     1762    checkbutton $inner.xgrid \
     1763        -text "X" \
    18061764        -variable [itcl::scope _settings(-xgrid)] \
    18071765        -command [itcl::code $this AdjustSetting -xgrid] \
    18081766        -font "Arial 9"
    1809     checkbutton $inner.gridy \
    1810         -text "Show Y Grid" \
     1767    checkbutton $inner.ygrid \
     1768        -text "Y" \
    18111769        -variable [itcl::scope _settings(-ygrid)] \
    18121770        -command [itcl::code $this AdjustSetting -ygrid] \
    18131771        -font "Arial 9"
    1814     checkbutton $inner.gridz \
    1815         -text "Show Z Grid" \
     1772    checkbutton $inner.zgrid \
     1773        -text "Z" \
    18161774        -variable [itcl::scope _settings(-zgrid)] \
    18171775        -command [itcl::code $this AdjustSetting -zgrid] \
     1776        -font "Arial 9"
     1777    checkbutton $inner.minorticks \
     1778        -text "Minor Ticks" \
     1779        -variable [itcl::scope _settings(-axisminorticks)] \
     1780        -command [itcl::code $this AdjustSetting -axisminorticks] \
    18181781        -font "Arial 9"
    18191782
     
    18321795
    18331796    blt::table $inner \
    1834         0,0 $inner.visible -anchor w -cspan 2 \
    1835         1,0 $inner.labels  -anchor w -cspan 2 \
    1836         2,0 $inner.gridx   -anchor w -cspan 2 \
    1837         3,0 $inner.gridy   -anchor w -cspan 2 \
    1838         4,0 $inner.gridz   -anchor w -cspan 2 \
    1839         5,0 $inner.mode_l  -anchor w -cspan 2 -padx { 2 0 } \
    1840         6,0 $inner.mode    -fill x   -cspan 2
     1797        0,0 $inner.visible -anchor w -cspan 4 \
     1798        1,0 $inner.labels  -anchor w -cspan 4 \
     1799        2,0 $inner.minorticks  -anchor w -cspan 4 \
     1800        4,0 $inner.grid_l  -anchor w \
     1801        4,1 $inner.xgrid   -anchor w \
     1802        4,2 $inner.ygrid   -anchor w \
     1803        4,3 $inner.zgrid   -anchor w \
     1804        5,0 $inner.mode_l  -anchor w -padx { 2 0 } \
     1805        5,1 $inner.mode    -fill x   -cspan 3
    18411806
    18421807    blt::table configure $inner r* c* -resize none
    1843     blt::table configure $inner r7 c1 -resize expand
     1808    blt::table configure $inner r7 c6 -resize expand
     1809    blt::table configure $inner r3 -height 0.125i
    18441810}
    18451811
     
    19391905        -showvalue off \
    19401906        -command [itcl::code $this AdjustSetting -cutplaneopacity]
    1941     set _widget(-cutplaneopacity) [expr $_settings(-cutplaneopacity) * 100.0]
     1907    $inner.opacity set [expr $_settings(-cutplaneopacity) * 100.0]
    19421908
    19431909    # X-value slicer...
     
    26092575    }
    26102576    if { $_contourList(numLevels) < 1 } {
    2611         puts stderr "numLevels < 1"
     2577        # There are tools that set 0 levels to get cutplanes only
     2578        #puts stderr "numLevels < 1"
    26122579        return ""
    26132580    }
     
    26242591    set _contourList(values) $values
    26252592}
     2593
     2594itcl::body Rappture::VtkIsosurfaceViewer::SetCurrentFieldName { dataobj } {
     2595    set _first $dataobj
     2596    $itk_component(field) choices delete 0 end
     2597    $itk_component(fieldmenu) delete 0 end
     2598    array unset _fields
     2599    set _curFldName ""
     2600    foreach cname [$_first components] {
     2601        foreach fname [$_first fieldnames $cname] {
     2602            if { [info exists _fields($fname)] } {
     2603                continue
     2604            }
     2605            foreach { label units components } \
     2606                [$_first fieldinfo $fname] break
     2607            $itk_component(field) choices insert end "$fname" "$label"
     2608            $itk_component(fieldmenu) add radiobutton -label "$label" \
     2609                -value $label -variable [itcl::scope _curFldLabel] \
     2610                -selectcolor red \
     2611                -activebackground $itk_option(-plotbackground) \
     2612                -activeforeground $itk_option(-plotforeground) \
     2613                -font "Arial 8" \
     2614                -command [itcl::code $this Combo invoke]
     2615            set _fields($fname) [list $label $units $components]
     2616            if { $_curFldName == "" } {
     2617                set _curFldName $fname
     2618                set _curFldLabel $label
     2619            }
     2620        }
     2621    }
     2622    $itk_component(field) value $_curFldLabel
     2623    if { ![info exists _limits($_curFldName)] } {
     2624        SendCmd "dataset maprange all"
     2625    } else {
     2626        set limits $_limits($_curFldName)
     2627        SendCmd "dataset maprange explicit $limits $_curFldName"
     2628        if { $limits != $_currentLimits } {
     2629            set _currentLimits $limits
     2630            EventuallyChangeContourLevels
     2631        }
     2632    }
     2633}
  • branches/uq/gui/scripts/vtkmeshviewer.tcl

    r4534 r4797  
    5757    public method get {args}
    5858    public method isconnected {}
    59     public method limits { colormap }
     59    public method limits { dataobj }
    6060    public method parameters {title args} {
    6161        # do nothing
     
    8181    private method BuildAxisTab {}
    8282    private method BuildCameraTab {}
    83     private method BuildCutawayTab {}
    8483    private method BuildDownloadPopup { widget command }
    8584    private method BuildPolydataTab {}
     
    9493    private method SetOrientation { side }
    9594    private method SetPolydataOpacity {}
    96     private method Slice {option args}
    9795
    9896    private variable _arcball ""
     
    102100    private variable _datasets;         # contains all the dataobj-component
    103101                                        # datasets in the server
    104     private variable _colormaps;        # contains all the colormaps
    105                                         # in the server.
    106102    private variable _dataset2style;    # maps dataobj-component to transfunc
    107103    private variable _style2datasets;   # maps tf back to list of
     
    187183        -axesvisible            1
    188184        -axislabels             1
     185        -axisminorticks         1
    189186        -outline                0
    190187        -polydataedges          0
     
    193190        -polydatavisible        1
    194191        -polydatawireframe      0
    195         -xcutaway               0
    196         -xdirection             -1
    197192        -xgrid                  0
    198         -xposition              0
    199         -ycutaway               0
    200         -ydirection             -1
    201193        -ygrid                  0
    202         -yposition              0
    203         -zcutaway               0
    204         -zdirection             -1
    205194        -zgrid                  0
    206         -zposition              0
    207195    }
    208196    array set _widget {
     
    285273    BuildPolydataTab
    286274    BuildAxisTab
    287     #BuildCutawayTab
    288275    BuildCameraTab
    289276
     
    678665                set session $env(SESSION)
    679666            }
     667            lappend info "version" "$Rappture::version"
     668            lappend info "build" "$Rappture::build"
     669            lappend info "svnurl" "$Rappture::svnurl"
     670            lappend info "installdir" "$Rappture::installdir"
    680671            lappend info "hub" [exec hostname]
    681672            lappend info "client" "vtkmeshviewer"
     
    719710
    720711    # disconnected -- no more data sitting on server
    721     array unset _datasets
    722     array unset _data
    723     array unset _colormaps
     712    array unset _datasets
     713    array unset _data
    724714    global readyForNextFrame
    725715    set readyForNextFrame 1
     
    831821        $_arcball resize $w $h
    832822        DoResize
    833         InitSettings -xgrid -ygrid -zgrid -axismode -axesvisible -axislabels
     823        InitSettings -xgrid -ygrid -zgrid -axismode \
     824            -axesvisible -axislabels -axisminorticks
    834825        StopBufferingCommands
    835826        SendCmd "imgflush"
     
    899890            -polydatavisible -polydatawireframe
    900891 
    901         SendCmd "axis lformat all %g"
    902         # Too many major ticks, so turn off minor ticks
    903         SendCmd "axis minticks all 0"
     892        #SendCmd "axis lformat all %g"
    904893
    905894        set q [list $_view(qw) $_view(qx) $_view(qy) $_view(qz)]
     
    11621151        }
    11631152        "-polydataopacity" {
     1153            set _settings($what) [expr $_widget($what) * 0.01]
    11641154            EventuallySetPolydataOpacity
    11651155        }
     
    11911181            SendCmd "axis labels all $bool"
    11921182        }
     1183        "-axisminorticks" {
     1184            set bool $_settings($what)
     1185            SendCmd "axis minticks all $bool"
     1186        }
    11931187        "-xgrid" {
    11941188            set bool $_settings($what)
     
    12071201            set mode [$itk_component(axismode) translate $mode]
    12081202            SendCmd "axis flymode $mode"
    1209         }
    1210         "-xcutaway" - "-ycutaway" - "-zcutaway" {
    1211             set axis [string range $what 1 1]
    1212             set bool $_settings($what)
    1213             if { $bool } {
    1214                 set pos [expr $_settings(-${axis}position) * 0.01]
    1215                 set dir $_settings(-${axis}direction)
    1216                 $itk_component(${axis}CutScale) configure -state normal \
    1217                     -troughcolor white
    1218                 SendCmd "renderer clipplane $axis $pos $dir"
    1219             } else {
    1220                 $itk_component(${axis}CutScale) configure -state disabled \
    1221                     -troughcolor grey82
    1222                 SendCmd "renderer clipplane $axis 1 -1"
    1223             }
    1224         }
    1225         "-xposition" - "-yposition" - "-zposition" {
    1226             set axis [string range $what 1 1]
    1227             set pos [expr $_settings($what) * 0.01]
    1228             SendCmd "renderer clipplane ${axis} $pos -1"
    1229         }
    1230         "-xdirection" - "-ydirection" - "-zdirection" {
    1231             set axis [string range $what 1 1]
    1232             puts stderr "direction not implemented"
    12331203        }
    12341204        default {
     
    13821352    set inner [$itk_component(main) insert end \
    13831353        -title "Axis Settings" \
    1384         -icon [Rappture::icon axis1]]
     1354        -icon [Rappture::icon axis2]]
    13851355    $inner configure -borderwidth 4
    13861356
    13871357    checkbutton $inner.visible \
    1388         -text "Show Axes" \
     1358        -text "Axes" \
    13891359        -variable [itcl::scope _settings(-axesvisible)] \
    13901360        -command [itcl::code $this AdjustSetting -axesvisible] \
     
    13921362
    13931363    checkbutton $inner.labels \
    1394         -text "Show Axis Labels" \
     1364        -text "Axis Labels" \
    13951365        -variable [itcl::scope _settings(-axislabels)] \
    13961366        -command [itcl::code $this AdjustSetting -axislabels] \
    13971367        -font "Arial 9"
    1398 
    1399     checkbutton $inner.gridx \
    1400         -text "Show X Grid" \
     1368    label $inner.grid_l -text "Grid" -font "Arial 9"
     1369    checkbutton $inner.xgrid \
     1370        -text "X" \
    14011371        -variable [itcl::scope _settings(-xgrid)] \
    14021372        -command [itcl::code $this AdjustSetting -xgrid] \
    14031373        -font "Arial 9"
    1404     checkbutton $inner.gridy \
    1405         -text "Show Y Grid" \
     1374    checkbutton $inner.ygrid \
     1375        -text "Y" \
    14061376        -variable [itcl::scope _settings(-ygrid)] \
    14071377        -command [itcl::code $this AdjustSetting -ygrid] \
    14081378        -font "Arial 9"
    1409     checkbutton $inner.gridz \
    1410         -text "Show Z Grid" \
     1379    checkbutton $inner.zgrid \
     1380        -text "Z" \
    14111381        -variable [itcl::scope _settings(-zgrid)] \
    14121382        -command [itcl::code $this AdjustSetting -zgrid] \
     1383        -font "Arial 9"
     1384    checkbutton $inner.minorticks \
     1385        -text "Minor Ticks" \
     1386        -variable [itcl::scope _settings(-axisminorticks)] \
     1387        -command [itcl::code $this AdjustSetting -axisminorticks] \
    14131388        -font "Arial 9"
    14141389
     
    14271402
    14281403    blt::table $inner \
    1429         0,0 $inner.visible -anchor w -cspan 2 \
    1430         1,0 $inner.labels  -anchor w -cspan 2 \
    1431         2,0 $inner.gridx   -anchor w -cspan 2 \
    1432         3,0 $inner.gridy   -anchor w -cspan 2 \
    1433         4,0 $inner.gridz   -anchor w -cspan 2 \
    1434         5,0 $inner.mode_l  -anchor w -cspan 2 -padx { 2 0 } \
    1435         6,0 $inner.mode    -fill x   -cspan 2
     1404        0,0 $inner.visible -anchor w -cspan 4 \
     1405        1,0 $inner.labels  -anchor w -cspan 4 \
     1406        2,0 $inner.minorticks  -anchor w -cspan 4 \
     1407        4,0 $inner.grid_l  -anchor w \
     1408        4,1 $inner.xgrid   -anchor w \
     1409        4,2 $inner.ygrid   -anchor w \
     1410        4,3 $inner.zgrid   -anchor w \
     1411        5,0 $inner.mode_l  -anchor w -padx { 2 0 } \
     1412        5,1 $inner.mode    -fill x   -cspan 3
    14361413
    14371414    blt::table configure $inner r* c* -resize none
    1438     blt::table configure $inner r7 c1 -resize expand
     1415    blt::table configure $inner r7 c6 -resize expand
     1416    blt::table configure $inner r3 -height 0.125i
    14391417}
    14401418
     
    14851463    blt::table configure $inner c2 -resize expand
    14861464    blt::table configure $inner r$row -resize expand
    1487 }
    1488 
    1489 itcl::body Rappture::VtkMeshViewer::BuildCutawayTab {} {
    1490 
    1491     set fg [option get $itk_component(hull) font Font]
    1492    
    1493     set inner [$itk_component(main) insert end \
    1494         -title "Cutaway Along Axis" \
    1495         -icon [Rappture::icon cutbutton]]
    1496 
    1497     $inner configure -borderwidth 4
    1498 
    1499     # X-value slicer...
    1500     itk_component add xCutButton {
    1501         Rappture::PushButton $inner.xbutton \
    1502             -onimage [Rappture::icon x-cutplane] \
    1503             -offimage [Rappture::icon x-cutplane] \
    1504             -command [itcl::code $this AdjustSetting -xcutaway] \
    1505             -variable [itcl::scope _settings(-xcutaway)]
    1506     }
    1507     Rappture::Tooltip::for $itk_component(xCutButton) \
    1508         "Toggle the X-axis cutaway on/off"
    1509 
    1510     itk_component add xCutScale {
    1511         ::scale $inner.xval -from 100 -to 0 \
    1512             -width 10 -orient vertical -showvalue yes \
    1513             -borderwidth 1 -highlightthickness 0 \
    1514             -command [itcl::code $this Slice move x] \
    1515             -variable [itcl::scope _settings(-xposition)]
    1516     } {
    1517         usual
    1518         ignore -borderwidth -highlightthickness
    1519     }
    1520     # Set the default cutaway value before disabling the scale.
    1521     $itk_component(xCutScale) set 100
    1522     $itk_component(xCutScale) configure -state disabled
    1523     Rappture::Tooltip::for $itk_component(xCutScale) \
    1524         "@[itcl::code $this Slice tooltip x]"
    1525 
    1526     itk_component add xDirButton {
    1527         Rappture::PushButton $inner.xdir \
    1528             -onimage [Rappture::icon arrow-down] \
    1529             -onvalue -1 \
    1530             -offimage [Rappture::icon arrow-up] \
    1531             -offvalue 1 \
    1532             -command [itcl::code $this AdjustSetting -xdirection] \
    1533             -variable [itcl::scope _settings(-xdirection)]
    1534     }
    1535     set _settings(-xdirection) -1
    1536     Rappture::Tooltip::for $itk_component(xDirButton) \
    1537         "Toggle the direction of the X-axis cutaway"
    1538 
    1539     # Y-value slicer...
    1540     itk_component add yCutButton {
    1541         Rappture::PushButton $inner.ybutton \
    1542             -onimage [Rappture::icon y-cutplane] \
    1543             -offimage [Rappture::icon y-cutplane] \
    1544             -command [itcl::code $this AdjustSetting -ycutaway] \
    1545             -variable [itcl::scope _settings(-ycutaway)]
    1546     }
    1547     Rappture::Tooltip::for $itk_component(yCutButton) \
    1548         "Toggle the Y-axis cutaway on/off"
    1549 
    1550     itk_component add yCutScale {
    1551         ::scale $inner.yval -from 100 -to 0 \
    1552             -width 10 -orient vertical -showvalue yes \
    1553             -borderwidth 1 -highlightthickness 0 \
    1554             -command [itcl::code $this Slice move y] \
    1555             -variable [itcl::scope _settings(-yposition)]
    1556     } {
    1557         usual
    1558         ignore -borderwidth -highlightthickness
    1559     }
    1560     Rappture::Tooltip::for $itk_component(yCutScale) \
    1561         "@[itcl::code $this Slice tooltip y]"
    1562     # Set the default cutaway value before disabling the scale.
    1563     $itk_component(yCutScale) set 100
    1564     $itk_component(yCutScale) configure -state disabled
    1565 
    1566     itk_component add yDirButton {
    1567         Rappture::PushButton $inner.ydir \
    1568             -onimage [Rappture::icon arrow-down] \
    1569             -onvalue -1 \
    1570             -offimage [Rappture::icon arrow-up] \
    1571             -offvalue 1 \
    1572             -command [itcl::code $this AdjustSetting -ydirection] \
    1573             -variable [itcl::scope _settings(-ydirection)]
    1574     }
    1575     Rappture::Tooltip::for $itk_component(yDirButton) \
    1576         "Toggle the direction of the Y-axis cutaway"
    1577     set _settings(-ydirection) -1
    1578 
    1579     # Z-value slicer...
    1580     itk_component add zCutButton {
    1581         Rappture::PushButton $inner.zbutton \
    1582             -onimage [Rappture::icon z-cutplane] \
    1583             -offimage [Rappture::icon z-cutplane] \
    1584             -command [itcl::code $this AdjustSetting -zcutaway] \
    1585             -variable [itcl::scope _settings(-zcutaway)]
    1586     }
    1587     Rappture::Tooltip::for $itk_component(zCutButton) \
    1588         "Toggle the Z-axis cutaway on/off"
    1589 
    1590     itk_component add zCutScale {
    1591         ::scale $inner.zval -from 100 -to 0 \
    1592             -width 10 -orient vertical -showvalue yes \
    1593             -borderwidth 1 -highlightthickness 0 \
    1594             -command [itcl::code $this Slice move z] \
    1595             -variable [itcl::scope _settings(-zposition)]
    1596     } {
    1597         usual
    1598         ignore -borderwidth -highlightthickness
    1599     }
    1600     $itk_component(zCutScale) set 100
    1601     $itk_component(zCutScale) configure -state disabled
    1602     Rappture::Tooltip::for $itk_component(zCutScale) \
    1603         "@[itcl::code $this Slice tooltip z]"
    1604 
    1605     itk_component add zDirButton {
    1606         Rappture::PushButton $inner.zdir \
    1607             -onimage [Rappture::icon arrow-down] \
    1608             -onvalue -1 \
    1609             -offimage [Rappture::icon arrow-up] \
    1610             -offvalue 1 \
    1611             -command [itcl::code $this AdjustSetting -zdirection] \
    1612             -variable [itcl::scope _settings(-zdirection)]
    1613     }
    1614     set _settings(-zdirection) -1
    1615     Rappture::Tooltip::for $itk_component(zDirButton) \
    1616         "Toggle the direction of the Z-axis cutaway"
    1617 
    1618     blt::table $inner \
    1619         0,0 $itk_component(xCutButton)  -anchor e -padx 2 -pady 2 \
    1620         1,0 $itk_component(xCutScale)   -fill y \
    1621         0,1 $itk_component(yCutButton)  -anchor e -padx 2 -pady 2 \
    1622         1,1 $itk_component(yCutScale)   -fill y \
    1623         0,2 $itk_component(zCutButton)  -anchor e -padx 2 -pady 2 \
    1624         1,2 $itk_component(zCutScale)   -fill y \
    1625 
    1626     blt::table configure $inner r* c* -resize none
    1627     blt::table configure $inner r1 c3 -resize expand
    16281465}
    16291466
     
    17881625}
    17891626
    1790 # ----------------------------------------------------------------------
    1791 # USAGE: Slice move x|y|z <newval>
    1792 #
    1793 # Called automatically when the user drags the slider to move the
    1794 # cut plane that slices 3D data.  Gets the current value from the
    1795 # slider and moves the cut plane to the appropriate point in the
    1796 # data set.
    1797 # ----------------------------------------------------------------------
    1798 itcl::body Rappture::VtkMeshViewer::Slice {option args} {
    1799     switch -- $option {
    1800         "move" {
    1801             set axis [lindex $args 0]
    1802             set newval [lindex $args 1]
    1803             if {[llength $args] != 2} {
    1804                 error "wrong # args: should be \"Slice move x|y|z newval\""
    1805             }
    1806             set newpos [expr {0.01*$newval}]
    1807             SendCmd "renderer clipplane $axis $newpos -1"
    1808         }
    1809         "tooltip" {
    1810             set axis [lindex $args 0]
    1811             set val [$itk_component(${axis}CutScale) get]
    1812             return "Move the [string toupper $axis] cut plane.\nCurrently:  $axis = $val%"
    1813         }
    1814         default {
    1815             error "bad option \"$option\": should be axis, move, or tooltip"
    1816         }
    1817     }
    1818 }
    1819 
    18201627itcl::body Rappture::VtkMeshViewer::SetOrientation { side } {
    18211628    array set positions {
     
    18381645    set _view(zoom) 1.0
    18391646}
    1840 
  • branches/uq/gui/scripts/vtkstreamlinesviewer.tcl

    r4460 r4797  
    226226        axesVisible             1
    227227        axisLabelsVisible       1
     228        axisMinorTicks          1
    228229        axisXGrid               0
    229230        axisYGrid               0
     
    799800                set session $env(SESSION)
    800801            }
     802            lappend info "version" "$Rappture::version"
     803            lappend info "build" "$Rappture::build"
     804            lappend info "svnurl" "$Rappture::svnurl"
     805            lappend info "installdir" "$Rappture::installdir"
    801806            lappend info "hub" [exec hostname]
    802807            lappend info "client" "vtkstreamlinesviewer"
     
    966971        DoResize
    967972        InitSettings axisXGrid axisYGrid axisZGrid axis-mode \
    968             axesVisible axisLabelsVisible
     973            axesVisible axisLabelsVisible axisMinorTicks
    969974        # This "imgflush" is to force an image returned before vtkvis starts
    970975        # reading a (big) dataset.  This will display an empty plot with axes
     
    13231328    switch -- $what {
    13241329        "volumeOpacity" {
    1325             set val $_settings(volumeOpacity)
     1330            set val $_settings($what)
    13261331            set sval [expr { 0.01 * double($val) }]
    13271332            SendCmd "polydata opacity $sval"
    13281333        }
    13291334        "volumeWireframe" {
    1330             set bool $_settings(volumeWireframe)
     1335            set bool $_settings($what)
    13311336            SendCmd "polydata wireframe $bool"
    13321337        }
    13331338        "volumeVisible" {
    1334             set bool $_settings(volumeVisible)
     1339            set bool $_settings($what)
    13351340            SendCmd "polydata visible $bool"
    13361341            if { $bool } {
     
    13431348        }
    13441349        "volumeLighting" {
    1345             set bool $_settings(volumeLighting)
     1350            set bool $_settings($what)
    13461351            SendCmd "polydata lighting $bool"
    13471352        }
    13481353        "volumeEdges" {
    1349             set bool $_settings(volumeEdges)
     1354            set bool $_settings($what)
    13501355            SendCmd "polydata edges $bool"
    13511356        }
    13521357        "axesVisible" {
    1353             set bool $_settings(axesVisible)
     1358            set bool $_settings($what)
    13541359            SendCmd "axis visible all $bool"
    13551360        }
    13561361        "axisLabelsVisible" {
    1357             set bool $_settings(axisLabelsVisible)
     1362            set bool $_settings($what)
    13581363            SendCmd "axis labels all $bool"
     1364        }
     1365        "axisMinorTicks" {
     1366            set bool $_settings($what)
     1367            SendCmd "axis minticks all $bool"
    13591368        }
    13601369        "axisXGrid" - "axisYGrid" - "axisZGrid" {
     
    14521461        }
    14531462        "streamlinesOpacity" {
    1454             set val $_settings(streamlinesOpacity)
     1463            set val $_settings($what)
    14551464            set sval [expr { 0.01 * double($val) }]
    14561465            SendCmd "streamlines opacity $sval"
    14571466        }
    14581467        "streamlinesScale" {
    1459             set val $_settings(streamlinesScale)
     1468            set val $_settings($what)
    14601469            set sval [expr { 0.01 * double($val) }]
    14611470            SendCmd "streamlines scale $sval $sval $sval"
    14621471        }
    14631472        "streamlinesLighting" {
    1464             set bool $_settings(streamlinesLighting)
     1473            set bool $_settings($what)
    14651474            SendCmd "streamlines lighting $bool"
    14661475        }
     
    17701779    set inner [$itk_component(main) insert end \
    17711780        -title "Axis Settings" \
    1772         -icon [Rappture::icon axis1]]
     1781        -icon [Rappture::icon axis2]]
    17731782    $inner configure -borderwidth 4
    17741783
    17751784    checkbutton $inner.visible \
    1776         -text "Show Axes" \
     1785        -text "Axes" \
    17771786        -variable [itcl::scope _settings(axesVisible)] \
    17781787        -command [itcl::code $this AdjustSetting axesVisible] \
     
    17801789
    17811790    checkbutton $inner.labels \
    1782         -text "Show Axis Labels" \
     1791        -text "Axis Labels" \
    17831792        -variable [itcl::scope _settings(axisLabelsVisible)] \
    17841793        -command [itcl::code $this AdjustSetting axisLabelsVisible] \
    17851794        -font "Arial 9"
    1786 
     1795    label $inner.grid_l -text "Grid" -font "Arial 9"
    17871796    checkbutton $inner.xgrid \
    1788         -text "Show X Grid" \
     1797        -text "X" \
    17891798        -variable [itcl::scope _settings(axisXGrid)] \
    17901799        -command [itcl::code $this AdjustSetting axisXGrid] \
    17911800        -font "Arial 9"
    17921801    checkbutton $inner.ygrid \
    1793         -text "Show Y Grid" \
     1802        -text "Y" \
    17941803        -variable [itcl::scope _settings(axisYGrid)] \
    17951804        -command [itcl::code $this AdjustSetting axisYGrid] \
    17961805        -font "Arial 9"
    17971806    checkbutton $inner.zgrid \
    1798         -text "Show Z Grid" \
     1807        -text "Z" \
    17991808        -variable [itcl::scope _settings(axisZGrid)] \
    18001809        -command [itcl::code $this AdjustSetting axisZGrid] \
     1810        -font "Arial 9"
     1811    checkbutton $inner.minorticks \
     1812        -text "Minor Ticks" \
     1813        -variable [itcl::scope _settings(axisMinorTicks)] \
     1814        -command [itcl::code $this AdjustSetting axisMinorTicks] \
    18011815        -font "Arial 9"
    18021816
     
    18151829
    18161830    blt::table $inner \
    1817         0,0 $inner.visible -anchor w -cspan 2 \
    1818         1,0 $inner.labels  -anchor w -cspan 2 \
    1819         2,0 $inner.xgrid   -anchor w -cspan 2 \
    1820         3,0 $inner.ygrid   -anchor w -cspan 2 \
    1821         4,0 $inner.zgrid   -anchor w -cspan 2 \
    1822         5,0 $inner.mode_l  -anchor w -cspan 2 -padx { 2 0 } \
    1823         6,0 $inner.mode    -fill x   -cspan 2
     1831        0,0 $inner.visible -anchor w -cspan 4 \
     1832        1,0 $inner.labels  -anchor w -cspan 4 \
     1833        2,0 $inner.minorticks  -anchor w -cspan 4 \
     1834        4,0 $inner.grid_l  -anchor w \
     1835        4,1 $inner.xgrid   -anchor w \
     1836        4,2 $inner.ygrid   -anchor w \
     1837        4,3 $inner.zgrid   -anchor w \
     1838        5,0 $inner.mode_l  -anchor w -padx { 2 0 } \
     1839        5,1 $inner.mode    -fill x   -cspan 3
    18241840
    18251841    blt::table configure $inner r* c* -resize none
    1826     blt::table configure $inner r7 c1 -resize expand
    1827 }
    1828 
     1842    blt::table configure $inner r7 c6 -resize expand
     1843    blt::table configure $inner r3 -height 0.125i
     1844}
    18291845
    18301846itcl::body Rappture::VtkStreamlinesViewer::BuildCameraTab {} {
     
    21432159    }
    21442160    array set settings $style
     2161    StartBufferingCommands
    21452162    SendCmd "streamlines add $tag"
    21462163    SendCmd "streamlines seed visible off $tag"
     
    21492166        set length [string length $seeds]
    21502167        SendCmd "streamlines seed fmesh 200 data follows $length $tag"
    2151         SendCmd "$seeds"
     2168        append _outbuf $seeds
    21522169        set _seeds($dataobj) 1
    21532170    }
     
    21602177    set _settings(volumeWireframe) $settings(-wireframe)
    21612178    set _settings(volumeOpacity) [expr $settings(-opacity) * 100.0]
     2179    StopBufferingCommands
    21622180    SetColormap $dataobj $comp
    21632181}
  • branches/uq/gui/scripts/vtksurfaceviewer.tcl

    r4538 r4797  
    5757    public method get {args}
    5858    public method isconnected {}
    59     public method limits { colormap }
    6059    public method parameters {title args} {
    6160        # do nothing
     
    202201
    203202    array set _settings {
    204         -axesvisible                    1
    205         -axislabelsvisible              1
    206         -background                     black
    207         -colormap                       BCGYR
    208         -colormapvisible                1
    209         -field                          "Default"
    210         -isolinecolor                   white
    211         -isolinesvisible                0
    212         -legendvisible                  1
    213         -numcontours                    10
    214         -surfaceedges                   0
    215         -surfacelighting                1
    216         -surfaceopacity                 100
    217         -outline                        0
    218         -surfacevisible                 1
    219         -surfacewireframe               0
    220         -xaxisgrid                      0
    221         -yaxisgrid                      0
    222         -zaxisgrid                      0
     203        -axesvisible                1
     204        -axislabels                 1
     205        -axisminorticks             1
     206        -background                 black
     207        -colormap                   BCGYR
     208        -colormapvisible            1
     209        -field                      "Default"
     210        -isolinecolor               white
     211        -isolinesvisible            0
     212        -legendvisible              1
     213        -numcontours                10
     214        -surfaceedges               0
     215        -surfacelighting            1
     216        -surfaceopacity             100
     217        -outline                    0
     218        -surfacevisible             1
     219        -surfacewireframe           0
     220        -xgrid                      0
     221        -ygrid                      0
     222        -zgrid                      0
    223223    }
    224224    array set _changed {
     
    732732                set session $env(SESSION)
    733733            }
     734            lappend info "version" "$Rappture::version"
     735            lappend info "build" "$Rappture::build"
     736            lappend info "svnurl" "$Rappture::svnurl"
     737            lappend info "installdir" "$Rappture::installdir"
    734738            lappend info "hub" [exec hostname]
    735739            lappend info "client" "vtksurfaceviewer"
     
    905909        set _first ""
    906910        InitSettings -xaxisgrid -yaxisgrid -zaxisgrid -axismode \
    907             -axesvisible -axislabelsvisible
    908         foreach axis { x y z } {
    909             SendCmd "axis lformat $axis %g"
    910         }
     911            -axesvisible -axislabels -axisminorticks
     912        #SendCmd "axis lformat all %g"
    911913        StopBufferingCommands
    912914        SendCmd "imgflush"
     
    10071009        }
    10081010        if { [array size _fields] < 2 } {
    1009             blt::table forget $itk_component(field) $itk_component(field_l)
     1011            catch {blt::table forget $itk_component(field) $itk_component(field_l)}
    10101012        }
    10111013        set _reset 0
     
    12651267        }
    12661268        "-axesvisible" {
    1267             set bool $_settings(-axesvisible)
     1269            set bool $_settings($what)
    12681270            SendCmd "axis visible all $bool"
    12691271        }
    1270         "-axislabelsvisible" {
    1271             set bool $_settings(-axislabelsvisible)
     1272        "-axislabels" {
     1273            set bool $_settings($what)
    12721274            SendCmd "axis labels all $bool"
     1275        }
     1276        "-axisminorticks" {
     1277            set bool $_settings($what)
     1278            SendCmd "axis minticks all $bool"
    12731279        }
    12741280        "-xaxisgrid" - "-yaxisgrid" - "-zaxisgrid" {
     
    14951501}
    14961502
    1497 itcl::body Rappture::VtkSurfaceViewer::limits { dataobj } {
    1498     foreach { limits(xmin) limits(xmax) } [$dataobj limits x] break
    1499     foreach { limits(ymin) limits(ymax) } [$dataobj limits y] break
    1500     foreach { limits(zmin) limits(zmax) } [$dataobj limits z] break
    1501     foreach { limits(vmin) limits(vmax) } [$dataobj limits v] break
    1502     return [array get limits]
    1503 }
    1504 
    15051503itcl::body Rappture::VtkSurfaceViewer::BuildSurfaceTab {} {
    15061504
     
    16671665
    16681666    checkbutton $inner.visible \
    1669         -text "Show Axes" \
     1667        -text "Axes" \
    16701668        -variable [itcl::scope _settings(-axesvisible)] \
    16711669        -command [itcl::code $this AdjustSetting -axesvisible] \
     
    16731671
    16741672    checkbutton $inner.labels \
    1675         -text "Show Axis Labels" \
    1676         -variable [itcl::scope _settings(-axislabelsvisible)] \
    1677         -command [itcl::code $this AdjustSetting -axislabelsvisible] \
     1673        -text "Axis Labels" \
     1674        -variable [itcl::scope _settings(-axislabels)] \
     1675        -command [itcl::code $this AdjustSetting -axislabels] \
    16781676        -font "Arial 9"
    1679 
    1680     checkbutton $inner.gridx \
    1681         -text "Show X Grid" \
     1677    label $inner.grid_l -text "Grid" -font "Arial 9"
     1678    checkbutton $inner.xgrid \
     1679        -text "X" \
    16821680        -variable [itcl::scope _settings(-xaxisgrid)] \
    16831681        -command [itcl::code $this AdjustSetting -xaxisgrid] \
    16841682        -font "Arial 9"
    1685     checkbutton $inner.gridy \
    1686         -text "Show Y Grid" \
     1683    checkbutton $inner.ygrid \
     1684        -text "Y" \
    16871685        -variable [itcl::scope _settings(-yaxisgrid)] \
    16881686        -command [itcl::code $this AdjustSetting -yaxisgrid] \
    16891687        -font "Arial 9"
    1690     checkbutton $inner.gridz \
    1691         -text "Show Z Grid" \
     1688    checkbutton $inner.zgrid \
     1689        -text "Z" \
    16921690        -variable [itcl::scope _settings(-zaxisgrid)] \
    16931691        -command [itcl::code $this AdjustSetting -zaxisgrid] \
     1692        -font "Arial 9"
     1693    checkbutton $inner.minorticks \
     1694        -text "Minor Ticks" \
     1695        -variable [itcl::scope _settings(-axisminorticks)] \
     1696        -command [itcl::code $this AdjustSetting -axisminorticks] \
    16941697        -font "Arial 9"
    16951698
     
    17081711
    17091712    blt::table $inner \
    1710         0,0 $inner.visible -anchor w -cspan 2 \
    1711         1,0 $inner.labels  -anchor w -cspan 2 \
    1712         2,0 $inner.gridx   -anchor w -cspan 2 \
    1713         3,0 $inner.gridy   -anchor w -cspan 2 \
    1714         4,0 $inner.gridz   -anchor w -cspan 2 \
    1715         5,0 $inner.mode_l  -anchor w -cspan 2 -padx { 2 0 } \
    1716         6,0 $inner.mode    -fill x   -cspan 2
     1713        0,0 $inner.visible -anchor w -cspan 4 \
     1714        1,0 $inner.labels  -anchor w -cspan 4 \
     1715        2,0 $inner.minorticks  -anchor w -cspan 4 \
     1716        4,0 $inner.grid_l  -anchor w \
     1717        4,1 $inner.xgrid   -anchor w \
     1718        4,2 $inner.ygrid   -anchor w \
     1719        4,3 $inner.zgrid   -anchor w \
     1720        5,0 $inner.mode_l  -anchor w -padx { 2 0 } \
     1721        5,1 $inner.mode    -fill x   -cspan 3
    17171722
    17181723    blt::table configure $inner r* c* -resize none
    1719     blt::table configure $inner r7 c1 -resize expand
    1720 }
    1721 
     1724    blt::table configure $inner r7 c6 -resize expand
     1725    blt::table configure $inner r3 -height 0.125i
     1726}
    17221727
    17231728itcl::body Rappture::VtkSurfaceViewer::BuildCameraTab {} {
  • branches/uq/gui/scripts/vtkviewer.tcl

    r4528 r4797  
    5757    public method get {args}
    5858    public method isconnected {}
    59     public method limits { colormap }
     59    public method limits { dataobj }
    6060    public method parameters {title args} {
    6161        # do nothing
     
    257257        visible         1
    258258        labels          1
     259        minorticks      1
    259260    }]
    260261    array set _settings [subst {
     
    874875                set session $env(SESSION)
    875876            }
     877            lappend info "version" "$Rappture::version"
     878            lappend info "build" "$Rappture::build"
     879            lappend info "svnurl" "$Rappture::svnurl"
     880            lappend info "installdir" "$Rappture::installdir"
    876881            lappend info "hub" [exec hostname]
    877882            lappend info "client" "vtkviewer"
     
    10281033        DoResize
    10291034        InitSettings axis-xgrid axis-ygrid axis-zgrid axis-mode \
    1030             axis-visible axis-labels
     1035            axis-visible axis-labels axis-minorticks
    10311036
    10321037        StopBufferingCommands
     
    16621667                set type [$dataobj type $comp]
    16631668                if { $type == "molecule" } {
    1664                     SendCmd [subst {molecule rscale $_settings(molecule-rscale) $dataset
    1665 molecule ascale $_settings(molecule-atomscale) $dataset
    1666 molecule bscale $_settings(molecule-bondscale) $dataset
    1667 molecule bstyle $_settings(molecule-bondstyle) $dataset
    1668 molecule atoms $_settings(molecule-atoms-visible) $dataset
    1669 molecule bonds $_settings(molecule-bonds-visible) $dataset}]
     1669                    StartBufferingCommands
     1670                    SendCmd [subst {molecule rscale $_settings(molecule-rscale) $dataset}]
     1671                    SendCmd [subst {molecule ascale $_settings(molecule-atomscale) $dataset}]
     1672                    SendCmd [subst {molecule bscale $_settings(molecule-bondscale) $dataset}]
     1673                    SendCmd [subst {molecule bstyle $_settings(molecule-bondstyle) $dataset}]
     1674                    SendCmd [subst {molecule atoms $_settings(molecule-atoms-visible) $dataset}]
     1675                    SendCmd [subst {molecule bonds $_settings(molecule-bonds-visible) $dataset}]
     1676                    StopBufferingCommands
    16701677                }
    16711678            }
     
    17001707            set bool $_axis(labels)
    17011708            SendCmd "axis labels all $bool"
     1709        }
     1710        "axis-minorticks" {
     1711            set bool $_axis(minorticks)
     1712            SendCmd "axis minticks all $bool"
    17021713        }
    17031714        "axis-xgrid" {
     
    21222133    set inner [$itk_component(main) insert end \
    21232134        -title "Axis Settings" \
    2124         -icon [Rappture::icon axis1]]
     2135        -icon [Rappture::icon axis2]]
    21252136    $inner configure -borderwidth 4
    21262137
    21272138    checkbutton $inner.visible \
    2128         -text "Show Axes" \
     2139        -text "Axes" \
    21292140        -variable [itcl::scope _axis(visible)] \
    21302141        -command [itcl::code $this AdjustSetting axis-visible] \
     
    21322143
    21332144    checkbutton $inner.labels \
    2134         -text "Show Axis Labels" \
     2145        -text "Axis Labels" \
    21352146        -variable [itcl::scope _axis(labels)] \
    21362147        -command [itcl::code $this AdjustSetting axis-labels] \
    21372148        -font "Arial 9"
    2138 
    2139     checkbutton $inner.gridx \
    2140         -text "Show X Grid" \
     2149    label $inner.grid_l -text "Grid" -font "Arial 9"
     2150    checkbutton $inner.xgrid \
     2151        -text "X" \
    21412152        -variable [itcl::scope _axis(xgrid)] \
    21422153        -command [itcl::code $this AdjustSetting axis-xgrid] \
    21432154        -font "Arial 9"
    2144     checkbutton $inner.gridy \
    2145         -text "Show Y Grid" \
     2155    checkbutton $inner.ygrid \
     2156        -text "Y" \
    21462157        -variable [itcl::scope _axis(ygrid)] \
    21472158        -command [itcl::code $this AdjustSetting axis-ygrid] \
    21482159        -font "Arial 9"
    2149     checkbutton $inner.gridz \
    2150         -text "Show Z Grid" \
     2160    checkbutton $inner.zgrid \
     2161        -text "Z" \
    21512162        -variable [itcl::scope _axis(zgrid)] \
    21522163        -command [itcl::code $this AdjustSetting axis-zgrid] \
     2164        -font "Arial 9"
     2165    checkbutton $inner.minorticks \
     2166        -text "Minor Ticks" \
     2167        -variable [itcl::scope _axis(minorticks)] \
     2168        -command [itcl::code $this AdjustSetting axis-minorticks] \
    21532169        -font "Arial 9"
    21542170
     
    21672183
    21682184    blt::table $inner \
    2169         0,0 $inner.visible -anchor w -cspan 2 \
    2170         1,0 $inner.labels  -anchor w -cspan 2 \
    2171         2,0 $inner.gridx   -anchor w -cspan 2 \
    2172         3,0 $inner.gridy   -anchor w -cspan 2 \
    2173         4,0 $inner.gridz   -anchor w -cspan 2 \
    2174         5,0 $inner.mode_l  -anchor w -cspan 2 -padx { 2 0 } \
    2175         6,0 $inner.mode    -fill x   -cspan 2
     2185        0,0 $inner.visible -anchor w -cspan 4 \
     2186        1,0 $inner.labels  -anchor w -cspan 4 \
     2187        2,0 $inner.minorticks  -anchor w -cspan 4 \
     2188        4,0 $inner.grid_l  -anchor w \
     2189        4,1 $inner.xgrid   -anchor w \
     2190        4,2 $inner.ygrid   -anchor w \
     2191        4,3 $inner.zgrid   -anchor w \
     2192        5,0 $inner.mode_l  -anchor w -padx { 2 0 } \
     2193        5,1 $inner.mode    -fill x   -cspan 3
    21762194
    21772195    blt::table configure $inner r* c* -resize none
    2178     blt::table configure $inner r7 c1 -resize expand
     2196    blt::table configure $inner r7 c6 -resize expand
     2197    blt::table configure $inner r3 -height 0.125i
    21792198}
    21802199
     
    26842703                -bondstyle "cylinder"
    26852704                -bondsvisible 1
     2705                -color "elementDefault"
    26862706                -edgecolor black
    26872707                -edges 0
  • branches/uq/gui/scripts/vtkvolumeviewer.tcl

    r4568 r4797  
    751751                set session $env(SESSION)
    752752            }
     753            lappend info "version" "$Rappture::version"
     754            lappend info "build" "$Rappture::build"
     755            lappend info "svnurl" "$Rappture::svnurl"
     756            lappend info "installdir" "$Rappture::installdir"
    753757            lappend info "hub" [exec hostname]
    754758            lappend info "client" "vtkvolumeviewer"
  • branches/uq/gui/src/RpPdbToVtk.c

    r4412 r4797  
    191191    for (i = 0, hPtr = Tcl_FirstHashEntry(atomTablePtr, &iter); hPtr != NULL;
    192192         hPtr = Tcl_NextHashEntry(&iter), i++) {
    193         PdbAtom *atomPtr;
    194 
    195         atomPtr = Tcl_GetHashValue(hPtr);
     193        PdbAtom *atomPtr = Tcl_GetHashValue(hPtr);
    196194        array[i] = atomPtr;
    197195    }
     
    691689        Tcl_AppendToObj(objPtr, mesg, -1);
    692690    }
     691#if 0
    693692    for (hPtr = Tcl_FirstHashEntry(&atomTable, &iter); hPtr != NULL;
    694693         hPtr = Tcl_NextHashEntry(&iter)) {
    695         PdbAtom *atomPtr;
    696 
    697         atomPtr = Tcl_GetHashValue(hPtr);
    698 #if 0
     694        PdbAtom *atomPtr = Tcl_GetHashValue(hPtr);
    699695        fprintf(stderr, "%d %s %d connections\n", atomPtr->ordinal,
    700696                elements[atomPtr->number].symbol, atomPtr->numConnections);
     697    }
    701698#endif
    702     }
    703699    sprintf(mesg, "POINT_DATA %d\n", atomTable.numEntries);
    704700    Tcl_AppendToObj(objPtr, mesg, -1);
  • branches/uq/lang/tcl/pkgIndex.tcl.in

    r3739 r4797  
    66        variable version $version
    77        variable build "@SVN_VERSION@"
     8        variable svnurl "@SVN_URL@"
    89        variable installdir [file normalize $dir]
    910    }
  • branches/uq/lang/tcl/scripts/xauth.tcl

    r4514 r4797  
    3030package require sha1
    3131package require tls
    32 http::register https 443 ::tls::socket
     32http::register https 443 [list ::tls::socket -tls1 1]
    3333
    3434namespace eval XAuth {
Note: See TracChangeset for help on using the changeset viewer.