mathutils.geometry.intersect_line_line_2d doesn't operate on lines, but on line segments #46002

Closed
opened 2015-09-03 10:51:18 +02:00 by Sybren A. Stüvel · 7 comments

The function mathutils.geometry.intersect_line_line_2d is described as "Takes 2 lines (as 4 vectors) and returns a vector for their point of intersection or None". However, it does not intersect lines. It intersects line segments. To add to the confusion, the 3D variant mathutils.geometry.intersect_line_line is described in the exact same way, but does intersect lines.

We should at least update the documentation for the functions to reflect this difference. In my opinion the name should change too, but this would introduce backward compatibilities.

The function `mathutils.geometry.intersect_line_line_2d` is described as "Takes 2 lines (as 4 vectors) and returns a vector for their point of intersection or None". However, it does *not* intersect lines. It intersects line segments. To add to the confusion, the 3D variant `mathutils.geometry.intersect_line_line` is described in the exact same way, but does intersect lines. We should at least update the documentation for the functions to reflect this difference. In my opinion the name should change too, but this would introduce backward compatibilities.
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Author
Member

Added subscribers: @dr.sybren, @ideasman42

Added subscribers: @dr.sybren, @ideasman42
Campbell Barton was assigned by Sergey Sharybin 2015-09-03 11:15:52 +02:00

Added subscriber: @Sergey

Added subscriber: @Sergey

Added subscriber: @mont29

Added subscriber: @mont29
Campbell Barton was unassigned by Bastien Montagne 2015-10-13 09:59:12 +02:00
Bastien Montagne self-assigned this 2015-10-13 09:59:12 +02:00

Will fix the comment for now… Name is… yuck, ugly issue, but better not break compat for now imho. :(

Will fix the comment for now… Name is… yuck, ugly issue, but better not break compat for now imho. :(

This issue was referenced by blender/blender@e1b67c9bc0

This issue was referenced by blender/blender@e1b67c9bc0db39033d8d250281e047186c98af1b

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#46002
No description provided.