Difference between revisions of "ParaView/Automation with Python"

From PHASTA Wiki
Jump to: navigation, search
(Created page with "1. Extract surface using paraview from paraview.simple import * #========== read in data file print 'Read phasta file' dataObj = PhastaReader( FileName= 'restart_one.pht' ) ...")
(No difference)

Revision as of 14:59, 26 July 2012

1. Extract surface using paraview

from paraview.simple import *

  1. ========== read in data file

print 'Read phasta file'

dataObj = PhastaReader( FileName= 'restart_one.pht' )

SRF = ExtractSurface(Input=dataObj)

MGBLK1 = MergeBlocks(Input=SRF)

vtkWriter = DataSetWriter(FileName = 'Surface.vtk' , Input = MGBLK1, FileType = 1)

vtkWriter.UpdatePipeline()