Jump to content

Recommended Posts

Posted

Hi all,

Can someone please tell me how to catch the tangent of a circle using AutoLISP?

For example to draw a line from pt1 to the tangent of the circle in this picture?

Thank you.

aa.JPG

Posted

Just use "TAN" in command line, the pause may be what you were looking for.

(command "line" (getpoint) "tan" pause "")

Posted

Thanks Big Al,

I'm trying to do this without user input. For example I have pt1 and pt2 saved as known variables. The circle size is an unknown variable that can change but the top quadrant of the circle will always be positioned at pt2. With that scenario, I need to draw a line from pt1 up to the tangent of the circle. I know how to draw lines using polar calculations, but this point of tangent is unknown until the size of the circle is determined by the user and I don't understand how to find the tangent point using automation. My endgame is shown in the second image.

Thanks for your help friend.

a1.JPG

a2.JPG

Posted

Even better since you are looking for tangent points from point to reference CIRCLE...

 

http://www.lee-mac.com/intersectionfunctions.html

Use above to find intersection points between 2 VLA-OBJECT curves (CIRCLES)

 

http://www.lee-mac.com/mathematicalfunctions.html#geomint

Search for LM:inters-circle-circle sub function to obtain 2 points of intersection of 2 circles...

 

Look into attached *.jpg to understand tangent points solution from reference point to reference circle...

tantocircle.jpg

Posted

The key is that a line from the tangent point to the circle center will be perpendicular to a line from the given point to the tangent point:

 

2017-02-08.png

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...