Hi,
How do I draw a line with a certain lenght from an endpoint of an arc
in the same angle as that endpoint if this was not the last object drawn.
I'm trying to find a way not to have to trace the arc before.
jsandso
Hi,
How do I draw a line with a certain lenght from an endpoint of an arc
in the same angle as that endpoint if this was not the last object drawn.
I'm trying to find a way not to have to trace the arc before.
jsandso
I draw line from the center of the arc to the end of the arc - then offset that line by the distance. Draw the line you want -then erase the two constructioin lines.
Don't know a better way.
Bill
Thanks Bill,
yes that's what I'm doing as well but I was hoping someone
got a better idea or a small lisp prog. I'm just wondering as
this is a standard function in other cad programs. Just can't
believe AutoCad has no function for that.
jsandso
JSandSO
Try this lisp function. No guarantee it works every case.
Bill
(defun arcln ()
;draws a line tangent to end of arc
(setq E (ENTSEL "\nSELECT ARC NEAR END TO DRAW TANGENT LINE: "))
(setq lineln (getreal "\nENTER DISTANCE "))
(setq el (entget (car e)))
(setq arcctr (cdr (assoc 10 el)))
(setq pickpt (car (cdr e)))
;determine end of arc to use
(setq ang1 (cdr (assoc 50 el)))
(setq ang2 (cdr (assoc 51 el)))
(setq arcrad (cdr (assoc 40 el)))
(setq p1 (polar arcctr ang1 arcrad))
(setq p2 (polar arcctr ang2 arcrad))
(if (< (distance pickpt p1) (distance pickpt p2))
(setq EndToUse 1)
(setq EndToUse 2)
)
; store end point
(if (eq EndToUse 1)
(setq p3 (polar p1 (- ang1 (/ pi 2)) lineln))
(setq p3 (polar p2 (+ ang2 (/ pi 2)) lineln))
)
;draw line
(if (eq EndToUse 1)
(command "line" p1 p3 "")
(command "line" p2 p3 "")
)
)
Please keep in mind, I learned AutoCad a long time ago and still like to type in commands instead of picking the icons.
Enter "List" and pick the arc.
This will show you information about the arc including the starting and ending angles.
Remember these angles. Autocad draws arcs in a counterclockwise manner so you should be able to tell which angle is which.
Now enter the "LINE" command and pick the endpoint of the arc as your start point.
Your next point should be entered like this, length of line<endangle+90 Depending upon your numbers here is an example. Let's say the ending angle of the arc is 221 degrees and you want a 15" long line
15<311.
That's all there is to it.
There may be faster and better ways, but this seems to do what you want.
If the line goes the wrong way, then subtract 90 instead of adding.
wjbzone,
you are the best, thank you very much for that lisp.
It does exactly what I was looking for.
JSandSO