mirror of
https://github.com/OpenFOAM/ThirdParty-6.git
synced 2025-12-08 06:57:43 +00:00
ParaView-5.0.1: Added the source-tree to ThirdParty-dev and patched as described in the README file
Resolves bug-report http://bugs.openfoam.org/view.php?id=2098
This commit is contained in:
27
ParaView-5.0.1/VTK/Examples/Infovis/Python/cone_layout.py
Normal file
27
ParaView-5.0.1/VTK/Examples/Infovis/Python/cone_layout.py
Normal file
@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env python
|
||||
from vtk import *
|
||||
|
||||
|
||||
reader = vtkXMLTreeReader()
|
||||
reader.SetFileName("vtkclasses.xml")
|
||||
|
||||
view = vtkGraphLayoutView()
|
||||
view.AddRepresentationFromInputConnection(reader.GetOutputPort())
|
||||
view.SetVertexLabelArrayName("id")
|
||||
view.SetVertexLabelVisibility(True)
|
||||
view.SetVertexColorArrayName("vertex id")
|
||||
view.SetColorVertices(True)
|
||||
view.SetLayoutStrategyToCone()
|
||||
view.SetInteractionModeTo3D() # Left mouse button causes 3D rotate instead of zoom
|
||||
|
||||
theme = vtkViewTheme.CreateMellowTheme()
|
||||
theme.SetCellColor(.2,.2,.6)
|
||||
theme.SetLineWidth(2)
|
||||
theme.SetPointSize(10)
|
||||
view.ApplyViewTheme(theme)
|
||||
theme.FastDelete()
|
||||
|
||||
view.GetRenderWindow().SetSize(600, 600)
|
||||
view.ResetCamera()
|
||||
view.Render()
|
||||
view.GetInteractor().Start()
|
||||
Reference in New Issue
Block a user