Try this
SureTry this
Excellent solution Stefan :-)
I may be overlooking something obvious, but whilst studying your solution I struggled to understand how the following two expressions determine that the two lines are within the given proximity, independent of the end point used:Code - Auto/Visual Lisp: [Select]
Could you shed some light please?
Basically, I rotated the line around 0,0 to get a horizontal line, then I got the Y position.
Based on OP's clean and clear sample, I decided that is not worth investigating further :)Basically, I rotated the line around 0,0 to get a horizontal line, then I got the Y position.
This is what I was missing - many thanks indeed Stefan for taking the time to explain your method here, I greatly appreciate it. It's unfortunate that collinear lines could spoil the elegance of this solution - perhaps (equal (cadr x) y d) could be replaced with something like (< 1e-8 (abs (- (cadr x) y)) d) to account for this before we must resort to sorting the entire set...
Based on OP's clean and clear sample, I decided that is not worth investigating further :)
Stefan
Sorry and sorry
Sorry to have one question, but I would like to ask you a question.
The code is really good
Can you see the attached file?
I'm sorry, but can you see the error part?
ps: Please understand that there is an error because I use a translation program to write.