VTK – vtkClipPolyData Example

The article shows how to clip a cone by a plane. The vtkClipPolyData object provides a major algorithm to process the 3D model. Here is python script that describes all details about it. #!/usr/bin/env python import vtk cone = vtk.vtkConeSource() coneMapper = vtk.vtkPolyDataMapper() coneMapper.SetInputConnection( cone.GetOutputPort() ) coneActor = vtk.vtkActor() coneActor.SetMapper( Read more…

VTK – vtkGraphLayoutView Example

vtkRandomGraphSource can be used to create a random graph which includes points and edges. vtkGraphLayoutView is a vtkRenderView which has its own renderer and iterator, we can use it to display graph view. from vtk import * # create a random graph source = vtkRandomGraphSource() source.SetNumberOfVertices(100) source.SetNumberOfEdges(110) source.StartWithTreeOn() #create a Read more…

XML To JSON
: Input your strings, the tool can convert XML to JSON for you.

X