[ 
https://issues.apache.org/jira/browse/GEOMETRY-43?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16769305#comment-16769305
 ] 

Matt Juntunen commented on GEOMETRY-43:
---------------------------------------

bq.  I find it a little counter-intuitive to say a line lies on a plane and 
does not intersect.

I could see that. I picture asking for the intersection is saying that you want 
the unique point where two element coincide. In the case where the line lies on 
the plane, there are an infinite number, so no unique point exists.

A few notes on the helper methods above:
* {{o.a.c.geometry.euclidean.twod.Line}} has an {{isParallelTo()}} method. We 
should use a common convention for the names. I vote for the shorter 
{{isParallel}} method that you have. I can change the name in GEOMETRY-28 since 
I'm working on that now.
* I'm not probably sold on the {{Optional}} return value since this would be 
its first appearance in the code. Can you post an example demonstrating some of 
the benefits of this? Again, {{o.a.c.geometry.euclidean.twod.Line}} has a 
similar {{getOffset}} method that simply returns the calculated value and says 
in the documentation that "This method should be called only for parallel lines 
otherwise the result is not meaningful." [~erans], what do you think of this 
approach?
* We should rename {{isOnPlane}} to {{contains}} and make that an overloaded 
method.

> Check unit test - line intersecting cube (line lies on a plane)
> ---------------------------------------------------------------
>
>                 Key: GEOMETRY-43
>                 URL: https://issues.apache.org/jira/browse/GEOMETRY-43
>             Project: Apache Commons Geometry
>          Issue Type: Task
>          Components: Euclidean 3D
>            Reporter: Sven Rathgeber
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> Intersecting a cube with a Line (which lies on a plane) results in one 
> intersection only.
>  
> Please check the pull request:
> https://github.com/apache/commons-geometry/pull/23
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to