[vtkusers] How To find self crossings in polydata

Michael Knopke Michael.Knopke at gmx.de
Tue Oct 28 11:38:22 EDT 2008


Hello,

Well, just don't want to reinvent the wheel. I want to detect if a connected
pointlist (inside vtkPolydata) crosses itself (therefore producing
degenerated polygons if used as source)
My approach was to get all points and check each line segment if it
intersects another one with this function:
if ( (vtkLine::Intersection(P1,P2,P3,P4,uparam,vparam)) ==2)  return true;
// where P1-P2 is line segment1 and P3-P4 line segment2



Regards.
Michael

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20081028/0645db81/attachment.htm>


More information about the vtkusers mailing list