Changeset 4797 for branches/uq/gui/scripts/vtkstreamlinesviewer.tcl
- Timestamp:
- Nov 26, 2014, 4:45:43 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/uq/gui/scripts/vtkstreamlinesviewer.tcl
r4460 r4797 226 226 axesVisible 1 227 227 axisLabelsVisible 1 228 axisMinorTicks 1 228 229 axisXGrid 0 229 230 axisYGrid 0 … … 799 800 set session $env(SESSION) 800 801 } 802 lappend info "version" "$Rappture::version" 803 lappend info "build" "$Rappture::build" 804 lappend info "svnurl" "$Rappture::svnurl" 805 lappend info "installdir" "$Rappture::installdir" 801 806 lappend info "hub" [exec hostname] 802 807 lappend info "client" "vtkstreamlinesviewer" … … 966 971 DoResize 967 972 InitSettings axisXGrid axisYGrid axisZGrid axis-mode \ 968 axesVisible axisLabelsVisible 973 axesVisible axisLabelsVisible axisMinorTicks 969 974 # This "imgflush" is to force an image returned before vtkvis starts 970 975 # reading a (big) dataset. This will display an empty plot with axes … … 1323 1328 switch -- $what { 1324 1329 "volumeOpacity" { 1325 set val $_settings( volumeOpacity)1330 set val $_settings($what) 1326 1331 set sval [expr { 0.01 * double($val) }] 1327 1332 SendCmd "polydata opacity $sval" 1328 1333 } 1329 1334 "volumeWireframe" { 1330 set bool $_settings( volumeWireframe)1335 set bool $_settings($what) 1331 1336 SendCmd "polydata wireframe $bool" 1332 1337 } 1333 1338 "volumeVisible" { 1334 set bool $_settings( volumeVisible)1339 set bool $_settings($what) 1335 1340 SendCmd "polydata visible $bool" 1336 1341 if { $bool } { … … 1343 1348 } 1344 1349 "volumeLighting" { 1345 set bool $_settings( volumeLighting)1350 set bool $_settings($what) 1346 1351 SendCmd "polydata lighting $bool" 1347 1352 } 1348 1353 "volumeEdges" { 1349 set bool $_settings( volumeEdges)1354 set bool $_settings($what) 1350 1355 SendCmd "polydata edges $bool" 1351 1356 } 1352 1357 "axesVisible" { 1353 set bool $_settings( axesVisible)1358 set bool $_settings($what) 1354 1359 SendCmd "axis visible all $bool" 1355 1360 } 1356 1361 "axisLabelsVisible" { 1357 set bool $_settings( axisLabelsVisible)1362 set bool $_settings($what) 1358 1363 SendCmd "axis labels all $bool" 1364 } 1365 "axisMinorTicks" { 1366 set bool $_settings($what) 1367 SendCmd "axis minticks all $bool" 1359 1368 } 1360 1369 "axisXGrid" - "axisYGrid" - "axisZGrid" { … … 1452 1461 } 1453 1462 "streamlinesOpacity" { 1454 set val $_settings( streamlinesOpacity)1463 set val $_settings($what) 1455 1464 set sval [expr { 0.01 * double($val) }] 1456 1465 SendCmd "streamlines opacity $sval" 1457 1466 } 1458 1467 "streamlinesScale" { 1459 set val $_settings( streamlinesScale)1468 set val $_settings($what) 1460 1469 set sval [expr { 0.01 * double($val) }] 1461 1470 SendCmd "streamlines scale $sval $sval $sval" 1462 1471 } 1463 1472 "streamlinesLighting" { 1464 set bool $_settings( streamlinesLighting)1473 set bool $_settings($what) 1465 1474 SendCmd "streamlines lighting $bool" 1466 1475 } … … 1770 1779 set inner [$itk_component(main) insert end \ 1771 1780 -title "Axis Settings" \ 1772 -icon [Rappture::icon axis 1]]1781 -icon [Rappture::icon axis2]] 1773 1782 $inner configure -borderwidth 4 1774 1783 1775 1784 checkbutton $inner.visible \ 1776 -text " ShowAxes" \1785 -text "Axes" \ 1777 1786 -variable [itcl::scope _settings(axesVisible)] \ 1778 1787 -command [itcl::code $this AdjustSetting axesVisible] \ … … 1780 1789 1781 1790 checkbutton $inner.labels \ 1782 -text " ShowAxis Labels" \1791 -text "Axis Labels" \ 1783 1792 -variable [itcl::scope _settings(axisLabelsVisible)] \ 1784 1793 -command [itcl::code $this AdjustSetting axisLabelsVisible] \ 1785 1794 -font "Arial 9" 1786 1795 label $inner.grid_l -text "Grid" -font "Arial 9" 1787 1796 checkbutton $inner.xgrid \ 1788 -text " Show X Grid" \1797 -text "X" \ 1789 1798 -variable [itcl::scope _settings(axisXGrid)] \ 1790 1799 -command [itcl::code $this AdjustSetting axisXGrid] \ 1791 1800 -font "Arial 9" 1792 1801 checkbutton $inner.ygrid \ 1793 -text " Show Y Grid" \1802 -text "Y" \ 1794 1803 -variable [itcl::scope _settings(axisYGrid)] \ 1795 1804 -command [itcl::code $this AdjustSetting axisYGrid] \ 1796 1805 -font "Arial 9" 1797 1806 checkbutton $inner.zgrid \ 1798 -text " Show Z Grid" \1807 -text "Z" \ 1799 1808 -variable [itcl::scope _settings(axisZGrid)] \ 1800 1809 -command [itcl::code $this AdjustSetting axisZGrid] \ 1810 -font "Arial 9" 1811 checkbutton $inner.minorticks \ 1812 -text "Minor Ticks" \ 1813 -variable [itcl::scope _settings(axisMinorTicks)] \ 1814 -command [itcl::code $this AdjustSetting axisMinorTicks] \ 1801 1815 -font "Arial 9" 1802 1816 … … 1815 1829 1816 1830 blt::table $inner \ 1817 0,0 $inner.visible -anchor w -cspan 2 \ 1818 1,0 $inner.labels -anchor w -cspan 2 \ 1819 2,0 $inner.xgrid -anchor w -cspan 2 \ 1820 3,0 $inner.ygrid -anchor w -cspan 2 \ 1821 4,0 $inner.zgrid -anchor w -cspan 2 \ 1822 5,0 $inner.mode_l -anchor w -cspan 2 -padx { 2 0 } \ 1823 6,0 $inner.mode -fill x -cspan 2 1831 0,0 $inner.visible -anchor w -cspan 4 \ 1832 1,0 $inner.labels -anchor w -cspan 4 \ 1833 2,0 $inner.minorticks -anchor w -cspan 4 \ 1834 4,0 $inner.grid_l -anchor w \ 1835 4,1 $inner.xgrid -anchor w \ 1836 4,2 $inner.ygrid -anchor w \ 1837 4,3 $inner.zgrid -anchor w \ 1838 5,0 $inner.mode_l -anchor w -padx { 2 0 } \ 1839 5,1 $inner.mode -fill x -cspan 3 1824 1840 1825 1841 blt::table configure $inner r* c* -resize none 1826 blt::table configure $inner r7 c 1-resize expand1827 } 1828 1842 blt::table configure $inner r7 c6 -resize expand 1843 blt::table configure $inner r3 -height 0.125i 1844 } 1829 1845 1830 1846 itcl::body Rappture::VtkStreamlinesViewer::BuildCameraTab {} { … … 2143 2159 } 2144 2160 array set settings $style 2161 StartBufferingCommands 2145 2162 SendCmd "streamlines add $tag" 2146 2163 SendCmd "streamlines seed visible off $tag" … … 2149 2166 set length [string length $seeds] 2150 2167 SendCmd "streamlines seed fmesh 200 data follows $length $tag" 2151 SendCmd "$seeds"2168 append _outbuf $seeds 2152 2169 set _seeds($dataobj) 1 2153 2170 } … … 2160 2177 set _settings(volumeWireframe) $settings(-wireframe) 2161 2178 set _settings(volumeOpacity) [expr $settings(-opacity) * 100.0] 2179 StopBufferingCommands 2162 2180 SetColormap $dataobj $comp 2163 2181 }
Note: See TracChangeset
for help on using the changeset viewer.