587,773 active members*
2,993 visitors online*
Register for free
Login
IndustryArena Forum > CAD Software > Autodesk > line from point in angle
Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2003
    Posts
    13

    line from point in angle

    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

  2. #2
    Join Date
    Apr 2003
    Posts
    416
    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

  3. #3
    Join Date
    Apr 2003
    Posts
    13
    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. #4
    Join Date
    Apr 2003
    Posts
    416
    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. #5
    Join Date
    Nov 2003
    Posts
    634
    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.

  6. #6
    Join Date
    Apr 2003
    Posts
    13
    wjbzone,
    you are the best, thank you very much for that lisp.
    It does exactly what I was looking for.

    JSandSO

Similar Threads

  1. G-Code to DXF
    By WayneHill in forum OpenSource Software
    Replies: 227
    Last Post: 05-19-2021, 11:26 PM
  2. Visual Basic Controller Project
    By dwwright in forum Visual Basic
    Replies: 30
    Last Post: 04-16-2016, 10:31 AM
  3. point data in autocad
    By trubleshtr in forum Uncategorised CAM Discussion
    Replies: 3
    Last Post: 03-11-2005, 12:32 PM
  4. angle cuts
    By coolman in forum MetalWork Discussion
    Replies: 1
    Last Post: 01-23-2005, 06:33 AM
  5. Tool tables
    By Nimrod in forum Mastercam
    Replies: 4
    Last Post: 11-24-2003, 09:31 PM

Posting Permissions

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