Ignore:
Timestamp:
Jan 4, 2015 6:52:23 PM (9 years ago)
Author:
gah
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/r9/gui/scripts/vtkstreamlinesviewer.tcl

    r4344 r4919  
    11# -*- mode: tcl; indent-tabs-mode: nil -*-
    22# ----------------------------------------------------------------------
    3 #  COMPONENT: vtkviewer - Vtk drawing object viewer
     3#  COMPONENT: vtkstreamlinesviewer - Vtk streamlines object viewer
    44#
    55#  It connects to the Vtk server running on a rendering farm,
     
    226226        axesVisible             1
    227227        axisLabelsVisible       1
     228        axisMinorTicks          1
    228229        axisXGrid               0
    229230        axisYGrid               0
     
    453454    eval itk_initialize $args
    454455    Connect
    455     update
    456456}
    457457
     
    800800                set session $env(SESSION)
    801801            }
     802            lappend info "version" "$Rappture::version"
     803            lappend info "build" "$Rappture::build"
     804            lappend info "svnurl" "$Rappture::svnurl"
     805            lappend info "installdir" "$Rappture::installdir"
    802806            lappend info "hub" [exec hostname]
    803807            lappend info "client" "vtkstreamlinesviewer"
     
    967971        DoResize
    968972        InitSettings axisXGrid axisYGrid axisZGrid axis-mode \
    969             axesVisible axisLabelsVisible
     973            axesVisible axisLabelsVisible axisMinorTicks
    970974        # This "imgflush" is to force an image returned before vtkvis starts
    971975        # reading a (big) dataset.  This will display an empty plot with axes
     
    13241328    switch -- $what {
    13251329        "volumeOpacity" {
    1326             set val $_settings(volumeOpacity)
     1330            set val $_settings($what)
    13271331            set sval [expr { 0.01 * double($val) }]
    13281332            SendCmd "polydata opacity $sval"
    13291333        }
    13301334        "volumeWireframe" {
    1331             set bool $_settings(volumeWireframe)
     1335            set bool $_settings($what)
    13321336            SendCmd "polydata wireframe $bool"
    13331337        }
    13341338        "volumeVisible" {
    1335             set bool $_settings(volumeVisible)
     1339            set bool $_settings($what)
    13361340            SendCmd "polydata visible $bool"
    13371341            if { $bool } {
     
    13441348        }
    13451349        "volumeLighting" {
    1346             set bool $_settings(volumeLighting)
     1350            set bool $_settings($what)
    13471351            SendCmd "polydata lighting $bool"
    13481352        }
    13491353        "volumeEdges" {
    1350             set bool $_settings(volumeEdges)
     1354            set bool $_settings($what)
    13511355            SendCmd "polydata edges $bool"
    13521356        }
    13531357        "axesVisible" {
    1354             set bool $_settings(axesVisible)
     1358            set bool $_settings($what)
    13551359            SendCmd "axis visible all $bool"
    13561360        }
    13571361        "axisLabelsVisible" {
    1358             set bool $_settings(axisLabelsVisible)
     1362            set bool $_settings($what)
    13591363            SendCmd "axis labels all $bool"
     1364        }
     1365        "axisMinorTicks" {
     1366            set bool $_settings($what)
     1367            SendCmd "axis minticks all $bool"
    13601368        }
    13611369        "axisXGrid" - "axisYGrid" - "axisZGrid" {
     
    14531461        }
    14541462        "streamlinesOpacity" {
    1455             set val $_settings(streamlinesOpacity)
     1463            set val $_settings($what)
    14561464            set sval [expr { 0.01 * double($val) }]
    14571465            SendCmd "streamlines opacity $sval"
    14581466        }
    14591467        "streamlinesScale" {
    1460             set val $_settings(streamlinesScale)
     1468            set val $_settings($what)
    14611469            set sval [expr { 0.01 * double($val) }]
    14621470            SendCmd "streamlines scale $sval $sval $sval"
    14631471        }
    14641472        "streamlinesLighting" {
    1465             set bool $_settings(streamlinesLighting)
     1473            set bool $_settings($what)
    14661474            SendCmd "streamlines lighting $bool"
    14671475        }
     
    17711779    set inner [$itk_component(main) insert end \
    17721780        -title "Axis Settings" \
    1773         -icon [Rappture::icon axis1]]
     1781        -icon [Rappture::icon axis2]]
    17741782    $inner configure -borderwidth 4
    17751783
     
    18011809        -command [itcl::code $this AdjustSetting axisZGrid] \
    18021810        -font "Arial 9"
     1811    checkbutton $inner.minorticks \
     1812        -text "Minor Ticks" \
     1813        -variable [itcl::scope _settings(axisMinorTicks)] \
     1814        -command [itcl::code $this AdjustSetting axisMinorTicks] \
     1815        -font "Arial 9"
    18031816
    18041817    label $inner.mode_l -text "Mode" -font "Arial 9"
     
    18161829
    18171830    blt::table $inner \
    1818         0,0 $inner.visible -anchor w -cspan 2 \
    1819         1,0 $inner.labels  -anchor w -cspan 2 \
    1820         2,0 $inner.xgrid   -anchor w -cspan 2 \
    1821         3,0 $inner.ygrid   -anchor w -cspan 2 \
    1822         4,0 $inner.zgrid   -anchor w -cspan 2 \
    1823         5,0 $inner.mode_l  -anchor w -cspan 2 -padx { 2 0 } \
    1824         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
    18251840
    18261841    blt::table configure $inner r* c* -resize none
    1827     blt::table configure $inner r7 c1 -resize expand
    1828 }
    1829 
     1842    blt::table configure $inner r7 c6 -resize expand
     1843    blt::table configure $inner r3 -height 0.125i
     1844}
    18301845
    18311846itcl::body Rappture::VtkStreamlinesViewer::BuildCameraTab {} {
     
    21442159    }
    21452160    array set settings $style
     2161    StartBufferingCommands
    21462162    SendCmd "streamlines add $tag"
    21472163    SendCmd "streamlines seed visible off $tag"
     
    21502166        set length [string length $seeds]
    21512167        SendCmd "streamlines seed fmesh 200 data follows $length $tag"
    2152         SendCmd "$seeds"
     2168        append _outbuf $seeds
    21532169        set _seeds($dataobj) 1
    21542170    }
     
    21612177    set _settings(volumeWireframe) $settings(-wireframe)
    21622178    set _settings(volumeOpacity) [expr $settings(-opacity) * 100.0]
     2179    StopBufferingCommands
    21632180    SetColormap $dataobj $comp
    21642181}
Note: See TracChangeset for help on using the changeset viewer.