Changeset 2293 for trunk/gui


Ignore:
Timestamp:
Jul 1, 2011 1:57:40 PM (13 years ago)
Author:
ldelgass
Message:

vtkviewer2-test needs to use a Rappture::Scene data object (for now). Also
remove send flow file menu item from vtkcontour-test (leftover from nanovis
test)

Location:
trunk/gui/apps
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/apps/vtkcontour-test

    r2166 r2293  
    6868
    6969# ----------------------------------------------------------------------
    70 # Fake data object for sending DX or flow data...
     70# Fake data object for sending VTK data file...
    7171# ----------------------------------------------------------------------
    7272itcl::class visData {
    7373    constructor {args} {
    74         set _data [Rappture::encoding::encode -as zb64 [lindex $args 0]]
     74        set _data [lindex $args 0]
    7575    }
    7676
     
    8181        return ""
    8282    }
     83    public method data {args} {
     84        return $_data
     85    }
    8386    public method values {args} {
    8487        return $_data
     
    100103    global widgets
    101104
    102     set file [tk_getOpenFile -title "Open Command File"]
     105    set file [tk_getOpenFile -title "Open VTK File"]
    103106    if {"" != $file && [catch {
    104107            set fid [open $file r]
     
    109112        set obj [visData #auto $info]
    110113        $widgets(vtkcontourviewer) add $obj
    111     }
    112 }
    113 
    114 # ----------------------------------------------------------------------
    115 # USAGE: send_flow_file
    116 #
    117 # Prompts the user for a text file, and then sends the text within
    118 # that file along to the rendering widget.
    119 # ----------------------------------------------------------------------
    120 proc send_flow_file {} {
    121     global widgets
    122 
    123     set file [tk_getOpenFile -title "Open Command File"]
    124     if {"" != $file && [catch {
    125             set fid [open $file r]
    126             fconfigure $fid -translation binary
    127             set info [read $fid]
    128             close $fid
    129           }] == 0} {
    130         set _data [Rappture::encoding::encode -as zb64 $info ]
    131         set _data "flow data follows [string length $_data]\n$_data"
    132         $widgets(command) insert 0 $_data
    133         send_command
    134114    }
    135115}
     
    330310menu .mbar
    331311menu .mbar.file
    332 .mbar.file add command -label "Send Volume File..." -underline 0 -command send_file
    333 .mbar.file add command -label "Send Flow File..." -underline 0 -command send_flow_file
     312.mbar.file add command -label "Send VTK File..." -underline 0 -command send_file
    334313.mbar.file add command -label "Load script..." -underline 0 -command load_script
    335314.mbar.file add command -label "Reset" -underline 0 -command reset
  • trunk/gui/apps/vtkviewer2-test

    r2248 r2293  
    7171# ----------------------------------------------------------------------
    7272itcl::class visData {
    73     inherit Rappture::Drawing3d
     73    inherit Rappture::Scene
    7474
    7575    constructor {args} {
    76         Rappture::Drawing3d::constructor [Rappture::library standard] ""
     76        Rappture::Scene::constructor [Rappture::library standard] ""
    7777    } {
    7878        set _data [lindex $args 0]
Note: See TracChangeset for help on using the changeset viewer.