View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000640VTK(No Category)public2004-03-01 22:252011-01-13 17:00
ReporterGoodwin Lawlor 
Assigned ToMathieu Malaterre 
PrioritylowSeverityfeatureReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0000640: vtkPolygon::IntersectPolygonWithPolygon()
DescriptionvtkPolygon::IntersectPolygonWithPolygon() incorrectly return false that two
triangles are intersecting when two triangles are intersecting
each other exactly at their edges...

The fix for this is in vtkTriangle::PointInTriangle(). At the moment
vtkTriangle::PointInTriangle returns true if a point is inside but not on
the edge of the triangle. So line 958 of vtkTriangle.cxx should change to:

 if ( (vtkMath::Dot(n1,n2) >= 0.0) && (vtkMath::Dot(n2,n3) >= 0.0) )

to include the edges.
TagsNo tags attached.
Project
Type
Attached Files

 Relationships

  Notes
(0000713)
Goodwin Lawlor (reporter)
2004-03-01 22:30

Sorry, the correct diff is:
===================================================================
RCS file: /cvsroot/VTK/VTK/Common/vtkTriangle.cxx,v
retrieving revision 1.103
diff -r1.103 vtkTriangle.cxx
988c988
< if ( (vtkMath::Dot(n1,n2) > 0.0) && (vtkMath::Dot(n2,n3) > 0.0) )
---
> if ( (vtkMath::Dot(n1,n2) >= 0.0) && (vtkMath::Dot(n2,n3) >= 0.0) )
(0000719)
Goodwin Lawlor (reporter)
2004-03-02 13:20

A new diff:
RCS file: /cvsroot/VTK/VTK/Common/vtkTriangle.cxx,v
retrieving revision 1.103
diff -u -r1.103 vtkTriangle.cxx
--- Common/vtkTriangle.cxx 8 Jan 2004 15:31:22 -0000 1.103
+++ Common/vtkTriangle.cxx 2 Mar 2004 18:18:03 -0000
@@ -985,7 +985,7 @@

   // Check whether normals go in same direction
   //
- if ( (vtkMath::Dot(n1,n2) > 0.0) && (vtkMath::Dot(n2,n3) > 0.0) )
+ if ( (vtkMath::Dot(n1,n2) >= 0.0) && (vtkMath::Dot(n2,n3) >= 0.0) )
     {
     return 1;
     }
(0000753)
Mathieu Malaterre (developer)
2004-03-10 18:01

Fixed in CVS, thanks Goodwin.

 Issue History
Date Modified Username Field Change
2010-11-29 17:59 Mathieu Malaterre Source_changeset_attached => VTK master 1709e362
2011-01-13 17:00 Source_changeset_attached => VTK master a2bd8391
2011-01-13 17:00 Source_changeset_attached => VTK master 020ef709
2011-06-16 13:11 Zack Galbreath Category => (No Category)


Copyright © 2000 - 2018 MantisBT Team