- Timestamp:
- Apr 16, 2014, 1:18:07 PM (11 years ago)
- Location:
- trunk/gui/scripts
- Files:
-
- 1 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/Makefile.in
r4267 r4344 139 139 $(srcdir)/vtkmeshviewer.tcl \ 140 140 $(srcdir)/vtkstreamlinesviewer.tcl \ 141 $(srcdir)/vtksurfaceviewer.tcl \ 141 142 $(srcdir)/vtkvolumeviewer.tcl \ 142 143 $(srcdir)/vtkheightmapviewer.tcl \ -
trunk/gui/scripts/fieldresult.tcl
r4301 r4344 61 61 set servers [Rappture::VisViewer::GetServerList "nanovis"] 62 62 } 63 "contour" - "glyphs" - "heightmap" - "isosurface" - "streamlines" - " vtkimage" - "vtkviewer" - "vtkvolume" {63 "contour" - "glyphs" - "heightmap" - "isosurface" - "streamlines" - "surface" - "vtkimage" - "vtkviewer" - "vtkvolume" { 64 64 set servers [Rappture::VisViewer::GetServerList "vtkvis"] 65 65 } … … 99 99 itk_component add renderer { 100 100 Rappture::VtkStreamlinesViewer $itk_interior.ren $servers 101 } 102 } 103 "surface" { 104 itk_component add renderer { 105 Rappture::VtkSurfaceViewer $itk_interior.ren $servers 101 106 } 102 107 } -
trunk/gui/scripts/vtkglyphviewer.tcl
r4338 r4344 1 1 # -*- mode: tcl; indent-tabs-mode: nil -*- 2 3 2 # ---------------------------------------------------------------------- 4 3 # COMPONENT: vtkglyphviewer - Vtk 3D glyphs object viewer … … 8 7 # ====================================================================== 9 8 # AUTHOR: Michael McLennan, Purdue University 10 # Copyright (c) 2004-20 05 Purdue Research Foundation9 # Copyright (c) 2004-2014 HUBzero Foundation, LLC 11 10 # 12 11 # See the file "license.terms" for information on usage and … … 1513 1512 itcl::body Rappture::VtkGlyphViewer::RequestLegend {} { 1514 1513 set _legendPending 0 1515 if { ![info exists _fields($_curFldName)] } { 1516 return 1517 } 1514 set font "Arial 8" 1515 set w 12 1516 set lineht [font metrics $font -linespace] 1517 # color ramp height = (canvas height) - (min and max value lines) - 2 1518 set h [expr {$_height - 2 * ($lineht + 2)}] 1519 1518 1520 set fname $_curFldName 1519 set font "Arial 8"1520 set lineht [font metrics $font -linespace]1521 set w 121522 set h [expr {$_height - 2 * ($lineht + 2)}]1523 if { $h < 1 } {1524 return1525 }1526 1521 if { [string match "component*" $fname] } { 1527 1522 set title "" … … 1539 1534 if { $title != "" } { 1540 1535 incr h -$lineht 1536 } 1537 if { $h < 1 } { 1538 return 1541 1539 } 1542 1540 # Set the legend on the first heightmap dataset. … … 2426 2424 # If there's a legend title, create a text item for the title. 2427 2425 $c create text $x $y \ 2428 -anchor ne \ 2429 -fill $itk_option(-plotforeground) -tags "title legend" \ 2430 -font $font 2431 incr y $lineht 2426 -anchor ne \ 2427 -fill $itk_option(-plotforeground) -tags "title legend" \ 2428 -font $font 2429 if { $title != "" } { 2430 incr y $lineht 2431 } 2432 2432 $c create text $x $y \ 2433 2433 -anchor ne \ -
trunk/gui/scripts/vtkheightmapviewer.tcl
r4336 r4344 7 7 # ====================================================================== 8 8 # AUTHOR: Michael McLennan, Purdue University 9 # Copyright (c) 2004-201 2HUBzero Foundation, LLC9 # Copyright (c) 2004-2014 HUBzero Foundation, LLC 10 10 # 11 11 # See the file "license.terms" for information on usage and … … 1357 1357 } 1358 1358 "axisLabels" { 1359 set bool $_settings( axisLabels)1359 set bool $_settings($what) 1360 1360 SendCmd "axis labels all $bool" 1361 1361 } 1362 1362 "axisMinorTicks" { 1363 set bool $_settings( axisMinorTicks)1363 set bool $_settings($what) 1364 1364 foreach axis { x y z } { 1365 1365 SendCmd "axis minticks ${axis} $bool" … … 1367 1367 } 1368 1368 "axisVisible" { 1369 set bool $_settings( axisVisible)1369 set bool $_settings($what) 1370 1370 SendCmd "axis visible all $bool" 1371 1371 } … … 1391 1391 } 1392 1392 "colormap" { 1393 set _changed( colormap) 11393 set _changed($what) 1 1394 1394 StartBufferingCommands 1395 1395 set color [$itk_component(colormap) value] 1396 set _settings( colormap) $color1396 set _settings($what) $color 1397 1397 if { $color == "none" } { 1398 1398 if { $_settings(colormapVisible) } { … … 1435 1435 } 1436 1436 "edges" { 1437 set bool $_settings( edges)1437 set bool $_settings($what) 1438 1438 SendCmd "heightmap edges $bool" 1439 1439 } … … 1441 1441 set label [$itk_component(field) value] 1442 1442 set fname [$itk_component(field) translate $label] 1443 set _settings( field) $fname1443 set _settings($what) $fname 1444 1444 if { [info exists _fields($fname)] } { 1445 1445 foreach { label units components } $_fields($fname) break … … 1496 1496 } 1497 1497 "isHeightmap" { 1498 set bool $_settings( isHeightmap)1498 set bool $_settings($what) 1499 1499 set c $itk_component(view) 1500 1500 StartBufferingCommands … … 1602 1602 "lighting" { 1603 1603 if { $_settings(isHeightmap) } { 1604 set _settings(saveLighting) $_settings( lighting)1604 set _settings(saveLighting) $_settings($what) 1605 1605 set bool $_settings($what) 1606 1606 SendCmd "heightmap lighting $bool" … … 1610 1610 } 1611 1611 "numIsolines" { 1612 set _settings( numIsolines) [$itk_component(numisolines) value]1613 set _currentNumIsolines $_settings( numIsolines)1612 set _settings($what) [$itk_component(numisolines) value] 1613 set _currentNumIsolines $_settings($what) 1614 1614 UpdateContourList 1615 set _changed( numIsolines) 11615 set _changed($what) 1 1616 1616 SendCmd "heightmap contourlist [list $_contourList]" 1617 1617 if {$_settings(colormapDiscrete)} { 1618 set numColors [expr $_settings( numIsolines) + 1]1618 set numColors [expr $_settings($what) + 1] 1619 1619 SendCmd "colormap res $numColors" 1620 1620 EventuallyRequestLegend … … 1624 1624 } 1625 1625 "opacity" { 1626 set _changed( opacity) 11626 set _changed($what) 1 1627 1627 if { $_settings(isHeightmap) } { 1628 set _settings(saveOpacity) $_settings( opacity)1629 set val $_settings( opacity)1628 set _settings(saveOpacity) $_settings($what) 1629 set val $_settings($what) 1630 1630 set sval [expr { 0.01 * double($val) }] 1631 1631 SendCmd "heightmap opacity $sval" … … 1638 1638 SendCmd "outline visible 0" 1639 1639 } else { 1640 set _settings(saveOutline) $_settings( outline)1641 set bool $_settings( outline)1640 set _settings(saveOutline) $_settings($what) 1641 set bool $_settings($what) 1642 1642 SendCmd "outline visible $bool" 1643 1643 } … … 2262 2262 array set style { 2263 2263 -color BCGYR 2264 -levels 10 2264 2265 -opacity 100 2265 -levels 102266 2266 } 2267 2267 set stylelist [$dataobj style $comp] … … 2382 2382 # If there's a legend title, create a text item for the title. 2383 2383 $c create text $x $y \ 2384 -anchor ne \ 2385 -fill $itk_option(-plotforeground) -tags "title legend" \ 2386 -font $font 2384 -anchor ne \ 2385 -fill $itk_option(-plotforeground) -tags "title legend" \ 2386 -font $font 2387 if { $title != "" } { 2388 incr y $lineht 2389 } 2387 2390 $c create text $x $y \ 2388 2391 -anchor ne \ -
trunk/gui/scripts/vtkimageviewer.tcl
r4336 r4344 7 7 # ====================================================================== 8 8 # AUTHOR: Michael McLennan, Purdue University 9 # Copyright (c) 2004-201 2HUBzero Foundation, LLC9 # Copyright (c) 2004-2014 HUBzero Foundation, LLC 10 10 # 11 11 # See the file "license.terms" for information on usage and … … 2145 2145 # If there's a legend title, create a text item for the title. 2146 2146 $c create text $x $y \ 2147 -anchor ne \ 2148 -fill $itk_option(-plotforeground) -tags "title legend" \ 2149 -font $font 2147 -anchor ne \ 2148 -fill $itk_option(-plotforeground) -tags "title legend" \ 2149 -font $font 2150 if { $title != "" } { 2151 incr y $lineht 2152 } 2150 2153 $c create text $x $y \ 2151 2154 -anchor ne \ -
trunk/gui/scripts/vtkisosurfaceviewer.tcl
r4342 r4344 222 222 223 223 array set _settings { 224 -axesvisible 1 225 -axislabelsvisible 1 224 226 -background black 225 227 -colormap BCGYR 226 228 -colormapvisible 1 227 -field "Default"228 -isolinecolor white229 -axesvisible 1230 -axislabelsvisible 1231 229 -cutplaneedges 0 232 230 -cutplanelighting 1 … … 235 233 -cutplanesvisible 0 236 234 -cutplanewireframe 0 235 -field "Default" 236 -isolinecolor white 237 237 -isosurfaceedges 0 238 238 -isosurfacelighting 1 -
trunk/gui/scripts/vtkmeshviewer.tcl
r4250 r4344 1 1 # -*- mode: tcl; indent-tabs-mode: nil -*- 2 3 2 # ---------------------------------------------------------------------- 4 3 # COMPONENT: vtkmeshviewer - Vtk mesh 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 -
trunk/gui/scripts/vtkstreamlinesviewer.tcl
r4336 r4344 7 7 # ====================================================================== 8 8 # AUTHOR: Michael McLennan, Purdue University 9 # Copyright (c) 2004-201 2HUBzero Foundation, LLC9 # Copyright (c) 2004-2014 HUBzero Foundation, LLC 10 10 # 11 11 # See the file "license.terms" for information on usage and -
trunk/gui/scripts/vtkviewer.tcl
r4336 r4344 1 1 # -*- mode: tcl; indent-tabs-mode: nil -*- 2 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
Note: See TracChangeset
for help on using the changeset viewer.