Changeset 2353 for trunk/gui


Ignore:
Timestamp:
Aug 13, 2011, 7:15:14 PM (13 years ago)
Author:
gah
Message:

new nanoscale

Location:
trunk/gui/scripts
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/flowvisviewer.tcl

    r1929 r2353  
    913913# ----------------------------------------------------------------------
    914914itcl::body Rappture::FlowvisViewer::SendDataObjs {} {
    915     puts stderr "in SendDataObjs"
    916 
    917915    blt::busy hold $itk_component(hull)
    918916    foreach dataobj $_sendobjs {
  • trunk/gui/scripts/nanovisviewer.tcl

    r1839 r2353  
    205205
    206206    array set _settings [subst {
    207         $this-pan-x                $_view(pan-x)
    208         $this-pan-y                $_view(pan-y)
    209         $this-phi                $_view(phi)
    210         $this-psi                $_view(psi)
    211         $this-theta                $_view(theta)
    212         $this-volume                1
    213         $this-xcutplane                0
    214         $this-xcutposition        0
    215         $this-ycutplane                0
    216         $this-ycutposition        0
    217         $this-zcutplane                0
    218         $this-zcutposition        0
    219         $this-zoom                $_view(zoom)
     207        $this-pan-x                     $_view(pan-x)
     208        $this-pan-y                     $_view(pan-y)
     209        $this-phi                       $_view(phi)
     210        $this-psi                       $_view(psi)
     211        $this-theta                     $_view(theta)
     212        $this-volume                    1
     213        $this-xcutplane                 0
     214        $this-xcutposition              0
     215        $this-ycutplane                 0
     216        $this-ycutposition              0
     217        $this-zcutplane                 0
     218        $this-zcutposition              0
     219        $this-zoom                      $_view(zoom)
    220220    }]
    221221
     
    945945            }
    946946            array set style [lindex [$_first components -style $comp] 0]
    947             if {$what != "-cutplanes" || $style(-cutplanes)} {
     947            if { $what != "-cutplanes" || $style(-cutplanes) } {
    948948                lappend rlist $vol
    949949            }
     
    12231223            if { [isconnected] } {
    12241224                set vols [CurrentVolumes -cutplanes]
     1225 puts stderr "cutplanes=$cutplanes"
    12251226                SendCmd "cutplane state $bool $axis $vols"
    12261227            }
  • trunk/gui/scripts/unirect2d.tcl

    r2144 r2353  
    147147    set dx [expr {($_xMax - $_xMin) / double($_xNum)}]
    148148    set dy [expr {($_yMax - $_yMin) / double($_yNum)}]
    149     for { set i 0 } { $i < $_xNum } { incr i } {
     149    foreach {a b} $_axisOrder break
     150    for { set i 0 } { $i < [set _${a}Num] } { incr i } {
    150151        set x [expr {$_xMin + (double($i) * $dx)}]
    151         for { set j 0 } { $j < $_yNum } { incr j } {
     152        for { set j 0 } { $j < [set _${b}Num] } { incr j } {
    152153            set y [expr {$_yMin + (double($i) * $dy)}]
    153154            lappend data $x $y
  • trunk/gui/scripts/visviewer.tcl

    r2241 r2353  
    206206    set servers [Shuffle $hostlist]
    207207
    208     set memorySize 10000
    209208    # Get the first server
    210209    foreach {hostname port} [split [lindex $servers 0] :] break
     
    212211
    213212    while {1} {
    214         SendEcho <<line "connecting to $hostname:$port..."
     213        puts stderr "connecting to $hostname:$port..."
    215214        if { [catch {socket $hostname $port} _sid] != 0 } {
     215            set _sid ""
    216216            if {[llength $servers] == 0} {
    217217                blt::busy release $itk_component(hull)
     
    226226        fconfigure $_sid -translation binary -encoding binary
    227227
    228         # Send memory requirement to the load balancer
    229         puts -nonewline $_sid [binary format I $memorySize]
    230         flush $_sid
    231 
    232         # Read back a reconnection order
    233         set data [read $_sid 4]
    234         if {[binary scan $data cccc b1 b2 b3 b4] != 4} {
    235             blt::busy release $itk_component(hull)
    236             error "couldn't read redirection request"
    237         }
    238         set addr [format "%u.%u.%u.%u" \
    239             [expr {$b1 & 0xff}] \
    240             [expr {$b2 & 0xff}] \
    241             [expr {$b3 & 0xff}] \
    242             [expr {$b4 & 0xff}]]
    243 
    244         if { [string equal $addr "0.0.0.0"] } {
    245             # We're connected. Cancel any pending serverDown events and
    246             # release the busy window over the hull.
    247             $_dispatcher cancel !serverDown
    248             if { $_idleTimeout > 0 } {
    249                 $_dispatcher event -after $_idleTimeout !timeout
    250             }
    251             blt::busy release $itk_component(hull)
    252             fconfigure $_sid -buffering line
    253             fileevent $_sid readable [itcl::code $this ReceiveHelper]
    254             return 1
    255         }
    256         set hostname $addr
     228        # We're connected. Cancel any pending serverDown events and
     229        # release the busy window over the hull.
     230        $_dispatcher cancel !serverDown
     231        if { $_idleTimeout > 0 } {
     232            $_dispatcher event -after $_idleTimeout !timeout
     233        }
     234        blt::busy release $itk_component(hull)
     235        fconfigure $_sid -buffering line
     236        fileevent $_sid readable [itcl::code $this ReceiveHelper]
     237        return 1
    257238    }
    258239    #NOTREACHED
     
    295276    if { [IsConnected] } {
    296277        if { [eof $_sid] } {
    297             error "unexpected eof on socket"
    298         }
    299         $_dispatcher cancel !timeout
    300         if { $_idleTimeout > 0 } {
    301             $_dispatcher event -after $_idleTimeout !timeout
    302         }
    303         return 1
     278            Disconnect
     279        } else {
     280            $_dispatcher cancel !timeout
     281            if { $_idleTimeout > 0 } {
     282                $_dispatcher event -after $_idleTimeout !timeout
     283            }
     284            return 1
     285        }
    304286    }
    305287    # If we aren't connected, assume it's because the connection to the
Note: See TracChangeset for help on using the changeset viewer.