- Timestamp:
- Jan 24, 2012, 1:24:54 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/vtkheightmapviewer.tcl
r2768 r2769 261 261 surface-edges 0 262 262 surface-lighting 1 263 surface-opacity 40263 surface-opacity 100 264 264 surface-visible 1 265 265 surface-wireframe 0 266 266 surface-numcontours 10 267 surface-scale 1267 surface-scale 50 268 268 legend-visible 1 269 269 }] … … 1112 1112 if { $_reset } { 1113 1113 InitSettings surface-opacity \ 1114 surface-numcontours surface- lighting \1114 surface-numcontours surface-scale surface-lighting \ 1115 1115 surface-palette surface-field \ 1116 1116 surface-edges surface-opacity surface-wireframe … … 1502 1502 "surface-scale" { 1503 1503 set val $_settings(surface-scale) 1504 set sval [expr { 0.01 * double($val) }]1504 set sval [expr { $val >= 50 ? double($val)/50.0 : 1.0/(2.0-(double($val)/50.0)) }] 1505 1505 foreach dataset [CurrentDatasets -visible $_first] { 1506 SendCmd "heightmap scale $sval $sval$sval $dataset"1506 SendCmd "heightmap heightscale $sval $dataset" 1507 1507 } 1508 1508 } … … 1992 1992 1993 1993 label $inner.scale_l -text "Scale" -font "Arial 9" 1994 ::scale $inner.scale -from 1-to 100 -orient horizontal \1994 ::scale $inner.scale -from 0 -to 100 -orient horizontal \ 1995 1995 -variable [itcl::scope _settings(surface-scale)] \ 1996 1996 -width 10 \ … … 2032 2032 2033 2033 blt::table $inner \ 2034 0,0 $inner.surface 2034 0,0 $inner.surface -anchor w -pady 2 \ 2035 2035 1,0 $inner.wireframe -anchor w -pady 2 \ 2036 2036 2,0 $inner.lighting -anchor w -pady 2 \ … … 2040 2040 6,0 $inner.numcontours_l -anchor w -pady 2 -cspan 2 \ 2041 2041 7,0 $inner.numcontours -fill x -pady 2 -cspan 2 \ 2042 8,0 $inner.field_l -anchor w -pady 2 \ 2043 8,1 $inner.field -anchor w -pady 2 \ 2044 9,0 $inner.palette_l -anchor w -pady 2 \ 2045 9,1 $inner.palette -anchor w -pady 2 \ 2042 8,0 $inner.scale_l -anchor w -pady 2 -cspan 2 \ 2043 9,0 $inner.scale -fill x -pady 2 -cspan 2 \ 2044 10,0 $inner.field_l -anchor w -pady 2 \ 2045 10,1 $inner.field -anchor w -pady 2 \ 2046 11,0 $inner.palette_l -anchor w -pady 2 \ 2047 11,1 $inner.palette -anchor w -pady 2 \ 2046 2048 2047 2049 blt::table configure $inner r* c* -resize none 2048 blt::table configure $inner r1 0c1 -resize expand2050 blt::table configure $inner r12 c1 -resize expand 2049 2051 } 2050 2052 … … 2423 2425 -edges 0 2424 2426 -edgecolor black 2427 -lighting 1 2425 2428 -linewidth 1.0 2426 -opacity 0.4 2429 -opacity 1.0 2430 -scale 1.0 2431 -numcontours 10 2432 -visible 1 2427 2433 -wireframe 0 2428 -lighting 12429 -visible 12430 2434 } 2431 2435 if { $dataobj != $_first } { … … 2433 2437 } 2434 2438 array set settings $style 2435 SendCmd "heightmap add $tag" 2439 SendCmd "heightmap add numcontours $settings(-numcontours) $settings(-scale) $tag" 2440 set _settings(surface-numcontours) $settings(-numcontours) 2441 set val $settings(-scale) 2442 set val [expr { $val < 0.5 ? 0.5 : $val } ] 2443 set val [expr { $val > 2.0 ? 2.0 : $val } ] 2444 set _settings(surface-scale) [expr { $val >= 1.0 ? int($val * 50.0) : int(50.0 * (2.0 - (1.0/$val))) }] 2436 2445 #SendCmd "cutplane add $tag" 2437 2446 #SendCmd "cutplane edges 0 $tag"
Note: See TracChangeset
for help on using the changeset viewer.