- Timestamp:
- Jun 9, 2009, 3:55:46 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/field.tcl
r1491 r1496 249 249 } 250 250 if {[info exists _comp2unirect2d($what)]} { 251 set mobj $_comp2unirect2d($what) 252 return [$mobj blob] 251 return [$_comp2unirect2d($what) blob] 253 252 } 254 253 if {[info exists _comp2unirect3d($what)]} { 255 set mobj $_comp2unirect3d($what) 256 return [$mobj blob] 254 return [$_comp2unirect3d($what) blob] 257 255 } 258 256 error "bad option \"$what\": should be [join [lsort [array names _comp2dims]] {, }]" -
trunk/gui/scripts/flowhints.tcl
r1491 r1496 61 61 "arrows" "off" 62 62 "volume" "on" 63 "duration" "1:00" 64 "speed" "1x" 63 65 } 64 66 set _units $units … … 75 77 "arrows" { GetBoolean $f $child _hints(arrows) } 76 78 "axis" { GetAxis $f $child _hints(axis) } 79 "speed" { set _hints(speed) $value } 80 "duration" { set _hints(duration) $value } 77 81 "position" { GetPosition $f $child _hints(position) } 78 82 "particles*" { … … 112 116 "hide" "no" 113 117 "label" "" 118 "linewidth" "2" 114 119 } 115 120 set b [$f element -as object $child] … … 124 129 "description" { set data(description) $value } 125 130 "hide" { GetBoolean $b hide data(hide) } 131 "linewidth" { set data(linewidth) $value } 126 132 "label" { set data(label) $value } 127 133 "corner*" { -
trunk/gui/scripts/flowspeed.tcl
r1491 r1496 59 59 itcl::body Rappture::Flowspeed::constructor {args} { 60 60 itk_component add entry { 61 entry $itk_interior.entry -font "arial 9"61 entry $itk_interior.entry 62 62 } { 63 63 usual 64 64 keep -width 65 ignore -font66 65 rename -background -textbackground textBackground Background 67 66 rename -foreground -textforeground textForeground Foreground -
trunk/gui/scripts/flowvisviewer.tcl
r1494 r1496 904 904 foreach comp [$dataobj components] { 905 905 # Send the data as one huge base64-encoded mess -- yuck! 906 set data [$dataobj blob $comp] 907 set nbytes [string length $data] 906 set time [time { 907 set data [$dataobj blob $comp] 908 set nbytes [string length $data] 909 }] 910 puts stderr rebuild=$time 908 911 set extents [$dataobj extents $comp] 912 909 913 # I have a field. Is a vector field or a volume field? 910 914 if { $extents == 1 } { … … 1169 1173 foreach comp [$dataobj components] { 1170 1174 # Send the data as one huge base64-encoded mess -- yuck! 1171 set data [$dataobj blob $comp] 1172 set nbytes [string length $data] 1175 set blob [time { set data [$dataobj blob $comp] }] 1176 puts stderr blob=$blob 1177 set nbytes [string length $data] 1173 1178 set extents [$dataobj extents $comp] 1174 1179 # I have a field. Is a vector field or a volume field? … … 1196 1201 FixSettings grid 1197 1202 FixSettings axes 1198 # nothing to send -- activate the proper ivol 1203 FixSettings volume 1204 FixSettings outline 1205 FixSettings light 1206 FixSettings transp 1207 # nothing to send -- activate the proper volume 1199 1208 set _first [lindex [get] 0] 1200 1209 if {"" != $_first} { 1201 1210 FixSettings light 1202 1211 FixSettings transp 1203 FixSettings outline1204 1205 1212 set axis [$_first hints updir] 1206 1213 if {"" != $axis} { … … 1266 1273 # care. We're finished here. 1267 1274 blt::busy hold $itk_component(hull); update idletasks 1268 SendBytes $_outbuf ;1275 SendBytes $_outbuf 1269 1276 blt::busy release $itk_component(hull) 1270 1277 set _buffering 0; # Turn off buffering. … … 1737 1744 } 1738 1745 array set style [lindex [$dataobj components -style $comp] 0] 1746 set _settings($this-light) $style(-light) 1747 set _settings($this-transp) $style(-transp) 1748 set _settings($this-opacity) [expr $style(-opacity) * 100] 1739 1749 set tf "$style(-color):$style(-levels):$style(-opacity)" 1740 1750 set _obj2style($dataobj-$comp) $tf … … 1757 1767 -levels 6 1758 1768 -opacity 1.0 1769 -light 40 1770 -transp 50 1759 1771 } 1760 1772 set dataobj ""; set comp "" … … 1809 1821 } 1810 1822 set max $_settings($tag-opacity) 1811 1823 1812 1824 set isovalues {} 1813 1825 foreach m $_isomarkers($tf) { … … 2592 2604 append cmd "if {\[flow exists $tag\]} {flow delete $tag}\n" 2593 2605 array set info [$flowobj hints] 2606 set _settings($this-volume) $info(volume) 2607 set _settings($this-outline) $info(outline) 2608 set _settings($this-arrows) $info(arrows) 2609 set _settings($this-duration) $info(duration) 2610 $itk_component(speed) value $info(speed) 2594 2611 append cmd "flow add $tag -position $info(position) -axis $info(axis) " 2595 2612 append cmd "-volume $info(volume) -outline $info(outline) " … … 2612 2629 set color [Color2RGB $info(color)] 2613 2630 append cmd "$tag box add $info(name) -color {$color} " 2614 append cmd "-hide $info(hide) "2631 append cmd "-hide $info(hide) -linewidth $info(linewidth) " 2615 2632 append cmd "-corner1 {$info(corner1)} -corner2 {$info(corner2)}\n" 2616 2633 } -
trunk/gui/scripts/heightmapviewer.tcl
r1463 r1496 541 541 foreach dataobj $_sendobjs { 542 542 foreach comp [$dataobj components] { 543 set data [$dataobj blob $comp]544 545 543 foreach { vmin vmax } [$dataobj limits v] break 546 544 if { $_limits(vmin) == "" || $vmin < $_limits(vmin) } { … … 550 548 set _limits(vmax) $vmax 551 549 } 552 553 550 # tell the engine to expect some data 551 set data [$dataobj blob $comp] 554 552 set nbytes [string length $data] 555 553 if { ![SendBytes "heightmap data follows $nbytes\n"] } { -
trunk/gui/scripts/unirect3d.tcl
r1463 r1496 103 103 lappend data "values" [$_values range 0 end] 104 104 } 105 return [Rappture::encoding::encode -as zb64 "$data"] 105 return "@@RP-ENC:raw\n$data" 106 #return [Rappture::encoding::encode -as b64 "$data"] 106 107 } 107 108 -
trunk/src/core/RpEncode.cc
r1451 r1496 261 261 bytes += 11; 262 262 size -= 11; 263 headerFlags |= RPENC_Z;263 headerFlags = RPENC_Z; 264 264 } else if ((size > 13) && (strncmp(bytes, "@@RP-ENC:b64\n", 13) == 0)){ 265 265 bytes += 13; 266 266 size -= 13; 267 headerFlags |= RPENC_B64;267 headerFlags = RPENC_B64; 268 268 } else if ((size > 14) && (strncmp(bytes, "@@RP-ENC:zb64\n", 14) == 0)){ 269 269 bytes += 14; 270 270 size -= 14; 271 headerFlags |= (RPENC_B64 | RPENC_Z);272 } else if ((size > 13) && (strncmp(bytes, "@@RP-ENC:raw\n", 1 4) == 0)){271 headerFlags = (RPENC_B64 | RPENC_Z); 272 } else if ((size > 13) && (strncmp(bytes, "@@RP-ENC:raw\n", 13) == 0)){ 273 273 bytes += 13; 274 274 size -= 13;
Note: See TracChangeset
for help on using the changeset viewer.