Changeset 4919 for branches/r9/gui/scripts/vtkstreamlinesviewer.tcl
- Timestamp:
- Jan 4, 2015 6:52:23 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/r9/gui/scripts/vtkstreamlinesviewer.tcl
r4344 r4919 1 1 # -*- mode: tcl; indent-tabs-mode: nil -*- 2 2 # ---------------------------------------------------------------------- 3 # COMPONENT: vtk viewer - Vtk drawingobject viewer3 # COMPONENT: vtkstreamlinesviewer - Vtk streamlines object viewer 4 4 # 5 5 # It connects to the Vtk server running on a rendering farm, … … 226 226 axesVisible 1 227 227 axisLabelsVisible 1 228 axisMinorTicks 1 228 229 axisXGrid 0 229 230 axisYGrid 0 … … 453 454 eval itk_initialize $args 454 455 Connect 455 update456 456 } 457 457 … … 800 800 set session $env(SESSION) 801 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" 802 806 lappend info "hub" [exec hostname] 803 807 lappend info "client" "vtkstreamlinesviewer" … … 967 971 DoResize 968 972 InitSettings axisXGrid axisYGrid axisZGrid axis-mode \ 969 axesVisible axisLabelsVisible 973 axesVisible axisLabelsVisible axisMinorTicks 970 974 # This "imgflush" is to force an image returned before vtkvis starts 971 975 # reading a (big) dataset. This will display an empty plot with axes … … 1324 1328 switch -- $what { 1325 1329 "volumeOpacity" { 1326 set val $_settings( volumeOpacity)1330 set val $_settings($what) 1327 1331 set sval [expr { 0.01 * double($val) }] 1328 1332 SendCmd "polydata opacity $sval" 1329 1333 } 1330 1334 "volumeWireframe" { 1331 set bool $_settings( volumeWireframe)1335 set bool $_settings($what) 1332 1336 SendCmd "polydata wireframe $bool" 1333 1337 } 1334 1338 "volumeVisible" { 1335 set bool $_settings( volumeVisible)1339 set bool $_settings($what) 1336 1340 SendCmd "polydata visible $bool" 1337 1341 if { $bool } { … … 1344 1348 } 1345 1349 "volumeLighting" { 1346 set bool $_settings( volumeLighting)1350 set bool $_settings($what) 1347 1351 SendCmd "polydata lighting $bool" 1348 1352 } 1349 1353 "volumeEdges" { 1350 set bool $_settings( volumeEdges)1354 set bool $_settings($what) 1351 1355 SendCmd "polydata edges $bool" 1352 1356 } 1353 1357 "axesVisible" { 1354 set bool $_settings( axesVisible)1358 set bool $_settings($what) 1355 1359 SendCmd "axis visible all $bool" 1356 1360 } 1357 1361 "axisLabelsVisible" { 1358 set bool $_settings( axisLabelsVisible)1362 set bool $_settings($what) 1359 1363 SendCmd "axis labels all $bool" 1364 } 1365 "axisMinorTicks" { 1366 set bool $_settings($what) 1367 SendCmd "axis minticks all $bool" 1360 1368 } 1361 1369 "axisXGrid" - "axisYGrid" - "axisZGrid" { … … 1453 1461 } 1454 1462 "streamlinesOpacity" { 1455 set val $_settings( streamlinesOpacity)1463 set val $_settings($what) 1456 1464 set sval [expr { 0.01 * double($val) }] 1457 1465 SendCmd "streamlines opacity $sval" 1458 1466 } 1459 1467 "streamlinesScale" { 1460 set val $_settings( streamlinesScale)1468 set val $_settings($what) 1461 1469 set sval [expr { 0.01 * double($val) }] 1462 1470 SendCmd "streamlines scale $sval $sval $sval" 1463 1471 } 1464 1472 "streamlinesLighting" { 1465 set bool $_settings( streamlinesLighting)1473 set bool $_settings($what) 1466 1474 SendCmd "streamlines lighting $bool" 1467 1475 } … … 1771 1779 set inner [$itk_component(main) insert end \ 1772 1780 -title "Axis Settings" \ 1773 -icon [Rappture::icon axis 1]]1781 -icon [Rappture::icon axis2]] 1774 1782 $inner configure -borderwidth 4 1775 1783 … … 1801 1809 -command [itcl::code $this AdjustSetting axisZGrid] \ 1802 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] \ 1815 -font "Arial 9" 1803 1816 1804 1817 label $inner.mode_l -text "Mode" -font "Arial 9" … … 1816 1829 1817 1830 blt::table $inner \ 1818 0,0 $inner.visible -anchor w -cspan 2 \ 1819 1,0 $inner.labels -anchor w -cspan 2 \ 1820 2,0 $inner.xgrid -anchor w -cspan 2 \ 1821 3,0 $inner.ygrid -anchor w -cspan 2 \ 1822 4,0 $inner.zgrid -anchor w -cspan 2 \ 1823 5,0 $inner.mode_l -anchor w -cspan 2 -padx { 2 0 } \ 1824 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 1825 1840 1826 1841 blt::table configure $inner r* c* -resize none 1827 blt::table configure $inner r7 c 1-resize expand1828 } 1829 1842 blt::table configure $inner r7 c6 -resize expand 1843 blt::table configure $inner r3 -height 0.125i 1844 } 1830 1845 1831 1846 itcl::body Rappture::VtkStreamlinesViewer::BuildCameraTab {} { … … 2144 2159 } 2145 2160 array set settings $style 2161 StartBufferingCommands 2146 2162 SendCmd "streamlines add $tag" 2147 2163 SendCmd "streamlines seed visible off $tag" … … 2150 2166 set length [string length $seeds] 2151 2167 SendCmd "streamlines seed fmesh 200 data follows $length $tag" 2152 SendCmd "$seeds"2168 append _outbuf $seeds 2153 2169 set _seeds($dataobj) 1 2154 2170 } … … 2161 2177 set _settings(volumeWireframe) $settings(-wireframe) 2162 2178 set _settings(volumeOpacity) [expr $settings(-opacity) * 100.0] 2179 StopBufferingCommands 2163 2180 SetColormap $dataobj $comp 2164 2181 }
Note: See TracChangeset
for help on using the changeset viewer.