- Timestamp:
- May 19, 2015, 9:15:39 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/unirect2d.tcl
r5569 r5577 158 158 append out "DATASET STRUCTURED_POINTS\n" 159 159 append out "DIMENSIONS $_xNum $_yNum 1\n" 160 set xSpace [expr ($_xMax - $_xMin) / double($_xNum - 1)] 161 set ySpace [expr ($_yMax - $_yMin) / double($_yNum - 1)] 160 append out "ORIGIN $_xMin $_yMin 0\n" 161 if { $_xNum > 1 } { 162 set xSpace [expr (double($_xMax) - double($_xMin)) / double($_xNum - 1)] 163 } else { 164 set xSpace 0.0 165 } 166 if { $_yNum > 1 } { 167 set ySpace [expr (double($_yMax) - double($_yMin)) / double($_yNum - 1)] 168 } else { 169 set ySpace 0.0 170 } 162 171 append out "SPACING $xSpace $ySpace 0\n" 163 append out "ORIGIN $_xMin $_yMin 0\n"164 172 set _vtkdata $out 165 173 set _isValid 1
Note: See TracChangeset
for help on using the changeset viewer.