- Timestamp:
- Nov 10, 2014, 2:46:41 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/vtkstreamlinesviewer.tcl
r4669 r4679 226 226 axesVisible 1 227 227 axisLabelsVisible 1 228 axisMinorTicks 1 228 229 axisXGrid 0 229 230 axisYGrid 0 … … 970 971 DoResize 971 972 InitSettings axisXGrid axisYGrid axisZGrid axis-mode \ 972 axesVisible axisLabelsVisible 973 axesVisible axisLabelsVisible axisMinorTicks 973 974 # This "imgflush" is to force an image returned before vtkvis starts 974 975 # reading a (big) dataset. This will display an empty plot with axes … … 1327 1328 switch -- $what { 1328 1329 "volumeOpacity" { 1329 set val $_settings( volumeOpacity)1330 set val $_settings($what) 1330 1331 set sval [expr { 0.01 * double($val) }] 1331 1332 SendCmd "polydata opacity $sval" 1332 1333 } 1333 1334 "volumeWireframe" { 1334 set bool $_settings( volumeWireframe)1335 set bool $_settings($what) 1335 1336 SendCmd "polydata wireframe $bool" 1336 1337 } 1337 1338 "volumeVisible" { 1338 set bool $_settings( volumeVisible)1339 set bool $_settings($what) 1339 1340 SendCmd "polydata visible $bool" 1340 1341 if { $bool } { … … 1347 1348 } 1348 1349 "volumeLighting" { 1349 set bool $_settings( volumeLighting)1350 set bool $_settings($what) 1350 1351 SendCmd "polydata lighting $bool" 1351 1352 } 1352 1353 "volumeEdges" { 1353 set bool $_settings( volumeEdges)1354 set bool $_settings($what) 1354 1355 SendCmd "polydata edges $bool" 1355 1356 } 1356 1357 "axesVisible" { 1357 set bool $_settings( axesVisible)1358 set bool $_settings($what) 1358 1359 SendCmd "axis visible all $bool" 1359 1360 } 1360 1361 "axisLabelsVisible" { 1361 set bool $_settings( axisLabelsVisible)1362 set bool $_settings($what) 1362 1363 SendCmd "axis labels all $bool" 1364 } 1365 "axisMinorTicks" { 1366 set bool $_settings($what) 1367 SendCmd "axis minticks all $bool" 1363 1368 } 1364 1369 "axisXGrid" - "axisYGrid" - "axisZGrid" { … … 1456 1461 } 1457 1462 "streamlinesOpacity" { 1458 set val $_settings( streamlinesOpacity)1463 set val $_settings($what) 1459 1464 set sval [expr { 0.01 * double($val) }] 1460 1465 SendCmd "streamlines opacity $sval" 1461 1466 } 1462 1467 "streamlinesScale" { 1463 set val $_settings( streamlinesScale)1468 set val $_settings($what) 1464 1469 set sval [expr { 0.01 * double($val) }] 1465 1470 SendCmd "streamlines scale $sval $sval $sval" 1466 1471 } 1467 1472 "streamlinesLighting" { 1468 set bool $_settings( streamlinesLighting)1473 set bool $_settings($what) 1469 1474 SendCmd "streamlines lighting $bool" 1470 1475 } … … 1774 1779 set inner [$itk_component(main) insert end \ 1775 1780 -title "Axis Settings" \ 1776 -icon [Rappture::icon axis 1]]1781 -icon [Rappture::icon axis2]] 1777 1782 $inner configure -borderwidth 4 1778 1783 1779 1784 checkbutton $inner.visible \ 1780 -text " ShowAxes" \1785 -text "Axes" \ 1781 1786 -variable [itcl::scope _settings(axesVisible)] \ 1782 1787 -command [itcl::code $this AdjustSetting axesVisible] \ … … 1784 1789 1785 1790 checkbutton $inner.labels \ 1786 -text " ShowAxis Labels" \1791 -text "Axis Labels" \ 1787 1792 -variable [itcl::scope _settings(axisLabelsVisible)] \ 1788 1793 -command [itcl::code $this AdjustSetting axisLabelsVisible] \ 1789 1794 -font "Arial 9" 1790 1795 label $inner.grid_l -text "Grid" -font "Arial 9" 1791 1796 checkbutton $inner.xgrid \ 1792 -text " Show X Grid" \1797 -text "X" \ 1793 1798 -variable [itcl::scope _settings(axisXGrid)] \ 1794 1799 -command [itcl::code $this AdjustSetting axisXGrid] \ 1795 1800 -font "Arial 9" 1796 1801 checkbutton $inner.ygrid \ 1797 -text " Show Y Grid" \1802 -text "Y" \ 1798 1803 -variable [itcl::scope _settings(axisYGrid)] \ 1799 1804 -command [itcl::code $this AdjustSetting axisYGrid] \ 1800 1805 -font "Arial 9" 1801 1806 checkbutton $inner.zgrid \ 1802 -text " Show Z Grid" \1807 -text "Z" \ 1803 1808 -variable [itcl::scope _settings(axisZGrid)] \ 1804 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] \ 1805 1815 -font "Arial 9" 1806 1816 … … 1819 1829 1820 1830 blt::table $inner \ 1821 0,0 $inner.visible -anchor w -cspan 2 \ 1822 1,0 $inner.labels -anchor w -cspan 2 \ 1823 2,0 $inner.xgrid -anchor w -cspan 2 \ 1824 3,0 $inner.ygrid -anchor w -cspan 2 \ 1825 4,0 $inner.zgrid -anchor w -cspan 2 \ 1826 5,0 $inner.mode_l -anchor w -cspan 2 -padx { 2 0 } \ 1827 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 1828 1840 1829 1841 blt::table configure $inner r* c* -resize none 1830 blt::table configure $inner r7 c 1-resize expand1831 } 1832 1842 blt::table configure $inner r7 c6 -resize expand 1843 blt::table configure $inner r3 -height 0.125i 1844 } 1833 1845 1834 1846 itcl::body Rappture::VtkStreamlinesViewer::BuildCameraTab {} { … … 2147 2159 } 2148 2160 array set settings $style 2161 StartBufferingCommands 2149 2162 SendCmd "streamlines add $tag" 2150 2163 SendCmd "streamlines seed visible off $tag" … … 2153 2166 set length [string length $seeds] 2154 2167 SendCmd "streamlines seed fmesh 200 data follows $length $tag" 2155 SendCmd "$seeds"2168 append _outbuf $seeds 2156 2169 set _seeds($dataobj) 1 2157 2170 } … … 2164 2177 set _settings(volumeWireframe) $settings(-wireframe) 2165 2178 set _settings(volumeOpacity) [expr $settings(-opacity) * 100.0] 2179 StopBufferingCommands 2166 2180 SetColormap $dataobj $comp 2167 2181 }
Note: See TracChangeset
for help on using the changeset viewer.