Changeset 3930
- Timestamp:
- Sep 17, 2013, 9:32:26 AM (11 years ago)
- Location:
- trunk/gui/scripts
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/field.tcl
r3917 r3930 102 102 public method numComponents {cname} 103 103 public method fieldlimits {} 104 public method valueLimits { cname } 104 105 public method flowhints { cname } 105 106 public method hints {{key ""}} … … 404 405 } 405 406 error "can't get field blob: Unknown component \"$cname\": should be one of [join [lsort [array names _comp2dims]] {, }]" 407 } 408 409 itcl::body Rappture::Field::valueLimits { cname } { 410 if { [info exists _comp2limits($cname)] } { 411 return $_comp2limits($cname) 412 } 413 return "" 406 414 } 407 415 … … 900 908 set _dim 3 901 909 set _comp2dims($cname) "3D" 910 set data [$_field get -decode no $cname.$type] 911 set contents [Rappture::encoding::decode -as zb64 $data] 912 if { $contents == "" } { 913 puts stderr "WARNING: no data for \"$_path.$cname.$type\"" 914 continue; # Ignore this component 915 } 916 if 1 { 917 set f [open /tmp/$_path.$cname.dx "w"] 918 puts -nonewline $f $contents 919 close $f 920 } 921 if { [catch { Rappture::DxToVtk $contents } vtkdata] == 0 } { 922 ReadVtkDataSet $cname $vtkdata 923 } else { 924 puts stderr "Can't parse dx data: $vtkdata" 925 } 926 if 1 { 927 set f [open /tmp/$_path.$cname.vtk "w"] 928 puts -nonewline $f $vtkdata 929 close $f 930 } 902 931 if { $_viewer != "nanovis" } { 903 set vtkdata [$_field get -decode yes $cname.$type]904 if { $vtkdata == "" } {905 puts stderr "WARNING: no data for \"$_path.$cname.$type\""906 continue; # Ignore this component907 }908 if 0 {909 set f [open /tmp/$_path.$cname.dx "w"]910 puts -nonewline $f $vtkdata911 close $f912 }913 set vtkdata [Rappture::DxToVtk $vtkdata]914 if 0 {915 set f [open /tmp/$_path.$cname.vtk "w"]916 puts -nonewline $f $vtkdata917 close $f918 }919 ReadVtkDataSet $cname $vtkdata920 932 set _type "vtk" 921 933 set _comp2vtk($cname) $vtkdata 922 934 } else { 923 set contents [$_field get -decode no $cname.$type]924 if { $contents == "" } {925 puts stderr "WARNING: no data for \"$_path.$cname.$type\""926 continue; # Ignore this component927 }928 935 set _type "dx" 929 set _comp2dx($cname) $ contents936 set _comp2dx($cname) $data 930 937 } 931 938 set _comp2style($cname) [$_field get $cname.style] … … 934 941 [Rappture::FlowHints ::\#auto $_field $cname $_units] 935 942 } 943 set _dim 3 936 944 incr _counter 937 945 } elseif { $type == "ucd"} { -
trunk/gui/scripts/isomarker.tcl
r3362 r3930 30 30 private common _normalIcon [Rappture::icon nvlegendmark] 31 31 private common _activeIcon [Rappture::icon nvlegendmark2] 32 private method EnterTick {} 33 private method LeaveTick {} 34 private method StartDrag { x y } 35 private method ContinueDrag { x y } 36 private method StopDrag { x y } 32 37 33 constructor {c obj tf args} { 34 set _canvas $c 35 set _nvobj $obj 36 set _tf $tf 37 set w [winfo width $_canvas] 38 set h [winfo height $_canvas] 39 set _tick [$c create image 0 $h \ 40 -image $_normalIcon -anchor s \ 41 -tags "$this $obj" -state hidden] 42 set _label [$c create text 0 $h \ 43 -anchor n -fill white -font "Helvetica 8" \ 44 -tags "$this $obj" -state hidden] 45 $c bind $_tick <Enter> [itcl::code $this HandleEvent "enter"] 46 $c bind $_tick <Leave> [itcl::code $this HandleEvent "leave"] 47 $c bind $_tick <ButtonPress-1> \ 48 [itcl::code $this HandleEvent "start" %x %y] 49 $c bind $_tick <B1-Motion> \ 50 [itcl::code $this HandleEvent "update" %x %y] 51 $c bind $_tick <ButtonRelease-1> \ 52 [itcl::code $this HandleEvent "end" %x %y] 38 constructor {c obj tf args} {} 39 destructor {} 40 public method transferfunc {} 41 public method activate { bool } 42 public method visible { bool } 43 public method screenpos {} 44 public method absval { {x "-get"} } 45 public method relval { {x "-get"} } 46 } 47 48 itcl::body Rappture::IsoMarker::constructor {c obj tf args} { 49 set _canvas $c 50 set _nvobj $obj 51 set _tf $tf 52 set w [winfo width $_canvas] 53 set h [winfo height $_canvas] 54 set _tick [$c create image 0 $h \ 55 -image $_normalIcon -anchor s \ 56 -tags "$this $obj" -state hidden] 57 set _label [$c create text 0 $h \ 58 -anchor n -fill white -font "Helvetica 8" \ 59 -tags "$this $obj" -state hidden] 60 $c bind $_tick <Enter> [itcl::code $this EnterTick] 61 $c bind $_tick <Leave> [itcl::code $this LeaveTick] 62 $c bind $_tick <ButtonPress-1> [itcl::code $this StartDrag %x %y] 63 $c bind $_tick <B1-Motion> [itcl::code $this ContinueDrag %x %y] 64 $c bind $_tick <ButtonRelease-1> [itcl::code $this StopDrag %x %y] 65 } 66 67 itcl::body Rappture::IsoMarker::destructor {} { 68 $_canvas delete $this 69 } 70 71 itcl::body Rappture::IsoMarker::transferfunc {} { 72 return $_tf 73 } 74 75 itcl::body Rappture::IsoMarker::activate { bool } { 76 if { $bool || $_activePress || $_activeMotion } { 77 $_canvas itemconfigure $_label -state normal 78 $_canvas itemconfigure $_tick -image $_activeIcon 79 $_canvas itemconfigure title -state hidden 80 } else { 81 $_canvas itemconfigure $_label -state hidden 82 $_canvas itemconfigure $_tick -image $_normalIcon 83 $_canvas itemconfigure title -state normal 53 84 } 54 destructor { 55 $_canvas delete $this 85 } 86 87 itcl::body Rappture::IsoMarker::visible { bool } { 88 if { $bool } { 89 absval $_value 90 $_canvas itemconfigure $_tick -state normal 91 $_canvas raise $_tick 92 } else { 93 $_canvas itemconfigure $_tick -state hidden 56 94 } 57 public method transferfunc {} { 58 return $_tf 95 } 96 97 itcl::body Rappture::IsoMarker::screenpos { } { 98 set x [relval] 99 if { $x < 0.0 } { 100 set x 0.0 101 } elseif { $x > 1.0 } { 102 set x 1.0 59 103 } 60 public method activate { bool } { 61 if { $bool || $_activePress || $_activeMotion } { 62 $_canvas itemconfigure $_label -state normal 63 $_canvas itemconfigure $_tick -image $_activeIcon 64 } else { 65 $_canvas itemconfigure $_label -state hidden 66 $_canvas itemconfigure $_tick -image $_normalIcon 67 } 104 set low 10 105 set w [winfo width $_canvas] 106 set high [expr {$w - 10}] 107 set x [expr {round($x*($high - $low) + $low)}] 108 return $x 109 } 110 111 itcl::body Rappture::IsoMarker::absval { {x "-get"} } { 112 if { $x != "-get" } { 113 set _value $x 114 set y 31 115 $_canvas itemconfigure $_label -text [format %.2g $_value] 116 set x [screenpos] 117 $_canvas coords $_tick $x [expr {$y+3}] 118 $_canvas coords $_label $x [expr {$y+5}] 68 119 } 69 public method visible { bool } { 70 if { $bool } { 71 absval $_value 72 $_canvas itemconfigure $_tick -state normal 73 $_canvas raise $_tick 74 } else { 75 $_canvas itemconfigure $_tick -state hidden 76 } 77 } 78 public method screenpos { } { 79 set x [relval] 80 if { $x < 0.0 } { 81 set x 0.0 82 } elseif { $x > 1.0 } { 83 set x 1.0 84 } 85 set low 10 86 set w [winfo width $_canvas] 87 set high [expr {$w - 10}] 88 set x [expr {round($x*($high - $low) + $low)}] 89 return $x 90 } 91 public method absval { {x "-get"} } { 92 if { $x != "-get" } { 93 set _value $x 94 set y 31 95 $_canvas itemconfigure $_label -text [format %.2g $_value] 96 set x [screenpos] 97 $_canvas coords $_tick $x [expr {$y+3}] 98 $_canvas coords $_label $x [expr {$y+5}] 99 } 100 return $_value 101 } 102 public method relval { {x "-get"} } { 103 if { $x == "-get" } { 104 array set limits [$_nvobj limits $_tf] 105 if { $limits(vmax) == $limits(vmin) } { 106 if { $limits(vmax) == 0.0 } { 107 set limits(vmin) 0.0 108 set limits(vmax) 1.0 109 } else { 110 set limits(vmax) [expr $limits(vmin) + 1.0] 111 } 112 } 113 return [expr {($_value-$limits(vmin))/ 114 ($limits(vmax) - $limits(vmin))}] 115 } 116 array set limits [$_nvobj limits $_tf] 117 if { $limits(vmax) == $limits(vmin) } { 118 set limits(vmin) 0.0 119 set limits(vmax) 1.0 120 } 121 if { [catch {expr $limits(vmax) - $limits(vmin)} r] != 0 } { 122 return 0.0 123 } 124 absval [expr {($x * $r) + $limits(vmin)}] 125 } 126 private method HandleEvent { option args } { 127 switch -- $option { 128 enter { 129 set _activeMotion 1 130 activate yes 131 $_canvas raise $_tick 132 } 133 leave { 134 set _activeMotion 0 135 activate no 136 } 137 start { 138 $_canvas raise $_tick 139 set _activePress 1 140 activate yes 141 $_canvas itemconfigure limits -state hidden 142 } 143 update { 144 set w [winfo width $_canvas] 145 set x [lindex $args 0] 146 relval [expr {double($x-10)/($w-20)}] 147 $_nvobj overmarker $this $x 148 $_nvobj updatetransferfuncs 149 } 150 end { 151 set x [lindex $args 0] 152 if { ![$_nvobj rmdupmarker $this $x]} { 153 eval HandleEvent update $args 154 } 155 set _activePress 0 156 activate no 157 $_canvas itemconfigure limits -state normal 158 } 159 default { 160 error "bad option \"$option\": should be start, update, end" 120 return $_value 121 } 122 123 itcl::body Rappture::IsoMarker::relval { {x "-get"} } { 124 foreach {min max} [$_nvobj limits $_tf] break 125 if { $x == "-get" } { 126 if { $max == $min } { 127 if { $max == 0.0 } { 128 set min 0.0 129 set max 1.0 130 } else { 131 set max [expr $min + 1.0] 161 132 } 162 133 } 134 return [expr {($_value - $min) / ($max - $min)}] 135 } 136 if { $max == $min } { 137 set min 0.0 138 set max 1.0 163 139 } 140 if { [catch {expr $max - $min} r] != 0 } { 141 return 0.0 142 } 143 absval [expr {($x * $r) + $min}] 164 144 } 145 146 itcl::body Rappture::IsoMarker::EnterTick {} { 147 set _activeMotion 1 148 activate yes 149 $_canvas raise $_tick 150 } 151 152 itcl::body Rappture::IsoMarker::LeaveTick {} { 153 set _activeMotion 0 154 activate no 155 } 156 157 itcl::body Rappture::IsoMarker::StartDrag { x y } { 158 $_canvas raise $_tick 159 set _activePress 1 160 activate yes 161 $_canvas itemconfigure limits -state hidden 162 $_canvas itemconfigure title -state hidden 163 } 164 165 itcl::body Rappture::IsoMarker::StopDrag { x y } { 166 if { ![$_nvobj removeDuplicateMarker $this $x]} { 167 ContinueDrag $x $y 168 } 169 set _activePress 0 170 activate no 171 $_canvas itemconfigure limits -state normal 172 $_canvas itemconfigure title -state normal 173 } 174 175 itcl::body Rappture::IsoMarker::ContinueDrag { x y } { 176 set w [winfo width $_canvas] 177 relval [expr {double($x-10)/($w-20)}] 178 $_nvobj overMarker $this $x 179 $_nvobj updateTransferFunctions 180 $_canvas raise $_tick 181 set _activePress 1 182 activate yes 183 $_canvas itemconfigure limits -state hidden 184 $_canvas itemconfigure title -state hidden 185 } 186 -
trunk/gui/scripts/nanovisviewer.tcl
r3925 r3930 76 76 public method isconnected {} 77 77 public method limits { tf } 78 public method over marker { m x }78 public method overMarker { m x } 79 79 public method parameters {title args} { 80 80 # do nothing 81 81 } 82 public method r mdupmarker { m x }82 public method removeDuplicateMarker { m x } 83 83 public method scale {args} 84 public method update transferfuncs {}84 public method updateTransferFunctions {} 85 85 86 86 protected method Connect {} … … 96 96 protected method ReceiveImage { args } 97 97 protected method ReceiveLegend { tf vmin vmax size } 98 protected method DrawLegend { cname } 98 99 protected method Rotate {option x y} 99 100 protected method SendTransferFuncs {} … … 136 137 private variable _serverTfs ;# contains all the transfer functions 137 138 ;# in the server. 138 private variable _recvdDatasets ;# list of data objs to send to server139 private variable _dataset2style ;# maps dataobj-component to transfunc140 private variable _style2datasets ;# maps tf back to list of141 # dataobj-components using the tf.142 143 private variable _reset 1; # Connection to server has been reset 144 private variable _click ;# info used for rotate operations145 private variable _limits ;# autoscale min/max for all axes146 private variable _view ;# view params for 3D view147 private variable _isomarkers ;# array of isosurface level values 0..1139 private variable _recvdDatasets; # list of data objs to send to server 140 private variable _dataset2style; # maps dataobj-component to transfunc 141 private variable _style2datasets; # maps tf back to list of 142 # dataobj-components using the tf. 143 144 private variable _reset 1; # Connection to server has been reset. 145 private variable _click; # Info used for rotate operations. 146 private variable _limits; # Autoscale min/max for all axes 147 private variable _view; # View params for 3D view 148 private variable _isomarkers; # Array of isosurface level values 0..1 148 149 private variable _settings 149 150 # Array of transfer functions in server. If 0 the transfer has been … … 220 221 $_arcball quaternion $q 221 222 222 set _limits(vmin) 0.0 223 set _limits(vmax) 1.0 223 set _limits(v) [list 0.0 1.0] 224 224 set _reset 1 225 225 … … 530 530 if { $pos >= 0 } { 531 531 set _dlist [lreplace $_dlist $pos $pos] 532 array unset _limits $dataobj*533 532 array unset _obj2ovride $dataobj-* 534 533 array unset _dataset2style $dataobj-* … … 552 551 # ---------------------------------------------------------------------- 553 552 itcl::body Rappture::NanovisViewer::scale {args} { 554 foreach val {xmin xmax ymin ymax zmin zmax vmin vmax} { 555 set _limits($val) "" 556 } 553 array set style { 554 -color BCGYR 555 -levels 6 556 -opacity 1.0 557 -markers "" 558 } 559 array unset _limits 557 560 array unset _volcomponents 558 561 foreach dataobj $args { … … 569 572 } 570 573 lappend _volcomponents($cname) $dataobj-$cname 574 array unset limits 575 array set limits [$dataobj valueLimits $cname] 576 set _limits($cname) $limits(v) 571 577 } 572 578 foreach axis {x y z v} { 573 579 foreach { min max } [$dataobj limits $axis] break 574 580 if {"" != $min && "" != $max} { 575 if {"" == $_limits(${axis}min)} { 576 set _limits(${axis}min) $min 577 set _limits(${axis}max) $max 581 if { ![info exists _limits($axis)] } { 582 set _limits($axis) [list $min $max] 578 583 } else { 579 if {$min < $_limits(${axis}min)} { 580 set _limits(${axis}min) $min 584 foreach {amin amax} $_limits($axis) break 585 if {$min < $amin} { 586 set amin $min 581 587 } 582 if {$max > $ _limits(${axis}max)} {583 set _limits(${axis}max)$max588 if {$max > $amax} { 589 set amax $max 584 590 } 591 set _limits($axis) [list $amin $amax] 585 592 } 586 593 } … … 760 767 761 768 # 762 # ReceiveLegend -- 763 # 764 # The procedure is the response from the render server to each "legend" 765 # command. The server sends back a "legend" command invoked our 766 # the slave interpreter. The purpose is to collect data of the image 767 # representing the legend in the canvas. In addition, the isomarkers 768 # of the active transfer function are displayed. 769 # 770 # I don't know is this is the right place to display the isomarkers. 771 # I don't know all the different paths used to draw the plot. There's 772 # "Rebuild", "add", etc. 773 # 774 itcl::body Rappture::NanovisViewer::ReceiveLegend { tf vmin vmax size } { 775 if { ![isconnected] } { 776 return 777 } 778 set bytes [ReceiveBytes $size] 779 $_image(legend) configure -data $bytes 780 ReceiveEcho <<line "<read $size bytes for [image width $_image(legend)]x[image height $_image(legend)] legend>" 781 769 # DrawLegend -- 770 # 771 itcl::body Rappture::NanovisViewer::DrawLegend { cname } { 782 772 set c $itk_component(legend) 783 773 set w [winfo width $c] … … 789 779 -image $_image(legend) -tags transfunc 790 780 $c create text $lx $ly -anchor sw \ 791 -fill $itk_option(-plotforeground) -tags "limits vmin"781 -fill $itk_option(-plotforeground) -tags "limits text vmin" 792 782 $c create text [expr {$w-$lx}] $ly -anchor se \ 793 -fill $itk_option(-plotforeground) -tags "limits vmax" 783 -fill $itk_option(-plotforeground) -tags "limits text vmax" 784 $c create text [expr {$w/2}] $ly -anchor s \ 785 -fill $itk_option(-plotforeground) -tags "limits text title" 794 786 $c lower transfunc 795 787 $c bind transfunc <ButtonRelease-1> \ … … 798 790 # Display the markers used by the active transfer function. 799 791 800 array set limits [limits $tf]801 $c itemconfigure vmin -text [format %.2g $ limits(min)]792 foreach {min max} $_limits($cname) break 793 $c itemconfigure vmin -text [format %.2g $min] 802 794 $c coords vmin $lx $ly 803 795 804 $c itemconfigure vmax -text [format %.2g $ limits(max)]796 $c itemconfigure vmax -text [format %.2g $max] 805 797 $c coords vmax [expr {$w-$lx}] $ly 806 798 799 set title [$_first hints label] 800 set units [$_first hints units] 801 if { $units != "" } { 802 set title "$title ($units)" 803 } 804 $c itemconfigure title -text $title 805 $c coords title [expr {$w/2}] $ly 807 806 808 807 HideAllMarkers 809 if { [info exists _isomarkers($ tf)] } {810 foreach m $_isomarkers($ tf) {808 if { [info exists _isomarkers($cname)] } { 809 foreach m $_isomarkers($cname) { 811 810 $m visible yes 812 811 } … … 833 832 834 833 # 834 # 835 # ReceiveLegend -- 836 # 837 # The procedure is the response from the render server to each "legend" 838 # command. The server sends back a "legend" command invoked our 839 # the slave interpreter. The purpose is to collect data of the image 840 # representing the legend in the canvas. In addition, the isomarkers 841 # of the active transfer function are displayed. 842 # 843 # I don't know is this is the right place to display the isomarkers. 844 # I don't know all the different paths used to draw the plot. There's 845 # "Rebuild", "add", etc. 846 # 847 itcl::body Rappture::NanovisViewer::ReceiveLegend { cname vmin vmax size } { 848 if { ![isconnected] } { 849 return 850 } 851 set bytes [ReceiveBytes $size] 852 $_image(legend) configure -data $bytes 853 ReceiveEcho <<line "<read $size bytes for [image width $_image(legend)]x[image height $_image(legend)] legend>" 854 855 DrawLegend $_current 856 } 857 858 # 835 859 # ReceiveData -- 836 860 # … … 872 896 SendCmd "volume state 1 $tag" 873 897 } 874 set _limits($tag-min) $info(min); # Minimum value of the volume. 875 set _limits($tag-max) $info(max); # Maximum value of the volume. 876 set _limits(vmin) $info(vmin); # Overall minimum value. 877 set _limits(vmax) $info(vmax); # Overall maximum value. 898 set _limits($tag) [list $info(min) $info(max)] 899 set _limits(v) [list $info(vmin) $info(vmax)] 878 900 879 901 unset _recvdDatasets($tag) … … 882 904 # the first data object. This assumes that the data is always 883 905 # successfully transferred. 884 update transferfuncs906 updateTransferFunctions 885 907 } 886 908 } … … 1008 1030 set cname [lindex [$_first components] 0] 1009 1031 if { [info exists _serverDatasets($_first-$cname)] } { 1010 update transferfuncs1032 updateTransferFunctions 1011 1033 } 1012 1034 } … … 1098 1120 1099 1121 itcl::body Rappture::NanovisViewer::PanCamera {} { 1100 #set x [expr ($_view(xpan)) / $_limits(xrange)]1101 #set y [expr ($_view(ypan)) / $_limits(yrange)]1102 1122 set x $_view(xpan) 1103 1123 set y $_view(ypan) … … 1278 1298 opacity { 1279 1299 error "this should not be called" 1280 set val $_settings($this-opacity) 1281 set sval [expr { 0.01 * double($val) }] 1282 set _settings($this-opacity) $sval 1283 set _settings($_current-opacity) $sval 1284 updatetransferfuncs 1300 set _settings($_current-opacity) $_settings($this-opacity) 1301 updateTransferFunctions 1285 1302 } 1286 1303 thickness { 1287 1304 set val $_settings($this-thickness) 1288 1305 set _settings($_current-thickness) $val 1289 # Scale values between 0.00001 and 0.01000 1290 set sval [expr {0.0001*double($val)}] 1291 updatetransferfuncs 1306 updateTransferFunctions 1292 1307 } 1293 1308 "outline" { … … 1553 1568 # USAGE: UndateTransferFuncs 1554 1569 # ---------------------------------------------------------------------- 1555 itcl::body Rappture::NanovisViewer::update transferfuncs {} {1570 itcl::body Rappture::NanovisViewer::updateTransferFunctions {} { 1556 1571 $_dispatcher event -idle !send_transfunc 1557 1572 } … … 1568 1583 $m relval [expr {double($x-10)/($w-20)}] 1569 1584 lappend _isomarkers($cname) $m 1570 update transferfuncs1585 updateTransferFunctions 1571 1586 return 1 1572 1587 } 1573 1588 1574 itcl::body Rappture::NanovisViewer::r mdupmarker { marker x } {1589 itcl::body Rappture::NanovisViewer::removeDuplicateMarker { marker x } { 1575 1590 set bool 0 1576 1591 if { [info exists _isomarkers($_current)] } { … … 1591 1606 } 1592 1607 set _isomarkers($_current) $list 1593 update transferfuncs1608 updateTransferFunctions 1594 1609 } 1595 1610 return $bool 1596 1611 } 1597 1612 1598 itcl::body Rappture::NanovisViewer::over marker { marker x } {1613 itcl::body Rappture::NanovisViewer::overMarker { marker x } { 1599 1614 if { [info exists _isomarkers($_current)] } { 1600 1615 set marker [namespace tail $marker] … … 1617 1632 } 1618 1633 set min ""; set max "" 1619 foreach tag $_style2datasets($cname){1620 if { ![info exists _ serverDatasets($tag)] } {1634 foreach tag [GetDatasetsWithComponent $cname] { 1635 if { ![info exists _limits($tag)] } { 1621 1636 continue 1622 1637 } 1623 if { ![info exists _limits($tag-min)] } { 1624 continue 1625 } 1626 if { $min == "" || $min > $_limits($tag-min) } { 1627 set min $_limits($tag-min) 1628 } 1629 if { $max == "" || $max < $_limits($tag-max) } { 1630 set max $_limits($tag-max) 1638 foreach {amin amax} $_limits($tag) break 1639 if { $min == "" || $min > $amin } { 1640 set min $amin 1641 } 1642 if { $max == "" || $max < $amax } { 1643 set max $amax 1631 1644 } 1632 1645 } … … 1637 1650 set _limits(max) $max 1638 1651 } 1639 return [ array get _limits]1652 return [list $_limits(min) $_limits(max)] 1640 1653 } 1641 1654 … … 1749 1762 -command [itcl::code $this AdjustSetting specularExponent] 1750 1763 1751 label $inner.transp_l -text " Transparency" -font $font1752 ::scale $inner.transp -from 100 -to0 -orient horizontal \1764 label $inner.transp_l -text "Opacity" -font $font 1765 ::scale $inner.transp -from 0 -to 100 -orient horizontal \ 1753 1766 -variable [itcl::scope _settings($this-transp)] \ 1754 1767 -showvalue off -command [itcl::code $this AdjustSetting transp] … … 2015 2028 itcl::body Rappture::NanovisViewer::SlicerTip {axis} { 2016 2029 set val [$itk_component(${axis}CutScale) get] 2017 # set val [expr {0.01*($val-50)2018 # *($_limits(${axis}max)-$_limits(${axis}min))2019 # + 0.5*($_limits(${axis}max)+$_limits(${axis}min))}]2020 2030 return "Move the [string toupper $axis] cut plane.\nCurrently: $axis = $val%" 2021 2031 }
Note: See TracChangeset
for help on using the changeset viewer.