[vtkusers] triangle - triangle intersection VTK C++

TJ Corona tj.corona at kitware.com
Fri Jul 21 09:50:45 EDT 2017


> Changing my code from TriangleTriangleIntersect() to TrianglesIntersect(), it
> seems to still give me some headache.
> I am still bit confused as why it returns 0, even if triangles go in to each
> other.


Is “it” the vtkIntersectionPolyDataFilter::TriangleTriangleIntersect() method or the vtkTriangle::TrianglesIntersect() method?

If the former, then the triangles are again coplanar. Please see vtkIntersectionPolyDataFilter.cxx:2060, where the method exits without continuing the calculation.

If the latter, then the method should return true for the triangles intersecting. If it doesn’t then this is a bug.


Thomas J. Corona, Ph.D.
Kitware, Inc.
Senior R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4443

> On Jul 21, 2017, at 8:34 AM, nolvis <fgr at lordsofts.com> wrote:
> 
> Changing my code from TriangleTriangleIntersect() to TrianglesIntersect(), it
> seems to still give me some headache.
> I am still bit confused as why it returns 0, even if triangles go in to each
> other.
> Am i missing something?
> 
> Picture: http://imgur.com/a/PMcRk
> 
> //1st triangle coordinates
> 0.0, 0.0, 0.0
> 5.0, 0.0, 0.0
> 0.0, 5.0, 0.0
> //2nd triangle coordinates
> 10.0, 5.0, 0.0
> 5.0, 10.0, 0.0 
> 1.0, 1.0, 0.0 
> 
> 
> 
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/triangle-triangle-intersection-VTK-C-tp5744096p5744099.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170721/0dad554d/attachment.html>


More information about the vtkusers mailing list