Changeset 5217 for branches/1.3


Ignore:
Timestamp:
Apr 14, 2015, 2:14:51 PM (9 years ago)
Author:
ldelgass
Message:

merge r5134 from trunk

Location:
branches/1.3
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • branches/1.3

    • Property svn:mergeinfo changed
      /trunkmerged: 5134
  • branches/1.3/gui/scripts/flowvisviewer.tcl

    r5214 r5217  
    108108    private method EventuallyGoto { nSteps }
    109109    private method EventuallyResizeLegend { }
    110     private method FlowCmd { dataobj comp nbytes extents }
    111110    private method GetMovie { widget width height }
    112111    private method GetPngImage { widget width height }
     
    115114    private method ParseLevelsOption { tf levels }
    116115    private method ParseMarkersOption { tf markers }
     116    private method SendFlowCmd { dataobj comp nbytes extents }
    117117    private method WaitIcon { option widget }
    118118    private method str2millisecs { value }
     
    670670# ----------------------------------------------------------------------
    671671itcl::body Rappture::FlowvisViewer::delete {args} {
    672      flow stop
     672    flow stop
    673673    if {[llength $args] == 0} {
    674674        set args $_dlist
     
    12251225            # I have a field. Is a vector field or a volume field?
    12261226            if { $extents == 1 } {
    1227                 set cmd "volume data follows $nbytes $tag\n"
     1227                SendCmd "volume data follows $nbytes $tag"
    12281228            } 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} {
    12321230                    continue
    12331231                }
    12341232            }
    1235             append _outbuf $cmd
    1236             append _outbuf $data
     1233            SendData $data
    12371234            NameTransferFunc $dataobj $comp
    12381235            set _recvObjs($tag) 1
     
    26332630}
    26342631
    2635 itcl::body Rappture::FlowvisViewer::FlowCmd { dataobj comp nbytes extents } {
     2632itcl::body Rappture::FlowvisViewer::SendFlowCmd { dataobj comp nbytes extents } {
    26362633    set tag "$dataobj-$comp"
    26372634    if { ![info exists _obj2flow($tag)] } {
    2638         append cmd "flow add $tag\n"
    2639         append cmd "$tag data follows $nbytes $extents\n"
    2640         return $cmd
     2635        SendCmd "flow add $tag"
     2636        SendCmd "$tag data follows $nbytes $extents"
     2637        return 0
    26412638    }
    26422639    set flowobj $_obj2flow($tag)
    26432640    if { $flowobj == "" } {
    26442641        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}"
    26492645    array set info  [$flowobj hints]
    26502646    set _settings($this-volume) $info(volume)
     
    26532649    set _settings($this-duration) $info(duration)
    26542650    $itk_component(speed) value $info(speed)
     2651    set cmd {}
    26552652    append cmd "flow add $tag"
    26562653    append cmd " -position $info(position)"
     
    26592656    append cmd " -outline $info(outline)"
    26602657    append cmd " -slice $info(streams)"
    2661     append cmd " -arrows $info(arrows)\n"
     2658    append cmd " -arrows $info(arrows)"
     2659    SendCmd $cmd
    26622660    foreach part [$flowobj particles] {
     2661        set cmd {}
    26632662        array unset info
    26642663        array set info $part
     
    26692668        append cmd " -axis $info(axis)"
    26702669        append cmd " -color {$color}"
    2671         append cmd " -size $info(size)\n"
     2670        append cmd " -size $info(size)"
     2671        SendCmd $cmd
    26722672    }
    26732673    foreach box [$flowobj boxes] {
     2674        set cmd {}
    26742675        array unset info
    26752676        set info(corner1) ""
     
    26852686        append cmd " -linewidth $info(linewidth) "
    26862687        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
    26912693}
    26922694
  • branches/1.3/gui/scripts/molvisviewer.tcl

    r5038 r5217  
    966966                # with the data payload immediately afterwards.
    967967                ServerCmd "loadpdb -defer follows $model $state $numBytes"
    968                 append _outbuf $data1
     968                SendData $data1
    969969                set _dataobjs($model-$state)  1
    970970            }
     
    979979                # with the data payload immediately afterwards.
    980980                ServerCmd "loadpdb -defer follows $model $state $numBytes"
    981                 append _outbuf $data2
     981                SendData $data2
    982982                set _dataobjs($model-$state)  1
    983983            }
     
    10281028                    # command with the data payload immediately afterwards.
    10291029                    ServerCmd "loadpdb -defer follows $model $state $numBytes"
    1030                     append _outbuf $data3
     1030                    SendData $data3
    10311031                }
    10321032                set _dataobjs($model-$state) 1
  • branches/1.3/gui/scripts/nanovisviewer.tcl

    r5214 r5217  
    920920                }
    921921                SendCmd "volume data follows $nbytes $tag"
    922                 append _outbuf $data
     922                SendData $data
    923923                set _recvdDatasets($tag) 1
    924924                set _serverDatasets($tag) 0
  • branches/1.3/gui/scripts/visviewer.tcl

    r5177 r5217  
    2929    private common _done            ;   # Used to indicate status of send.
    3030    private variable _buffer        ;   # buffer for incoming/outgoing commands
     31    private variable _outbuf       ;    # buffer for outgoing commands
    3132    private variable _blockOnWrite 0;   # Should writes to socket block?
    3233    private variable _initialized
     
    4647    protected variable _sid ""      ;   # socket connection to server
    4748    protected variable _maxConnects 100
    48     protected variable _outbuf       ;    # buffer for outgoing commands
    4949    protected variable _buffering 0
    5050    protected variable _cmdSeq 0     ;    # Command sequence number
  • branches/1.3/gui/scripts/vtkglyphviewer.tcl

    r5177 r5217  
    837837    $_dispatcher cancel !legend
    838838    # disconnected -- no more data sitting on server
    839     set _outbuf ""
    840839    array unset _datasets
    841840    array unset _data
     
    1000999                }
    10011000                SendCmd "dataset add $tag data follows $length"
    1002                 append _outbuf $bytes
     1001                SendData $bytes
    10031002                set _datasets($tag) 1
    10041003                SetObjectStyle $dataobj $comp
  • branches/1.3/gui/scripts/vtkheightmapviewer.tcl

    r5177 r5217  
    10021002                }
    10031003                SendCmd "dataset add $tag data follows $length"
    1004                 append _outbuf $bytes
     1004                SendData $bytes
    10051005                set _datasets($tag) 1
    10061006                SetObjectStyle $dataobj $comp
  • branches/1.3/gui/scripts/vtkimageviewer.tcl

    r5177 r5217  
    980980                }
    981981                SendCmd "dataset add $tag data follows $length"
    982                 append _outbuf $bytes
     982                SendData $bytes
    983983                set _datasets($tag) 1
    984984                SetObjectStyle $dataobj $comp
  • branches/1.3/gui/scripts/vtkisosurfaceviewer.tcl

    r5181 r5217  
    949949    $_dispatcher cancel !legend
    950950    # disconnected -- no more data sitting on server
    951     set _outbuf ""
    952951    array unset _datasets
    953952    array unset _data
     
    11121111                }
    11131112                SendCmd "dataset add $tag data follows $length"
    1114                 append _outbuf $bytes
     1113                SendData $bytes
    11151114                set _datasets($tag) 1
    11161115                SetObjectStyle $dataobj $comp
  • branches/1.3/gui/scripts/vtkmeshviewer.tcl

    r5110 r5217  
    867867            }
    868868            SendCmd "dataset add $tag data follows $length"
    869             append _outbuf $bytes
     869            SendData $bytes
    870870            set _datasets($tag) 1
    871871            SetObjectStyle $dataobj
  • branches/1.3/gui/scripts/vtkstreamlinesviewer.tcl

    r5110 r5217  
    10081008                }
    10091009                SendCmd "dataset add $tag data follows $length"
    1010                 append _outbuf $bytes
     1010                SendData $bytes
    10111011                set _datasets($tag) 1
    10121012                SetObjectStyle $dataobj $comp
     
    21652165        set length [string length $seeds]
    21662166        SendCmd "streamlines seed fmesh 200 data follows $length $tag"
    2167         append _outbuf $seeds
     2167        SendData $seeds
    21682168        set _seeds($dataobj) 1
    21692169    }
  • branches/1.3/gui/scripts/vtksurfaceviewer.tcl

    r5181 r5217  
    792792    $_dispatcher cancel !legend
    793793    # disconnected -- no more data sitting on server
    794     set _outbuf ""
    795794    array unset _datasets
    796795    array unset _data
     
    957956                }
    958957                SendCmd "dataset add $tag data follows $length"
    959                 append _outbuf $bytes
     958                SendData $bytes
    960959                set _datasets($tag) 1
    961960                SetObjectStyle $dataobj $comp
  • branches/1.3/gui/scripts/vtkviewer.tcl

    r5177 r5217  
    926926
    927927    # disconnected -- no more data sitting on server
    928     set _outbuf ""
    929928    array unset _datasets
    930929    array unset _data
     
    10841083                }
    10851084                SendCmd "dataset add $tag data follows $length"
    1086                 append _outbuf $bytes
     1085                SendData $bytes
    10871086                set _datasets($tag) 1
    10881087                SetObjectStyle $dataobj $comp
  • branches/1.3/gui/scripts/vtkvolumeviewer.tcl

    r5177 r5217  
    815815    $_dispatcher cancel !legend
    816816    # disconnected -- no more data sitting on server
    817     set _outbuf ""
    818817    array unset _datasets
    819818    array unset _data
     
    977976                    SendCmd [list "clientinfo" $info]
    978977                }
    979                 append _outbuf "dataset add $tag data follows $length\n"
    980                 append _outbuf $bytes
     978                SendCmd "dataset add $tag data follows $length"
     979                SendData $bytes
    981980                set _datasets($tag) 1
    982981                SetObjectStyle $dataobj $comp
Note: See TracChangeset for help on using the changeset viewer.