Changeset 4186 for branches


Ignore:
Timestamp:
Feb 20, 2014 3:16:12 PM (10 years ago)
Author:
ldelgass
Message:

merge trunk version of isosurface viewer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.3/gui/scripts/vtkisosurfaceviewer.tcl

    r3879 r4186  
    150150    private variable _legendPending 0
    151151    private variable _field      ""
    152     private variable _colorMode "vmag"; #  Mode of colormap (vmag or scalar)
     152    private variable _colorMode "scalar";       #  Mode of colormap (vmag or scalar)
    153153    private variable _fieldNames {}
    154154    private variable _fields
     
    235235        cutplaneEdges           0
    236236        cutplaneLighting        1
    237         cutplanePreinterp       0
     237        cutplanePreinterp       1
    238238        cutplaneOpacity         100
    239239        cutplaneVisible         0
     
    440440
    441441    eval itk_initialize $args
     442
     443    EnableWaitDialog 500
    442444    Connect
    443445    update
     
    772774        if { $_reportClientInfo }  {
    773775            # Tell the server the viewer, hub, user and session.
    774             # Do this immediately on connect before buffing any commands
     776            # Do this immediately on connect before buffering any commands
    775777            global env
    776778
     
    875877        set _hardcopy($tag) $bytes
    876878    }
    877     EventuallyRequestLegend
    878879}
    879880
     
    15071508    set font "Arial 8"
    15081509    set lineht [font metrics $font -linespace]
    1509     set c $itk_component(view)
    15101510    set w 12
    15111511    set h [expr {$_height - 2 * ($lineht + 2)}]
    1512     if { $h < 1} {
     1512    if { $h < 1 } {
    15131513        return
    15141514    }
     
    16981698    itk_component add numcontours {
    16991699        Rappture::Spinint $inner.numcontours \
    1700             -min 1 -max 50 -font "arial 9"
     1700            -min 0 -max 50 -font "arial 9"
    17011701    }
    17021702    $itk_component(numcontours) value $_settings(numContours)
     
    17731773        "static_triad"    "static" \
    17741774        "closest_triad"   "closest" \
    1775         "furthest_triad"  "furthest" \
     1775        "furthest_triad"  "farthest" \
    17761776        "outer_edges"     "outer"         
    17771777    $itk_component(axisMode) value "static"
     
    21162116    }
    21172117    array set style [$dataobj style $comp]
    2118     if { $dataobj != $_first } {
     2118    if { $dataobj != $_first || $style(-levels) == 1 } {
    21192119        set style(-opacity) 1
    21202120    }
    2121     if { $_currentColormap == "" } {
    2122         set stylelist [$dataobj style $comp]
    2123         if { $stylelist != "" } {
    2124             array set style $stylelist
    2125             set stylelist [array get style]
    2126             SetCurrentColormap $stylelist
    2127         }
    2128         $itk_component(colormap) value $style(-color)
    2129     }
    21302121    SendCmd "cutplane add $tag"
    2131     SendCmd "cutplane edges 0 $tag"
    2132     SendCmd "cutplane wireframe 0 $tag"
    2133     SendCmd "cutplane lighting 1 $tag"
    2134     SendCmd "cutplane linewidth 1 $tag"
    2135 
    2136     foreach axis { x y z } {
    2137         SendCmd "cutplane slice $axis 0.5 $tag"
    2138         SendCmd "cutplane axis $axis 0 $tag"
    2139     }
     2122    SendCmd "cutplane visible 0 $tag"
     2123
    21402124    # This is too complicated.  We want to set the colormap, number of
    21412125    # isolines and opacity for the dataset.  They can be the default values,
     
    21572141    }
    21582142    if { $_currentColormap == "" } {
     2143        SetCurrentColormap $style(-color)
    21592144        $itk_component(colormap) value $style(-color)
    21602145    }
     
    22962281        "move" {
    22972282            set axis [lindex $args 0]
    2298             set a [string toupper $axis]
    2299             set oldval $_settings(cutplane${a}Position)
    23002283            set newval [lindex $args 1]
    23012284            if {[llength $args] != 2} {
     
    25052488    set _currentColormap $name
    25062489    SendCmd "contour3d colormap $_currentColormap"
     2490    SendCmd "cutplane colormap $_currentColormap"
    25072491}
    25082492
     
    25462530        return
    25472531    }
     2532    if { $_currentNumContours < 1 } {
     2533        set _contourList ""
     2534        return
     2535    }
    25482536    foreach { vmin vmax } $_limits($_curFldName) break
    25492537    set v [blt::vector create \#auto]
Note: See TracChangeset for help on using the changeset viewer.