Changeset 4472 for branches/1.3/gui


Ignore:
Timestamp:
Jul 9, 2014 6:46:04 PM (10 years ago)
Author:
ldelgass
Message:

merge r4393 from trunk

Location:
branches/1.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/1.3

    • Property svn:mergeinfo changed
      /trunkmerged: 4393
  • branches/1.3/gui/scripts/mesh.tcl

    r4471 r4472  
    392392    return $value
    393393}
    394 
    395394
    396395itcl::body Rappture::Mesh::ReadVtk { path } {
     
    671670    set _type "triangles"
    672671    set _numPoints [$xv length]
    673     set count 0
     672    set _numCells 0
    674673    set data {}
    675674    set celltypes {}
     
    677676        append data " 3 $a $b $c\n"
    678677        append celltypes "5\n"
    679         incr count
     678        incr _numCells
    680679    }
    681680    append out "DATASET UNSTRUCTURED_GRID\n"
     
    684683        append out " $x $y $z\n"
    685684    }
    686     append out "CELLS $count [expr $count * 4]\n"
     685    set count [expr $_numCells * 4]
     686    append out "CELLS $_numCells $count\n"
    687687    append out $data
    688     append out "CELL_TYPES $count\n"
     688    append out "CELL_TYPES $_numCells\n"
    689689    append out $celltypes
    690690    set _limits(x) [$xv limits]
     
    700700    set _type "quads"
    701701    set _numPoints [$xv length]
    702     set count 0
     702    set _numCells 0
    703703    set data {}
    704704    set celltypes {}
     
    706706        append data " 4 $a $b $c $d\n"
    707707        append celltypes "9\n"
    708         incr count
     708        incr _numCells
    709709    }
    710710    append out "DATASET UNSTRUCTURED_GRID\n"
     
    713713        append out " $x $y $z\n"
    714714    }
    715     append out "CELLS $count [expr $count * 5]\n"
     715    set count [expr $_numCells * 5]
     716    append out "CELLS $_numCells $count\n"
    716717    append out $data
    717     append out "CELL_TYPES $count\n"
     718    append out "CELL_TYPES $_numCells\n"
    718719    append out $celltypes
    719720    set _limits(x) [$xv limits]
     
    729730    set _type "tetrahedrons"
    730731    set _numPoints [$xv length]
    731     set count 0
     732    set _numCells 0
    732733    set data {}
    733734    set celltypes {}
     
    735736        append data " 4 $a $b $c $d\n"
    736737        append celltypes "10\n"
    737         incr count
     738        incr _numCells
    738739    }
    739740    append out "DATASET UNSTRUCTURED_GRID\n"
     
    742743        append out " $x $y $z\n"
    743744    }
    744     append out "CELLS $count [expr $count * 5]\n"
     745    set count [expr $_numCells * 5]
     746    append out "CELLS $_numCells $count\n"
    745747    append out $data
    746     append out "CELL_TYPES $count\n"
     748    append out "CELL_TYPES $_numCells\n"
    747749    append out $celltypes
    748750    set _limits(x) [$xv limits]
     
    758760    set _type "hexahedrons"
    759761    set _numPoints [$xv length]
    760     set count 0
     762    set _numCells 0
    761763    set data {}
    762764    set celltypes {}
     
    764766        append data " 8 $a $b $c $d $e $f $g $h\n"
    765767        append celltypes "12\n"
    766         incr count
     768        incr _numCells
    767769    }
    768770    append out "DATASET UNSTRUCTURED_GRID\n"
     
    771773        append out " $x $y $z\n"
    772774    }
    773     append out "CELLS $count [expr $count * 9]\n"
     775    set count [expr $_numCells * 9]
     776    append out "CELLS $_numCells $count\n"
    774777    append out $data
    775     append out "CELL_TYPES $count\n"
     778    append out "CELL_TYPES $_numCells\n"
    776779    append out $celltypes
    777780    set _limits(x) [$xv limits]
     
    787790    set _type "wedges"
    788791    set _numPoints [$xv length]
    789     set count 0
     792    set _numCells 0
    790793    set data {}
    791794    set celltypes {}
     
    793796        append data " 6 $a $b $c $d $e $f\n"
    794797        append celltypes "13\n"
    795         incr count
     798        incr _numCells
    796799    }
    797800    append out "DATASET UNSTRUCTURED_GRID\n"
     
    800803        append out " $x $y $z\n"
    801804    }
    802     append out "CELLS $count [expr $count * 7]\n"
     805    set count [expr $_numCells * 7]
     806    append out "CELLS $_numCells $count\n"
    803807    append out $data
    804     append out "CELL_TYPES $count\n"
     808    append out "CELL_TYPES $_numCells\n"
    805809    append out $celltypes
    806810    set _limits(x) [$xv limits]
     
    816820    set _type "pyramids"
    817821    set _numPoints [$xv length]
    818     set count 0
     822    set _numCells 0
    819823    set data {}
    820824    set celltypes {}
     
    822826        append data " 5 $a $b $c $d $e\n"
    823827        append celltypes "14\n"
    824         incr count
     828        incr _numCells
    825829    }
    826830    append out "DATASET UNSTRUCTURED_GRID\n"
     
    829833        append out " $x $y $z\n"
    830834    }
    831     append out "CELLS $count [expr $count * 6]\n"
     835    set count [expr $_numCells * 6]
     836    append out "CELLS $_numCells $count\n"
    832837    append out $data
    833     append out "CELL_TYPES $count\n"
     838    append out "CELL_TYPES $_numCells\n"
    834839    append out $celltypes
    835840    set _limits(x) [$xv limits]
Note: See TracChangeset for help on using the changeset viewer.