I am having a problem with parcel creation tools in giving me the true tangent length of an outer curve to set my building pads to be within the setbacks at back of lots lines of an outer curve. Here is a modified lisp and hope someone can help. I have not written any lisp in 15 or so years so please any help would be welcome.
(defun c:tangentl (/ tan tangentl outer radius ratio)
(if (and (setq radius (getreal "\nRadius of arc: "))
(setq tan (getreal "\Length of tangent: "))
)
(progn
(setq tangentl (/ tan 2.0)) <<<<<<<<-----Here is the start of my problem
(setq ratio (/ radius (sqrt (- (* radius radius) (* halfchord halfchord) ))))
(setq outer (* 2 (* ratio halfchord)))
)
)
(princ (strcat "\nOuter tangent Length is " (rtos outer 2 8)))
(princ)
)
I want to get the min frontage at back of lots to an outer curve so that I can set my pad inside the setback envelope.
Thank you.......
Solved! Go to Solution.
Solved by Jeff_M. Go to Solution.
Here's a new lisp to calc this:
(defun c:arclenfromoutertan (/ chord halfchord len radius delta) ;;; ASIN Returns the arcsinus of a number in radians (defun asin (num) (if (<= -1 num 1) (atan num (sqrt (- 1 (expt num 2)))) ) ) (if (and (setq radius (getreal "\nRadius of arc: ")) (setq tangent (getreal "\Length of tangent: ")) ) (progn (setq halftangent (/ tangent 2.0)) (setq ratio (/ radius (sqrt (+ (* radius radius) (* halftangent halftangent))) ) ) (setq halfchord (* halftangent ratio)) (setq delta (* 2 (asin (* (/ 1 radius) halfchord)))) (setq len (* delta radius)) ) ) (princ (strcat "\nArc length for this outer tangent length is " (rtos len 2 8) ) ) (princ) )