Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.


See original GitHub issue

Feature Request

As a COMPAS user, I want compas.geometry.queries to have a function for lines co-linear check and so that we can all use it.


Describe the solution you’d like I would like the following (or something similar) to happen:

line1 = Line([0, 0, 0], [1, 1, 1])
line2 = Line([2, 2, 2], [3, 3,3])
assert is_line_line_colinear(line1, line2) == true
"Another Direction should work too"
line3 = Line([-2,- 2, -2], [3, 3,3])
assert is_line_line_colinear(line1, line3) == true

Describe alternatives you’ve considered Currently there is a function to check if 3 points in colinear.

There is also feature to do intersection between 2 lines.

But not a simple 2 lines colinear check, or did I miss something? Would be useful to have this feature.

similarly, is_line_line_overlap(l1, l2, epsilon) might also be useful

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

brgcodecommented, Oct 18, 2019

anyhow, since with this thread the colinear function is basically implemented, how about we go through the proper channels, which means you write a PR and i approve it 😃

yck011522commented, Oct 18, 2019

Hi Tom, I haven’t got any experience creating a Pull Request. But I can give it a try. Please let me know if I do anything wrong.

Read more comments on GitHub >

github_iconTop Results From Across the Web

计算几何_直线求交点_线段判相交- 过路人1998 - 博客园
使用克拉默法则 Point GetLineLineIntersect(const Line &a, const Line &b) { Point pt =; if (IsLineLineCollinear(a, b)) return pt; ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found