Changeset 2511


Ignore:
Timestamp:
Sep 13, 2011, 12:42:39 PM (13 years ago)
Author:
ldelgass
Message:

Add streamlines viewer test app, add spheres drawing type test to vtkviewer test
app.

Location:
trunk/gui/apps
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/apps/Makefile.in

    r2400 r2511  
    2626                $(srcdir)/nanovis-test \
    2727                $(srcdir)/vtkcontour-test \
     28                $(srcdir)/vtkstreamlines-test \
    2829                $(srcdir)/vtkviewer-test \
    2930                $(srcdir)/flowvis-test \
  • trunk/gui/apps/vtkviewer-test

    r2470 r2511  
    147147
    148148# ----------------------------------------------------------------------
     149# USAGE: send_spheres_file
     150#
     151# Prompts the user for a text file, and then sends the text within
     152# that file along to the rendering widget.
     153# ----------------------------------------------------------------------
     154proc send_spheres_file {} {
     155    global widgets
     156
     157    set file [tk_getOpenFile -title "Open VTK File as Spheres"]
     158    if {"" != $file && [catch {
     159            set fid [open $file r]
     160            fconfigure $fid -translation binary
     161            set info [read $fid]
     162            close $fid
     163          }] == 0} {
     164        set obj [visData #auto $info "spheres"]
     165        $widgets(vtkviewer) add $obj
     166    }
     167}
     168
     169# ----------------------------------------------------------------------
    149170# USAGE: load_script
    150171#
     
    343364.mbar.file add command -label "Send VTK File..." -underline 0 -command send_file
    344365.mbar.file add command -label "Send VTK File as Streamlines..." -underline 0 -command send_streamlines_file
     366.mbar.file add command -label "Send VTK File as Spheres..." -underline 0 -command send_spheres_file
    345367.mbar.file add command -label "Load script..." -underline 0 -command load_script
    346368.mbar.file add command -label "Reset" -underline 0 -command reset
Note: See TracChangeset for help on using the changeset viewer.