- Timestamp:
- Jul 1, 2011 1:57:40 PM (13 years ago)
- Location:
- trunk/gui/apps
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/apps/vtkcontour-test
r2166 r2293 68 68 69 69 # ---------------------------------------------------------------------- 70 # Fake data object for sending DX or flow data...70 # Fake data object for sending VTK data file... 71 71 # ---------------------------------------------------------------------- 72 72 itcl::class visData { 73 73 constructor {args} { 74 set _data [ Rappture::encoding::encode -as zb64 [lindex $args 0]]74 set _data [lindex $args 0] 75 75 } 76 76 … … 81 81 return "" 82 82 } 83 public method data {args} { 84 return $_data 85 } 83 86 public method values {args} { 84 87 return $_data … … 100 103 global widgets 101 104 102 set file [tk_getOpenFile -title "Open CommandFile"]105 set file [tk_getOpenFile -title "Open VTK File"] 103 106 if {"" != $file && [catch { 104 107 set fid [open $file r] … … 109 112 set obj [visData #auto $info] 110 113 $widgets(vtkcontourviewer) add $obj 111 }112 }113 114 # ----------------------------------------------------------------------115 # USAGE: send_flow_file116 #117 # Prompts the user for a text file, and then sends the text within118 # that file along to the rendering widget.119 # ----------------------------------------------------------------------120 proc send_flow_file {} {121 global widgets122 123 set file [tk_getOpenFile -title "Open Command File"]124 if {"" != $file && [catch {125 set fid [open $file r]126 fconfigure $fid -translation binary127 set info [read $fid]128 close $fid129 }] == 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 $_data133 send_command134 114 } 135 115 } … … 330 310 menu .mbar 331 311 menu .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 334 313 .mbar.file add command -label "Load script..." -underline 0 -command load_script 335 314 .mbar.file add command -label "Reset" -underline 0 -command reset -
trunk/gui/apps/vtkviewer2-test
r2248 r2293 71 71 # ---------------------------------------------------------------------- 72 72 itcl::class visData { 73 inherit Rappture:: Drawing3d73 inherit Rappture::Scene 74 74 75 75 constructor {args} { 76 Rappture:: Drawing3d::constructor [Rappture::library standard] ""76 Rappture::Scene::constructor [Rappture::library standard] "" 77 77 } { 78 78 set _data [lindex $args 0]
Note: See TracChangeset
for help on using the changeset viewer.