Changeset 5071 for trunk


Ignore:
Timestamp:
Mar 4, 2015 9:22:11 PM (9 years ago)
Author:
ldelgass
Message:

Isosurface viewer fixes: Fix applying UI settings for opacity, numcontours to
new results. Set font option on gauges: still doesn't seem to get rid of bold
text. Use custom min/max to compute isovlues even when they are range is larger
than the intrinsic data range.

File:
1 edited

Legend:

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

    r5068 r5071  
    14241424        }
    14251425        "-cutplaneopacity" {
     1426            set _changed($what) 1
    14261427            set _settings($what) [expr $_widget($what) * 0.01]
    14271428            SendCmd "cutplane opacity $_settings($what)"
     
    15241525        }
    15251526        "-isosurfaceopacity" {
     1527            set _changed($what) 1
    15261528            set _settings($what) [expr $_widget($what) * 0.01]
    15271529            SendCmd "contour3d opacity $_settings($what)"
     
    15541556        }
    15551557        "-numcontours" {
     1558            set _changed($what) 1
    15561559            set _settings($what) [$itk_component(numcontours) value]
    15571560            if { $_contourList(numLevels) != $_settings($what) } {
     
    18211824    }
    18221825    itk_component add min {
    1823         Rappture::Gauge $inner.min \
     1826        Rappture::Gauge $inner.min -font "Arial 9" \
    18241827            -validatecommand [itcl::code $this LegendRangeValidate "" vmin]
    18251828    }
     
    18311834    }
    18321835    itk_component add max {
    1833         Rappture::Gauge $inner.max \
     1836        Rappture::Gauge $inner.max -font "Arial 9" \
    18341837            -validatecommand [itcl::code $this LegendRangeValidate "" vmax]
    18351838    }
     
    23282331        SendCmd "cutplane axis $axis $visible $tag"
    23292332    }
     2333    SendCmd "cutplane opacity $_settings(-cutplaneopacity) $tag"
    23302334    SendCmd "cutplane visible $style(-cutplanesvisible) $tag"
    23312335
     
    24172421}
    24182422
    2419 
    24202423# ----------------------------------------------------------------------
    24212424# USAGE: LegendPointToValue <x> <y>
     
    24492452}
    24502453
    2451 
    24522454# ----------------------------------------------------------------------
    24532455# USAGE: LegendProbeSingleContour <x> <y>
     
    24612463    SendCmd [list contour3d contourlist $value]
    24622464}
    2463 
    24642465
    24652466#
     
    28192820}
    28202821
    2821 
    28222822itcl::body Rappture::VtkIsosurfaceViewer::MouseOver2Which {} {
    28232823    switch -- $_mouseOver {
     
    28342834    return $which
    28352835}
    2836 
    28372836
    28382837# ----------------------------------------------------------------------
     
    29262925}
    29272926
    2928 
    29292927# ----------------------------------------------------------------------
    29302928# USAGE: ToggleCustomRange
     
    29832981    AdjustSetting -range
    29842982}
    2985 
    29862983
    29872984# ----------------------------------------------------------------------
     
    30193016}
    30203017
    3021 
    30223018#
    30233019# SetCurrentColormap --
     
    30823078        set values $_contourList(reqValues)
    30833079    } else {
    3084         # use the field limits to calculate the contour list values
    3085         foreach { vmin vmax } $_limits($_curFldName) break
    3086 
    3087         # if custom range has been set and are within the field's
    3088         # range, use the custom min and max to generate contour list values
     3080        # if custom range has been set, use the custom min and max
     3081        # to generate contour list values
    30893082        if { $_settings(-customrange) } {
    3090             if { [$itk_component(min) value] > $vmin } {
    3091                 set vmin [$itk_component(min) value]
    3092             }
    3093             if { [$itk_component(max) value] < $vmax } {
    3094                 set vmax [$itk_component(max) value]
    3095             }
     3083            set vmin [$itk_component(min) value]
     3084            set vmax [$itk_component(max) value]
     3085        } else {
     3086            # use the field limits to calculate the contour list values
     3087            foreach { vmin vmax } $_limits($_curFldName) break
    30963088        }
    30973089
Note: See TracChangeset for help on using the changeset viewer.