Changeset 5217 for branches/1.3
- Timestamp:
- Apr 14, 2015, 2:14:51 PM (9 years ago)
- Location:
- branches/1.3
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.3
-
branches/1.3/gui/scripts/flowvisviewer.tcl
r5214 r5217 108 108 private method EventuallyGoto { nSteps } 109 109 private method EventuallyResizeLegend { } 110 private method FlowCmd { dataobj comp nbytes extents }111 110 private method GetMovie { widget width height } 112 111 private method GetPngImage { widget width height } … … 115 114 private method ParseLevelsOption { tf levels } 116 115 private method ParseMarkersOption { tf markers } 116 private method SendFlowCmd { dataobj comp nbytes extents } 117 117 private method WaitIcon { option widget } 118 118 private method str2millisecs { value } … … 670 670 # ---------------------------------------------------------------------- 671 671 itcl::body Rappture::FlowvisViewer::delete {args} { 672 672 flow stop 673 673 if {[llength $args] == 0} { 674 674 set args $_dlist … … 1225 1225 # I have a field. Is a vector field or a volume field? 1226 1226 if { $extents == 1 } { 1227 set cmd "volume data follows $nbytes $tag\n"1227 SendCmd "volume data follows $nbytes $tag" 1228 1228 } else { 1229 set cmd [FlowCmd $dataobj $comp $nbytes $extents] 1230 if { $cmd == "" } { 1231 puts stderr "no command" 1229 if {[SendFlowCmd $dataobj $comp $nbytes $extents] < 0} { 1232 1230 continue 1233 1231 } 1234 1232 } 1235 append _outbuf $cmd 1236 append _outbuf $data 1233 SendData $data 1237 1234 NameTransferFunc $dataobj $comp 1238 1235 set _recvObjs($tag) 1 … … 2633 2630 } 2634 2631 2635 itcl::body Rappture::FlowvisViewer:: FlowCmd { dataobj comp nbytes extents } {2632 itcl::body Rappture::FlowvisViewer::SendFlowCmd { dataobj comp nbytes extents } { 2636 2633 set tag "$dataobj-$comp" 2637 2634 if { ![info exists _obj2flow($tag)] } { 2638 append cmd "flow add $tag\n"2639 append cmd "$tag data follows $nbytes $extents\n"2640 return $cmd2635 SendCmd "flow add $tag" 2636 SendCmd "$tag data follows $nbytes $extents" 2637 return 0 2641 2638 } 2642 2639 set flowobj $_obj2flow($tag) 2643 2640 if { $flowobj == "" } { 2644 2641 puts stderr "no flowobj" 2645 return "" 2646 } 2647 set cmd {} 2648 append cmd "if {\[flow exists $tag\]} {flow delete $tag}\n" 2642 return -1 2643 } 2644 SendCmd "if {\[flow exists $tag\]} {flow delete $tag}" 2649 2645 array set info [$flowobj hints] 2650 2646 set _settings($this-volume) $info(volume) … … 2653 2649 set _settings($this-duration) $info(duration) 2654 2650 $itk_component(speed) value $info(speed) 2651 set cmd {} 2655 2652 append cmd "flow add $tag" 2656 2653 append cmd " -position $info(position)" … … 2659 2656 append cmd " -outline $info(outline)" 2660 2657 append cmd " -slice $info(streams)" 2661 append cmd " -arrows $info(arrows)\n" 2658 append cmd " -arrows $info(arrows)" 2659 SendCmd $cmd 2662 2660 foreach part [$flowobj particles] { 2661 set cmd {} 2663 2662 array unset info 2664 2663 array set info $part … … 2669 2668 append cmd " -axis $info(axis)" 2670 2669 append cmd " -color {$color}" 2671 append cmd " -size $info(size)\n" 2670 append cmd " -size $info(size)" 2671 SendCmd $cmd 2672 2672 } 2673 2673 foreach box [$flowobj boxes] { 2674 set cmd {} 2674 2675 array unset info 2675 2676 set info(corner1) "" … … 2685 2686 append cmd " -linewidth $info(linewidth) " 2686 2687 append cmd " -corner1 {$info(corner1)} " 2687 append cmd " -corner2 {$info(corner2)}\n" 2688 } 2689 append cmd "$tag data follows $nbytes $extents\n" 2690 return $cmd 2688 append cmd " -corner2 {$info(corner2)}" 2689 SendCmd $cmd 2690 } 2691 SendCmd "$tag data follows $nbytes $extents" 2692 return 0 2691 2693 } 2692 2694 -
branches/1.3/gui/scripts/molvisviewer.tcl
r5038 r5217 966 966 # with the data payload immediately afterwards. 967 967 ServerCmd "loadpdb -defer follows $model $state $numBytes" 968 append _outbuf$data1968 SendData $data1 969 969 set _dataobjs($model-$state) 1 970 970 } … … 979 979 # with the data payload immediately afterwards. 980 980 ServerCmd "loadpdb -defer follows $model $state $numBytes" 981 append _outbuf$data2981 SendData $data2 982 982 set _dataobjs($model-$state) 1 983 983 } … … 1028 1028 # command with the data payload immediately afterwards. 1029 1029 ServerCmd "loadpdb -defer follows $model $state $numBytes" 1030 append _outbuf$data31030 SendData $data3 1031 1031 } 1032 1032 set _dataobjs($model-$state) 1 -
branches/1.3/gui/scripts/nanovisviewer.tcl
r5214 r5217 920 920 } 921 921 SendCmd "volume data follows $nbytes $tag" 922 append _outbuf$data922 SendData $data 923 923 set _recvdDatasets($tag) 1 924 924 set _serverDatasets($tag) 0 -
branches/1.3/gui/scripts/visviewer.tcl
r5177 r5217 29 29 private common _done ; # Used to indicate status of send. 30 30 private variable _buffer ; # buffer for incoming/outgoing commands 31 private variable _outbuf ; # buffer for outgoing commands 31 32 private variable _blockOnWrite 0; # Should writes to socket block? 32 33 private variable _initialized … … 46 47 protected variable _sid "" ; # socket connection to server 47 48 protected variable _maxConnects 100 48 protected variable _outbuf ; # buffer for outgoing commands49 49 protected variable _buffering 0 50 50 protected variable _cmdSeq 0 ; # Command sequence number -
branches/1.3/gui/scripts/vtkglyphviewer.tcl
r5177 r5217 837 837 $_dispatcher cancel !legend 838 838 # disconnected -- no more data sitting on server 839 set _outbuf ""840 839 array unset _datasets 841 840 array unset _data … … 1000 999 } 1001 1000 SendCmd "dataset add $tag data follows $length" 1002 append _outbuf$bytes1001 SendData $bytes 1003 1002 set _datasets($tag) 1 1004 1003 SetObjectStyle $dataobj $comp -
branches/1.3/gui/scripts/vtkheightmapviewer.tcl
r5177 r5217 1002 1002 } 1003 1003 SendCmd "dataset add $tag data follows $length" 1004 append _outbuf$bytes1004 SendData $bytes 1005 1005 set _datasets($tag) 1 1006 1006 SetObjectStyle $dataobj $comp -
branches/1.3/gui/scripts/vtkimageviewer.tcl
r5177 r5217 980 980 } 981 981 SendCmd "dataset add $tag data follows $length" 982 append _outbuf$bytes982 SendData $bytes 983 983 set _datasets($tag) 1 984 984 SetObjectStyle $dataobj $comp -
branches/1.3/gui/scripts/vtkisosurfaceviewer.tcl
r5181 r5217 949 949 $_dispatcher cancel !legend 950 950 # disconnected -- no more data sitting on server 951 set _outbuf ""952 951 array unset _datasets 953 952 array unset _data … … 1112 1111 } 1113 1112 SendCmd "dataset add $tag data follows $length" 1114 append _outbuf$bytes1113 SendData $bytes 1115 1114 set _datasets($tag) 1 1116 1115 SetObjectStyle $dataobj $comp -
branches/1.3/gui/scripts/vtkmeshviewer.tcl
r5110 r5217 867 867 } 868 868 SendCmd "dataset add $tag data follows $length" 869 append _outbuf$bytes869 SendData $bytes 870 870 set _datasets($tag) 1 871 871 SetObjectStyle $dataobj -
branches/1.3/gui/scripts/vtkstreamlinesviewer.tcl
r5110 r5217 1008 1008 } 1009 1009 SendCmd "dataset add $tag data follows $length" 1010 append _outbuf$bytes1010 SendData $bytes 1011 1011 set _datasets($tag) 1 1012 1012 SetObjectStyle $dataobj $comp … … 2165 2165 set length [string length $seeds] 2166 2166 SendCmd "streamlines seed fmesh 200 data follows $length $tag" 2167 append _outbuf$seeds2167 SendData $seeds 2168 2168 set _seeds($dataobj) 1 2169 2169 } -
branches/1.3/gui/scripts/vtksurfaceviewer.tcl
r5181 r5217 792 792 $_dispatcher cancel !legend 793 793 # disconnected -- no more data sitting on server 794 set _outbuf ""795 794 array unset _datasets 796 795 array unset _data … … 957 956 } 958 957 SendCmd "dataset add $tag data follows $length" 959 append _outbuf$bytes958 SendData $bytes 960 959 set _datasets($tag) 1 961 960 SetObjectStyle $dataobj $comp -
branches/1.3/gui/scripts/vtkviewer.tcl
r5177 r5217 926 926 927 927 # disconnected -- no more data sitting on server 928 set _outbuf ""929 928 array unset _datasets 930 929 array unset _data … … 1084 1083 } 1085 1084 SendCmd "dataset add $tag data follows $length" 1086 append _outbuf$bytes1085 SendData $bytes 1087 1086 set _datasets($tag) 1 1088 1087 SetObjectStyle $dataobj $comp -
branches/1.3/gui/scripts/vtkvolumeviewer.tcl
r5177 r5217 815 815 $_dispatcher cancel !legend 816 816 # disconnected -- no more data sitting on server 817 set _outbuf ""818 817 array unset _datasets 819 818 array unset _data … … 977 976 SendCmd [list "clientinfo" $info] 978 977 } 979 append _outbuf "dataset add $tag data follows $length\n"980 append _outbuf$bytes978 SendCmd "dataset add $tag data follows $length" 979 SendData $bytes 981 980 set _datasets($tag) 1 982 981 SetObjectStyle $dataobj $comp
Note: See TracChangeset
for help on using the changeset viewer.