[Paraview] Delauney 3d
Moreland, Kenneth
kmorel at sandia.gov
Fri Apr 26 16:58:24 EDT 2013
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 <wascott at sandia.gov<mailto:wascott at sandia.gov>>
Date: Thursday, April 25, 2013 2:00 PM
To: "paraview at paraview.org<mailto:paraview at paraview.org>" <paraview at paraview.org<mailto:paraview at paraview.org>>
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20130426/0b4aa247/attachment-0001.htm>
More information about the ParaView
mailing list