![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| Autodesk Software (Autocad, Inventor etc) Discuss Autodesk Software (Autocad, Inventor etc) software here. |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| ||||
| ||||
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 |
|
#3
| ||||
| ||||
| 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 |
|
#4
| ||||
| ||||
| 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 "") ) ) |
|
#5
| ||||
| ||||
| 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. |
| Sponsored Links |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| G-Code to DXF | WayneHill | OpenSource Software | 200 | 04-22-2012 09:51 PM |
| Visual Basic Controller Project | dwwright | Visual Basic | 29 | 02-14-2011 01:24 PM |
| point data in autocad | trubleshtr | General CAM Discussion | 3 | 03-11-2005 05:32 AM |
| angle cuts | coolman | General Metalwork Discussion | 1 | 01-22-2005 11:33 PM |
| Tool tables | Nimrod | Mastercam | 4 | 11-24-2003 02:31 PM |