Changeset 2736


Ignore:
Timestamp:
Dec 27, 2011 8:55:00 AM (11 years ago)
Author:
gah
Message:
 
Location:
trunk/gui/scripts
Files:
4 edited

Legend:

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

    r2732 r2736  
    696696                set element [$_xmlobj element -as type $path]
    697697                if { $element == "unirect2d" } {
    698                     global env
    699698                    set _comp2dims($cname) "2D"
    700699                    set _comp2unirect2d($cname) \
     
    702701                             $extents]
    703702                    set _comp2style($cname) [$_field get $cname.style]
    704                     if { [info exists env(VTKHEIGHTMAP)] } {
    705                         set type "vtkheightmap"
    706                     } else {
    707703                    if {[$_field element $cname.flow] != ""} {
    708704                        set _comp2flowhints($cname) \
    709705                            [Rappture::FlowHints ::\#auto $_field $cname $_units]
    710706                    }
    711                     }
    712707                    incr _counter
    713708                } elseif { $element == "unirect3d" } {
  • trunk/gui/scripts/resultviewer.tcl

    r2732 r2736  
    266266                            if { [$dataobj hints type] == "contour" } {
    267267                                set resultMode "vtkcontour"
     268                            } elseif { [info exists env(VTKHEIGHTMAP)] } {
     269                                set resultMode "vtkheightmap"
    268270                            } else {
    269                                 set resultMode "vtkheightmap"
     271                                set resultMode "heightmap"
    270272                            }
    271273                        } else {
  • trunk/gui/scripts/sequenceresult.tcl

    r2732 r2736  
    471471                    2D {
    472472                        if { [$dataobj isunirect2d] } {
     473                            global env
    473474                            if { [$dataobj hints type] == "contour" } {
    474475                                set mode "vtkcontour"
     476                            } elseif { [info exists env(VTKHEIGHTMAP)] } {
     477                                set resultMode "vtkheightmap"
    475478                            } else {
    476                                 set mode "vtkheightmap"
     479                                set resultMode "heightmap"
    477480                            }
    478481                        } else {
  • trunk/gui/scripts/vtkheightmapviewer.tcl

    r2732 r2736  
    228228        xpan            0
    229229        ypan            0
    230         ortho           0
     230        ortho           1
    231231    }
    232232    set _arcball [blt::arcball create 100 100]
     
    993993    #
    994994    set q [list $_view(qw) $_view(qx) $_view(qy) $_view(qz)]
    995     $_arcball quaternion $q
    996     if {$_view(ortho)} {
     995    $_arcball quaternion $q
     996    SendCmd "camera mode persp"
     997   if {$_view(ortho)} {
    997998        SendCmd "camera mode ortho"
    998999    } else {
     
    10211022            if { ![info exists _datasets($tag)] } {
    10221023                set bytes [ConvertToVtkData $dataobj $comp]
    1023                 puts stderr contents=$bytes
     1024                puts stderr [GetVtkData]
    10241025                set length [string length $bytes]
    10251026                append _outbuf "dataset add $tag data follows $length\n"
     
    10821083        }
    10831084        foreach { name title units } [$_first hints scalars] {
     1085            set _scalarFields($title) $name
     1086            $itk_component(field) choices insert end "$name" "$title"
     1087            $itk_component(fieldmenu) add radiobutton -label "$title" \
     1088                -value $title -variable [itcl::scope _currentField] \
     1089                -selectcolor red \
     1090                -activebackground black \
     1091                -activeforeground white \
     1092                -font "Arial 8" \
     1093                -command [itcl::code $this Combo invoke]
     1094            set _fields($name) [list $title $units]
     1095        }
     1096        foreach { name title units } { default Default ??? } {
    10841097            set _scalarFields($title) $name
    10851098            $itk_component(field) choices insert end "$name" "$title"
     
    23312344    append out "SPACING 1 1 1 \n"
    23322345    append out "POINT_DATA [expr $xN * $yN] \n"
    2333     append out "SCALARS field float 1 \n"
     2346    append out "SCALARS default float 1 \n"
    23342347    append out "LOOKUP_TABLE default \n"
    23352348    append out [join $values "\n"]
     
    23452358            set tag $dataobj-$comp
    23462359            set contents [ConvertToVtkData $dataobj $comp]
    2347             puts stderr contents=$contents
    23482360            #set contents [$dataobj vtkdata $comp]
    23492361            append bytes "$contents\n\n"
     
    24232435    array set settings $style
    24242436    SendCmd "heightmap add $tag"
    2425     SendCmd "cutplane add $tag"
    2426     SendCmd "cutplane edges 0 $tag"
    2427     SendCmd "cutplane wireframe 0 $tag"
    2428     SendCmd "cutplane lighting 1 $tag"
    2429     SendCmd "cutplane linewidth 1 $tag"
     2437    #SendCmd "cutplane add $tag"
     2438    #SendCmd "cutplane edges 0 $tag"
     2439    #SendCmd "cutplane wireframe 0 $tag"
     2440    #SendCmd "cutplane lighting 1 $tag"
     2441    #SendCmd "cutplane linewidth 1 $tag"
    24302442    #SendCmd "cutplane linecolor 1 1 1 $tag"
    24312443    #SendCmd "cutplane visible $tag"
    24322444    foreach axis { x y z } {
    2433         SendCmd "cutplane slice $axis 1.0 $tag"
    2434         SendCmd "cutplane axis $axis 0 $tag"
     2445        #SendCmd "cutplane slice $axis 1.0 $tag"
     2446        #SendCmd "cutplane axis $axis 0 $tag"
    24352447    }
    24362448
Note: See TracChangeset for help on using the changeset viewer.