LosGirk Posted February 8, 2017 Posted February 8, 2017 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. Quote
BIGAL Posted February 8, 2017 Posted February 8, 2017 Just use "TAN" in command line, the pause may be what you were looking for. (command "line" (getpoint) "tan" pause "") Quote
LosGirk Posted February 8, 2017 Author Posted February 8, 2017 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. Quote
marko_ribar Posted February 8, 2017 Posted February 8, 2017 Look into this sub function (you must login to access...) https://www.theswamp.org/index.php?topic=50398.msg555230#msg555230 P.S. When you get list of points ( 2 points to circle ) - choose the one closer to your pt2... M.R. Quote
marko_ribar Posted February 8, 2017 Posted February 8, 2017 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... Quote
Lee Mac Posted February 8, 2017 Posted February 8, 2017 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: Quote
LosGirk Posted February 8, 2017 Author Posted February 8, 2017 That is too cool. Thank you everybody! Quote
Recommended Posts
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.