PDA

View Full Version : Draw a line tangent to two circles



pmg456037
2009-06-22, 06:09 PM
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!

pmg456037
2009-06-22, 06:16 PM
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.

BeKirra
2009-06-23, 02:48 AM
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.


(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

shannonj658585
2011-02-23, 06:34 PM
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.