# Thread: Draw a line tangent to two circles

1. Login to Give a bone

## Draw a line tangent to two circles

Hello,

My apologies in advance if this is in the wrong forum or sub forum.

I have two non-intersecting circles. For the question, the size, distance between and rotation, shouldn't matter.

I need to draw a line tangent to both circles. How do I do that?

I'm am trying to following, and it just doesn't work

Polyline
Tangent snap
Select first circle
Tangent snap
Select second circle

The problem is the first circle. The tangent snap isn't tanget.

Thanks!

2. Login to Give a bone

## Re: Draw a line tangent to two circles

Found an Answer.

Someone in my office, heard my cussing and screaming and came up with a solution.

Using LINE instead of POLYLINE allows you you rotate the tangent around the circle, unlike polyline.

So I have to use a line and then convert it to a polyline.

Thank you.

3. Login to Give a bone

## Re: Draw a line tangent to two circles

Hi Patrick,
I think that your thread should be in "AutoCAD General Forum" because the question doesn't have to be a 3D related issue.

And try this.
It draws a tangent line from arc to arc.
Code:
```(defun c:TANGENT_LINE (/ OSMODE_0 Pt01 Pt02 Entity1)
(setq OSMODE_0 (getvar "osmode"))
(setvar "osmode" 512)
(setq Pt01 (getpoint "Select 1st point on a circle: ")
Pt02 (getpoint "Select 2nd point on another circle: ")
); end of setq
(if (/= PEDITACCEPT 1)
(setvar "PEDITACCEPT" 1))
(command "._line" "_tan" Pt01 "_tan" Pt02 "")
(setq Entity1 (entlast))
(command "._pedit" Entity1 "e" "exit" "")
(setvar "osmode" OSMODE_0)
(princ)
); end of program```

4. Login to Give a bone

## Re: Draw a line tangent to two circles

If you do not mind doing some math the attached pdf file depicts a method I have used for geting a line that is tangent to two circles and very accurat. And if you do not know how to rotate about a point it shows how to do that as well.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•