[vtkusers] Decimation problems

Frederic DANESI frederic.danesi at dinccs.com
Tue Mar 11 10:35:08 EDT 2008


Why did you delete your polys before calling Delaunay ?
> > poly->GetPolys()->Delete();

Be aware that Delaunay does not really work on vtkPoints included in the
input, but on Points that are actually used by at least one cell in the
input ...

You should simply try for example :
vtkDelaunay3D *delaunay = vtkDelaunay3D::New();
delaunay->SetInput(poly);
//delaunay->SetTolerance(0.01); WARNING : this is relative to the bounding
box !!!
//delaunay->SetAlpha(0.2);
//delaunay->BoundingTriangulationOn();
delaunay->Update();

without further parameters, and without deleting the polys ... 
just to see if it works ...

For more help, we may need more code or data example ...
HTH
Fred.


> -----Message d'origine-----
> De : vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] De la part
de
> Amy Squillacote
> Envoyé : mardi 11 mars 2008 15:02
> À : Stefan Huber
> Cc : vtkusers
> Objet : Re: [vtkusers] Decimation problems
> 
> Please keep the discussion on the vtkusers list. I'm posting your
> response back to the list so other people may be able to help you find
> an answer.
> 
> - Amy
> 
> Stefan Huber wrote:
> > Hi Amy,
> >
> > Thanks for your answer. i am sorry that i didnt give you a good enough
> discription of the problem.
> >
> > But now the problem with the decimation works. I don't know why (i
didn't do
> changes) but it works.
> >
> > The problem with the delaunay is still existing.
> > my code:
> >
> > poly->GetPolys()->Delete();
> > vtkDelaunay3D *delaunay = vtkDelaunay3D::New();
> > delaunay->SetInput(poly);
> > delaunay->SetTolerance(0.01);
> > delaunay->SetAlpha(0.2);
> > delaunay->BoundingTriangulationOn();
> > delaunay->Update();
> >
> > When i want to call the Dll (which contains the code) i only get an
access
> violation.
> >
> >
> > thanks,
> > Stefan
> > -------- Original-Nachricht --------
> >
> >> Datum: Tue, 11 Mar 2008 08:00:17 -0500
> >> Von: Amy Squillacote <ahs at cfdrc.com>
> >> An: Stefan Huber <Huber.Ste at gmx.at>
> >> CC: vtkusers at vtk.org
> >> Betreff: Re: [vtkusers] Decimation problems
> >>
> >
> >
> >> Hi Stefan,
> >>
> >> You have not provided enough information for anyone to help. What is
the
> >> problem you are seeing with the two lines of code you listed below? For
> >> example, do you get an error message? If so, what message? Does your
> >> code segfault? If so, please provide a stack trace.
> >>
> >> - Amy
> >>
> >> Stefan Huber wrote:
> >>
> >>> Hi,
> >>>
> >>> i have to call the decimationPro algorithm and a delaunay3d algorithm
> >>>
> >> but i always get problems when i run the application.
> >>
> >>> I have a polydata object which contains the points, normals and
Tcoords.
> >>>
> >>> i always get the problem when i run following code:
> >>>      decimate->Update();
> >>>      poly= decimate->GetOutput();
> >>>
> >>> can somebody help me please? whats wrong?
> >>>
> >>> thanks, Stefan
> >>>
> >>>
> >>>
> >> --
> >> Amy Squillacote                    Phone: (256) 726-4839
> >> Computer Scientist                 Fax: (256) 726-4806
> >> CFD Research Corporation           Web: http://www.cfdrc.com
> >> 215 Wynn Drive, Suite 501
> >> Huntsville, AL  35805
> >>
> >>
> >
> >
> 
> --
> Amy Squillacote                    Phone: (256) 726-4839
> Computer Scientist                 Fax: (256) 726-4806
> CFD Research Corporation           Web: http://www.cfdrc.com
> 215 Wynn Drive, Suite 501
> Huntsville, AL  35805
> 
> 
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers





More information about the vtkusers mailing list