Changeset 5134
- Timestamp:
- Mar 14, 2015, 1:50:46 AM (10 years ago)
- Location:
- trunk/gui/scripts
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/flowvisviewer.tcl
r5100 r5134 91 91 private method EventuallyGoto { nSteps } 92 92 private method EventuallyResizeLegend { } 93 private method FlowCmd { dataobj comp nbytes extents }94 93 private method GetDatasetsWithComponent { cname } 95 94 private method GetFlowInfo { widget } … … 112 111 private method ResizeLegend {} 113 112 private method Rotate {option x y} 113 private method SendFlowCmd { dataobj comp nbytes extents } 114 114 private method SendTransferFuncs {} 115 115 private method SetOrientation { side } … … 1174 1174 SendCmd "volume data follows $nbytes $tag" 1175 1175 } else { 1176 set cmd [FlowCmd $dataobj $comp $nbytes $extents] 1177 if { $cmd == "" } { 1178 puts stderr "no command" 1179 continue 1176 if {[SendFlowCmd $dataobj $comp $nbytes $extents] < 0} { 1177 continue 1180 1178 } 1181 append _outbuf $cmd 1182 } 1183 append _outbuf $data 1179 } 1180 SendData $data 1184 1181 NameTransferFunc $dataobj $comp 1185 1182 set _recvObjs($tag) 1 … … 2614 2611 } 2615 2612 2616 itcl::body Rappture::FlowvisViewer:: FlowCmd { dataobj comp nbytes extents } {2613 itcl::body Rappture::FlowvisViewer::SendFlowCmd { dataobj comp nbytes extents } { 2617 2614 set tag "$dataobj-$comp" 2618 2615 if { ![info exists _obj2flow($tag)] } { 2619 append cmd "flow add $tag\n"2620 append cmd "$tag data follows $nbytes $extents\n"2621 return $cmd2616 SendCmd "flow add $tag" 2617 SendCmd "$tag data follows $nbytes $extents" 2618 return 0 2622 2619 } 2623 2620 set flowobj $_obj2flow($tag) 2624 2621 if { $flowobj == "" } { 2625 2622 puts stderr "no flowobj" 2626 return "" 2627 } 2628 set cmd {} 2629 append cmd "if {\[flow exists $tag\]} {flow delete $tag}\n" 2623 return -1 2624 } 2625 SendCmd "if {\[flow exists $tag\]} {flow delete $tag}" 2630 2626 array set info [$flowobj hints] 2631 2627 set _settings($this-volume) $info(volume) … … 2634 2630 set _settings($this-duration) $info(duration) 2635 2631 $itk_component(speed) value $info(speed) 2632 set cmd {} 2636 2633 append cmd "flow add $tag" 2637 2634 append cmd " -position $info(position)" … … 2640 2637 append cmd " -outline $info(outline)" 2641 2638 append cmd " -slice $info(streams)" 2642 append cmd " -arrows $info(arrows)\n" 2639 append cmd " -arrows $info(arrows)" 2640 SendCmd $cmd 2643 2641 foreach part [$flowobj particles] { 2642 set cmd {} 2644 2643 array unset info 2645 2644 array set info $part … … 2650 2649 append cmd " -axis $info(axis)" 2651 2650 append cmd " -color {$color}" 2652 append cmd " -size $info(size)\n" 2651 append cmd " -size $info(size)" 2652 SendCmd $cmd 2653 2653 } 2654 2654 foreach box [$flowobj boxes] { 2655 set cmd {} 2655 2656 array unset info 2656 2657 set info(corner1) "" … … 2666 2667 append cmd " -linewidth $info(linewidth) " 2667 2668 append cmd " -corner1 {$info(corner1)} " 2668 append cmd " -corner2 {$info(corner2)}\n" 2669 } 2670 append cmd "$tag data follows $nbytes $extents\n" 2671 return $cmd 2669 append cmd " -corner2 {$info(corner2)}" 2670 SendCmd $cmd 2671 } 2672 SendCmd "$tag data follows $nbytes $extents" 2673 return 0 2672 2674 } 2673 2675 -
trunk/gui/scripts/mapviewer.tcl
r5120 r5134 1164 1164 set length [string length $bytes] 1165 1165 SendCmd "map load data follows $length" 1166 append _outbuf$bytes1166 SendData $bytes 1167 1167 } else { 1168 1168 if { [info exists _mapsettings(style)] } { -
trunk/gui/scripts/molvisviewer.tcl
r5015 r5134 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 -
trunk/gui/scripts/nanovisviewer.tcl
r5098 r5134 950 950 } 951 951 SendCmd "volume data follows $nbytes $tag" 952 append _outbuf$data952 SendData $data 953 953 set _recvdDatasets($tag) 1 954 954 set _serverDatasets($tag) 0 -
trunk/gui/scripts/visviewer.tcl
r5132 r5134 30 30 private common _done ; # Used to indicate status of send. 31 31 private variable _buffer ; # buffer for incoming/outgoing commands 32 private variable _outbuf ; # buffer for outgoing commands 32 33 private variable _blockOnWrite 0; # Should writes to socket block? 33 34 private variable _initialized … … 47 48 protected variable _sid "" ; # socket connection to server 48 49 protected variable _maxConnects 100 49 protected variable _outbuf ; # buffer for outgoing commands50 50 protected variable _buffering 0 51 51 protected variable _cmdSeq 0 ; # Command sequence number -
trunk/gui/scripts/vtkglyphviewer.tcl
r5094 r5134 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 -
trunk/gui/scripts/vtkheightmapviewer.tcl
r5092 r5134 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 -
trunk/gui/scripts/vtkimageviewer.tcl
r5094 r5134 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 -
trunk/gui/scripts/vtkisosurfaceviewer.tcl
r5094 r5134 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 -
trunk/gui/scripts/vtkmeshviewer.tcl
r5094 r5134 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 -
trunk/gui/scripts/vtkstreamlinesviewer.tcl
r5092 r5134 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 } -
trunk/gui/scripts/vtksurfaceviewer.tcl
r5094 r5134 784 784 $_dispatcher cancel !legend 785 785 # disconnected -- no more data sitting on server 786 set _outbuf ""787 786 array unset _datasets 788 787 array unset _data … … 947 946 } 948 947 SendCmd "dataset add $tag data follows $length" 949 append _outbuf$bytes948 SendData $bytes 950 949 set _datasets($tag) 1 951 950 SetObjectStyle $dataobj $comp -
trunk/gui/scripts/vtkviewer.tcl
r5094 r5134 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 -
trunk/gui/scripts/vtkvolumeviewer.tcl
r5092 r5134 884 884 $_dispatcher cancel !legend 885 885 # disconnected -- no more data sitting on server 886 set _outbuf ""887 886 array unset _datasets 888 887 array unset _data … … 1065 1064 } 1066 1065 SendCmd "dataset add $tag data follows $length" 1067 append _outbuf$bytes1066 SendData $bytes 1068 1067 set _datasets($tag) 1 1069 1068 SetObjectStyle $dataobj $comp
Note: See TracChangeset
for help on using the changeset viewer.