Changeset 4688 for trunk


Ignore:
Timestamp:
Nov 10, 2014, 9:42:12 AM (10 years ago)
Author:
ldelgass
Message:

axis fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/vtkisosurfaceviewer.tcl

    r4673 r4688  
    237237    array set _settings {
    238238        -axesvisible                    1
    239         -axislabelsvisible              1
     239        -axislabels                     1
     240        -axisminorticks                 1
    240241        -axismode                       "static"
    241242        -background                     black
     
    9991000        set _first ""
    10001001        InitSettings -xgrid -ygrid -zgrid -axismode \
    1001             -axesvisible -axislabelsvisible
    1002         SendCmd "axis lformat all %g"
    1003         # Too many major ticks, so turn off minor ticks
    1004         SendCmd "axis minticks all 0"
     1002            -axesvisible -axislabels -axisminorticks
     1003        #SendCmd "axis lformat all %g"
    10051004        StopBufferingCommands
    10061005        SendCmd "imgflush"
     
    10351034                    SendCmd "clientinfo [list $info]"
    10361035                }
    1037                 append _outbuf "dataset add $tag data follows $length\n"
     1036                SendCmd "dataset add $tag data follows $length"
    10381037                append _outbuf $bytes
    10391038                set _datasets($tag) 1
     
    13741373        }
    13751374        "-axesvisible" {
    1376             set bool $_settings(-axesvisible)
     1375            set bool $_settings($what)
    13771376            SendCmd "axis visible all $bool"
    13781377        }
    1379         "-axislabelsvisible" {
    1380             set bool $_settings(-axislabelsvisible)
     1378        "-axislabels" {
     1379            set bool $_settings($what)
    13811380            SendCmd "axis labels all $bool"
    13821381        }
    1383         "-xgrid" - "-ygrid" - "-zgrid" {
    1384             set axis [string tolower [string range $what 1 1]]
     1382        "-axisminorticks" {
    13851383            set bool $_settings($what)
    1386             SendCmd "axis grid $axis $bool"
     1384            SendCmd "axis minticks all $bool"
    13871385        }
    13881386        "-axismode" {
     
    13911389            set _settings($what) $mode
    13921390            SendCmd "axis flymode $mode"
     1391        }
     1392        "-xgrid" - "-ygrid" - "-zgrid" {
     1393            set axis [string tolower [string range $what 1 1]]
     1394            set bool $_settings($what)
     1395            SendCmd "axis grid $axis $bool"
    13931396        }
    13941397        "-cutplaneedges" {
     
    17911794
    17921795    checkbutton $inner.visible \
    1793         -text "Show Axes" \
     1796        -text "Axes" \
    17941797        -variable [itcl::scope _settings(-axesvisible)] \
    17951798        -command [itcl::code $this AdjustSetting -axesvisible] \
     
    17971800
    17981801    checkbutton $inner.labels \
    1799         -text "Show Axis Labels" \
    1800         -variable [itcl::scope _settings(-axislabelsvisible)] \
    1801         -command [itcl::code $this AdjustSetting -axislabelsvisible] \
     1802        -text "Axis Labels" \
     1803        -variable [itcl::scope _settings(-axislabels)] \
     1804        -command [itcl::code $this AdjustSetting -axislabels] \
    18021805        -font "Arial 9"
    1803 
    1804     checkbutton $inner.gridx \
    1805         -text "Show X Grid" \
     1806    label $inner.grid_l -text "Grid" -font "Arial 9"
     1807    checkbutton $inner.xgrid \
     1808        -text "X" \
    18061809        -variable [itcl::scope _settings(-xgrid)] \
    18071810        -command [itcl::code $this AdjustSetting -xgrid] \
    18081811        -font "Arial 9"
    1809     checkbutton $inner.gridy \
    1810         -text "Show Y Grid" \
     1812    checkbutton $inner.ygrid \
     1813        -text "Y" \
    18111814        -variable [itcl::scope _settings(-ygrid)] \
    18121815        -command [itcl::code $this AdjustSetting -ygrid] \
    18131816        -font "Arial 9"
    1814     checkbutton $inner.gridz \
    1815         -text "Show Z Grid" \
     1817    checkbutton $inner.zgrid \
     1818        -text "Z" \
    18161819        -variable [itcl::scope _settings(-zgrid)] \
    18171820        -command [itcl::code $this AdjustSetting -zgrid] \
     1821        -font "Arial 9"
     1822    checkbutton $inner.minorticks \
     1823        -text "Minor Ticks" \
     1824        -variable [itcl::scope _settings(-axisminorticks)] \
     1825        -command [itcl::code $this AdjustSetting -axisminorticks] \
    18181826        -font "Arial 9"
    18191827
     
    18321840
    18331841    blt::table $inner \
    1834         0,0 $inner.visible -anchor w -cspan 2 \
    1835         1,0 $inner.labels  -anchor w -cspan 2 \
    1836         2,0 $inner.gridx   -anchor w -cspan 2 \
    1837         3,0 $inner.gridy   -anchor w -cspan 2 \
    1838         4,0 $inner.gridz   -anchor w -cspan 2 \
    1839         5,0 $inner.mode_l  -anchor w -cspan 2 -padx { 2 0 } \
    1840         6,0 $inner.mode    -fill x   -cspan 2
     1842        0,0 $inner.visible -anchor w -cspan 4 \
     1843        1,0 $inner.labels  -anchor w -cspan 4 \
     1844        2,0 $inner.minorticks  -anchor w -cspan 4 \
     1845        4,0 $inner.grid_l  -anchor w \
     1846        4,1 $inner.xgrid   -anchor w \
     1847        4,2 $inner.ygrid   -anchor w \
     1848        4,3 $inner.zgrid   -anchor w \
     1849        5,0 $inner.mode_l  -anchor w -padx { 2 0 } \
     1850        5,1 $inner.mode    -fill x   -cspan 3
    18411851
    18421852    blt::table configure $inner r* c* -resize none
    1843     blt::table configure $inner r7 c1 -resize expand
     1853    blt::table configure $inner r7 c6 -resize expand
     1854    blt::table configure $inner r3 -height 0.125i
    18441855}
    18451856
     
    26092620    }
    26102621    if { $_contourList(numLevels) < 1 } {
    2611         puts stderr "numLevels < 1"
     2622        # There are tools that set 0 levels to get cutplanes only
     2623        #puts stderr "numLevels < 1"
    26122624        return ""
    26132625    }
Note: See TracChangeset for help on using the changeset viewer.