Changeset 5364 for branches/1.3
- Timestamp:
- Apr 29, 2015, 6:32:23 AM (10 years ago)
- Location:
- branches/1.3
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.3
-
branches/1.3/gui/apps/vtkheightmap-test
r4413 r5364 26 26 package require Rappture 27 27 package require RapptureGUI 28 package require vtk29 28 30 29 option add *comm.font -*-courier-medium-r-normal-*-*-120-* -
branches/1.3/gui/apps/vtkisosurface-test
r4413 r5364 26 26 package require Rappture 27 27 package require RapptureGUI 28 package require vtk29 28 30 29 option add *comm.font -*-courier-medium-r-normal-*-*-120-* -
branches/1.3/gui/apps/vtkvolume-test
r4413 r5364 26 26 package require Rappture 27 27 package require RapptureGUI 28 package require vtk29 28 30 29 option add *comm.font -*-courier-medium-r-normal-*-*-120-* -
branches/1.3/gui/scripts/drawing.tcl
r4786 r5364 48 48 # ---------------------------------------------------------------------- 49 49 itcl::body Rappture::Drawing::constructor {xmlobj path} { 50 package require vtk51 50 if {![Rappture::library isvalid $xmlobj]} { 52 51 error "bad value \"$xmlobj\": should be Rappture::library" … … 123 122 } 124 123 } 125 foreach {key} { axisorder } {126 set str [$_drawing get $key]127 if {"" != $str} {128 set _hints($key) $str129 }130 }131 124 foreach {key path} { 132 125 toolid tool.id -
branches/1.3/gui/scripts/field.tcl
r5363 r5364 895 895 # 896 896 # Extract gzipped, base64-encoded OpenDX data 897 # 897 # 898 898 set viewer [$_field get "about.view"] 899 899 if { $viewer != "" } { -
branches/1.3/gui/scripts/vtkglyphviewer.tcl
r5348 r5364 158 158 # ---------------------------------------------------------------------- 159 159 itcl::body Rappture::VtkGlyphViewer::constructor {hostlist args} { 160 package require vtk161 160 set _serverType "vtkvis" 162 161 -
branches/1.3/gui/scripts/vtkisosurfaceviewer.tcl
r5348 r5364 182 182 # ---------------------------------------------------------------------- 183 183 itcl::body Rappture::VtkIsosurfaceViewer::constructor {hostlist args} { 184 package require vtk185 184 set _serverType "vtkvis" 186 185 -
branches/1.3/gui/scripts/vtkmeshviewer.tcl
r5348 r5364 57 57 public method get {args} 58 58 public method isconnected {} 59 public method limits { dataobj }60 59 public method parameters {title args} { 61 60 # do nothing … … 135 134 # ---------------------------------------------------------------------- 136 135 itcl::body Rappture::VtkMeshViewer::constructor {hostlist args} { 137 package require vtk138 136 set _serverType "vtkvis" 139 137 … … 173 171 set _arcball [blt::arcball create 100 100] 174 172 $_arcball quaternion [ViewToQuaternion] 175 176 set _limits(zmin) 0.0177 set _limits(zmax) 1.0178 173 179 174 array set _settings { … … 551 546 itcl::body Rappture::VtkMeshViewer::scale {args} { 552 547 foreach dataobj $args { 553 array set bounds [limits $dataobj] 554 if {![info exists _limits(xmin)] || $_limits(xmin) > $bounds(xmin)} { 555 set _limits(xmin) $bounds(xmin) 556 } 557 if {![info exists _limits(xmax)] || $_limits(xmax) < $bounds(xmax)} { 558 set _limits(xmax) $bounds(xmax) 559 } 560 561 if {![info exists _limits(ymin)] || $_limits(ymin) > $bounds(ymin)} { 562 set _limits(ymin) $bounds(ymin) 563 } 564 if {![info exists _limits(ymax)] || $_limits(ymax) < $bounds(ymax)} { 565 set _limits(ymax) $bounds(ymax) 566 } 567 568 if {![info exists _limits(zmin)] || $_limits(zmin) > $bounds(zmin)} { 569 set _limits(zmin) $bounds(zmin) 570 } 571 if {![info exists _limits(zmax)] || $_limits(zmax) < $bounds(zmax)} { 572 set _limits(zmax) $bounds(zmax) 548 if { ![$dataobj isvalid] } { 549 continue; # Object doesn't contain valid data. 550 } 551 foreach axis { x y z } { 552 set lim [$dataobj limits $axis] 553 if { ![info exists _limits($axis)] } { 554 set _limits($axis) $lim 555 continue 556 } 557 foreach {min max} $lim break 558 foreach {amin amax} $_limits($axis) break 559 if { $amin > $min } { 560 set amin $min 561 } 562 if { $amax < $max } { 563 set amax $max 564 } 565 set _limits($axis) [list $amin $amax] 573 566 } 574 567 } … … 824 817 } 825 818 826 set _limits(zmin) ""827 set _limits(zmax) ""828 819 set _first "" 829 820 SendCmd "dataset visible 0" … … 1226 1217 SendCmd "outline color $rgb" 1227 1218 } 1228 }1229 1230 itcl::body Rappture::VtkMeshViewer::limits { dataobj } {1231 set tag $dataobj1232 if { ![info exists _limits($tag)] } {1233 set data [$dataobj vtkdata -full]1234 if { $data == "" } {1235 continue1236 }1237 set tmpfile file[pid].vtk1238 set f [open "$tmpfile" "w"]1239 fconfigure $f -translation binary -encoding binary1240 puts $f $data1241 close $f1242 set reader [vtkDataSetReader $tag-xvtkDataSetReader]1243 $reader SetFileName $tmpfile1244 $reader Update1245 file delete $tmpfile1246 set output [$reader GetOutput]1247 set _limits($tag) [$output GetBounds]1248 rename $output ""1249 rename $reader ""1250 }1251 foreach { xMin xMax yMin yMax zMin zMax} $_limits($tag) break1252 if {![info exists limits(xmin)] || $limits(xmin) > $xMin} {1253 set limits(xmin) $xMin1254 }1255 if {![info exists limits(xmax)] || $limits(xmax) < $xMax} {1256 set limits(xmax) $xMax1257 }1258 if {![info exists limits(ymin)] || $limits(ymin) > $yMin} {1259 set limits(ymin) $xMin1260 }1261 if {![info exists limits(ymax)] || $limits(ymax) < $yMax} {1262 set limits(ymax) $yMax1263 }1264 if {![info exists limits(zmin)] || $limits(zmin) > $zMin} {1265 set limits(zmin) $zMin1266 }1267 if {![info exists limits(zmax)] || $limits(zmax) < $zMax} {1268 set limits(zmax) $zMax1269 }1270 1271 return [array get limits]1272 1219 } 1273 1220 -
branches/1.3/gui/scripts/vtkstreamlinesviewer.tcl
r5348 r5364 164 164 # ---------------------------------------------------------------------- 165 165 itcl::body Rappture::VtkStreamlinesViewer::constructor {hostlist args} { 166 package require vtk167 166 set _serverType "vtkvis" 168 167 -
branches/1.3/gui/scripts/vtksurfaceviewer.tcl
r5348 r5364 159 159 # ---------------------------------------------------------------------- 160 160 itcl::body Rappture::VtkSurfaceViewer::constructor {hostlist args} { 161 package require vtk162 161 set _serverType "vtkvis" 163 162 -
branches/1.3/gui/scripts/vtkvolumeviewer.tcl
r5348 r5364 157 157 # ---------------------------------------------------------------------- 158 158 itcl::body Rappture::VtkVolumeViewer::constructor {hostlist args} { 159 package require vtk160 159 set _serverType "vtkvis" 161 160
Note: See TracChangeset
for help on using the changeset viewer.