Changeset 5568


Ignore:
Timestamp:
May 19, 2015, 2:55:05 PM (9 years ago)
Author:
ldelgass
Message:

Fix origin in unirect2d->VTK conversion

File:
1 edited

Legend:

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

    r5536 r5568  
    6262        return $_numPoints
    6363    }
    64     public method vtkdata {} {
    65         return $_vtkdata
    66     }
     64    public method vtkdata {{what -partial}} {}
    6765}
    6866
     
    162160    set ySpace [expr ($_yMax - $_yMin) / double($_yNum - 1)]
    163161    append out "SPACING $xSpace $ySpace 0\n"
    164     append out "ORIGIN 0 0 0\n"
     162    append out "ORIGIN $_xMin $_yMin 0\n"
    165163    set _vtkdata $out
    166164    set _isValid 1
     
    277275}
    278276
     277itcl::body Rappture::Unirect2d::vtkdata {{what -partial}} {
     278    if {$what == "-full"} {
     279        append out "# vtk DataFile Version 3.0\n"
     280        append out "[hints label]\n"
     281        append out "ASCII\n"
     282        append out $_vtkdata
     283        return $out
     284    } else {
     285        return $_vtkdata
     286    }
     287}
     288
    279289itcl::body Rappture::Unirect2d::GetSize { obj path varName } {
    280290    set string [$obj get $path]
Note: See TracChangeset for help on using the changeset viewer.