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).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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]] {, }]"
Note: See TracChangeset for help on using the changeset viewer.