Ignore:
Timestamp:
Apr 29, 2014 9:28:09 AM (10 years ago)
Author:
gah
Message:

bug fix: -isosurfacevisible sets all surfaces to visible

Location:
branches/1.3/gui/scripts
Files:
2 edited

Legend:

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

    r4341 r4351  
    11# -*- mode: tcl; indent-tabs-mode: nil -*-
    2 
    3 # ----------------------------------------------------------------------
    4 #  COMPONENT: vtkisolinesviewer - Vtk 3D contour object viewer
     2# ----------------------------------------------------------------------
     3#  COMPONENT: vtkisosurfaceviewer - Vtk 3D contour object viewer
    54#
    65#  It connects to the Vtk server running on a rendering farm,
     
    223222
    224223    array set _settings {
     224        -axesvisible                    1
     225        -axislabelsvisible              1
    225226        -background                     black
    226227        -colormap                       BCGYR
    227228        -colormapvisible                1
    228         -field                          "Default"
    229         -isolinecolor                   white
    230         -axesvisible                    1
    231         -axislabelsvisible              1
    232229        -cutplaneedges                  0
    233230        -cutplanelighting               1
     
    236233        -cutplanesvisible               0
    237234        -cutplanewireframe              0
     235        -field                          "Default"
     236        -isolinecolor                   white
    238237        -isosurfaceedges                0
    239238        -isosurfacelighting             1
     
    356355    pack $itk_component(cutplane) -padx 2 -pady 2
    357356
     357
    358358    if { [catch {
    359359        BuildIsosurfaceTab
     
    969969    }
    970970    set _first ""
    971     SendCmd "dataset visible 0"
     971    SendCmd "contour3d visible 0"
    972972    foreach dataobj [get -objects] {
    973973        if { [info exists _obj2ovride($dataobj-raise)] &&  $_first == "" } {
     
    10051005                # Setting dataset visible enables outline
    10061006                # and contour3d
    1007                 SendCmd "dataset visible 1 $tag"
     1007                SendCmd "contour3d visible 1 $tag"
    10081008            }
    10091009        }
     
    14191419        "-isosurfacevisible" {
    14201420            set bool $_settings($what)
    1421             SendCmd "contour3d visible $bool"
     1421            SendCmd "contour3d visible 0"
     1422            if { $bool } {
     1423                foreach tag [CurrentDatasets -visible] {
     1424                    SendCmd "contour3d visible $bool $tag"
     1425                }
     1426            }
    14221427            if { $bool } {
    14231428                Rappture::Tooltip::for $itk_component(contour) \
     
    14691474            }
    14701475            SendCmd "dataset scalar $_curFldName"
    1471             SendCmd "dataset maprange explicit $_limits($_curFldName) $_curFldName"
     1476            if { ![info exists _limits($_curFldName)] } {
     1477                SendCmd "dataset maprange all"
     1478            } else {
     1479                SendCmd "dataset maprange explicit $_limits($_curFldName) $_curFldName"
     1480            }
    14721481            SendCmd "cutplane colormode $_colorMode $_curFldName"
    14731482            SendCmd "contour3d colormode $_colorMode $_curFldName"
     
    21092118    array set style {
    21102119        -color BCGYR
     2120        -cutplanesvisible 0
     2121        -edgecolor black
    21112122        -edges 0
    2112         -edgecolor black
     2123        -isosurfacevisible 1
     2124        -levels 10
     2125        -lighting 1
    21132126        -linewidth 1.0
    21142127        -opacity 0.6
     2128        -outline 0
    21152129        -wireframe 0
    2116         -lighting 1
    2117         -outline 0
    2118         -levels 10
    2119         -cutplanesvisible 0
     2130        -xcutplaneposition 50
    21202131        -xcutplanevisible 1
     2132        -ycutplaneposition 50
    21212133        -ycutplanevisible 1
     2134        -zcutplaneposition 50
    21222135        -zcutplanevisible 1
    2123         -xcutplaneposition 50
    2124         -ycutplaneposition 50
    2125         -zcutplaneposition 50
    2126         -isosurfacevisible 1
    21272136    }
    21282137    array set style [$dataobj style $comp]
     
    23782387        # If there's a legend title, create a text item for the title.
    23792388        $c create text $x $y \
    2380                 -anchor ne \
    2381                 -fill $itk_option(-plotforeground) -tags "title legend" \
    2382                 -font $font
    2383             incr y $lineht
     2389            -anchor ne \
     2390            -fill $itk_option(-plotforeground) -tags "title legend" \
     2391            -font $font
     2392        if { $title != "" } {
     2393            incr y $lineht
     2394        }
    23842395        $c create text $x $y \
    23852396            -anchor ne \
  • branches/1.3/gui/scripts/vtkvolumeviewer.tcl

    r4335 r4351  
    22542254            set x [expr $x1 + [winfo rootx $itk_component(view)]]
    22552255            set y [expr $y2 + [winfo rooty $itk_component(view)]]
    2256             #puts stderr "combo x=$x y=$y"
    22572256            tk_popup $itk_component(fieldmenu) $x $y
    22582257        }
Note: See TracChangeset for help on using the changeset viewer.