[vtkusers] filling in a sphere's intersection with a plane
Andras Lasso
lasso at queensu.ca
Sat Jan 12 09:46:37 EST 2019
Thanks David, I’ve tried replacing stripper+cleaner+triangulator by your vtkContourTriangulator and it worked very well. Need to do some more testing but probably will switch permanently.
Andras
From: David Gobbi <david.gobbi at gmail.com>
Sent: Friday, January 11, 2019 1:27 PM
To: Andras Lasso <lasso at queensu.ca>
Cc: The Merper <msmerps at gmail.com>; VTK Users <vtkusers at vtk.org>
Subject: Re: [vtkusers] filling in a sphere's intersection with a plane
On Fri, Jan 11, 2019 at 11:04 AM Andras Lasso <lasso at queensu.ca<mailto:lasso at queensu.ca>> wrote:
In general, vtkCutter returns a random (unordered, non-continuous) list of line segments.
Can vtkContourTriangulator deal with that (merge points and order line segments to form closed contours)?
Yes. If given unordered line segments, vtkContourTriangulator will sort them. The nightly tests cover this feature.
Usually we apply vtkStripper with a very large MaximumLength on vtkCutter output to create polygons that can be triangulated and rendered. This works well almost every time, but in some cases (cutting very complex geometries with hundreds of thousand of points) stripping does not find closed polygons. It would be nice to have a somewhat simpler and more robust solution.
The vtkCountourTriangulator code has checks to deal with bad geometry. It's not perfect, but it's much better than vtkPolygon::Triangulate(). I've avoided vtkDelaunay2D because certain geometries will cause it to crash.
I wrote vtkClipClosedSurface specifically to deal with complex 3D geometries (it uses vtkContourTriangulator as its final stage). I had meant to write a similar filter called vtkCutClosedSurface filter for cutting (instead of clipping) but that never happened.
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtkusers/attachments/20190112/d05f88ed/attachment.html>
More information about the vtkusers
mailing list