Jump to content

Longest/Closest Distance Between Two Objects


toxicsquall

Recommended Posts

Hello,

I have this Lisp MD (Closest Distance Between Two Objects).lsp that can show me what is the shortest distance between two objects. If you type MD it shows the distance value and if you type MDL, it draws a line between them on the closest point distance. It can be useful for you if you need.

 

But I need the right opposite of it. :glare:

 

I need the Longest Distance between two objects.

I need the number and the line of it.

Can someone help me?

Link to comment
Share on other sites

But I need the right opposite of it. :glare:

 

If you are searching for longest distance between 2 curves like in your posted lisp, you have many ways to get those 2 points... There is my sub function posted here : https://www.theswamp.org/index.php?topic=42246.msg507763#msg507763 , which you can use to get furthest point from checking point...

Another way and I think is better is to segment reference curves and then supply point list to Lee Mac's MinEnclosingCircle sub function, after which instead of drawing minimum enclosing circle, you can check 2 or 3 touching points for longest distance - that 2 points that satisfy relation of longest distance would be solution to your task... You can finally draw line or use that data for your needs as you wish...

MinEnclosingCircle - look here : http://www.lee-mac.com/minimumenclosingcircle.html

 

HTH., M.R.

Link to comment
Share on other sites

If you are searching for longest distance between 2 curves like in your posted lisp, you have many ways to get those 2 points... There is my sub function posted here : https://www.theswamp.org/index.php?topic=42246.msg507763#msg507763 , which you can use to get furthest point from checking point...

 

Sounds awesome,

Thanks for sharing it, Marko!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...