Changeset 4798


Ignore:
Timestamp:
Nov 26, 2014 7:28:23 PM (5 years ago)
Author:
gah
Message:

sync with former 1.3 branch

Location:
branches/uq
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • branches/uq/configure

    r4797 r4798  
    672672OCTAVE_VERSION_MAJOR
    673673OCTAVE_VERSION
    674 SVN_URL
    675674SVN_VERSION
    676675MKOCTFILE3
     
    72987297
    72997298SVN_VERSION=`svnversion $srcdir | sed 's/Unversioned directory/unknown/'`
    7300 SVN_URL=`svn info $srcdir | sed -ne 's/^URL: //p'`
    73017299
    73027300make_command=""
     
    1013710135
    1013810136MAKE=${make_command}
    10139 
    1014010137
    1014110138
  • branches/uq/configure.in

    r4797 r4798  
    108108
    109109SVN_VERSION=`svnversion $srcdir | sed 's/Unversioned directory/unknown/'`
    110 SVN_URL=`svn info $srcdir | sed -ne 's/^URL: //p'`
    111110
    112111make_command=""
     
    402401AC_SUBST(MKOCTFILE3)
    403402AC_SUBST(SVN_VERSION)
    404 AC_SUBST(SVN_URL)
    405403AC_SUBST(OCTAVE_VERSION)
    406404AC_SUBST(OCTAVE_VERSION_MAJOR)
  • branches/uq/gui/configure

    r4797 r4798  
    11#! /bin/sh
    22# Guess values for system-dependent variables and create Makefiles.
    3 # Generated by GNU Autoconf 2.69 for RapptureGUI 1.3.
     3# Generated by GNU Autoconf 2.69 for RapptureGUI 1.4.
    44#
    55# Report bugs to <rappture@nanohub.org>.
     
    580580PACKAGE_NAME='RapptureGUI'
    581581PACKAGE_TARNAME='rappturegui'
    582 PACKAGE_VERSION='1.3'
    583 PACKAGE_STRING='RapptureGUI 1.3'
     582PACKAGE_VERSION='1.4'
     583PACKAGE_STRING='RapptureGUI 1.4'
    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.3 to adapt to many kinds of systems.
     1225\`configure' configures RapptureGUI 1.4 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.3:";;
     1291     short | recursive ) echo "Configuration of RapptureGUI 1.4:";;
    12921292   esac
    12931293  cat <<\_ACEOF
     
    13801380if $ac_init_version; then
    13811381  cat <<\_ACEOF
    1382 RapptureGUI configure 1.3
     1382RapptureGUI configure 1.4
    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.3, which was
     1437It was created by RapptureGUI $as_me 1.4, 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.3, which was
     3687This file was extended by RapptureGUI $as_me 1.4, 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.3
     3740RapptureGUI config.status 1.4
    37413741configured by $0, generated by GNU Autoconf 2.69,
    37423742  with options \\"\$ac_cs_config\\"
  • branches/uq/gui/configure.in

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

    r4797 r4798  
    6060    public method get {args}
    6161    public method isconnected {}
     62    public method limits { colormap }
    6263    public method parameters {title args} {
    6364        # do nothing
     
    13881389        #SendCmd "color background $r $g $b"
    13891390    }
     1391}
     1392
     1393itcl::body Rappture::MapViewer::limits { dataobj } {
     1394    error "no limits"
    13901395}
    13911396
  • branches/uq/gui/scripts/mesh.tcl

    r4797 r4798  
    3333                                        # xmin, xmax, ymin, ymax, ...
    3434    private variable _numPoints 0   ;   # # of points in mesh
    35     private variable _numCells 0   ;    # # of cells in mesh
     35    private variable _numCells 0;       # # of cells in mesh
    3636    private variable _vtkdata "";       # Mesh in vtk file format.
    3737    private variable _isValid 0;        # Indicates if the mesh is valid.
     
    7676   
    7777    private method ReadNodesElements {path}
     78    private method GetCellCount { xNum yNum zNum }
    7879    private method GetDimension { path }
    7980    private method GetDouble { path }
     
    499500}
    500501
     502itcl::body Rappture::Mesh::GetCellCount { xNum yNum zNum } {
     503    set numCells 1
     504    if { $xNum > 0 } {
     505        set numCells [expr $numCells * $xNum]
     506    }
     507    if { $yNum > 0 } {
     508        set numCells [expr $numCells * $yNum]
     509    }
     510    if { $zNum > 0 } {
     511        set numCells [expr $numCells * $zNum]
     512    }
     513    return $numCells
     514}
     515
    501516itcl::body Rappture::Mesh::ReadGrid { path } {
    502517    set _type "grid"
     
    519534            set ${axis}Num $num
    520535            if {$min > $max} {
    521                 puts stderr "ERROR: grid $axis axis minimum larger than maximum"
     536                puts stderr "ERROR: grid $axis min can't be greater than max"
    522537                return 0
    523538            }
     
    561576            set _dim 3
    562577            set _numPoints [expr $xNum * $yNum * $zNum]
    563             set _numCells [expr ($xNum > 1 ? ($xNum - 1) : 1) * ($yNum > 1 ? ($yNum - 1) : 1) * ($zNum > 1 ? ($zNum - 1) : 1)]
    564             if { ($_numPoints*3) != $numCoords } {
     578            set _numCells [GetCellCount $xNum $yNum $zNum]
     579            if { ($_numPoints * 3) != $numCoords } {
    565580                puts stderr "WARNING: bad grid \"$path\": invalid grid: \# of points does not match dimensions <xdim> * <ydim> * <zdim>"
    566581                return 0
     
    584599            set _dim 2
    585600            set _numPoints [expr $xNum * $yNum]
    586             set _numCells [expr ($xNum > 1 ? ($xNum - 1) : 1) * ($yNum > 1 ? ($yNum - 1) : 1)]
    587             if { ($_numPoints*2) != $numCoords } {
     601            set _numCells [GetCellCount $xNum $yNum 0]
     602            if { ($_numPoints * 2) != $numCoords } {
    588603                puts stderr "WARNING: bad grid \"$path\": \# of points does not match dimensions <xdim> * <ydim>"
    589604                return 0
     
    609624            set _dim 1
    610625            set _numPoints $xNum
    611             set _numCells [expr $xNum - 1]
     626            set _numCells [GetCellCount $xNum 0 0]
    612627            if { $_numPoints != $numCoords } {
    613628                puts stderr "WARNING: bad grid \"$path\": \# of points does not match <xdim>"
     
    634649        # This results in a STRUCTURED_POINTS
    635650        if { $_dim == 1 } {
    636             if {$xNum == 1} {
    637                 set xSpace 0
    638             } else {
    639                 set xSpace [expr ($xMax - $xMin) / double($xNum - 1)]
     651            set xSpacing 0
     652            if { $xNum > 1 } {
     653                set xSpacing [expr ($xMax - $xMin) / double($xNum - 1)]
    640654            }
    641655            set _numPoints $xNum
    642             set _numCells [expr $xNum - 1]
     656            set _numCells [GetCellCount $xNum 0 0]
    643657            append out "DATASET STRUCTURED_POINTS\n"
    644658            append out "DIMENSIONS $xNum 1 1\n"
    645659            append out "ORIGIN $xMin 0 0\n"
    646             append out "SPACING $xSpace 0 0\n"
     660            append out "SPACING $xSpacing 0 0\n"
    647661            set _vtkdata $out
    648662            set _limits(x) [list $xMin $xMax]
     
    650664            set _limits(z) [list 0 0]
    651665        } elseif { $_dim == 2 } {
    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)]
     666            set xSpacing 0
     667            set ySpacing 0
     668            if { $xNum > 1 } {
     669                set xSpacing [expr ($xMax - $xMin) / double($xNum - 1)]
     670            }
     671            if { $yNum > 1 } {
     672                set ySpacing [expr ($yMax - $yMin) / double($yNum - 1)]
    661673            }
    662674            set _numPoints [expr $xNum * $yNum]
    663             set _numCells [expr ($xNum > 1 ? ($xNum - 1) : 1) * ($yNum > 1 ? ($yNum - 1) : 1)]
     675            set _numCells [GetCellCount $xNum $yNum 0]
    664676            append out "DATASET STRUCTURED_POINTS\n"
    665677            append out "DIMENSIONS $xNum $yNum 1\n"
    666678            append out "ORIGIN $xMin $yMin 0\n"
    667             append out "SPACING $xSpace $ySpace 0\n"
     679            append out "SPACING $xSpacing $ySpacing 0\n"
    668680            set _vtkdata $out
    669681            foreach axis {x y} {
     
    672684            set _limits(z) [list 0 0]
    673685        } elseif { $_dim == 3 } {
    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)]
     686            set xSpacing 0
     687            set ySpacing 0
     688            set zSpacing 0
     689            if {$xNum > 1} {
     690                set xSpacing [expr ($xMax - $xMin) / double($xNum - 1)]
     691            }
     692            if {$yNum > 1} {
     693                set ySpacing [expr ($yMax - $yMin) / double($yNum - 1)]
     694            }
     695            if {$zNum > 1} {
     696                set zSpacing [expr ($zMax - $zMin) / double($zNum - 1)]
    688697            }
    689698            set _numPoints [expr $xNum * $yNum * $zNum]
    690             set _numCells [expr ($xNum > 1 ? ($xNum - 1) : 1) * ($yNum > 1 ? ($yNum - 1) : 1) * ($zNum > 1 ? ($zNum - 1) : 1)]
     699            set _numCells [GetCellCount $xNum $yNum $zNum]
    691700            append out "DATASET STRUCTURED_POINTS\n"
    692701            append out "DIMENSIONS $xNum $yNum $zNum\n"
    693702            append out "ORIGIN $xMin $yMin $zMin\n"
    694             append out "SPACING $xSpace $ySpace $zSpace\n"
     703            append out "SPACING $xSpacing $ySpacing $zSpacing\n"
    695704            set _vtkdata $out
    696705            foreach axis {x y z} {
     
    741750    if { $_dim == 3 } {
    742751        set _numPoints [expr $xNum * $yNum * $zNum]
    743         set _numCells [expr ($xNum > 1 ? ($xNum - 1) : 1) * ($yNum > 1 ? ($yNum - 1) : 1) * ($zNum > 1 ? ($zNum - 1) : 1)]
     752        set _numCells [GetCellCount $xNum $yNum $zNum]
    744753        append out "DATASET RECTILINEAR_GRID\n"
    745754        append out "DIMENSIONS $xNum $yNum $zNum\n"
     
    761770    } elseif { $_dim == 2 } {
    762771        set _numPoints [expr $xNum * $yNum]
    763         set _numCells [expr ($xNum > 1 ? ($xNum - 1) : 1) * ($yNum > 1 ? ($yNum - 1) : 1)]
     772        set _numCells [GetCellCount $xNum $yNum 0]
    764773        append out "DATASET RECTILINEAR_GRID\n"
    765774        append out "DIMENSIONS $xNum $yNum 1\n"
     
    781790    } elseif { $_dim == 1 } {
    782791        set _numPoints $xNum
    783         set _numCells [expr $xNum - 1]
     792        set _numCells [GetCellCount $xNum 0 0]
    784793        append out "DATASET RECTILINEAR_GRID\n"
    785794        append out "DIMENSIONS $xNum 1 1\n"
  • branches/uq/gui/scripts/nanovisviewer.tcl

    r4797 r4798  
    150150    private variable _transferFunctionEditors
    151151    private variable _settings
     152    private variable _alphamap
    152153    private variable _widget
    153154
     
    13171318            set _settings($what) [expr $_widget($what) * 0.01]
    13181319            set _settings($_current${what}) $_settings($what)
    1319             foreach tag [GetDatasetsWithComponent $_current] {
    1320                 SendCmd "volume shading opacity $_settings($what) $tag"
    1321             }
     1320       
     1321            foreach {cmap wmap} $_cname2transferFunction($_current) break
     1322            set wmap [ComputeAlphamap $_current]
     1323            set _cname2transferFunction($_current) [list $cmap $wmap]
     1324            SendCmd [list transfunc define $_current $cmap $wmap]
    13221325        }
    13231326        "-volumevisible" {
     
    16861689    $inner configure -borderwidth 4
    16871690
     1691    set font [option get $itk_component(hull) font Font]
    16881692    set fg [option get $itk_component(hull) font Font]
    16891693    #set bfg [option get $itk_component(hull) boldFont Font]
    16901694
     1695    checkbutton $inner.vol -text "Show volume" -font $fg \
     1696        -variable [itcl::scope _settings(-volumevisible)] \
     1697        -command [itcl::code $this AdjustSetting -volumevisible]
    16911698    label $inner.shading -text "Shading:" -font $fg
    16921699
     
    16941701        -variable [itcl::scope _settings(-light2side)] \
    16951702        -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]
    17001703
    17011704    label $inner.dim -text "Glow" -font $fg
     
    17231726
    17241727    # Colormap
    1725     label $inner.colormap_l -text "Colormap" -font $fg
     1728    label $inner.colormap_l -text "Colormap" -font "Arial 9"
    17261729    itk_component add colormap {
    17271730        Rappture::Combobox $inner.colormap -width 10 -editable no
     
    17351738
    17361739    # Component
    1737     label $inner.volcomponents_l -text "Component" -font $fg
     1740    label $inner.volcomponents_l -text "Component" -font $font
    17381741    itk_component add volcomponents {
    17391742        Rappture::Combobox $inner.volcomponents -editable no
     
    17471750        1,0 $inner.shading -cspan 4 -anchor w -pady {10 2} \
    17481751        2,0 $inner.light2side -cspan 4 -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
     1752        3,0 $inner.dim -anchor e -pady 2 \
     1753        3,1 $inner.light -cspan 2 -pady 2 -fill x \
     1754        3,3 $inner.bright -anchor w -pady 2 \
     1755        4,0 $inner.fog -anchor e -pady 2 \
     1756        4,1 $inner.transp -cspan 2 -pady 2 -fill x \
     1757        4,3 $inner.plastic -anchor w -pady 2 \
     1758        5,0 $inner.thin -anchor e -pady 2 \
     1759        5,1 $inner.thickness -cspan 2 -pady 2 -fill x\
     1760        5,3 $inner.thick -anchor w -pady 2
    17591761
    17601762    blt::table configure $inner c0 c1 c3 r* -resize none
    1761     blt::table configure $inner r7 -resize expand
     1763    blt::table configure $inner r6 -resize expand
    17621764}
    17631765
     
    17731775        -command [itcl::code $this AdjustSetting -cutplanesvisible] \
    17741776        -font "Arial 9"
    1775 
     1777   
    17761778    # X-value slicer...
    17771779    itk_component add xCutButton {
     
    18581860
    18591861    blt::table $inner \
    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
     1862        1,1 $itk_component(xCutButton) \
     1863        1,2 $itk_component(yCutButton) \
     1864        1,3 $itk_component(zCutButton) \
     1865        0,1 $itk_component(xCutScale) \
     1866        0,2 $itk_component(yCutScale) \
     1867        0,3 $itk_component(zCutScale)
     1868
     1869    blt::table configure $inner r0 r1 c* -resize none
     1870    blt::table configure $inner r2 c4 -resize expand
    18701871    blt::table configure $inner c0 -width 2
    18711872    blt::table configure $inner c1 c2 c3 -padx 2
     
    21802181# GetDatasetsWithComponents --
    21812182#
    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.
     2183#     Returns a list of all the datasets (known by the combination of their
     2184#     data object and component name) that match the given component name.
     2185#     For example, this is used where we want to change the settings of
     2186#     volumes that have the current component.
    21862187#
    21872188itcl::body Rappture::NanovisViewer::GetDatasetsWithComponent { cname } {
     
    22022203# HideAllMarkers --
    22032204#
    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.
     2205#   Hide all the markers in all the transfer functions.  Can't simply
     2206#   delete and recreate markers from the <style> since the user may have
     2207#   create, deleted, or moved markers.
    22072208#
    22082209itcl::body Rappture::NanovisViewer::HideAllMarkers {} {
     
    22482249    set isovalues [$_transferFunctionEditors($cname) values]
    22492250
    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.
    2253     set max 1.0
     2251    # Currently using volume shading opacity to scale opacity in
     2252    # the volume shader.
     2253    set max $_settings($cname-volumeopacity)
    22542254
    22552255    # Use the component-wise thickness setting from the slider
     
    23002300    return $wmap
    23012301}
     2302
    23022303
    23032304itcl::body Rappture::NanovisViewer::NameToAlphamap { name } {
     
    24712472itcl::body Rappture::NanovisViewer::SetObjectStyle { dataobj cname } {
    24722473    array set styles {
    2473         -opacity  0.5
     2474        -opacity  0.6
    24742475    }
    24752476    array set styles [lindex [$dataobj components -style $cname] 0]
    24762477    set _settings($cname-volumeopacity) $styles(-opacity)
    2477     set tag $dataobj-$cname
    2478     SendCmd "volume shading opacity $_settings($cname-volumeopacity) $tag"
    24792478    NameTransferFunction $dataobj $cname
    24802479}
  • branches/uq/gui/scripts/vtkglyphviewer.tcl

    r4797 r4798  
    5757    public method get {args}
    5858    public method isconnected {}
     59    public method limits { colormap }
    5960    public method parameters {title args} {
    6061        # do nothing
     
    143144    private variable _legendPending 0
    144145    private variable _field      ""
    145     private variable _colorMode "vmag"; #  Mode of colormap (vmag or scalar)
     146    private variable _colorMode "vmag"; #  Mode of colormap (vmag or scalar)
    146147    private variable _fieldNames {}
    147148    private variable _fields
     
    955956        InitSettings -xgrid -ygrid -zgrid -axismode \
    956957            -axesvisible -axislabels -axisminorticks
    957         #SendCmd "axis lformat all %g"
     958        foreach axis { x y z } {
     959            SendCmd "axis lformat $axis %g"
     960        }
    958961        StopBufferingCommands
    959962        SendCmd "imgflush"
     
    14561459                return
    14571460            }
    1458             #if { ![info exists _limits($_curFldName)] } {
    1459             #    SendCmd "dataset maprange all"
    1460             #} else {
    1461             #    SendCmd "dataset maprange explicit $_limits($_curFldName) $_curFldName"
    1462             #}
    1463             #SendCmd "cutplane colormode $_colorMode $_curFldName"
    14641461            SendCmd "glyphs colormode $_colorMode $_curFldName"
    14651462            DrawLegend
     
    15451542        #SendCmd "cutplane color $rgb"
    15461543    }
     1544}
     1545
     1546itcl::body Rappture::VtkGlyphViewer::limits { dataobj } {
     1547    foreach { limits(xmin) limits(xmax) } [$dataobj limits x] break
     1548    foreach { limits(ymin) limits(ymax) } [$dataobj limits y] break
     1549    foreach { limits(zmin) limits(zmax) } [$dataobj limits z] break
     1550    foreach { limits(vmin) limits(vmax) } [$dataobj limits v] break
     1551    return [array get limits]
    15471552}
    15481553
  • branches/uq/gui/scripts/vtkheightmapviewer.tcl

    r4797 r4798  
    5858    public method get {args}
    5959    public method isconnected {}
     60    public method limits3 { dataobj }
    6061    public method parameters {title args} {
    6162        # do nothing
     
    10471048    if { $_reset } {
    10481049        SendCmd "axis tickpos outside"
    1049         #SendCmd "axis lformat all %g"
     1050        foreach axis { x y z } {
     1051            SendCmd "axis lformat $axis %g"
     1052        }
    10501053       
    10511054        foreach axis { x y z } {
     
    10991102            -numisolines
    11001103        if { [array size _fields] < 2 } {
    1101             catch {blt::table forget $itk_component(field) $itk_component(field_l)}
     1104            catch {
     1105                blt::table forget $itk_component(field) $itk_component(field_l)
     1106            }
    11021107        }
    11031108        RequestLegend
     
    18341839        }
    18351840    }
     1841}
     1842
     1843itcl::body Rappture::VtkHeightmapViewer::limits3 { dataobj } {
     1844    lappend limits x [$dataobj limits x]
     1845    lappend limits y [$dataobj limits y]
     1846    if { [catch { $dataobj limits $_curFldName } vlim] != 0 } {
     1847        set vlim [$dataobj limits v]
     1848    }
     1849    lappend limits v $vlim
     1850    return $limits
    18361851}
    18371852
  • branches/uq/gui/scripts/vtkimageviewer.tcl

    r4797 r4798  
    5858    public method get {args}
    5959    public method isconnected {}
     60    public method limits3 { dataobj }
    6061    public method parameters {title args} {
    6162        # do nothing
     
    925926        InitSettings view3D background
    926927
     928        # Let's see how this goes.  I think it's preferable to overloading the
     929        # axis title with the exponent.
     930        SendCmd "axis exp 0 0 0 1"
     931
    927932        SendCmd "axis lrot z 90"
    928933        set q [list $_view(qw) $_view(qx) $_view(qy) $_view(qz)]
     
    10561061            axisVisible axisLabels field view3D
    10571062        if { [array size _fields] < 2 } {
    1058             catch {blt::table forget $itk_component(field) $itk_component(field_l)}
     1063            catch {
     1064                blt::table forget $itk_component(field) $itk_component(field_l)
     1065            }
    10591066        }
    10601067        RequestLegend
     
    16271634        }
    16281635    }
     1636}
     1637
     1638itcl::body Rappture::VtkImageViewer::limits3 { dataobj } {
     1639    lappend limits x [$dataobj limits x]
     1640    lappend limits y [$dataobj limits y]
     1641    if { [catch { $dataobj limits $_curFldName } vlim] != 0 } {
     1642        set vlim [$dataobj limits v]
     1643    }
     1644    lappend limits v $vlim
     1645    return $limits
    16291646}
    16301647
  • branches/uq/gui/scripts/vtkisosurfaceviewer.tcl

    r4797 r4798  
    5757    public method get {args}
    5858    public method isconnected {}
     59    public method limits { colormap }
    5960    public method parameters {title args} {
    6061        # do nothing
     
    102103    private method Rotate {option x y}
    103104    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 }
     107    private method SetCurrentFieldName { dataobj }
    107108    private method SetOrientation { side }
    108     private method Slice {option args}
     109    private method Slice {option args} 
    109110    private method Zoom {option}
    110111    private method ViewToQuaternion {} {
     
    239240    array set _settings {
    240241        -axesvisible                    1
    241         -axislabels                     1
    242         -axisminorticks                 1
     242        -axislabelsvisible              1
    243243        -axismode                       "static"
    244244        -background                     black
     
    994994        set _first ""
    995995        InitSettings -xgrid -ygrid -zgrid -axismode \
    996             -axesvisible -axislabels -axisminorticks -ortho
    997         #SendCmd "axis lformat all %g"
     996            -axesvisible -axislabelsvisible -ortho
     997        SendCmd "axis lformat all %g"
     998        # Too many major ticks, so turn off minor ticks
     999        SendCmd "axis minticks all 0"
    9981000        StopBufferingCommands
    9991001        SendCmd "imgflush"
     
    10681070        }
    10691071        if { [array size _fields] < 2 } {
    1070             catch {blt::table forget $itk_component(field) $itk_component(field_l)}
     1072            catch {
     1073                blt::table forget $itk_component(field) $itk_component(field_l)
     1074            }
    10711075        }
    10721076        set _reset 0
     
    13191323            SendCmd "axis visible all $bool"
    13201324        }
    1321         "-axislabels" {
     1325        "-axislabelsvisible" {
    13221326            set bool $_settings($what)
    13231327            SendCmd "axis labels all $bool"
    1324         }
    1325         "-axisminorticks" {
    1326             set bool $_settings($what)
    1327             SendCmd "axis minticks all $bool"
    13281328        }
    13291329        "-axismode" {
     
    15981598}
    15991599
     1600itcl::body Rappture::VtkIsosurfaceViewer::limits { dataobj } {
     1601    foreach { limits(xmin) limits(xmax) } [$dataobj limits x] break
     1602    foreach { limits(ymin) limits(ymax) } [$dataobj limits y] break
     1603    foreach { limits(zmin) limits(zmax) } [$dataobj limits z] break
     1604    foreach { limits(vmin) limits(vmax) } [$dataobj limits v] break
     1605    return [array get limits]
     1606}
     1607
    16001608itcl::body Rappture::VtkIsosurfaceViewer::BuildIsosurfaceTab {} {
    16011609
     
    16831691        -showvalue off \
    16841692        -command [itcl::code $this AdjustSetting -isosurfaceopacity]
    1685     $inner.opacity set [expr $_settings(-isosurfaceopacity) * 100.0]
     1693    set _widget(-isosurfaceopacity) \
     1694        [expr $_settings(-isosurfaceopacity) * 100.0]
    16861695
    16871696    itk_component add field_l {
     
    17491758
    17501759    checkbutton $inner.visible \
    1751         -text "Axes" \
     1760        -text "Show Axes" \
    17521761        -variable [itcl::scope _settings(-axesvisible)] \
    17531762        -command [itcl::code $this AdjustSetting -axesvisible] \
     
    17551764
    17561765    checkbutton $inner.labels \
    1757         -text "Axis Labels" \
    1758         -variable [itcl::scope _settings(-axislabels)] \
    1759         -command [itcl::code $this AdjustSetting -axislabels] \
     1766        -text "Show Axis Labels" \
     1767        -variable [itcl::scope _settings(-axislabelsvisible)] \
     1768        -command [itcl::code $this AdjustSetting -axislabelsvisible] \
    17601769        -font "Arial 9"
    1761     label $inner.grid_l -text "Grid" -font "Arial 9"
    1762     checkbutton $inner.xgrid \
    1763         -text "X" \
     1770
     1771    checkbutton $inner.gridx \
     1772        -text "Show X Grid" \
    17641773        -variable [itcl::scope _settings(-xgrid)] \
    17651774        -command [itcl::code $this AdjustSetting -xgrid] \
    17661775        -font "Arial 9"
    1767     checkbutton $inner.ygrid \
    1768         -text "Y" \
     1776    checkbutton $inner.gridy \
     1777        -text "Show Y Grid" \
    17691778        -variable [itcl::scope _settings(-ygrid)] \
    17701779        -command [itcl::code $this AdjustSetting -ygrid] \
    17711780        -font "Arial 9"
    1772     checkbutton $inner.zgrid \
    1773         -text "Z" \
     1781    checkbutton $inner.gridz \
     1782        -text "Show Z Grid" \
    17741783        -variable [itcl::scope _settings(-zgrid)] \
    17751784        -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] \
    17811785        -font "Arial 9"
    17821786
     
    17951799
    17961800    blt::table $inner \
    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
     1801        0,0 $inner.visible -anchor w -cspan 2 \
     1802        1,0 $inner.labels  -anchor w -cspan 2 \
     1803        2,0 $inner.gridx   -anchor w -cspan 2 \
     1804        3,0 $inner.gridy   -anchor w -cspan 2 \
     1805        4,0 $inner.gridz   -anchor w -cspan 2 \
     1806        5,0 $inner.mode_l  -anchor w -cspan 2 -padx { 2 0 } \
     1807        6,0 $inner.mode    -fill x   -cspan 2
    18061808
    18071809    blt::table configure $inner r* c* -resize none
    1808     blt::table configure $inner r7 c6 -resize expand
    1809     blt::table configure $inner r3 -height 0.125i
     1810    blt::table configure $inner r7 c1 -resize expand
    18101811}
    18111812
     
    19051906        -showvalue off \
    19061907        -command [itcl::code $this AdjustSetting -cutplaneopacity]
    1907     $inner.opacity set [expr $_settings(-cutplaneopacity) * 100.0]
     1908    set _widget(-cutplaneopacity) [expr $_settings(-cutplaneopacity) * 100.0]
    19081909
    19091910    # X-value slicer...
     
    25752576    }
    25762577    if { $_contourList(numLevels) < 1 } {
    2577         # There are tools that set 0 levels to get cutplanes only
    2578         #puts stderr "numLevels < 1"
    25792578        return ""
    25802579    }
  • branches/uq/gui/scripts/vtkmeshviewer.tcl

    r4797 r4798  
    5757    public method get {args}
    5858    public method isconnected {}
    59     public method limits { dataobj }
     59    public method limits { colormap }
    6060    public method parameters {title args} {
    6161        # do nothing
     
    8181    private method BuildAxisTab {}
    8282    private method BuildCameraTab {}
     83    private method BuildCutawayTab {}
    8384    private method BuildDownloadPopup { widget command }
    8485    private method BuildPolydataTab {}
     
    9394    private method SetOrientation { side }
    9495    private method SetPolydataOpacity {}
     96    private method Slice {option args}
    9597
    9698    private variable _arcball ""
     
    100102    private variable _datasets;         # contains all the dataobj-component
    101103                                        # datasets in the server
     104    private variable _colormaps;        # contains all the colormaps
     105                                        # in the server.
    102106    private variable _dataset2style;    # maps dataobj-component to transfunc
    103107    private variable _style2datasets;   # maps tf back to list of
     
    183187        -axesvisible            1
    184188        -axislabels             1
    185         -axisminorticks         1
    186189        -outline                0
    187190        -polydataedges          0
     
    190193        -polydatavisible        1
    191194        -polydatawireframe      0
     195        -xcutaway               0
     196        -xdirection             -1
    192197        -xgrid                  0
     198        -xposition              0
     199        -ycutaway               0
     200        -ydirection             -1
    193201        -ygrid                  0
     202        -yposition              0
     203        -zcutaway               0
     204        -zdirection             -1
    194205        -zgrid                  0
     206        -zposition              0
    195207    }
    196208    array set _widget {
     
    273285    BuildPolydataTab
    274286    BuildAxisTab
     287    #BuildCutawayTab
    275288    BuildCameraTab
    276289
     
    710723
    711724    # disconnected -- no more data sitting on server
    712     array unset _datasets
    713     array unset _data
     725    array unset _datasets
     726    array unset _data
     727    array unset _colormaps
    714728    global readyForNextFrame
    715729    set readyForNextFrame 1
     
    821835        $_arcball resize $w $h
    822836        DoResize
    823         InitSettings -xgrid -ygrid -zgrid -axismode \
    824             -axesvisible -axislabels -axisminorticks
     837        InitSettings -xgrid -ygrid -zgrid -axismode -axesvisible -axislabels
    825838        StopBufferingCommands
    826839        SendCmd "imgflush"
     
    890903            -polydatavisible -polydatawireframe
    891904 
    892         #SendCmd "axis lformat all %g"
     905        SendCmd "axis lformat all %g"
     906        # Too many major ticks, so turn off minor ticks
     907        SendCmd "axis minticks all 0"
    893908
    894909        set q [list $_view(qw) $_view(qx) $_view(qy) $_view(qz)]
     
    12011216            set mode [$itk_component(axismode) translate $mode]
    12021217            SendCmd "axis flymode $mode"
     1218        }
     1219        "-xcutaway" - "-ycutaway" - "-zcutaway" {
     1220            set axis [string range $what 1 1]
     1221            set bool $_settings($what)
     1222            if { $bool } {
     1223                set pos [expr $_settings(-${axis}position) * 0.01]
     1224                set dir $_settings(-${axis}direction)
     1225                $itk_component(${axis}CutScale) configure -state normal \
     1226                    -troughcolor white
     1227                SendCmd "renderer clipplane $axis $pos $dir"
     1228            } else {
     1229                $itk_component(${axis}CutScale) configure -state disabled \
     1230                    -troughcolor grey82
     1231                SendCmd "renderer clipplane $axis 1 -1"
     1232            }
     1233        }
     1234        "-xposition" - "-yposition" - "-zposition" {
     1235            set axis [string range $what 1 1]
     1236            set pos [expr $_settings($what) * 0.01]
     1237            SendCmd "renderer clipplane ${axis} $pos -1"
     1238        }
     1239        "-xdirection" - "-ydirection" - "-zdirection" {
     1240            set axis [string range $what 1 1]
     1241            puts stderr "direction not implemented"
    12031242        }
    12041243        default {
     
    13521391    set inner [$itk_component(main) insert end \
    13531392        -title "Axis Settings" \
    1354         -icon [Rappture::icon axis2]]
     1393        -icon [Rappture::icon axis1]]
    13551394    $inner configure -borderwidth 4
    13561395
    13571396    checkbutton $inner.visible \
    1358         -text "Axes" \
     1397        -text "Show Axes" \
    13591398        -variable [itcl::scope _settings(-axesvisible)] \
    13601399        -command [itcl::code $this AdjustSetting -axesvisible] \
     
    13621401
    13631402    checkbutton $inner.labels \
    1364         -text "Axis Labels" \
     1403        -text "Show Axis Labels" \
    13651404        -variable [itcl::scope _settings(-axislabels)] \
    13661405        -command [itcl::code $this AdjustSetting -axislabels] \
    13671406        -font "Arial 9"
    1368     label $inner.grid_l -text "Grid" -font "Arial 9"
    1369     checkbutton $inner.xgrid \
    1370         -text "X" \
     1407
     1408    checkbutton $inner.gridx \
     1409        -text "Show X Grid" \
    13711410        -variable [itcl::scope _settings(-xgrid)] \
    13721411        -command [itcl::code $this AdjustSetting -xgrid] \
    13731412        -font "Arial 9"
    1374     checkbutton $inner.ygrid \
    1375         -text "Y" \
     1413    checkbutton $inner.gridy \
     1414        -text "Show Y Grid" \
    13761415        -variable [itcl::scope _settings(-ygrid)] \
    13771416        -command [itcl::code $this AdjustSetting -ygrid] \
    13781417        -font "Arial 9"
    1379     checkbutton $inner.zgrid \
    1380         -text "Z" \
     1418    checkbutton $inner.gridz \
     1419        -text "Show Z Grid" \
    13811420        -variable [itcl::scope _settings(-zgrid)] \
    13821421        -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] \
    13881422        -font "Arial 9"
    13891423
     
    14021436
    14031437    blt::table $inner \
    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
     1438        0,0 $inner.visible -anchor w -cspan 2 \
     1439        1,0 $inner.labels  -anchor w -cspan 2 \
     1440        2,0 $inner.gridx   -anchor w -cspan 2 \
     1441        3,0 $inner.gridy   -anchor w -cspan 2 \
     1442        4,0 $inner.gridz   -anchor w -cspan 2 \
     1443        5,0 $inner.mode_l  -anchor w -cspan 2 -padx { 2 0 } \
     1444        6,0 $inner.mode    -fill x   -cspan 2
    14131445
    14141446    blt::table configure $inner r* c* -resize none
    1415     blt::table configure $inner r7 c6 -resize expand
    1416     blt::table configure $inner r3 -height 0.125i
     1447    blt::table configure $inner r7 c1 -resize expand
    14171448}
    14181449
     
    14631494    blt::table configure $inner c2 -resize expand
    14641495    blt::table configure $inner r$row -resize expand
     1496}
     1497
     1498itcl::body Rappture::VtkMeshViewer::BuildCutawayTab {} {
     1499
     1500    set fg [option get $itk_component(hull) font Font]
     1501   
     1502    set inner [$itk_component(main) insert end \
     1503        -title "Cutaway Along Axis" \
     1504        -icon [Rappture::icon cutbutton]]
     1505
     1506    $inner configure -borderwidth 4
     1507
     1508    # X-value slicer...
     1509    itk_component add xCutButton {
     1510        Rappture::PushButton $inner.xbutton \
     1511            -onimage [Rappture::icon x-cutplane] \
     1512            -offimage [Rappture::icon x-cutplane] \
     1513            -command [itcl::code $this AdjustSetting -xcutaway] \
     1514            -variable [itcl::scope _settings(-xcutaway)]
     1515    }
     1516    Rappture::Tooltip::for $itk_component(xCutButton) \
     1517        "Toggle the X-axis cutaway on/off"
     1518
     1519    itk_component add xCutScale {
     1520        ::scale $inner.xval -from 100 -to 0 \
     1521            -width 10 -orient vertical -showvalue yes \
     1522            -borderwidth 1 -highlightthickness 0 \
     1523            -command [itcl::code $this Slice move x] \
     1524            -variable [itcl::scope _settings(-xposition)]
     1525    } {
     1526        usual
     1527        ignore -borderwidth -highlightthickness
     1528    }
     1529    # Set the default cutaway value before disabling the scale.
     1530    $itk_component(xCutScale) set 100
     1531    $itk_component(xCutScale) configure -state disabled
     1532    Rappture::Tooltip::for $itk_component(xCutScale) \
     1533        "@[itcl::code $this Slice tooltip x]"
     1534
     1535    itk_component add xDirButton {
     1536        Rappture::PushButton $inner.xdir \
     1537            -onimage [Rappture::icon arrow-down] \
     1538            -onvalue -1 \
     1539            -offimage [Rappture::icon arrow-up] \
     1540            -offvalue 1 \
     1541            -command [itcl::code $this AdjustSetting -xdirection] \
     1542            -variable [itcl::scope _settings(-xdirection)]
     1543    }
     1544    set _settings(-xdirection) -1
     1545    Rappture::Tooltip::for $itk_component(xDirButton) \
     1546        "Toggle the direction of the X-axis cutaway"
     1547
     1548    # Y-value slicer...
     1549    itk_component add yCutButton {
     1550        Rappture::PushButton $inner.ybutton \
     1551            -onimage [Rappture::icon y-cutplane] \
     1552            -offimage [Rappture::icon y-cutplane] \
     1553            -command [itcl::code $this AdjustSetting -ycutaway] \
     1554            -variable [itcl::scope _settings(-ycutaway)]
     1555    }
     1556    Rappture::Tooltip::for $itk_component(yCutButton) \
     1557        "Toggle the Y-axis cutaway on/off"
     1558
     1559    itk_component add yCutScale {
     1560        ::scale $inner.yval -from 100 -to 0 \
     1561            -width 10 -orient vertical -showvalue yes \
     1562            -borderwidth 1 -highlightthickness 0 \
     1563            -command [itcl::code $this Slice move y] \
     1564            -variable [itcl::scope _settings(-yposition)]
     1565    } {
     1566        usual
     1567        ignore -borderwidth -highlightthickness
     1568    }
     1569    Rappture::Tooltip::for $itk_component(yCutScale) \
     1570        "@[itcl::code $this Slice tooltip y]"
     1571    # Set the default cutaway value before disabling the scale.
     1572    $itk_component(yCutScale) set 100
     1573    $itk_component(yCutScale) configure -state disabled
     1574
     1575    itk_component add yDirButton {
     1576        Rappture::PushButton $inner.ydir \
     1577            -onimage [Rappture::icon arrow-down] \
     1578            -onvalue -1 \
     1579            -offimage [Rappture::icon arrow-up] \
     1580            -offvalue 1 \
     1581            -command [itcl::code $this AdjustSetting -ydirection] \
     1582            -variable [itcl::scope _settings(-ydirection)]
     1583    }
     1584    Rappture::Tooltip::for $itk_component(yDirButton) \
     1585        "Toggle the direction of the Y-axis cutaway"
     1586    set _settings(-ydirection) -1
     1587
     1588    # Z-value slicer...
     1589    itk_component add zCutButton {
     1590        Rappture::PushButton $inner.zbutton \
     1591            -onimage [Rappture::icon z-cutplane] \
     1592            -offimage [Rappture::icon z-cutplane] \
     1593            -command [itcl::code $this AdjustSetting -zcutaway] \
     1594            -variable [itcl::scope _settings(-zcutaway)]
     1595    }
     1596    Rappture::Tooltip::for $itk_component(zCutButton) \
     1597        "Toggle the Z-axis cutaway on/off"
     1598
     1599    itk_component add zCutScale {
     1600        ::scale $inner.zval -from 100 -to 0 \
     1601            -width 10 -orient vertical -showvalue yes \
     1602            -borderwidth 1 -highlightthickness 0 \
     1603            -command [itcl::code $this Slice move z] \
     1604            -variable [itcl::scope _settings(-zposition)]
     1605    } {
     1606        usual
     1607        ignore -borderwidth -highlightthickness
     1608    }
     1609    $itk_component(zCutScale) set 100
     1610    $itk_component(zCutScale) configure -state disabled
     1611    Rappture::Tooltip::for $itk_component(zCutScale) \
     1612        "@[itcl::code $this Slice tooltip z]"
     1613
     1614    itk_component add zDirButton {
     1615        Rappture::PushButton $inner.zdir \
     1616            -onimage [Rappture::icon arrow-down] \
     1617            -onvalue -1 \
     1618            -offimage [Rappture::icon arrow-up] \
     1619            -offvalue 1 \
     1620            -command [itcl::code $this AdjustSetting -zdirection] \
     1621            -variable [itcl::scope _settings(-zdirection)]
     1622    }
     1623    set _settings(-zdirection) -1
     1624    Rappture::Tooltip::for $itk_component(zDirButton) \
     1625        "Toggle the direction of the Z-axis cutaway"
     1626
     1627    blt::table $inner \
     1628        0,0 $itk_component(xCutButton)  -anchor e -padx 2 -pady 2 \
     1629        1,0 $itk_component(xCutScale)   -fill y \
     1630        0,1 $itk_component(yCutButton)  -anchor e -padx 2 -pady 2 \
     1631        1,1 $itk_component(yCutScale)   -fill y \
     1632        0,2 $itk_component(zCutButton)  -anchor e -padx 2 -pady 2 \
     1633        1,2 $itk_component(zCutScale)   -fill y \
     1634
     1635    blt::table configure $inner r* c* -resize none
     1636    blt::table configure $inner r1 c3 -resize expand
    14651637}
    14661638
     
    16251797}
    16261798
     1799# ----------------------------------------------------------------------
     1800# USAGE: Slice move x|y|z <newval>
     1801#
     1802# Called automatically when the user drags the slider to move the
     1803# cut plane that slices 3D data.  Gets the current value from the
     1804# slider and moves the cut plane to the appropriate point in the
     1805# data set.
     1806# ----------------------------------------------------------------------
     1807itcl::body Rappture::VtkMeshViewer::Slice {option args} {
     1808    switch -- $option {
     1809        "move" {
     1810            set axis [lindex $args 0]
     1811            set newval [lindex $args 1]
     1812            if {[llength $args] != 2} {
     1813                error "wrong # args: should be \"Slice move x|y|z newval\""
     1814            }
     1815            set newpos [expr {0.01*$newval}]
     1816            SendCmd "renderer clipplane $axis $newpos -1"
     1817        }
     1818        "tooltip" {
     1819            set axis [lindex $args 0]
     1820            set val [$itk_component(${axis}CutScale) get]
     1821            return "Move the [string toupper $axis] cut plane.\nCurrently:  $axis = $val%"
     1822        }
     1823        default {
     1824            error "bad option \"$option\": should be axis, move, or tooltip"
     1825        }
     1826    }
     1827}
     1828
    16271829itcl::body Rappture::VtkMeshViewer::SetOrientation { side } {
    16281830    array set positions {
     
    16451847    set _view(zoom) 1.0
    16461848}
     1849
  • branches/uq/gui/scripts/vtkstreamlinesviewer.tcl

    r4797 r4798  
    17831783
    17841784    checkbutton $inner.visible \
    1785         -text "Axes" \
     1785        -text "Show Axes" \
    17861786        -variable [itcl::scope _settings(axesVisible)] \
    17871787        -command [itcl::code $this AdjustSetting axesVisible] \
     
    17891789
    17901790    checkbutton $inner.labels \
    1791         -text "Axis Labels" \
     1791        -text "Show Axis Labels" \
    17921792        -variable [itcl::scope _settings(axisLabelsVisible)] \
    17931793        -command [itcl::code $this AdjustSetting axisLabelsVisible] \
    17941794        -font "Arial 9"
    1795     label $inner.grid_l -text "Grid" -font "Arial 9"
     1795
    17961796    checkbutton $inner.xgrid \
    1797         -text "X" \
     1797        -text "Show X Grid" \
    17981798        -variable [itcl::scope _settings(axisXGrid)] \
    17991799        -command [itcl::code $this AdjustSetting axisXGrid] \
    18001800        -font "Arial 9"
    18011801    checkbutton $inner.ygrid \
    1802         -text "Y" \
     1802        -text "Show Y Grid" \
    18031803        -variable [itcl::scope _settings(axisYGrid)] \
    18041804        -command [itcl::code $this AdjustSetting axisYGrid] \
    18051805        -font "Arial 9"
    18061806    checkbutton $inner.zgrid \
    1807         -text "Z" \
     1807        -text "Show Z Grid" \
    18081808        -variable [itcl::scope _settings(axisZGrid)] \
    18091809        -command [itcl::code $this AdjustSetting axisZGrid] \
  • branches/uq/gui/scripts/vtksurfaceviewer.tcl

    r4797 r4798  
    5757    public method get {args}
    5858    public method isconnected {}
     59    public method limits { colormap }
    5960    public method parameters {title args} {
    6061        # do nothing
     
    201202
    202203    array set _settings {
    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
     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
    223223    }
    224224    array set _changed {
     
    909909        set _first ""
    910910        InitSettings -xaxisgrid -yaxisgrid -zaxisgrid -axismode \
    911             -axesvisible -axislabels -axisminorticks
    912         #SendCmd "axis lformat all %g"
     911            -axesvisible -axislabelsvisible
     912        foreach axis { x y z } {
     913            SendCmd "axis lformat $axis %g"
     914        }
    913915        StopBufferingCommands
    914916        SendCmd "imgflush"
     
    15011503}
    15021504
     1505itcl::body Rappture::VtkSurfaceViewer::limits { dataobj } {
     1506    foreach { limits(xmin) limits(xmax) } [$dataobj limits x] break
     1507    foreach { limits(ymin) limits(ymax) } [$dataobj limits y] break
     1508    foreach { limits(zmin) limits(zmax) } [$dataobj limits z] break
     1509    foreach { limits(vmin) limits(vmax) } [$dataobj limits v] break
     1510    return [array get limits]
     1511}
     1512
    15031513itcl::body Rappture::VtkSurfaceViewer::BuildSurfaceTab {} {
    15041514
     
    16651675
    16661676    checkbutton $inner.visible \
    1667         -text "Axes" \
     1677        -text "Show Axes" \
    16681678        -variable [itcl::scope _settings(-axesvisible)] \
    16691679        -command [itcl::code $this AdjustSetting -axesvisible] \
     
    16711681
    16721682    checkbutton $inner.labels \
    1673         -text "Axis Labels" \
    1674         -variable [itcl::scope _settings(-axislabels)] \
    1675         -command [itcl::code $this AdjustSetting -axislabels] \
     1683        -text "Show Axis Labels" \
     1684        -variable [itcl::scope _settings(-axislabelsvisible)] \
     1685        -command [itcl::code $this AdjustSetting -axislabelsvisible] \
    16761686        -font "Arial 9"
    1677     label $inner.grid_l -text "Grid" -font "Arial 9"
    1678     checkbutton $inner.xgrid \
    1679         -text "X" \
     1687
     1688    checkbutton $inner.gridx \
     1689        -text "Show X Grid" \
    16801690        -variable [itcl::scope _settings(-xaxisgrid)] \
    16811691        -command [itcl::code $this AdjustSetting -xaxisgrid] \
    16821692        -font "Arial 9"
    1683     checkbutton $inner.ygrid \
    1684         -text "Y" \
     1693    checkbutton $inner.gridy \
     1694        -text "Show Y Grid" \
    16851695        -variable [itcl::scope _settings(-yaxisgrid)] \
    16861696        -command [itcl::code $this AdjustSetting -yaxisgrid] \
    16871697        -font "Arial 9"
    1688     checkbutton $inner.zgrid \
    1689         -text "Z" \
     1698    checkbutton $inner.gridz \
     1699        -text "Show Z Grid" \
    16901700        -variable [itcl::scope _settings(-zaxisgrid)] \
    16911701        -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] \
    16971702        -font "Arial 9"
    16981703
     
    17111716
    17121717    blt::table $inner \
    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
     1718        0,0 $inner.visible -anchor w -cspan 2 \
     1719        1,0 $inner.labels  -anchor w -cspan 2 \
     1720        2,0 $inner.gridx   -anchor w -cspan 2 \
     1721        3,0 $inner.gridy   -anchor w -cspan 2 \
     1722        4,0 $inner.gridz   -anchor w -cspan 2 \
     1723        5,0 $inner.mode_l  -anchor w -cspan 2 -padx { 2 0 } \
     1724        6,0 $inner.mode    -fill x   -cspan 2
    17221725
    17231726    blt::table configure $inner r* c* -resize none
    1724     blt::table configure $inner r7 c6 -resize expand
    1725     blt::table configure $inner r3 -height 0.125i
    1726 }
     1727    blt::table configure $inner r7 c1 -resize expand
     1728}
     1729
    17271730
    17281731itcl::body Rappture::VtkSurfaceViewer::BuildCameraTab {} {
  • branches/uq/gui/scripts/vtkviewer.tcl

    r4797 r4798  
    16671667                set type [$dataobj type $comp]
    16681668                if { $type == "molecule" } {
    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
     1669                    SendCmd [subst {molecule rscale $_settings(molecule-rscale) $dataset
     1670molecule ascale $_settings(molecule-atomscale) $dataset
     1671molecule bscale $_settings(molecule-bondscale) $dataset
     1672molecule bstyle $_settings(molecule-bondstyle) $dataset
     1673molecule atoms $_settings(molecule-atoms-visible) $dataset
     1674molecule bonds $_settings(molecule-bonds-visible) $dataset}]
    16771675                }
    16781676            }
     
    21372135
    21382136    checkbutton $inner.visible \
    2139         -text "Axes" \
     2137        -text "Show Axes" \
    21402138        -variable [itcl::scope _axis(visible)] \
    21412139        -command [itcl::code $this AdjustSetting axis-visible] \
     
    21432141
    21442142    checkbutton $inner.labels \
    2145         -text "Axis Labels" \
     2143        -text "Show Axis Labels" \
    21462144        -variable [itcl::scope _axis(labels)] \
    21472145        -command [itcl::code $this AdjustSetting axis-labels] \
    21482146        -font "Arial 9"
    2149     label $inner.grid_l -text "Grid" -font "Arial 9"
    2150     checkbutton $inner.xgrid \
    2151         -text "X" \
     2147
     2148    checkbutton $inner.gridx \
     2149        -text "Show X Grid" \
    21522150        -variable [itcl::scope _axis(xgrid)] \
    21532151        -command [itcl::code $this AdjustSetting axis-xgrid] \
    21542152        -font "Arial 9"
    2155     checkbutton $inner.ygrid \
    2156         -text "Y" \
     2153    checkbutton $inner.gridy \
     2154        -text "Show Y Grid" \
    21572155        -variable [itcl::scope _axis(ygrid)] \
    21582156        -command [itcl::code $this AdjustSetting axis-ygrid] \
    21592157        -font "Arial 9"
    2160     checkbutton $inner.zgrid \
    2161         -text "Z" \
     2158    checkbutton $inner.gridz \
     2159        -text "Show Z Grid" \
    21622160        -variable [itcl::scope _axis(zgrid)] \
    21632161        -command [itcl::code $this AdjustSetting axis-zgrid] \
  • branches/uq/gui/src/RpPdbToVtk.c

    r4797 r4798  
    191191    for (i = 0, hPtr = Tcl_FirstHashEntry(atomTablePtr, &iter); hPtr != NULL;
    192192         hPtr = Tcl_NextHashEntry(&iter), i++) {
    193         PdbAtom *atomPtr = Tcl_GetHashValue(hPtr);
     193        PdbAtom *atomPtr;
     194
     195        atomPtr = Tcl_GetHashValue(hPtr);
    194196        array[i] = atomPtr;
    195197    }
     
    689691        Tcl_AppendToObj(objPtr, mesg, -1);
    690692    }
    691 #if 0
    692     for (hPtr = Tcl_FirstHashEntry(&atomTable, &iter); hPtr != NULL;
    693          hPtr = Tcl_NextHashEntry(&iter)) {
    694         PdbAtom *atomPtr = Tcl_GetHashValue(hPtr);
    695         fprintf(stderr, "%d %s %d connections\n", atomPtr->ordinal,
    696                 elements[atomPtr->number].symbol, atomPtr->numConnections);
    697     }
    698 #endif
    699693    sprintf(mesg, "POINT_DATA %d\n", atomTable.numEntries);
    700694    Tcl_AppendToObj(objPtr, mesg, -1);
  • branches/uq/lang/tcl/pkgIndex.tcl.in

    r4797 r4798  
    66        variable version $version
    77        variable build "@SVN_VERSION@"
    8         variable svnurl "@SVN_URL@"
    98        variable installdir [file normalize $dir]
    109    }
  • branches/uq/src/core/RpEncode.cc

    r3362 r4798  
    210210    for (p = (unsigned const char *)buf, pend = p + size; p < pend; p++) {
    211211        if (!_base64chars[*p]) {
    212             fprintf(stderr, "%c %u is not base64\n", *p, *p);
     212            fprintf(stderr, "\"%c\" (0x%x) is not base64\n", *p, *p);
    213213            return false;
    214214        }
Note: See TracChangeset for help on using the changeset viewer.