hi everyone, need some help with a lisp routine, what it does is it will calculate the difference from two different pad elevations and draw a slope with a bench offset from the lot line dividing the two pads, the part I need help with is trying to draw a tapered line from 20' back from the street side of the lot line. I wanted the line to start 20' back at the toe line and taper to the top of slope line at the front of the lot. right now it will do a arc and this is great but I wanted another to the taper and I am getting stuck trying to re-write it. here is the routine as it is now.
Code:
(defun c:slope1( / yn e ps1 ps2 h1 h2 p1 p2 d tmp obj ang ang1 pa pb pc pd)
(show1)
(setq yn (getstring "\nCorrect or not (Y/N): <Y> "))
(if (or (= yn "N") (= yn "n"))
(change1)
)
(while (not (setq e (entsel "\npick a lot line (pick the street side)"))))
(get-elev 'ps1 'h1)
(get-elev 'ps2 'h2)
(if (< h2 h1) (setq tmp h1 h1 h2 h2 tmp tmp ps1 ps1 ps2 ps2 tmp))
(setq d (* 1.0 #s1 (- h2 h1)))
(setq pt (cadr e) obj (entget (car e))
p1 (cdr (assoc 10 obj))
p2 (cdr (assoc 11 obj))
)
(if (< (distance pt p2) (distance pt p1)) (setq tmp p1 p1 p2 p2 tmp))
(setq ang (angle p1 p2))
(setq tmp (polar p1 ang (* (distance p1 ps1)
(cos (- (angle p1 ps1) ang)) ) ))
(setq ang1 (angle tmp ps1))
(setq pa (polar (polar p1 ang (* 1.0 #front)) ang1 (* 1.0 #b1))
pb (polar (polar p2 (+ ang pi) (* 1.0 #back)) ang1 (* 1.0 #b1))
pc (polar (polar pa ang (* 2.0 d)) ang1 d)
pd (polar pb ang1 d)
)
(command "line" pa pb "" "line" pc pd ""
"ARC" pc "e" pa "d" (angtos (+ ang pi)) )
(princ)
)