MCPcopy Create free account
hub / github.com/Kitware/ParaView / Pipeline

Class Pipeline

Examples/Catalyst/CxxFullExample/SampleScripts/feslicescript.py:12–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10def CreateCoProcessor():
11 def _CreatePipeline(coprocessor, datadescription):
12 class Pipeline:
13 filename_3_pvtu = coprocessor.CreateProducer( datadescription, "input" )
14
15 Slice1 = Slice( guiName="Slice1", Crinkleslice=0, SliceOffsetValues=[0.0], Triangulatetheslice=1, SliceType="Plane" )
16 Slice1.SliceType.Offset = 0.0
17 Slice1.SliceType.Origin = [34.5, 32.45, 27.95]
18 Slice1.SliceType.Normal = [1.0, 0.0, 0.0]
19
20 # create a new 'Parallel PolyData Writer'
21 parallelPolyDataWriter1 = servermanager.writers.XMLPPolyDataWriter(Input=Slice1)
22
23 # register the writer with coprocessor
24 # and provide it with information such as the filename to use,
25 # how frequently to write the data, etc.
26 coprocessor.RegisterWriter(parallelPolyDataWriter1, filename='slice_{time}.pvtp', freq=10)
27
28 # create a new 'Parallel UnstructuredGrid Writer'
29 unstructuredGridWriter1 = servermanager.writers.XMLPUnstructuredGridWriter(Input=filename_3_pvtu)
30
31 # register the writer with coprocessor
32 # and provide it with information such as the filename to use,
33 # how frequently to write the data, etc.
34 coprocessor.RegisterWriter(unstructuredGridWriter1, filename='fullgrid_{time}.pvtu', freq=100)
35
36 return Pipeline()
37

Callers 1

_CreatePipelineFunction · 0.70

Calls 3

SliceClass · 0.85
CreateProducerMethod · 0.80
RegisterWriterMethod · 0.80

Tested by

no test coverage detected