I responded to Alan directly, but I'll repeat the response for the list as well.

The reason why you see white lines is that the alpha parameter causes the 
Delaunay 3D filter to create lines (or triangles) if they fit within the 
circumsphere smaller than alpha and the tetrahedron does not.  These lines are 
rendered without shading, so they show up as stark white streaks in the 
rendering.

The most straightforward solution to get what you want is to filter out any 
cells that are not tetrahedra.  I don't know of a filter designed for that, but 
you can do it with a Programmable Filter with the following script.  (Watch out 
for any newlines that an email program might insert.)

from paraview.vtk import vtkFiltersCore

input = self.GetUnstructuredGridInput()
output = self.GetUnstructuredGridOutput()

typesArray = input.GetCellTypesArray()
typesArray.SetName('__types__')

inputWithTypes = vtk.vtkUnstructuredGrid()
inputWithTypes.ShallowCopy(input)
inputWithTypes.GetCellData().AddArray(typesArray)

threshold = vtk.vtkFiltersCore.vtkThreshold()
threshold.SetInputData(inputWithTypes)
threshold.SetInputArrayToProcess(0,0,0,'vtkDataObject::FIELD_ASSOCIATION_CELLS','__types__')
threshold.ThresholdBetween(9.5, 10.5)
threshold.Update()
thresholdOutput = threshold.GetOutput()

output.ShallowCopy(thresholdOutput)
output.GetCellData().RemoveArray('__types__')

-Ken

From: <Scott>, Walter Scott <[email protected]<mailto:[email protected]>>
Date: Thursday, April 25, 2013 2:00 PM
To: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Subject: [EXTERNAL] [Paraview] Delauney 3d

I have a csv file of points.  After running it through the table to point 
filter, I am running the delauney 3d filter on it.  The dataset looks like a 
watermelon rind.  Unfortunately, the red part of the watermelon is solid.  
Fortunately, changing the alpha variable fixes this – deleting the red “meat” 
part of the watermelon.

My issue is that we are ending up with lots of white lines all over the outside 
of the solid object.  Think of my water melon rind as the outside green layer 
with the white rind, covered with white spider webs.

Has anyone seen this, and is there a fix or workaround?

Thanks,

Alan



_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to