[vtkusers] Problems using vtkExtractEdges with vykUnstructuredGrid, quadratic solid cell types

scotsman60 doug at beachmailing.com
Mon Sep 25 03:47:50 EDT 2017


Hello!!!

I've been trying to render the edges of higher order tets, wedges and hexas
for a few hours now and I can't seem to get it to work.

If I render the grid directly or extract the free faces and render I get all
of the internal edges of the higher order cells displayed - this is
expected.

So I did some reading and looked at some examples and came up with the
following - which unfortunately draws absolutely nothing. Note that
self.mesh is a vtkUnstructuredGrid, If I write this grid out and import to
Paraview I can see the higher order solids drawn correctly with the internal
edges hidden for all cells.

            meshEdges = vtk.vtkExtractEdges()
            meshEdges.SetInputData(self.mesh)
            meshEdgesAlgorithm = meshEdges.GetOutputPort()
            meshEdgePolyData = meshEdges.GetOutput()
            
            meshEdgeMapper = vtk.vtkDataSetMapper()
            #meshEdgeMapper.SetInputConnection(meshEdgesAlgorithm)
            meshEdgeMapper.SetInputData(meshEdgePolyData)
            meshEdgeMapper.Update()
   
            self.freeEdgeActor = vtk.vtkActor()
            self.freeEdgeActor.SetMapper(meshEdgeMapper)
            self.freeEdgeActor.GetProperty().SetRepresentationToWireframe()
            self.freeEdgeActor.GetProperty().BackfaceCullingOn()   
            self.freeEdgeActor.GetProperty().SetDiffuseColor(0, 0.5, 0)
            self.freeEdgeActor.GetProperty().SetEdgeVisibility(1)
            self.freeEdgeActor.GetProperty().SetEdgeColor(1, 0, 0)


Any input will be gratefully receeived,

Thanx,


Doug



--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html


More information about the vtkusers mailing list