I am confusing with angle

Discussion in 'AutoCAD' started by Adesu, Mar 31, 2005.

  1. Adesu

    Adesu Guest

    This 's script is simple and easy,but I am still confusing to find direction
    of angle,I am planning to create a arrow with manual process,of course angle
    for p3 opposite for p4,for example,if value ang is "0" ,"ang" for p3 ,it
    must be "+" and "ang" for p4 "-",now my question is how to find or determine
    if direction line of p3 to p4 put between angle 270 to 0,thanks for your
    reply


    (setq p1 (getpoint "\nCLICK OBJECT: "))
    (setq p2 (getpoint p1 "\nCLICK FOR TEXT OBJECT: "))
    (setq ang (angle p1 p2))
    (setq wf 5)
    (setq p3 (polar p1 ang wf)) ; problem at angle
    (setq p4 (polar p1 ang wf)) ; problem at angle
    (command "_pline" p1 p3 p4 "c" "")
     
    Adesu, Mar 31, 2005
    #1
  2. Adesu

    Jeff Mishler Guest

    Hi Ade,
    Is this what you are wanting to do?

    (setq p3 (polar p2 (+ ang (/ pi 2)) wf))
    (setq p4 (polar p2 (- ang (/ pi 2)) wf))
    (command "_pline" p1 p3 p4 "c")
     
    Jeff Mishler, Mar 31, 2005
    #2
  3. Adesu

    jane Guest

    too few arguements jeff.......




     
    jane, Apr 2, 2005
    #3
  4. Adesu

    Jeff Mishler Guest

    Sorry Jane, but it works just fine for me....plugging my revisions into
    Ade's origianal code.
     
    Jeff Mishler, Apr 2, 2005
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.