Commit e142138f authored by David Thompson's avatar David Thompson

Add test data with multiple polyhedra.

Change-Id: Iebbbbbcb1533c87c33b8bc2c30eb7f0e38288a04
parent c7aa834f
7e5424a7305099cca2c399fa0d710407
8e31ebe4c88f0cc939348c7a4e926b01
......@@ -8,6 +8,22 @@ rdr = vtkExodusIIReader()
rdr.SetFileName(str(VTK_DATA_ROOT) + "/Data/dodecahedron.exo")
rdr.Update()
tfm = vtkTransformFilter()
xfm = vtkTransform()
xfm.Translate(1.5, 0.5, 0.5)
xfm.Scale(0.1, 0.1, 0.1)
tfm.SetInputData(rdr.GetOutput().GetBlock(0).GetBlock(0))
tfm.SetTransform(xfm)
tfm.Update()
rd2 = vtkExodusIIReader()
rd2.SetFileName(str(VTK_DATA_ROOT) + "/Data/cube-1.exo")
rd2.Update()
shr = vtkShrinkFilter()
shr.SetInputData(rd2.GetOutput().GetBlock(0).GetBlock(0))
shr.Update()
ph = rdr.GetOutput().GetBlock(0).GetBlock(0).GetCell(0)
print '%d polyhedral faces' % ph.GetNumberOfFaces()
if ph.GetNumberOfFaces() != 12:
......@@ -30,8 +46,17 @@ rr = vtkRenderer()
ac = vtkActor()
dm = vtkDataSetMapper()
ac.SetMapper(dm)
dm.SetInputData(rdr.GetOutput().GetBlock(0).GetBlock(0))
dm.SetInputData(tfm.GetOutput())
rr.AddActor(ac)
a2 = vtkActor()
d2 = vtkDataSetMapper()
a2.SetMapper(d2)
d2.SetInputData(shr.GetOutput())
rr.AddActor(a2)
renWin.AddRenderer(rr)
renWin.SetInteractor(ri)
rr.GetActiveCamera().SetPosition(2.09, 1.419, 3.32)
rr.GetActiveCamera().SetFocalPoint(0.838, 0.431, 0.431)
rr.GetActiveCamera().SetViewUp(0.0820, 0.934, -0.348)
rr.ResetCamera()
renWin.Render()
6deaff599fc573756c1fab5401673dd3
6deaff599fc573756c1fab5401673dd3
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment