Changeset 5009 for branches/1.3
- Timestamp:
- Feb 12, 2015, 11:00:22 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.3/gui/scripts/vtkviewer.tcl
r4848 r5009 1 # -*- mode: tcl; indent-tabs-mode: nil -*- 2 1 # -*- mode: tcl; indent-tabs-mode: nil -*- 3 2 # ---------------------------------------------------------------------- 4 3 # COMPONENT: vtkviewer - Vtk drawing object viewer … … 8 7 # ====================================================================== 9 8 # AUTHOR: Michael McLennan, Purdue University 10 # Copyright (c) 2004-201 2HUBzero Foundation, LLC9 # Copyright (c) 2004-2014 HUBzero Foundation, LLC 11 10 # 12 11 # See the file "license.terms" for information on usage and … … 58 57 public method get {args} 59 58 public method isconnected {} 60 public method limits { colormap}61 public method parameters {title args} { 62 # do nothing 59 public method limits { dataobj } 60 public method parameters {title args} { 61 # do nothing 63 62 } 64 63 public method scale {args} 65 64 66 protected method Connect {}67 protected method CurrentDatasets {args}68 protected method Disconnect {}69 protected method DoResize {}70 protected method DoRotate {}71 protected method AdjustSetting {what {value ""}}72 protected method FixSettings { args }73 protected method Pan {option x y}74 protected method Pick {x y}75 protected method Rebuild {}76 protected method ReceiveDataset { args }77 protected method ReceiveImage { args }78 protected method ReceiveLegend { colormap title vmin vmax size }79 protected method Rotate {option x y}80 protected method Zoom {option}81 82 65 # The following methods are only used by this class. 66 private method AdjustSetting {what {value ""}} 83 67 private method BuildAxisTab {} 84 68 private method BuildCameraTab {} 85 69 private method BuildColormap { name styles } 86 70 private method BuildCutawayTab {} 87 private method BuildDownloadPopup { widget command } 71 private method BuildDownloadPopup { widget command } 72 private method BuildGlyphsTab {} 88 73 private method BuildMoleculeTab {} 89 74 private method BuildPolydataTab {} 90 75 private method ChangeColormap { dataobj comp color } 76 private method Connect {} 77 private method CurrentDatasets {args} 78 private method Disconnect {} 79 private method DoResize {} 80 private method DoRotate {} 91 81 private method DrawLegend {} 92 private method EnterLegend { x y } 93 private method EventuallySetAtomScale { args } 94 private method EventuallySetBondScale { args } 95 private method EventuallySetMoleculeOpacity { args } 96 private method EventuallySetMoleculeQuality { args } 97 private method EventuallySetPolydataOpacity { args } 98 private method EventuallyResize { w h } 99 private method EventuallyRotate { q } 100 private method GetImage { args } 101 private method GetVtkData { args } 102 private method IsValidObject { dataobj } 82 private method EnterLegend { x y } 83 private method EventuallyResize { w h } 84 private method EventuallyRotate { q } 85 private method EventuallySetAtomScale { args } 86 private method EventuallySetBondScale { args } 87 private method EventuallySetGlyphsOpacity { args } 88 private method EventuallySetMoleculeOpacity { args } 89 private method EventuallySetMoleculeQuality { args } 90 private method EventuallySetPolydataOpacity { args } 91 private method GetImage { args } 92 private method GetVtkData { args } 93 private method InitSettings { args } 94 private method IsValidObject { dataobj } 103 95 private method LeaveLegend {} 104 private method MotionLegend { x y } 96 private method MotionLegend { x y } 97 private method Pan {option x y} 105 98 private method PanCamera {} 99 private method Pick {x y} 100 private method QuaternionToView { q } { 101 foreach { _view(-qw) _view(-qx) _view(-qy) _view(-qz) } $q break 102 } 103 private method Rebuild {} 104 private method ReceiveDataset { args } 105 private method ReceiveImage { args } 106 private method ReceiveLegend { colormap title vmin vmax size } 106 107 private method RequestLegend {} 108 private method Rotate {option x y} 107 109 private method SetAtomScale {} 108 110 private method SetBondScale {} 109 111 private method SetColormap { dataobj comp } 112 private method SetGlyphsOpacity {} 110 113 private method SetLegendTip { x y } 111 114 private method SetMoleculeOpacity {} 112 115 private method SetMoleculeQuality {} 113 private method SetObjectStyle { dataobj comp } 116 private method SetObjectStyle { dataobj comp } 114 117 private method SetOpacity { dataset } 115 118 private method SetOrientation { side } 116 119 private method SetPolydataOpacity {} 117 private method Slice {option args} 120 private method Slice {option args} 121 private method ViewToQuaternion {} { 122 return [list $_view(-qw) $_view(-qx) $_view(-qy) $_view(-qz)] 123 } 124 private method Zoom {option} 118 125 119 126 private variable _arcball "" 120 private variable _dlist ""; 127 private variable _dlist ""; # list of data objects 121 128 private variable _obj2datasets 122 private variable _obj2ovride; 123 private variable _datasets; # contains all the dataobj-component124 125 private variable _colormaps; 126 127 private variable _dataset2style; 128 private variable _style2datasets; # maps tf back to list of129 129 private variable _obj2ovride; # maps dataobj => style override 130 private variable _datasets; # contains all the dataobj-component 131 # datasets in the server 132 private variable _colormaps; # contains all the colormaps 133 # in the server. 134 private variable _dataset2style; # maps dataobj-component to transfunc 135 private variable _style2datasets; # maps tf back to list of 136 # dataobj-components using the tf. 130 137 private variable _click; # info used for rotate operations 131 138 private variable _limits; # autoscale min/max for all axes … … 157 164 private variable _polydataOpacityPending 0 158 165 private variable _glyphsOpacityPending 0 159 private variable _updatePending 0;160 166 private variable _rotateDelay 150 161 167 private variable _scaleDelay 100 … … 181 187 $_dispatcher register !resize 182 188 $_dispatcher dispatch $this !resize "[itcl::code $this DoResize]; list" 183 184 # Update state event185 $_dispatcher register !update186 $_dispatcher dispatch $this !update "[itcl::code $this DoUpdate]; list"187 189 188 190 # Rotate event … … 214 216 $_dispatcher dispatch $this !polydataOpacity \ 215 217 "[itcl::code $this SetPolydataOpacity]; list" 218 219 # Glyphs opacity event 220 $_dispatcher register !glyphsOpacity 221 $_dispatcher dispatch $this !glyphsOpacity \ 222 "[itcl::code $this SetGlyphsOpacity]; list" 223 216 224 # 217 225 # Populate parser with commands handle incoming requests 218 226 # 219 $_parser alias image 220 $_parser alias dataset 221 $_parser alias legend 227 $_parser alias image [itcl::code $this ReceiveImage] 228 $_parser alias dataset [itcl::code $this ReceiveDataset] 229 $_parser alias legend [itcl::code $this ReceiveLegend] 222 230 223 231 # Initialize the view to some default parameters. 224 232 array set _view { 225 qw 0.853553226 qx -0.353553227 qy0.353553228 qz 0.146447229 zoom 1.0230 xpan 0231 ypan 0232 ortho0233 -ortho 0 234 -qw 0.853553 235 -qx -0.353553 236 -qy 0.353553 237 -qz 0.146447 238 -xpan 0 239 -ypan 0 240 -zoom 1.0 233 241 } 234 242 set _arcball [blt::arcball create 100 100] 235 set q [list $_view(qw) $_view(qx) $_view(qy) $_view(qz)] 236 $_arcball quaternion $q 243 $_arcball quaternion [ViewToQuaternion] 237 244 238 245 set _limits(zmin) 0.0 … … 240 247 241 248 array set _axis [subst { 249 labels 1 250 minorticks 1 251 visible 1 242 252 xgrid 0 243 253 ygrid 0 … … 252 262 ydirection -1 253 263 zdirection -1 254 visible 1255 labels 1256 264 }] 257 265 array set _settings [subst { 266 glyphs-edges 0 267 glyphs-lighting 1 268 glyphs-opacity 100 269 glyphs-outline 0 270 glyphs-palette BCGYR 271 glyphs-visible 1 272 glyphs-wireframe 0 258 273 legend 1 259 glyphs-opacity 100 260 glyphs-wireframe 0 261 polydata-edges 0 262 polydata-lighting 1 263 polydata-opacity 100 264 polydata-palette rainbow 265 polydata-visible 1 266 polydata-wireframe 0 274 molecule-atoms-visible 1 267 275 molecule-atomscale 0.3 276 molecule-bonds-visible 1 268 277 molecule-bondscale 0.075 269 278 molecule-bondstyle "cylinder" 270 molecule-atoms-visible 1271 molecule-bonds-visible 1272 279 molecule-edges 0 273 280 molecule-labels 0 274 281 molecule-lighting 1 275 282 molecule-opacity 100 283 molecule-outline 0 276 284 molecule-palette elementDefault 277 285 molecule-quality 1.0 … … 280 288 molecule-visible 1 281 289 molecule-wireframe 0 290 polydata-edges 0 291 polydata-lighting 1 292 polydata-opacity 100 293 polydata-outline 0 294 polydata-palette BCGYR 295 polydata-visible 1 296 polydata-wireframe 0 282 297 }] 283 298 itk_component add view { … … 304 319 305 320 set _map(id) [$c create image 0 0 -anchor nw -image $_image(plot)] 306 set _map(cwidth) -1 307 set _map(cheight) -1 321 set _map(cwidth) -1 322 set _map(cheight) -1 308 323 set _map(zoom) 1.0 309 324 set _map(original) "" … … 347 362 Rappture::Tooltip::for $itk_component(zoomout) "Zoom out" 348 363 349 BuildAxisTab 350 #BuildCutawayTab 351 BuildCameraTab 364 if { [catch { 365 BuildAxisTab 366 #BuildCutawayTab 367 BuildCameraTab 368 } errs] != 0 } { 369 puts stderr errs=$errs 370 } 352 371 353 372 # Legend 354 355 373 set _image(legend) [image create photo] 356 374 itk_component add legend { 357 canvas $itk_component(plotarea).legend -width 50 -highlightthickness 0 375 canvas $itk_component(plotarea).legend -width 50 -highlightthickness 0 358 376 } { 359 377 usual … … 362 380 } 363 381 364 # Hack around the Tk panewindow. The problem is that the requested 382 # Hack around the Tk panewindow. The problem is that the requested 365 383 # size of the 3d view isn't set until an image is retrieved from 366 384 # the server. So the panewindow uses the tiny size. … … 368 386 pack forget $itk_component(view) 369 387 blt::table $itk_component(plotarea) \ 370 0,0 $itk_component(view) -fill both -reqwidth $w 388 0,0 $itk_component(view) -fill both -reqwidth $w 371 389 blt::table configure $itk_component(plotarea) c1 -resize none 372 390 … … 378 396 bind $itk_component(view) <ButtonRelease-1> \ 379 397 [itcl::code $this Rotate release %x %y] 380 bind $itk_component(view) <Configure> \381 [itcl::code $this EventuallyResize %w %h]382 398 383 399 # Bindings for panning via mouse … … 457 473 458 474 itcl::body Rappture::VtkViewer::DoRotate {} { 459 set q [list $_view(qw) $_view(qx) $_view(qy) $_view(qz)] 460 SendCmd "camera orient $q" 475 SendCmd "camera orient [ViewToQuaternion]" 461 476 set _rotatePending 0 462 477 } … … 473 488 474 489 itcl::body Rappture::VtkViewer::EventuallyRotate { q } { 475 foreach { _view(qw) _view(qx) _view(qy) _view(qz) } $q break490 QuaternionToView $q 476 491 if { !$_rotatePending } { 477 492 set _rotatePending 1 … … 506 521 } 507 522 523 itcl::body Rappture::VtkViewer::SetGlyphsOpacity {} { 524 set _glyphsOpacityPending 0 525 foreach dataset [CurrentDatasets -visible $_first] { 526 foreach { dataobj comp } [split $dataset -] break 527 if { [$dataobj type $comp] == "glyphs" } { 528 SetOpacity $dataset 529 } 530 } 531 } 532 508 533 itcl::body Rappture::VtkViewer::SetPolydataOpacity {} { 509 534 set _polydataOpacityPending 0 … … 548 573 set _polydataOpacityPending 1 549 574 $_dispatcher event -after $_scaleDelay !polydataOpacity 575 } 576 } 577 578 itcl::body Rappture::VtkViewer::EventuallySetGlyphsOpacity { args } { 579 if { !$_glyphsOpacityPending } { 580 set _glyphsOpacityPending 1 581 $_dispatcher event -after $_scaleDelay !glyphsOpacity 550 582 } 551 583 } … … 642 674 continue 643 675 } 644 if {[info exists _obj2ovride($dataobj-raise)] && 676 if {[info exists _obj2ovride($dataobj-raise)] && 645 677 $_obj2ovride($dataobj-raise)} { 646 678 set dlist [linsert $dlist 0 $dataobj] … … 670 702 } 671 703 return $dlist 672 } 704 } 673 705 -image { 674 706 if {[llength $args] != 2} { … … 716 748 } 717 749 array set bounds [limits $dataobj] 718 if { ![info exists _limits(xmin)] || $_limits(xmin) > $bounds(xmin)} {750 if {[info exists bounds(xmin)] && (![info exists _limits(xmin)] || $_limits(xmin) > $bounds(xmin))} { 719 751 set _limits(xmin) $bounds(xmin) 720 752 } 721 if { ![info exists _limits(xmax)] || $_limits(xmax) < $bounds(xmax)} {753 if {[info exists bounds(xmax)] && (![info exists _limits(xmax)] || $_limits(xmax) < $bounds(xmax))} { 722 754 set _limits(xmax) $bounds(xmax) 723 755 } 724 756 725 if { ![info exists _limits(ymin)] || $_limits(ymin) > $bounds(ymin)} {757 if {[info exists bounds(ymin)] && (![info exists _limits(ymin)] || $_limits(ymin) > $bounds(ymin))} { 726 758 set _limits(ymin) $bounds(ymin) 727 759 } 728 if { ![info exists _limits(ymax)] || $_limits(ymax) < $bounds(ymax)} {760 if {[info exists bounds(ymax)] && (![info exists _limits(ymax)] || $_limits(ymax) < $bounds(ymax))} { 729 761 set _limits(ymax) $bounds(ymax) 730 762 } 731 763 732 if { ![info exists _limits(zmin)] || $_limits(zmin) > $bounds(zmin)} {764 if {[info exists bounds(zmin)] && (![info exists _limits(zmin)] || $_limits(zmin) > $bounds(zmin))} { 733 765 set _limits(zmin) $bounds(zmin) 734 766 } 735 if { ![info exists _limits(zmax)] || $_limits(zmax) < $bounds(zmax)} {767 if {[info exists bounds(zmax)] && (![info exists _limits(zmax)] || $_limits(zmax) < $bounds(zmax))} { 736 768 set _limits(zmax) $bounds(zmax) 769 } 770 } 771 if { $_haveGlyphs } { 772 if { ![$itk_component(main) exists "Glyphs Settings"] } { 773 if { [catch { BuildGlyphsTab } errs ] != 0 } { 774 puts stderr "errs=$errs" 775 } 737 776 } 738 777 } … … 828 867 if { $_reportClientInfo } { 829 868 # Tell the server the viewer, hub, user and session. 830 # Do this immediately on connect before buff ing any commands869 # Do this immediately on connect before buffering any commands 831 870 global env 832 871 … … 885 924 886 925 # disconnected -- no more data sitting on server 887 array unset _datasets 888 array unset _data 889 array unset _colormaps 926 set _outbuf "" 927 array unset _datasets 928 array unset _data 929 array unset _colormaps 890 930 global readyForNextFrame 891 931 set readyForNextFrame 1 … … 911 951 if { $info(-type) == "image" } { 912 952 if 0 { 913 set f [open "last.ppm" "w"] 953 set f [open "last.ppm" "w"] 914 954 fconfigure $f -encoding binary 915 955 puts -nonewline $f $bytes … … 989 1029 # Turn on buffering of commands to the server. We don't want to 990 1030 # be preempted by a server disconnect/reconnect (which automatically 991 # generates a new call to Rebuild). 1031 # generates a new call to Rebuild). 992 1032 StartBufferingCommands 993 1033 … … 997 1037 $_arcball resize $w $h 998 1038 DoResize 999 FixSettings axis-xgrid axis-ygrid axis-zgrid axis-mode \ 1000 axis-visible axis-labels 1001 1002 if { $_havePolydata } { 1003 FixSettings polydata-edges polydata-lighting polydata-opacity \ 1004 polydata-visible polydata-wireframe 1005 } 1039 InitSettings axis-xgrid axis-ygrid axis-zgrid axis-mode \ 1040 axis-visible axis-labels axis-minorticks 1041 1006 1042 StopBufferingCommands 1007 1043 SendCmd "imgflush" … … 1025 1061 if { $bytes == "" } { 1026 1062 continue 1063 } 1064 if 0 { 1065 set f [open /tmp/vtkviewer.vtk "w"] 1066 fconfigure $f -translation binary -encoding binary 1067 puts -nonewline $f $bytes 1068 close $f 1027 1069 } 1028 1070 set length [string length $bytes] … … 1037 1079 lappend info "dataset_size" $length 1038 1080 lappend info "dataset_tag" $tag 1039 SendCmd [list "clientinfo" $info]1081 SendCmd "clientinfo [list $info]" 1040 1082 } 1041 1083 SendCmd "dataset add $tag data follows $length" … … 1045 1087 } 1046 1088 lappend _obj2datasets($dataobj) $tag 1089 set type [$dataobj type $comp] 1047 1090 if { [info exists _obj2ovride($dataobj-raise)] } { 1048 SendCmd " datasetvisible 1 $tag"1091 SendCmd "$type visible 1 $tag" 1049 1092 SetOpacity $tag 1050 1093 } … … 1060 1103 set label [$_first hints ${axis}label] 1061 1104 if { $label != "" } { 1062 SendCmd "axis name $axis $label"1105 SendCmd [list axis name $axis $label] 1063 1106 } 1064 1107 set units [$_first hints ${axis}units] 1065 1108 if { $units != "" } { 1066 SendCmd "axis units $axis $units" 1067 } 1068 } 1109 SendCmd [list axis units $axis $units] 1110 } 1111 } 1112 } 1113 if { $_haveGlyphs } { 1114 InitSettings glyphs-outline 1115 } 1116 if { $_haveMolecules } { 1117 InitSettings molecule-outline 1118 } 1119 if { $_havePolydata } { 1120 InitSettings polydata-outline 1069 1121 } 1070 1122 if { $_reset } { 1071 set q [list $_view(qw) $_view(qx) $_view(qy) $_view(qz)] 1072 $_arcball quaternion $q 1123 if { $_haveGlyphs } { 1124 InitSettings glyphs-edges glyphs-lighting glyphs-opacity \ 1125 glyphs-visible glyphs-wireframe 1126 } 1127 if { $_havePolydata } { 1128 InitSettings polydata-edges polydata-lighting polydata-opacity \ 1129 polydata-visible polydata-wireframe 1130 } 1131 if { $_haveMolecules } { 1132 InitSettings molecule-edges molecule-lighting molecule-opacity \ 1133 molecule-visible molecule-wireframe molecule-labels 1134 } 1135 1136 $_arcball quaternion [ViewToQuaternion] 1073 1137 SendCmd "camera reset" 1074 if { $_view( ortho)} {1138 if { $_view(-ortho)} { 1075 1139 SendCmd "camera mode ortho" 1076 1140 } else { … … 1083 1147 1084 1148 if { $_haveMolecules } { 1085 # FixSettings molecule-representation1149 #InitSettings molecule-representation 1086 1150 } 1087 1151 set _reset 0 … … 1106 1170 itcl::body Rappture::VtkViewer::CurrentDatasets {args} { 1107 1171 set flag [lindex $args 0] 1108 switch -- $flag { 1172 switch -- $flag { 1109 1173 "-all" { 1110 1174 if { [llength $args] > 1 } { … … 1125 1189 set dlist [get -visible] 1126 1190 } 1127 } 1191 } 1128 1192 default { 1129 1193 set dlist $args … … 1153 1217 switch -- $option { 1154 1218 "in" { 1155 set _view( zoom) [expr {$_view(zoom)*1.25}]1156 SendCmd "camera zoom $_view( zoom)"1219 set _view(-zoom) [expr {$_view(-zoom)*1.25}] 1220 SendCmd "camera zoom $_view(-zoom)" 1157 1221 } 1158 1222 "out" { 1159 set _view( zoom) [expr {$_view(zoom)*0.8}]1160 SendCmd "camera zoom $_view( zoom)"1223 set _view(-zoom) [expr {$_view(-zoom)*0.8}] 1224 SendCmd "camera zoom $_view(-zoom)" 1161 1225 } 1162 1226 "reset" { 1163 1227 array set _view { 1164 qw 0.8535531165 qx -0.3535531166 qy 0.3535531167 qz 0.1464471168 zoom 1.01169 xpan 01170 ypan01228 -qw 0.853553 1229 -qx -0.353553 1230 -qy 0.353553 1231 -qz 0.146447 1232 -xpan 0 1233 -ypan 0 1234 -zoom 1.0 1171 1235 } 1172 1236 if { $_first != "" } { … … 1176 1240 } 1177 1241 } 1178 set q [list $_view(qw) $_view(qx) $_view(qy) $_view(qz)] 1179 $_arcball quaternion $q 1242 $_arcball quaternion [ViewToQuaternion] 1180 1243 DoRotate 1181 1244 SendCmd "camera reset" … … 1185 1248 1186 1249 itcl::body Rappture::VtkViewer::PanCamera {} { 1187 set x $_view( xpan)1188 set y $_view( ypan)1250 set x $_view(-xpan) 1251 set y $_view(-ypan) 1189 1252 SendCmd "camera pan $x $y" 1190 1253 } … … 1245 1308 foreach tag [CurrentDatasets -visible] { 1246 1309 SendCmd "dataset getscalar pixel $x $y $tag" 1247 } 1310 } 1248 1311 } 1249 1312 … … 1263 1326 set x [expr $x / double($w)] 1264 1327 set y [expr $y / double($h)] 1265 set _view( xpan) [expr $_view(xpan) + $x]1266 set _view( ypan) [expr $_view(ypan) + $y]1328 set _view(-xpan) [expr $_view(-xpan) + $x] 1329 set _view(-ypan) [expr $_view(-ypan) + $y] 1267 1330 PanCamera 1268 1331 return … … 1286 1349 set _click(x) $x 1287 1350 set _click(y) $y 1288 set _view( xpan) [expr $_view(xpan) - $dx]1289 set _view( ypan) [expr $_view(ypan) - $dy]1351 set _view(-xpan) [expr $_view(-xpan) - $dx] 1352 set _view(-ypan) [expr $_view(-ypan) - $dy] 1290 1353 PanCamera 1291 1354 } … … 1301 1364 1302 1365 # ---------------------------------------------------------------------- 1303 # USAGE: FixSettings <what> ?<value>?1366 # USAGE: InitSettings <what> ?<value>? 1304 1367 # 1305 1368 # Used internally to update rendering settings whenever parameters … … 1307 1370 # to the back end. 1308 1371 # ---------------------------------------------------------------------- 1309 itcl::body Rappture::VtkViewer:: FixSettings { args } {1372 itcl::body Rappture::VtkViewer::InitSettings { args } { 1310 1373 foreach setting $args { 1311 1374 AdjustSetting $setting … … 1325 1388 } 1326 1389 switch -- $what { 1390 "glyphs-opacity" { 1391 foreach dataset [CurrentDatasets -visible $_first] { 1392 foreach { dataobj comp } [split $dataset -] break 1393 if { [$dataobj type $comp] == "glyphs" } { 1394 SetOpacity $dataset 1395 } 1396 } 1397 } 1398 "glyphs-outline" { 1399 set bool $_settings($what) 1400 foreach dataset [CurrentDatasets -visible $_first] { 1401 foreach { dataobj comp } [split $dataset -] break 1402 set type [$dataobj type $comp] 1403 if { $type == "glyphs" } { 1404 SendCmd "outline visible $bool $dataset" 1405 } 1406 } 1407 } 1408 "glyphs-wireframe" { 1409 set bool $_settings($what) 1410 foreach dataset [CurrentDatasets -visible $_first] { 1411 foreach { dataobj comp } [split $dataset -] break 1412 set type [$dataobj type $comp] 1413 if { $type == "glyphs" } { 1414 SendCmd "$type wireframe $bool $dataset" 1415 } 1416 } 1417 } 1418 "glyphs-visible" { 1419 set bool $_settings($what) 1420 foreach dataset [CurrentDatasets -visible $_first] { 1421 foreach { dataobj comp } [split $dataset -] break 1422 set type [$dataobj type $comp] 1423 if { $type == "glyphs" } { 1424 SendCmd "$type visible $bool $dataset" 1425 } 1426 } 1427 } 1428 "glyphs-lighting" { 1429 set bool $_settings($what) 1430 foreach dataset [CurrentDatasets -visible $_first] { 1431 foreach { dataobj comp } [split $dataset -] break 1432 set type [$dataobj type $comp] 1433 if { $type == "glyphs" } { 1434 SendCmd "$type lighting $bool $dataset" 1435 } 1436 } 1437 } 1438 "glyphs-edges" { 1439 set bool $_settings($what) 1440 foreach dataset [CurrentDatasets -visible $_first] { 1441 foreach { dataobj comp } [split $dataset -] break 1442 set type [$dataobj type $comp] 1443 if { $type == "glyphs" } { 1444 SendCmd "$type edges $bool $dataset" 1445 } 1446 } 1447 } 1448 "glyphs-palette" { 1449 set palette [$itk_component(glyphspalette) value] 1450 set _settings($what) $palette 1451 foreach dataset [CurrentDatasets -visible $_first] { 1452 foreach {dataobj comp} [split $dataset -] break 1453 set type [$dataobj type $comp] 1454 if { $type == "glyphs" } { 1455 ChangeColormap $dataobj $comp $palette 1456 # FIXME: fill in current selected fieldname 1457 #SendCmd "glyphs colormode scalar {} $dataset" 1458 } 1459 } 1460 set _legendPending 1 1461 } 1327 1462 "polydata-opacity" { 1328 1463 foreach dataset [CurrentDatasets -visible $_first] { … … 1333 1468 } 1334 1469 } 1470 "polydata-outline" { 1471 set bool $_settings($what) 1472 foreach dataset [CurrentDatasets -visible $_first] { 1473 foreach { dataobj comp } [split $dataset -] break 1474 set type [$dataobj type $comp] 1475 if { $type == "polydata" } { 1476 SendCmd "outline visible $bool $dataset" 1477 } 1478 } 1479 } 1335 1480 "polydata-wireframe" { 1336 set bool $_settings( polydata-wireframe)1481 set bool $_settings($what) 1337 1482 foreach dataset [CurrentDatasets -visible $_first] { 1338 1483 foreach { dataobj comp } [split $dataset -] break … … 1344 1489 } 1345 1490 "polydata-visible" { 1346 set bool $_settings( polydata-visible)1491 set bool $_settings($what) 1347 1492 foreach dataset [CurrentDatasets -visible $_first] { 1348 1493 foreach { dataobj comp } [split $dataset -] break … … 1354 1499 } 1355 1500 "polydata-lighting" { 1356 set bool $_settings( polydata-lighting)1501 set bool $_settings($what) 1357 1502 foreach dataset [CurrentDatasets -visible $_first] { 1358 1503 foreach { dataobj comp } [split $dataset -] break … … 1364 1509 } 1365 1510 "polydata-edges" { 1366 set bool $_settings( polydata-edges)1511 set bool $_settings($what) 1367 1512 foreach dataset [CurrentDatasets -visible $_first] { 1368 1513 foreach { dataobj comp } [split $dataset -] break … … 1375 1520 "polydata-palette" { 1376 1521 set palette [$itk_component(meshpalette) value] 1377 set _settings( polydata-palette) $palette1522 set _settings($what) $palette 1378 1523 foreach dataset [CurrentDatasets -visible $_first] { 1379 1524 foreach {dataobj comp} [split $dataset -] break … … 1388 1533 } 1389 1534 "molecule-opacity" { 1390 set val $_settings(molecule-opacity)1391 set sval [expr { 0.01 * double($val) }]1392 1535 foreach dataset [CurrentDatasets -visible $_first] { 1393 1536 foreach { dataobj comp } [split $dataset -] break … … 1397 1540 } 1398 1541 } 1542 "molecule-outline" { 1543 set bool $_settings($what) 1544 foreach dataset [CurrentDatasets -visible $_first] { 1545 foreach { dataobj comp } [split $dataset -] break 1546 set type [$dataobj type $comp] 1547 if { $type == "molecule" } { 1548 SendCmd "outline visible $bool $dataset" 1549 } 1550 } 1551 } 1399 1552 "molecule-wireframe" { 1400 set bool $_settings( molecule-wireframe)1553 set bool $_settings($what) 1401 1554 foreach dataset [CurrentDatasets -visible $_first] { 1402 1555 foreach { dataobj comp } [split $dataset -] break … … 1408 1561 } 1409 1562 "molecule-visible" { 1410 set bool $_settings( molecule-visible)1563 set bool $_settings($what) 1411 1564 foreach dataset [CurrentDatasets -visible $_first] { 1412 1565 foreach { dataobj comp } [split $dataset -] break … … 1418 1571 } 1419 1572 "molecule-lighting" { 1420 set bool $_settings( molecule-lighting)1573 set bool $_settings($what) 1421 1574 foreach dataset [CurrentDatasets -visible $_first] { 1422 1575 foreach { dataobj comp } [split $dataset -] break … … 1428 1581 } 1429 1582 "molecule-edges" { 1430 set bool $_settings( molecule-edges)1583 set bool $_settings($what) 1431 1584 foreach dataset [CurrentDatasets -visible $_first] { 1432 1585 foreach { dataobj comp } [split $dataset -] break … … 1439 1592 "molecule-palette" { 1440 1593 set palette [$itk_component(moleculepalette) value] 1441 set _ moelculeSettings(palette) $palette1594 set _settings($what) $palette 1442 1595 foreach dataset [CurrentDatasets -visible $_first] { 1443 1596 foreach {dataobj comp} [split $dataset -] break … … 1503 1656 set _settings(molecule-atoms-visible) 0 1504 1657 set _settings(molecule-bonds-visible) 1 1505 set _settings(molecule-bondstyle) cylinder1658 set _settings(molecule-bondstyle) line 1506 1659 set _settings(molecule-atomscale) 1.0 1507 1660 set _settings(molecule-bondscale) 1.0 … … 1524 1677 set type [$dataobj type $comp] 1525 1678 if { $type == "molecule" } { 1526 SendCmd [subst {molecule rscale $_settings(molecule-rscale) $dataset 1527 molecule ascale $_settings(molecule-atomscale) $dataset 1528 molecule bscale $_settings(molecule-bondscale) $dataset 1529 molecule bstyle $_settings(molecule-bondstyle) $dataset 1530 molecule atoms $_settings(molecule-atoms-visible) $dataset 1531 molecule bonds $_settings(molecule-bonds-visible) $dataset}] 1679 StartBufferingCommands 1680 SendCmd [subst {molecule rscale $_settings(molecule-rscale) $dataset}] 1681 SendCmd [subst {molecule ascale $_settings(molecule-atomscale) $dataset}] 1682 SendCmd [subst {molecule bscale $_settings(molecule-bondscale) $dataset}] 1683 SendCmd [subst {molecule bstyle $_settings(molecule-bondstyle) $dataset}] 1684 SendCmd [subst {molecule atoms $_settings(molecule-atoms-visible) $dataset}] 1685 SendCmd [subst {molecule bonds $_settings(molecule-bonds-visible) $dataset}] 1686 StopBufferingCommands 1532 1687 } 1533 1688 } … … 1536 1691 set value [$itk_component(rscale) value] 1537 1692 set value [$itk_component(rscale) translate $value] 1538 set _settings( molecule-rscale) $value1693 set _settings($what) $value 1539 1694 foreach dataset [CurrentDatasets -visible $_first] { 1540 1695 foreach {dataobj comp} [split $dataset -] break 1541 1696 set type [$dataobj type $comp] 1542 1697 if { $type == "molecule" } { 1543 SendCmd [subst {molecule rscale $_settings( molecule-rscale) $dataset}]1698 SendCmd [subst {molecule rscale $_settings($what) $dataset}] 1544 1699 } 1545 1700 } 1546 1701 } 1547 1702 "molecule-labels" { 1548 set bool $_settings( molecule-labels)1703 set bool $_settings($what) 1549 1704 foreach dataset [CurrentDatasets -visible $_first] { 1550 1705 foreach { dataobj comp } [split $dataset -] break … … 1562 1717 set bool $_axis(labels) 1563 1718 SendCmd "axis labels all $bool" 1719 } 1720 "axis-minorticks" { 1721 set bool $_axis(minorticks) 1722 SendCmd "axis minticks all $bool" 1564 1723 } 1565 1724 "axis-xgrid" { … … 1595 1754 } 1596 1755 } 1597 "axis-xposition" - "axis-yposition" - "axis-zposition" - 1756 "axis-xposition" - "axis-yposition" - "axis-zposition" - 1598 1757 "axis-xdirection" - "axis-ydirection" - "axis-zdirection" { 1599 1758 set axis [string range $what 5 5] … … 1618 1777 set font "Arial 8" 1619 1778 set lineht [font metrics $font -linespace] 1620 set c $itk_component(legend)1621 1779 set w 12 1622 1780 set h [expr {$_height - 2 * ($lineht + 2)}] 1623 if { $h < 1 } {1781 if { $h < 1 } { 1624 1782 return 1625 1783 } … … 1727 1885 itcl::configbody Rappture::VtkViewer::plotbackground { 1728 1886 if { [isconnected] } { 1729 foreach {r g b} [Color2RGB $itk_option(-plotbackground)] break1730 SendCmd "screen bgcolor $r $g $b"1887 set rgb [Color2RGB $itk_option(-plotbackground)] 1888 SendCmd "screen bgcolor $rgb" 1731 1889 } 1732 1890 } … … 1737 1895 itcl::configbody Rappture::VtkViewer::plotforeground { 1738 1896 if { [isconnected] } { 1739 foreach {r g b} [Color2RGB $itk_option(-plotforeground)] break1740 #fix this!1741 #SendCmd "color background $r $g $b"1897 set rgb [Color2RGB $itk_option(-plotforeground)] 1898 SendCmd "axis color all $rgb" 1899 SendCmd "outline color $rgb" 1742 1900 } 1743 1901 } … … 1754 1912 set f [open "$tmpfile" "w"] 1755 1913 fconfigure $f -translation binary -encoding binary 1756 puts $f $data 1914 puts $f $data 1757 1915 close $f 1758 1916 set reader [vtkDataSetReader $tag-xvtkDataSetReader] … … 1772 1930 file delete $tmpfile 1773 1931 set output [$reader GetOutput] 1932 if { $output == "" } { 1933 # Invalid VTK file -- loader failed to parse 1934 continue 1935 } 1774 1936 set _limits($tag) [$output GetBounds] 1775 1937 if {$debug} { … … 1830 1992 } 1831 1993 1832 itcl::body Rappture::VtkViewer::Build PolydataTab {} {1994 itcl::body Rappture::VtkViewer::BuildGlyphsTab {} { 1833 1995 1834 1996 set fg [option get $itk_component(hull) font Font] 1835 1997 #set bfg [option get $itk_component(hull) boldFont Font] 1836 1998 1837 set inner [$itk_component(main) insert end \ 1999 set inner [$itk_component(main) insert 0 \ 2000 -title "Glyph Settings" \ 2001 -icon [Rappture::icon volume-on]] 2002 $inner configure -borderwidth 4 2003 2004 checkbutton $inner.glyphs \ 2005 -text "Show Glyphs" \ 2006 -variable [itcl::scope _settings(glyphs-visible)] \ 2007 -command [itcl::code $this AdjustSetting glyphs-visible] \ 2008 -font "Arial 9" -anchor w 2009 2010 checkbutton $inner.outline \ 2011 -text "Show Outline" \ 2012 -variable [itcl::scope _settings(glyphs-outline)] \ 2013 -command [itcl::code $this AdjustSetting glyphs-outline] \ 2014 -font "Arial 9" -anchor w 2015 2016 checkbutton $inner.wireframe \ 2017 -text "Show Wireframe" \ 2018 -variable [itcl::scope _settings(glyphs-wireframe)] \ 2019 -command [itcl::code $this AdjustSetting glyphs-wireframe] \ 2020 -font "Arial 9" -anchor w 2021 2022 checkbutton $inner.lighting \ 2023 -text "Enable Lighting" \ 2024 -variable [itcl::scope _settings(glyphs-lighting)] \ 2025 -command [itcl::code $this AdjustSetting glyphs-lighting] \ 2026 -font "Arial 9" -anchor w 2027 2028 checkbutton $inner.edges \ 2029 -text "Show Edges" \ 2030 -variable [itcl::scope _settings(glyphs-edges)] \ 2031 -command [itcl::code $this AdjustSetting glyphs-edges] \ 2032 -font "Arial 9" -anchor w 2033 2034 label $inner.palette_l -text "Palette" -font "Arial 9" -anchor w 2035 itk_component add glyphspalette { 2036 Rappture::Combobox $inner.palette -width 10 -editable no 2037 } 2038 $inner.palette choices insert end [GetColormapList] 2039 $itk_component(glyphspalette) value "BCGYR" 2040 bind $inner.palette <<Value>> \ 2041 [itcl::code $this AdjustSetting glyphs-palette] 2042 2043 label $inner.opacity_l -text "Opacity" -font "Arial 9" -anchor w 2044 ::scale $inner.opacity -from 0 -to 100 -orient horizontal \ 2045 -variable [itcl::scope _settings(glyphs-opacity)] \ 2046 -width 10 \ 2047 -showvalue off \ 2048 -command [itcl::code $this EventuallySetGlyphsOpacity] 2049 $inner.opacity set $_settings(glyphs-opacity) 2050 2051 blt::table $inner \ 2052 0,0 $inner.glyphs -cspan 2 -anchor w -pady 2 \ 2053 1,0 $inner.outline -cspan 2 -anchor w -pady 2 \ 2054 2,0 $inner.wireframe -cspan 2 -anchor w -pady 2 \ 2055 3,0 $inner.lighting -cspan 2 -anchor w -pady 2 \ 2056 4,0 $inner.edges -cspan 2 -anchor w -pady 2 \ 2057 5,0 $inner.opacity_l -anchor w -pady 2 \ 2058 5,1 $inner.opacity -fill x -pady 2 \ 2059 6,0 $inner.palette_l -anchor w -pady 2 \ 2060 6,1 $inner.palette -fill x -pady 2 2061 2062 blt::table configure $inner r* c* -resize none 2063 blt::table configure $inner r8 c1 -resize expand 2064 } 2065 2066 itcl::body Rappture::VtkViewer::BuildPolydataTab {} { 2067 2068 set fg [option get $itk_component(hull) font Font] 2069 #set bfg [option get $itk_component(hull) boldFont Font] 2070 2071 set inner [$itk_component(main) insert 0 \ 1838 2072 -title "Mesh Settings" \ 1839 2073 -icon [Rappture::icon mesh]] … … 1844 2078 -variable [itcl::scope _settings(polydata-visible)] \ 1845 2079 -command [itcl::code $this AdjustSetting polydata-visible] \ 1846 -font "Arial 9" -anchor w 2080 -font "Arial 9" -anchor w 2081 2082 checkbutton $inner.outline \ 2083 -text "Show Outline" \ 2084 -variable [itcl::scope _settings(polydata-outline)] \ 2085 -command [itcl::code $this AdjustSetting polydata-outline] \ 2086 -font "Arial 9" -anchor w 1847 2087 1848 2088 checkbutton $inner.wireframe \ … … 1850 2090 -variable [itcl::scope _settings(polydata-wireframe)] \ 1851 2091 -command [itcl::code $this AdjustSetting polydata-wireframe] \ 1852 -font "Arial 9" -anchor w 2092 -font "Arial 9" -anchor w 1853 2093 1854 2094 checkbutton $inner.lighting \ … … 1864 2104 -font "Arial 9" -anchor w 1865 2105 1866 label $inner.palette_l -text "Palette" -font "Arial 9" -anchor w 2106 label $inner.palette_l -text "Palette" -font "Arial 9" -anchor w 1867 2107 itk_component add meshpalette { 1868 2108 Rappture::Combobox $inner.palette -width 10 -editable no 1869 2109 } 1870 $inner.palette choices insert end \ 1871 "BCGYR" "BCGYR" \ 1872 "BGYOR" "BGYOR" \ 1873 "blue" "blue" \ 1874 "blue-to-brown" "blue-to-brown" \ 1875 "blue-to-orange" "blue-to-orange" \ 1876 "blue-to-grey" "blue-to-grey" \ 1877 "green-to-magenta" "green-to-magenta" \ 1878 "greyscale" "greyscale" \ 1879 "nanohub" "nanohub" \ 1880 "rainbow" "rainbow" \ 1881 "spectral" "spectral" \ 1882 "ROYGB" "ROYGB" \ 1883 "RYGCB" "RYGCB" \ 1884 "brown-to-blue" "brown-to-blue" \ 1885 "grey-to-blue" "grey-to-blue" \ 1886 "orange-to-blue" "orange-to-blue" 1887 2110 $inner.palette choices insert end [GetColormapList] 1888 2111 $itk_component(meshpalette) value "BCGYR" 1889 2112 bind $inner.palette <<Value>> \ 1890 2113 [itcl::code $this AdjustSetting polydata-palette] 1891 2114 1892 label $inner.opacity_l -text "Opacity" -font "Arial 9" -anchor w 2115 label $inner.opacity_l -text "Opacity" -font "Arial 9" -anchor w 1893 2116 ::scale $inner.opacity -from 0 -to 100 -orient horizontal \ 1894 2117 -variable [itcl::scope _settings(polydata-opacity)] \ 1895 2118 -width 10 \ 1896 2119 -showvalue off \ 1897 -command [itcl::code $this AdjustSetting polydata-opacity]2120 -command [itcl::code $this EventuallySetPolydataOpacity] 1898 2121 $inner.opacity set $_settings(polydata-opacity) 1899 2122 1900 2123 blt::table $inner \ 1901 2124 0,0 $inner.mesh -cspan 2 -anchor w -pady 2 \ 1902 1,0 $inner.wireframe -cspan 2 -anchor w -pady 2 \ 1903 2,0 $inner.lighting -cspan 2 -anchor w -pady 2 \ 1904 3,0 $inner.edges -cspan 2 -anchor w -pady 2 \ 1905 4,0 $inner.opacity_l -anchor w -pady 2 \ 1906 4,1 $inner.opacity -fill x -pady 2 \ 1907 5,0 $inner.palette_l -anchor w -pady 2 \ 1908 5,1 $inner.palette -fill x -pady 2 2125 1,0 $inner.outline -cspan 2 -anchor w -pady 2 \ 2126 2,0 $inner.wireframe -cspan 2 -anchor w -pady 2 \ 2127 3,0 $inner.lighting -cspan 2 -anchor w -pady 2 \ 2128 4,0 $inner.edges -cspan 2 -anchor w -pady 2 \ 2129 5,0 $inner.opacity_l -anchor w -pady 2 \ 2130 5,1 $inner.opacity -fill x -pady 2 \ 2131 6,0 $inner.palette_l -anchor w -pady 2 \ 2132 6,1 $inner.palette -fill x -pady 2 1909 2133 1910 2134 blt::table configure $inner r* c* -resize none 1911 blt::table configure $inner r 7c1 -resize expand2135 blt::table configure $inner r8 c1 -resize expand 1912 2136 } 1913 2137 … … 1919 2143 set inner [$itk_component(main) insert end \ 1920 2144 -title "Axis Settings" \ 1921 -icon [Rappture::icon axis 1]]2145 -icon [Rappture::icon axis2]] 1922 2146 $inner configure -borderwidth 4 1923 2147 1924 2148 checkbutton $inner.visible \ 1925 -text " ShowAxes" \2149 -text "Axes" \ 1926 2150 -variable [itcl::scope _axis(visible)] \ 1927 2151 -command [itcl::code $this AdjustSetting axis-visible] \ … … 1929 2153 1930 2154 checkbutton $inner.labels \ 1931 -text " ShowAxis Labels" \2155 -text "Axis Labels" \ 1932 2156 -variable [itcl::scope _axis(labels)] \ 1933 2157 -command [itcl::code $this AdjustSetting axis-labels] \ 1934 2158 -font "Arial 9" 1935 1936 checkbutton $inner. gridx\1937 -text " Show X Grid" \2159 label $inner.grid_l -text "Grid" -font "Arial 9" 2160 checkbutton $inner.xgrid \ 2161 -text "X" \ 1938 2162 -variable [itcl::scope _axis(xgrid)] \ 1939 2163 -command [itcl::code $this AdjustSetting axis-xgrid] \ 1940 2164 -font "Arial 9" 1941 checkbutton $inner. gridy\1942 -text " Show Y Grid" \2165 checkbutton $inner.ygrid \ 2166 -text "Y" \ 1943 2167 -variable [itcl::scope _axis(ygrid)] \ 1944 2168 -command [itcl::code $this AdjustSetting axis-ygrid] \ 1945 2169 -font "Arial 9" 1946 checkbutton $inner. gridz\1947 -text " Show Z Grid" \2170 checkbutton $inner.zgrid \ 2171 -text "Z" \ 1948 2172 -variable [itcl::scope _axis(zgrid)] \ 1949 2173 -command [itcl::code $this AdjustSetting axis-zgrid] \ 1950 2174 -font "Arial 9" 1951 1952 label $inner.mode_l -text "Mode" -font "Arial 9" 2175 checkbutton $inner.minorticks \ 2176 -text "Minor Ticks" \ 2177 -variable [itcl::scope _axis(minorticks)] \ 2178 -command [itcl::code $this AdjustSetting axis-minorticks] \ 2179 -font "Arial 9" 2180 2181 label $inner.mode_l -text "Mode" -font "Arial 9" 1953 2182 1954 2183 itk_component add axismode { … … 1958 2187 "static_triad" "static" \ 1959 2188 "closest_triad" "closest" \ 1960 "furthest_triad" "f urthest" \1961 "outer_edges" "outer" 2189 "furthest_triad" "farthest" \ 2190 "outer_edges" "outer" 1962 2191 $itk_component(axismode) value "static" 1963 2192 bind $inner.mode <<Value>> [itcl::code $this AdjustSetting axis-mode] 1964 2193 1965 2194 blt::table $inner \ 1966 0,0 $inner.visible -anchor w -cspan 2 \ 1967 1,0 $inner.labels -anchor w -cspan 2 \ 1968 2,0 $inner.gridx -anchor w -cspan 2 \ 1969 3,0 $inner.gridy -anchor w -cspan 2 \ 1970 4,0 $inner.gridz -anchor w -cspan 2 \ 1971 5,0 $inner.mode_l -anchor w -cspan 2 -padx { 2 0 } \ 1972 6,0 $inner.mode -fill x -cspan 2 2195 0,0 $inner.visible -anchor w -cspan 4 \ 2196 1,0 $inner.labels -anchor w -cspan 4 \ 2197 2,0 $inner.minorticks -anchor w -cspan 4 \ 2198 4,0 $inner.grid_l -anchor w \ 2199 4,1 $inner.xgrid -anchor w \ 2200 4,2 $inner.ygrid -anchor w \ 2201 4,3 $inner.zgrid -anchor w \ 2202 5,0 $inner.mode_l -anchor w -padx { 2 0 } \ 2203 5,1 $inner.mode -fill x -cspan 3 1973 2204 1974 2205 blt::table configure $inner r* c* -resize none 1975 blt::table configure $inner r7 c1 -resize expand 2206 blt::table configure $inner r7 c6 -resize expand 2207 blt::table configure $inner r3 -height 0.125i 1976 2208 } 1977 2209 … … 1994 2226 0,0 $inner.view_l -anchor e -pady 2 \ 1995 2227 0,1 $inner.view -anchor w -pady 2 2228 blt::table configure $inner r0 -resize none 1996 2229 1997 2230 set labels { qx qy qz qw xpan ypan zoom } … … 2000 2233 label $inner.${tag}label -text $tag -font "Arial 9" 2001 2234 entry $inner.${tag} -font "Arial 9" -bg white \ 2002 -textvariable [itcl::scope _view($tag)] 2003 bind $inner.${tag} <KeyPress-Return> \ 2004 [itcl::code $this camera set ${tag}] 2235 -textvariable [itcl::scope _view(-$tag)] 2236 bind $inner.${tag} <Return> \ 2237 [itcl::code $this camera set -${tag}] 2238 bind $inner.${tag} <KP_Enter> \ 2239 [itcl::code $this camera set -${tag}] 2005 2240 blt::table $inner \ 2006 2241 $row,0 $inner.${tag}label -anchor e -pady 2 \ … … 2011 2246 checkbutton $inner.ortho \ 2012 2247 -text "Orthographic Projection" \ 2013 -variable [itcl::scope _view( ortho)] \2014 -command [itcl::code $this camera set ortho] \2248 -variable [itcl::scope _view(-ortho)] \ 2249 -command [itcl::code $this camera set -ortho] \ 2015 2250 -font "Arial 9" 2016 2251 blt::table $inner \ … … 2019 2254 incr row 2020 2255 2021 blt::table configure $inner c* r*-resize none2256 blt::table configure $inner c* -resize none 2022 2257 blt::table configure $inner c2 -resize expand 2023 2258 blt::table configure $inner r$row -resize expand … … 2027 2262 2028 2263 set fg [option get $itk_component(hull) font Font] 2029 2264 2030 2265 set inner [$itk_component(main) insert end \ 2031 2266 -title "Cutaway Along Axis" \ 2032 -icon [Rappture::icon cutbutton]] 2267 -icon [Rappture::icon cutbutton]] 2033 2268 2034 2269 $inner configure -borderwidth 4 … … 2070 2305 -variable [itcl::scope _axis(xdirection)] 2071 2306 } 2072 set _axis(xdirection) -1 2307 set _axis(xdirection) -1 2073 2308 Rappture::Tooltip::for $itk_component(xDirButton) \ 2074 2309 "Toggle the direction of the X-axis cutaway" … … 2112 2347 Rappture::Tooltip::for $itk_component(yDirButton) \ 2113 2348 "Toggle the direction of the Y-axis cutaway" 2114 set _axis(ydirection) -1 2349 set _axis(ydirection) -1 2115 2350 2116 2351 # Z-value slicer... … … 2137 2372 $itk_component(zCutScale) set 100 2138 2373 $itk_component(zCutScale) configure -state disabled 2139 #$itk_component(zCutScale) configure -state disabled2140 2374 Rappture::Tooltip::for $itk_component(zCutScale) \ 2141 2375 "@[itcl::code $this Slice tooltip z]" … … 2150 2384 -variable [itcl::scope _axis(zdirection)] 2151 2385 } 2152 set _axis(zdirection) -1 2386 set _axis(zdirection) -1 2153 2387 Rappture::Tooltip::for $itk_component(zDirButton) \ 2154 2388 "Toggle the direction of the Z-axis cutaway" … … 2169 2403 set fg [option get $itk_component(hull) font Font] 2170 2404 2171 set inner [$itk_component(main) insert end\2405 set inner [$itk_component(main) insert 0 \ 2172 2406 -title "Molecule Settings" \ 2173 2407 -icon [Rappture::icon molecule]] … … 2180 2414 -font "Arial 9" 2181 2415 2416 checkbutton $inner.outline \ 2417 -text "Show Outline" \ 2418 -variable [itcl::scope _settings(molecule-outline)] \ 2419 -command [itcl::code $this AdjustSetting molecule-outline] \ 2420 -font "Arial 9" 2421 2182 2422 checkbutton $inner.label \ 2183 2423 -text "Show Atom Labels" \ … … 2212 2452 $inner.rep choices insert end \ 2213 2453 "ballandstick" "Ball and Stick" \ 2214 "spheres" 2215 "sticks" "Sticks"\2216 "rods" 2217 "wireframe" "Wireframe" 2218 "spacefilling" "Space Filling" 2454 "spheres" "Spheres" \ 2455 "sticks" "Sticks" \ 2456 "rods" "Rods" \ 2457 "wireframe" "Wireframe" \ 2458 "spacefilling" "Space Filling" 2219 2459 2220 2460 bind $inner.rep <<Value>> \ … … 2229 2469 } 2230 2470 $inner.rscale choices insert end \ 2231 "atomic" 2232 "covalent" 2233 "van_der_waals" "VDW"\2234 "none" 2471 "atomic" "Atomic" \ 2472 "covalent" "Covalent" \ 2473 "van_der_waals" "VDW" \ 2474 "none" "Constant" 2235 2475 2236 2476 bind $inner.rscale <<Value>> \ … … 2238 2478 $inner.rscale value "Covalent" 2239 2479 2240 label $inner.palette_l -text "Palette" -font "Arial 9" 2480 label $inner.palette_l -text "Palette" -font "Arial 9" 2241 2481 itk_component add moleculepalette { 2242 2482 Rappture::Combobox $inner.palette -width 10 -editable no 2243 2483 } 2244 $inner.palette choices insert end \ 2245 "elementDefault" "elementDefault" \ 2246 "BCGYR" "BCGYR" \ 2247 "BGYOR" "BGYOR" \ 2248 "blue" "blue" \ 2249 "blue-to-brown" "blue-to-brown" \ 2250 "blue-to-orange" "blue-to-orange" \ 2251 "blue-to-grey" "blue-to-grey" \ 2252 "green-to-magenta" "green-to-magenta" \ 2253 "greyscale" "greyscale" \ 2254 "nanohub" "nanohub" \ 2255 "rainbow" "rainbow" \ 2256 "spectral" "spectral" \ 2257 "ROYGB" "ROYGB" \ 2258 "RYGCB" "RYGCB" \ 2259 "brown-to-blue" "brown-to-blue" \ 2260 "grey-to-blue" "grey-to-blue" \ 2261 "orange-to-blue" "orange-to-blue" 2262 2484 $inner.palette choices insert end [GetColormapList -includeElementDefault] 2263 2485 $itk_component(moleculepalette) value "elementDefault" 2264 2486 bind $inner.palette <<Value>> \ 2265 2487 [itcl::code $this AdjustSetting molecule-palette] 2266 2267 checkbutton $inner.labels -text "Show labels on atoms" \2268 -command [itcl::code $this labels update] \2269 -variable [itcl::scope _settings(molecule-labels)] \2270 -font "Arial 9"2271 Rappture::Tooltip::for $inner.labels \2272 "Display atom symbol and serial number."2273 2274 checkbutton $inner.rock -text "Rock molecule back and forth" \2275 -variable [itcl::scope _settings(molecule-rock)] \2276 -font "Arial 9"2277 Rappture::Tooltip::for $inner.rock \2278 "Rotate the object back and forth around the y-axis."2279 2280 checkbutton $inner.cell -text "Parallelepiped" \2281 -font "Arial 9"2282 $inner.cell select2283 2488 2284 2489 label $inner.atomscale_l -text "Atom Scale" -font "Arial 9" … … 2321 2526 blt::table $inner \ 2322 2527 0,0 $inner.molecule -anchor w -pady {1 0} \ 2323 1,0 $inner.label -anchor w -pady {1 0} \ 2324 2,0 $inner.edges -anchor w -pady {1 0} \ 2325 3,0 $inner.rep_l -anchor w -pady { 2 0 } \ 2326 4,0 $inner.rep -fill x -pady 2 \ 2327 5,0 $inner.rscale_l -anchor w -pady { 2 0 } \ 2328 6,0 $inner.rscale -fill x -pady 2 \ 2329 7,0 $inner.palette_l -anchor w -pady 0 \ 2330 8,0 $inner.palette -fill x -padx 2 \ 2331 9,0 $inner.atomscale_l -anchor w -pady {3 0} \ 2332 10,0 $inner.atomscale -fill x -padx 2 \ 2333 11,0 $inner.bondscale_l -anchor w -pady {3 0} \ 2334 12,0 $inner.bondscale -fill x -padx 2 \ 2335 13,0 $inner.opacity_l -anchor w -pady {3 0} \ 2336 14,0 $inner.opacity -fill x -padx 2 \ 2337 15,0 $inner.quality_l -anchor w -pady {3 0} \ 2338 16,0 $inner.quality -fill x -padx 2 2339 2528 1,0 $inner.outline -anchor w -pady {1 0} \ 2529 2,0 $inner.label -anchor w -pady {1 0} \ 2530 3,0 $inner.edges -anchor w -pady {1 0} \ 2531 4,0 $inner.rep_l -anchor w -pady { 2 0 } \ 2532 5,0 $inner.rep -fill x -pady 2 \ 2533 6,0 $inner.rscale_l -anchor w -pady { 2 0 } \ 2534 7,0 $inner.rscale -fill x -pady 2 \ 2535 8,0 $inner.palette_l -anchor w -pady 0 \ 2536 9,0 $inner.palette -fill x -padx 2 \ 2537 10,0 $inner.atomscale_l -anchor w -pady {3 0} \ 2538 11,0 $inner.atomscale -fill x -padx 2 \ 2539 12,0 $inner.bondscale_l -anchor w -pady {3 0} \ 2540 13,0 $inner.bondscale -fill x -padx 2 \ 2541 14,0 $inner.opacity_l -anchor w -pady {3 0} \ 2542 15,0 $inner.opacity -fill x -padx 2 \ 2543 16,0 $inner.quality_l -anchor w -pady {3 0} \ 2544 17,0 $inner.quality -fill x -padx 2 2545 2340 2546 blt::table configure $inner r* -resize none 2341 blt::table configure $inner r1 7-resize expand2342 } 2343 2344 # 2345 # camera -- 2547 blt::table configure $inner r18 -resize expand 2548 } 2549 2550 # 2551 # camera -- 2346 2552 # 2347 2553 itcl::body Rappture::VtkViewer::camera {option args} { 2348 switch -- $option { 2554 switch -- $option { 2349 2555 "show" { 2350 2556 puts [array get _view] 2351 2557 } 2352 2558 "set" { 2353 set wh o[lindex $args 0]2354 set x $_view($wh o)2559 set what [lindex $args 0] 2560 set x $_view($what) 2355 2561 set code [catch { string is double $x } result] 2356 2562 if { $code != 0 || !$result } { 2357 2563 return 2358 2564 } 2359 switch -- $wh o{2360 " ortho" {2361 if {$_view( ortho)} {2565 switch -- $what { 2566 "-ortho" { 2567 if {$_view($what)} { 2362 2568 SendCmd "camera mode ortho" 2363 2569 } else { … … 2365 2571 } 2366 2572 } 2367 " xpan" - "ypan" {2573 "-xpan" - "-ypan" { 2368 2574 PanCamera 2369 2575 } 2370 " qx" - "qy" - "qz" - "qw" {2371 set q [ list $_view(qw) $_view(qx) $_view(qy) $_view(qz)]2576 "-qx" - "-qy" - "-qz" - "-qw" { 2577 set q [ViewToQuaternion] 2372 2578 $_arcball quaternion $q 2373 2579 EventuallyRotate $q 2374 2580 } 2375 " zoom" {2376 SendCmd "camera zoom $_view( zoom)"2581 "-zoom" { 2582 SendCmd "camera zoom $_view($what)" 2377 2583 } 2378 2584 } … … 2394 2600 2395 2601 itcl::body Rappture::VtkViewer::GetImage { args } { 2396 if { [image width $_image(download)] > 0 && 2602 if { [image width $_image(download)] > 0 && 2397 2603 [image height $_image(download)] > 0 } { 2398 2604 set bytes [$_image(download) data -format "jpeg -quality 100"] … … 2407 2613 -title "[Rappture::filexfer::label downloadWord] as..." 2408 2614 set inner [$popup component inner] 2409 label $inner.summary -text "" -anchor w 2615 label $inner.summary -text "" -anchor w 2410 2616 radiobutton $inner.vtk_button -text "VTK data file" \ 2411 2617 -variable [itcl::scope _downloadPopup(format)] \ 2412 2618 -font "Helvetica 9 " \ 2413 -value vtk 2619 -value vtk 2414 2620 Rappture::Tooltip::for $inner.vtk_button "Save as VTK data file." 2415 2621 radiobutton $inner.image_button -text "Image File" \ 2416 2622 -variable [itcl::scope _downloadPopup(format)] \ 2417 -value image 2623 -value image 2418 2624 Rappture::Tooltip::for $inner.image_button \ 2419 2625 "Save as digital image." … … 2436 2642 2,0 $inner.image_button -anchor w -cspan 2 -padx { 4 0 } \ 2437 2643 4,1 $inner.cancel -width .9i -fill y \ 2438 4,0 $inner.ok -padx 2 -width .9i -fill y 2644 4,0 $inner.ok -padx 2 -width .9i -fill y 2439 2645 blt::table configure $inner r3 -height 4 2440 2646 blt::table configure $inner r4 -pady 4 … … 2455 2661 "glyphs" { 2456 2662 array set settings { 2457 -color \#FFFFFF 2663 -color white 2664 -edgecolor black 2665 -edges 0 2458 2666 -gscale 1 2459 -edges 0 2460 -edgecolor black 2667 -lighting 1 2461 2668 -linewidth 1.0 2669 -normscale 0 2462 2670 -opacity 1.0 2671 -orientGlyphs 0 2672 -outline 0 2673 -ptsize 1.0 2674 -quality 1 2675 -scaleMode "vcomp" 2676 -shape "sphere" 2677 -visible 1 2463 2678 -wireframe 0 2464 -lighting 1 2465 -visible 1 2466 } 2679 } 2680 array set settings $style 2467 2681 set shape [$dataobj shape $comp] 2468 array set settings $style 2469 SendCmd "glyphs add $shape $tag" 2470 SendCmd "glyphs normscale 0 $tag" 2682 if {$shape != ""} { 2683 set settings(-shape) $shape 2684 } 2685 SendCmd "outline add $tag" 2686 SendCmd "outline color [Color2RGB $settings(-color)] $tag" 2687 SendCmd "outline visible $settings(-outline) $tag" 2688 set _settings(glyphs-outline) $settings(-outline) 2689 2690 SendCmd "glyphs add $settings(-shape) $tag" 2691 SendCmd "glyphs normscale $settings(-normscale) $tag" 2471 2692 SendCmd "glyphs gscale $settings(-gscale) $tag" 2472 2693 SendCmd "glyphs wireframe $settings(-wireframe) $tag" 2473 2694 SendCmd "glyphs color [Color2RGB $settings(-color)] $tag" 2474 2695 #SendCmd "glyphs colormode constant {} $tag" 2475 SendCmd "glyphs gorient 0 {} $tag" 2476 SendCmd "glyphs smode vcomp {} $tag" 2696 # Omitting field name for gorient and smode commands 2697 # defaults to active scalars or vectors depending on mode 2698 SendCmd "glyphs gorient $settings(-orientGlyphs) {} $tag" 2699 SendCmd "glyphs smode $settings(-scaleMode) {} $tag" 2700 SendCmd "glyphs edges $settings(-edges) $tag" 2701 SendCmd "glyphs linecolor [Color2RGB $settings(-edgecolor)] $tag" 2702 SendCmd "glyphs linewidth $settings(-linewidth) $tag" 2703 SendCmd "glyphs ptsize $settings(-ptsize) $tag" 2704 SendCmd "glyphs quality $settings(-quality) $tag" 2705 SendCmd "glyphs lighting $settings(-lighting) $tag" 2477 2706 SendCmd "glyphs opacity $settings(-opacity) $tag" 2707 set _settings(glyphs-opacity) [expr 100.0 * $settings(-opacity)] 2478 2708 SendCmd "glyphs visible $settings(-visible) $tag" 2479 2709 set _settings(glyphs-wireframe) $settings(-wireframe) 2480 2710 } 2481 2711 "molecule" { 2712 array set settings { 2713 -atomscale 0.3 2714 -atomsvisible 1 2715 -bondscale 0.075 2716 -bondstyle "cylinder" 2717 -bondsvisible 1 2718 -color "elementDefault" 2719 -edgecolor black 2720 -edges 0 2721 -labels 0 2722 -lighting 1 2723 -linewidth 1.0 2724 -opacity 1.0 2725 -outline 0 2726 -quality 1.0 2727 -representation "" 2728 -rscale "covalent" 2729 -visible 1 2730 -wireframe 0 2731 } 2732 array set settings $style 2733 2734 SendCmd "outline add $tag" 2735 SendCmd "outline color [Color2RGB white] $tag" 2736 SendCmd "outline visible $settings(-outline) $tag" 2737 set _settings(molecule-outline) $settings(-outline) 2738 2482 2739 SendCmd "molecule add $tag" 2483 SendCmd "molecule ascale $_settings(molecule-atomscale) $tag" 2484 SendCmd "molecule bscale $_settings(molecule-bondscale) $tag" 2485 SendCmd "molecule bstyle $_settings(molecule-bondstyle) $tag" 2486 SendCmd "molecule atoms $_settings(molecule-atoms-visible) $tag" 2487 SendCmd "molecule bonds $_settings(molecule-bonds-visible) $tag" 2740 if {$settings(-representation) != ""} { 2741 switch -- $settings(-representation) { 2742 "ballandstick" { 2743 set _settings(molecule-rscale) covalent 2744 set _settings(molecule-atoms-visible) 1 2745 set _settings(molecule-bonds-visible) 1 2746 set _settings(molecule-bondstyle) cylinder 2747 set _settings(molecule-atomscale) 0.3 2748 set _settings(molecule-bondscale) 0.075 2749 } 2750 "balls" - "spheres" { 2751 set _settings(molecule-rscale) covalent 2752 set _settings(molecule-atoms-visible) 1 2753 set _settings(molecule-bonds-visible) 0 2754 set _settings(molecule-bondstyle) cylinder 2755 set _settings(molecule-atomscale) 0.3 2756 set _settings(molecule-bondscale) 0.075 2757 } 2758 "sticks" { 2759 set _settings(molecule-rscale) none 2760 set _settings(molecule-atoms-visible) 1 2761 set _settings(molecule-bonds-visible) 1 2762 set _settings(molecule-bondstyle) cylinder 2763 set _settings(molecule-atomscale) 0.075 2764 set _settings(molecule-bondscale) 0.075 2765 } 2766 "spacefilling" { 2767 set _settings(molecule-rscale) van_der_waals 2768 set _settings(molecule-atoms-visible) 1 2769 set _settings(molecule-bonds-visible) 0 2770 set _settings(molecule-bondstyle) cylinder 2771 set _settings(molecule-atomscale) 1.0 2772 set _settings(molecule-bondscale) 0.075 2773 } 2774 "rods" { 2775 set _settings(molecule-rscale) none 2776 set _settings(molecule-atoms-visible) 1 2777 set _settings(molecule-bonds-visible) 1 2778 set _settings(molecule-bondstyle) cylinder 2779 set _settings(molecule-atomscale) 0.1 2780 set _settings(molecule-bondscale) 0.1 2781 } 2782 "wireframe" - "lines" { 2783 set _settings(molecule-rscale) none 2784 set _settings(molecule-atoms-visible) 0 2785 set _settings(molecule-bonds-visible) 1 2786 set _settings(molecule-bondstyle) line 2787 set _settings(molecule-atomscale) 1.0 2788 set _settings(molecule-bondscale) 1.0 2789 } 2790 default { 2791 error "unknown representation $value" 2792 } 2793 } 2794 SendCmd "molecule rscale $_settings(molecule-rscale) $tag" 2795 SendCmd "molecule atoms $_settings(molecule-atoms-visible) $tag" 2796 SendCmd "molecule bonds $_settings(molecule-bonds-visible) $tag" 2797 SendCmd "molecule bstyle $_settings(molecule-bondstyle) $tag" 2798 SendCmd "molecule ascale $_settings(molecule-atomscale) $tag" 2799 SendCmd "molecule bscale $_settings(molecule-bondscale) $tag" 2800 $itk_component(representation) value [$itk_component(representation) label $settings(-representation)] 2801 $itk_component(rscale) value [$itk_component(rscale) label $_settings(molecule-rscale)] 2802 switch -- $settings(-representation) { 2803 "ballandstick" - "balls" - "spheres" { 2804 $itk_component(rscale) configure -state normal 2805 } 2806 default { 2807 $itk_component(rscale) configure -state disabled 2808 } 2809 } 2810 } else { 2811 SendCmd "molecule rscale $settings(-rscale) $tag" 2812 set _settings(molecule-rscale) $settings(-rscale) 2813 SendCmd "molecule atoms $settings(-atomsvisible) $tag" 2814 set _settings(molecule-atoms-visible) $settings(-atomsvisible) 2815 SendCmd "molecule bonds $settings(-bondsvisible) $tag" 2816 set _settings(molecule-bonds-visible) $settings(-bondsvisible) 2817 SendCmd "molecule bstyle $settings(-bondstyle) $tag" 2818 set _settings(molecule-bondstyle) $settings(-bondstyle) 2819 SendCmd "molecule ascale $settings(-atomscale) $tag" 2820 set _settings(molecule-atomscale) $settings(-atomscale) 2821 SendCmd "molecule bscale $settings(-bondscale) $tag" 2822 set _settings(molecule-bondscale) $settings(-bondscale) 2823 } 2824 SendCmd "molecule labels $settings(-labels) $tag" 2825 set _settings(molecule-labels) $settings(-labels) 2826 SendCmd "molecule linecolor [Color2RGB $settings(-edgecolor)] $tag" 2827 SendCmd "molecule linewidth $settings(-linewidth) $tag" 2828 SendCmd "molecule edges $settings(-edges) $tag" 2829 set _settings(molecule-edges) $settings(-edges) 2830 SendCmd "molecule lighting $settings(-lighting) $tag" 2831 set _settings(molecule-lighting) $settings(-lighting) 2832 SendCmd "molecule aquality $settings(-quality) $tag" 2833 SendCmd "molecule bquality $settings(-quality) $tag" 2834 set _settings(molecule-quality) $settings(-quality) 2835 SendCmd "molecule visible $settings(-visible) $tag" 2836 set _settings(molecule-visible) $settings(-visible) 2488 2837 set _haveMolecules 1 2489 2838 } 2490 2839 "polydata" { 2491 2840 array set settings { 2492 -color \#FFFFFF 2841 -cloudstyle "mesh" 2842 -color white 2843 -edgecolor black 2493 2844 -edges 1 2494 - edgecolor black2845 -lighting 1 2495 2846 -linewidth 1.0 2496 2847 -opacity 1.0 2848 -outline 0 2849 -visible 1 2497 2850 -wireframe 0 2498 -lighting 12499 -visible 12500 2851 } 2501 2852 array set settings $style 2853 2854 SendCmd "outline add $tag" 2855 SendCmd "outline color [Color2RGB $settings(-color)] $tag" 2856 SendCmd "outline visible $settings(-outline) $tag" 2857 set _settings(polydata-outline) $settings(-outline) 2858 2502 2859 SendCmd "polydata add $tag" 2503 2860 SendCmd "polydata visible $settings(-visible) $tag" … … 2505 2862 SendCmd "polydata edges $settings(-edges) $tag" 2506 2863 set _settings(polydata-edges) $settings(-edges) 2864 SendCmd "polydata cloudstyle $settings(-cloudstyle) $tag" 2507 2865 SendCmd "polydata color [Color2RGB $settings(-color)] $tag" 2508 2866 #SendCmd "polydata colormode constant {} $tag" … … 2561 2919 set font "Arial 8" 2562 2920 set lineht [font metrics $font -linespace] 2563 2921 2564 2922 if { $_settings(legend) } { 2565 2923 set x [expr $w - 2] … … 2626 2984 set font "Arial 8" 2627 2985 set lineht [font metrics $font -linespace] 2628 2986 2629 2987 set imgHeight [image height $_image(legend)] 2630 2988 set coords [$c coords colormap] … … 2640 2998 } 2641 2999 set color [eval format "\#%02x%02x%02x" $pixel] 2642 $_image(swatch) put black -to 0 0 23 23 2643 $_image(swatch) put $color -to 1 1 22 22 3000 $_image(swatch) put black -to 0 0 23 23 3001 $_image(swatch) put $color -to 1 1 22 22 2644 3002 .rappturetooltip configure -icon $_image(swatch) 2645 3003 … … 2647 3005 set t [expr 1.0 - (double($imgY) / double($imgHeight-1))] 2648 3006 set value [expr $t * ($_limits(vmax) - $_limits(vmin)) + $_limits(vmin)] 2649 set tipx [expr $x + 15] 3007 set tipx [expr $x + 15] 2650 3008 set tipy [expr $y - 5] 2651 3009 Rappture::Tooltip::text $c "$_title $value" 2652 Rappture::Tooltip::tooltip show $c +$tipx,+$tipy 3010 Rappture::Tooltip::tooltip show $c +$tipx,+$tipy 2653 3011 } 2654 3012 … … 2665 3023 "move" { 2666 3024 set axis [lindex $args 0] 2667 set oldval $_axis(${axis}position)2668 3025 set newval [lindex $args 1] 2669 3026 if {[llength $args] != 2} { … … 2684 3041 } 2685 3042 2686 itcl::body Rappture::VtkViewer::SetOrientation { side } { 3043 itcl::body Rappture::VtkViewer::SetOrientation { side } { 2687 3044 array set positions { 2688 3045 front "1 0 0 0" … … 2693 3050 bottom "0.707107 0.707107 0 0" 2694 3051 } 2695 foreach name { qw qx qyqz } value $positions($side) {3052 foreach name { -qw -qx -qy -qz } value $positions($side) { 2696 3053 set _view($name) $value 2697 } 2698 set q [ list $_view(qw) $_view(qx) $_view(qy) $_view(qz)]3054 } 3055 set q [ViewToQuaternion] 2699 3056 $_arcball quaternion $q 2700 3057 SendCmd "camera orient $q" 2701 3058 SendCmd "camera reset" 2702 set _view( xpan) 02703 set _view( ypan) 02704 set _view( zoom) 1.02705 } 2706 2707 itcl::body Rappture::VtkViewer::SetOpacity { dataset } { 3059 set _view(-xpan) 0 3060 set _view(-ypan) 0 3061 set _view(-zoom) 1.0 3062 } 3063 3064 itcl::body Rappture::VtkViewer::SetOpacity { dataset } { 2708 3065 foreach {dataobj comp} [split $dataset -] break 2709 3066 set type [$dataobj type $comp]
Note: See TracChangeset
for help on using the changeset viewer.