Changeset 3877 for branches/1.3/gui/scripts/field.tcl
- Timestamp:
- Aug 21, 2013 10:52:23 AM (11 years ago)
- Location:
- branches/1.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.3
- Property svn:mergeinfo changed
/trunk merged: 3847-3850,3852,3859-3861,3865-3876
- Property svn:mergeinfo changed
-
branches/1.3/gui/scripts/field.tcl
r3807 r3877 868 868 # off to the NanoVis visualizer. 869 869 # 870 870 set _viewer "nanovis" 871 871 set _dim 3 872 set _type "dx"873 872 set _comp2dims($cname) "3D" 874 set contents [$_field get -decode no $cname.$type]875 if { $contents == "" } {876 puts stderr "WARNING: no data for \"$_path.$cname.$type\""877 continue; # Ignore this component878 }879 set _comp2dx($cname) $contents880 873 if 0 { 881 set hdr "@@RP-ENC:zb64\n" 882 set data [$_field get -decode no $cname.$type] 883 set data "$hdr$data" 884 set data [Rappture::encoding::decode $data] 885 set data [Rappture::DxToVtk $data] 886 set f [open /tmp/$_path.$cname.vtk "w"] 887 puts $f $data 888 close $f 874 set vtkdata [$_field get -decode yes $cname.$type] 875 if { $vtkdata == "" } { 876 puts stderr "WARNING: no data for \"$_path.$cname.$type\"" 877 continue; # Ignore this component 878 } 879 set vtkdata [Rappture::DxToVtk $vtkdata] 880 if 0 { 881 set f [open /tmp/$_path.$cname.vtk "w"] 882 puts $f $vtkdata 883 close $f 884 } 885 ReadVtkDataSet $cname $vtkdata 886 set _type "vtk" 887 set _comp2vtk($cname) $vtkdata 888 } else { 889 set contents [$_field get -decode no $cname.$type] 890 if { $contents == "" } { 891 puts stderr "WARNING: no data for \"$_path.$cname.$type\"" 892 continue; # Ignore this component 893 } 894 set _type "dx" 895 set _comp2dx($cname) $contents 896 } 897 set viewer [$_field get "about.view"] 898 if { $viewer != "" } { 899 set _viewer $viewer 889 900 } 890 901 set _comp2style($cname) [$_field get $cname.style] … … 1508 1519 } 1509 1520 if { ![$mesh isvalid] } { 1521 puts stderr "Mesh is invalid" 1510 1522 return 0 1511 1523 } 1512 1524 set _dim [$mesh dimensions] 1525 if { $_dim == 3 } { 1526 set dim 0 1527 foreach axis {x y z} { 1528 foreach {min max} [$mesh limits $axis] { 1529 if { $min < $max } { 1530 incr dim 1531 } 1532 } 1533 } 1534 if { $dim != 3 } { 1535 set _dim $dim 1536 } 1537 } 1538 1513 1539 if {$_dim == 1} { 1514 1540 # 1D data: Create vectors for graph widget.
Note: See TracChangeset
for help on using the changeset viewer.