Changeset 5610


Ignore:
Timestamp:
May 27, 2015 1:17:43 PM (9 years ago)
Author:
ldelgass
Message:

Remove unused mesh methods. mesh/values methods are only used for field acting
as a curve (XY data).

Location:
trunk/gui/scripts
Files:
4 edited

Legend:

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

    r5609 r5610  
    2525    }
    2626    public method points {}
    27     public method mesh {}
    2827    public method units { axis }
    2928    public method label { axis }
     
    216215
    217216# ----------------------------------------------------------------------
    218 # USAGE: mesh
    219 #
    220 # Returns the vtk object representing the mesh.
    221 # ----------------------------------------------------------------------
    222 itcl::body Rappture::Cloud::mesh {} {
    223     return $_points
    224 }
    225 
    226 # ----------------------------------------------------------------------
    227217# USAGE: dimensions
    228218#
  • trunk/gui/scripts/field.tcl

    r5608 r5610  
    306306#
    307307# For 1D data (curve), returns a BLT vector of x values for the field
    308 # component <name>.  Otherwise, this method is unused
     308# component <name>.  Otherwise, this method is unused.
    309309# ----------------------------------------------------------------------
    310310itcl::body Rappture::Field::mesh {{cname -overall}} {
     
    316316    }
    317317    if {[info exists _comp2vtk($cname)]} {
    318         # FIXME: extract mesh from VTK file data.
    319318        error "method \"mesh\" is not implemented for VTK file data"
    320319    }
     
    323322    }
    324323    if {[info exists _comp2mesh($cname)]} {
    325         # FIXME: This only works for cloud
    326         set mesh [lindex $_comp2mesh($cname) 0]
    327         return [$mesh points]
     324        error "method \"mesh\" is not implemented for Rappture::Mesh"
    328325    }
    329326    if {[info exists _comp2unirect2d($cname)]} {
    330         # FIXME: unirect2d mesh is a list: xMin xMax xNum yMin yMax yNum
    331         return [$_comp2unirect2d($cname) mesh]
     327        error "method \"mesh\" is not implemented for unirect2d"
    332328    }
    333329    if {[info exists _comp2unirect3d($cname)]} {
    334         # This returns a list of x,y,z points
    335         return [$_comp2unirect3d($cname) mesh]
     330        error "method \"mesh\" is not implemented for unirect3d"
    336331    }
    337332    error "can't get field mesh: Unknown component \"$cname\": should be one of [join [lsort [array names _comp2dims]] {, }]"
     
    342337#
    343338# For 1D data (curve), returns a BLT vector of field values (y coords)
    344 # for the field component <name>.  Otherwise, this method is unused
     339# for the field component <name>.  Otherwise, this method is unused.
     340# The number of elements in the vector should be a multiple of the
     341# return value of [numComponents]
    345342# ----------------------------------------------------------------------
    346343itcl::body Rappture::Field::values {cname} {
     
    351348        return [lindex $_comp2xy($cname) 1]  ;# return yv
    352349    }
    353     if { [info exists _comp2vtk($cname)] } {
    354         # FIXME: extract the values from the VTK file data
     350    if {[info exists _comp2vtk($cname)]} {
    355351        error "method \"values\" is not implemented for VTK file data"
    356352    }
     
    358354        error "method \"values\" is not implemented for DX file data"
    359355    }
    360     if { [info exists _comp2mesh($cname)] } {
    361         set vector [lindex $_comp2mesh($cname) 1]
    362         return [$vector range 0 end]
     356    if {[info exists _comp2mesh($cname)]} {
     357        return [lindex $_comp2mesh($cname) 1] ;# return vector
    363358    }
    364359    if {[info exists _comp2unirect2d($cname)]} {
    365         return $_values
     360        error "method \"values\" is not implemented for unirect2d"
    366361    }
    367362    if {[info exists _comp2unirect3d($cname)]} {
    368         return [$_comp2unirect3d($cname) values]
     363        error "method \"values\" is not implemented for unirect3d"
    369364    }
    370365    error "can't get field values. Unknown component \"$cname\": should be one of [join [lsort [array names _comp2dims]] {, }]"
     
    391386        return [$_comp2unirect3d($cname) blob]
    392387    }
     388    if {[info exists _comp2mesh($cname)]} {
     389        error "method \"blob\" not implemented for Rappture::Mesh"
     390    }
    393391    if { [info exists _comp2vtk($cname)] } {
    394         error "blob not implemented for VTK file data"
     392        error "method \"blob\" not implemented for VTK file data"
    395393    }
    396394    if {[info exists _comp2xy($cname)]} {
    397         error "blob not implemented for XY data"
     395        error "method \"blob\" not implemented for XY data"
    398396    }
    399397    error "can't get field blob: Unknown component \"$cname\": should be one of [join [lsort [array names _comp2dims]] {, }]"
  • trunk/gui/scripts/unirect2d.tcl

    r5578 r5610  
    3939    public method label { axis }
    4040    public method limits {axis}
    41     public method mesh {}
    4241    public method numpoints {} {
    4342        return $_numPoints
     
    195194
    196195# ----------------------------------------------------------------------
    197 # method mesh
    198 #       Returns a Tcl list that represents the mesh limits and dims.
    199 # ----------------------------------------------------------------------
    200 itcl::body Rappture::Unirect2d::mesh {} {
    201     lappend out $_xMin $_xMax $_xNum $_yMin $_yMax $_yNum
    202     return $out
    203 }
    204 
    205 # ----------------------------------------------------------------------
    206196# method limits <axis>
    207197#       Returns a list {min max} representing the limits for the
  • trunk/gui/scripts/unirect3d.tcl

    r5578 r5610  
    3737    public method label { axis }
    3838    public method limits {axis}
    39     public method mesh {}
    4039    public method numpoints {} {
    4140        return $_numPoints
     
    189188
    190189# ----------------------------------------------------------------------
    191 # method mesh
    192 #       Returns a Tcl list that represents the points of the uniform
    193 #       grid.  Each point has x,y and z values in the list.
    194 # ----------------------------------------------------------------------
    195 itcl::body Rappture::Unirect3d::mesh {} {
    196     set dx [expr {($_xMax - $_xMin) / double($_xNum - 1)}]
    197     set dy [expr {($_yMax - $_yMin) / double($_yNum - 1)}]
    198     set dz [expr {($_zMax - $_zMin) / double($_zNum - 1)}]
    199     foreach {a b c} $_axisOrder break
    200     for { set i 0 } { $i < [set _${a}Num] } { incr i } {
    201         set v1 [expr {[set _${a}Min] + (double($i) * [set d${a}])}]
    202         for { set j 0 } { $j < [set _${b}Num] } { incr j } {
    203             set v2 [expr {[set _${b}Min] + (double($i) * [set d${b}])}]
    204             for { set k 0 } { $k < [set _${c}Num] } { incr k } {
    205                 set v3 [expr {[set _${c}Min] + (double($i) * [set d${c}])}]
    206                 lappend data $v1 $v2 $v3
    207             }
    208         }
    209     }
    210     return $data
    211 }
    212 
    213 # ----------------------------------------------------------------------
    214190# method values
    215191#       Returns a BLT vector that represents the field values
Note: See TracChangeset for help on using the changeset viewer.