vtkPlane's intersectWithLine() function return is mathematically confusing
See original GitHub issuethe function is given a line defined by two points, but does not specify that the intersection HAS to happen between those two points for the result to return intersect:true.
A line defined by two points extends BEYOND those two points, and can still intersect, but if the intersection is outside of the defined points, you get a return with intersect:false but still get the coordinates of the intersection.
I think the function & corresponding return is misleading.
Issue Analytics
- State:
 - Created 4 years ago
 - Comments:11 (8 by maintainers)
 
Top Results From Across the Web
vtkPlane Class Reference - VTK
Return the distance of a point x to a plane defined by n(x-p0) = 0. The normal n[3] must be magnitude=1. ◇ IntersectWithLine()...
Read more >Plane | vtk.js - Kitware, Inc.
Method used to decorate a given object (publicAPI+model) with vtkPlane characteristics. Argument, Type, Required, Description. publicAPI, Yes ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Maybe
intersectWithLine(p0,p1)could be renamedintersectWithSegment(p0, p1)and documented as behaving likeVTK(C++) intersectWithLineand add newintersectWithLineas such:🎉 This issue has been resolved in version 11.0.0 🎉
The release is available on:
Your semantic-release bot 📦🚀