[vtkusers] vtkCutter producing strange artefacts [image attached]

Paul Kibet Korir pkorir at ebi.ac.uk
Fri Apr 29 06:30:02 EDT 2016


Answer to my question (for any future inquiry on this matter):

It turns out that this may be resolved by first decimating the mesh then 
smoothing it...

# example from VTK User's Guide, 11th edition, page 109
# may contain typos
from vtk import *
...
poly = vtkPolyData()
poly.SetPoints(...)
poly.SetPolys(...)

deci = vtkDecimatePro()
deci.SetInputData(poly)
deci.SetTargetReduction(0.9)
deci.PreserverTopologyOn()

smoother = vtkSmoothPolyDataFilter()
smoother.SetInputConnection(deci.GetOutputPort())
smoother.SetNumberOfIterations(50)
...

Rgds,

Paul


On 28/04/2016 12:01, Paul Kibet Korir wrote:
>
> Hi VTK Users,
>
> I'm using VTK to interpolate contours that result from the 
> intersection of a mesh surface with a plane. I'm getting very strange 
> artefacts as shown in the attached image (I have other images but the 
> file upload limit prevents me from including them). The image shows 
> the mesh (as a wireframe) with the plane in green. There is an extra 
> surface (large green) that protrudes off the mesh surface with a weird 
> structure inside the mesh.
>
> What should I do to alleviate this?
>
>
> -- 
> With kind regards,
>
> *Paul K Korir, PhD*
> /Scientific Programmer/
> EMBL-EBI
> Main Building, A2-35,
> WTGC, Hinxton, Cambridge CB10 1SD
> P: +44 1223 49 44 22
> F: +44 1223 49 44 68
>
>
> _______________________________________________
> 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 VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers

-- 
With kind regards,

*Paul K Korir, PhD*
/Scientific Programmer/
EMBL-EBI
Main Building, A2-35,
WTGC, Hinxton, Cambridge CB10 1SD
P: +44 1223 49 44 22
F: +44 1223 49 44 68
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160429/6fe1db0e/attachment.html>


More information about the vtkusers mailing list