[vtkusers] vtkDecimatePro question
Alexander Trum
a.trum at teraport.de
Tue Mar 19 15:25:29 EST 2002
Hello
Before using vtkDecimatePro you can pass your mesh through
vtkCleanPolyData with a tolerance of 0.0.
Perhaps this can solve your problem but I'm not sure.
Bye,
Alex
Brian Webb schrieb:
>
> I'm trying to use vtkDecimatePro to decimate a model, and it appears to be
> just removing facets and leaving holes in the model. According to the
> documentation it appears that calling PreserveTopologyOn should prevent this
> from happening. This works with a standard (fran) model, but it doesn't on
> my models.
>
> I'm thinking that there's something inconsistent in my models (the normals
> are inconsistent, or the polygons are not ordered correctly), but I can't
> figure out a way to correct it. I tried vtkPolyDataNormals, but that didn't
> work.
>
> Any ideas on what else I could try would be appreciated. I've included the
> relevant parts of my script at the end of this email.
>
> Thanks,
>
> Brian Webb
>
> #
> # Read the model.
> #
> vtkOBJReader importer
> importer SetFileName mig27.obj
> #vtkPolyDataReader importer
> # importer SetFileName "$VTK_DATA_ROOT/Data/fran_cut.vtk"
>
> vtkTriangleFilter triangs
> triangs SetInput [importer GetOutput]
>
> vtkPolyDataNormals normals
> normals SetInput [triangs GetOutput]
> normals FlipNormalsOn
> normals SplittingOff
> normals ConsistencyOn
> normals ComputePointNormalsOn
> normals ComputeCellNormalsOn
>
> vtkDecimatePro mesh
> mesh SetInput [triangs GetOutput]
> mesh SetTargetReduction 0.7
> mesh PreserveTopologyOn
> mesh AccumulateErrorOn
> mesh SplittingOff
> mesh DebugOn
>
> #
> # Create the mapper.
> #
> vtkPolyDataMapper mapper
> mapper SetInput [mesh GetOutput]
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
-------------- next part --------------
A non-text attachment was scrubbed...
Name: a.trum.vcf
Type: text/x-vcard
Size: 409 bytes
Desc: Karte f?r Alexander Trum
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20020319/d0998f62/attachment.vcf>
More information about the vtkusers
mailing list