DELTA ANGLE

DELTA ANGLE

etilley327KA
Advocate Advocate
205 Views
1 Reply
Message 1 of 2

DELTA ANGLE

etilley327KA
Advocate
Advocate

Can someone help me with what I assume is my foreangle, its not coming out right? Im trying to create LISP to draw radial lines.

 

(defun C:TEST (/ pt1 pt2 pt3 pt4 delta deltarad dis radius backangle foreangle *error*)
 
    (defun *error* (msg)
    (setvar "cmdecho" 1)
    (if (not (member msg '("Function cancelled" "quit / exit abort")))
        (princ (strcat "\nError: " msg))
    )
    (princ)
    )
  ;(setvar "cmdecho" 0)
  (setq pt1 (getpoint "\nSelect Radial Center Point: "))
  (setq pt2 (getpoint "\nSelect Backsight Point: "))
  (setq delta (getreal "\nEnter Delta (- Clockwise)(+ Counter): "))
  (setq deltarad (* delta (/ pi 180.000)))
  (setq dis (getreal "\nEnter the distance of the Radial line: "))
  (setq radius (distance pt1 pt2))
  (setq backangle (angle pt1 pt2))
  (setq foreangle (+ backangle deltarad))
  (setq pt3 (polar pt1 foreangle radius))
  (setq pt4 (polar pt3 foreangle dis))
  (entmake (list (cons 0 "LINE") (cons 10 pt3) (cons 11 pt4)))
  (setvar "cmdecho" 1)
  (princ)
)
0 Likes
206 Views
1 Reply
Reply (1)
Message 2 of 2

Kent1Cooper
Consultant
Consultant

I'm afraid "not coming out right" is not enough information.  It worked for me, if I understand what it's supposed to do.  If it's the fraction-of-a-degree difference in angle between the labeled Lines and the DELTA angle listed, it could be because the 209.51 Line is not exactly radial to the Arc.  Lengthen it past the center of the Arc, and put a Point at the center, and you'll see that it doesn't lie on the lengthened Line.

Kent Cooper, AIA
0 Likes