And to further entertain, Here's one from Ron Leigh l.o.n.g ago..
;| COVE https://ronleigh.com/autolisp/ales13.htm https://ronleigh.com/autolisp/index.htm
Copyright © 1988,1998 Ronald W. Leigh
Input: radius and 2 lines
Output: draws cove
Variables:
a,b,c,d Endpoints of lines
aa,cc Angle from cen to a,c
cen Center of arc (intersection of two lines)
coverad Radius of cove, GLOBAL
el1/el2 Entity lists
en1/en2 Entity names
oom Old osnap mode
temp Temporary value
b a
------------------ cen
c
|
|
|
|
|
|
d |;
;10====PROGRAM, SETUP
(defun c:cove (/ a b c d aa cc cen el1 el2 en1 en2 oom temp)
;(setq pi 3.1415926535897932385)
(setq oom (getvar "osmode"))
(setvar "osmode" 0)
;20====GET RADIUS, LINES, ENDPOINTS, INTERSECTION
(if (null coverad)
(setq coverad 1.0)
) ;_ end of if
(initget 6)
(setq
temp (getreal (strcat "\nCove radius <" (rtos coverad 2 4) ">: ")
) ;_ end of getreal
) ;_ end of setq
(if temp
(setq coverad temp)
) ;_ end of if
(setq en1 (car (entsel "\nSelect first line: ")))
(setq en2 (car (entsel "\nSelect second line: ")))
(setq el1 (entget en1)
el2 (entget en2)
) ;_ end of setq
(setq a (cdr (assoc 10 el1))
b (cdr (assoc 11 el1))
c (cdr (assoc 10 el2))
d (cdr (assoc 11 el2))
) ;_ end of setq
(setq cen (inters a b c d nil))
;30====DETERMINE CODE OF ENDPOINTS NEAREST INTERSECTION
(if (null cen)
(princ
"\n**Lines are parallel or coincident. Cove impossible."
) ;_ end of princ
(progn
(if (< (distance cen a) (distance cen b))
(setq code1 10)
(setq temp a
a b
b temp
code1 11
) ;_ end of setq
) ;_ end of if
(if (< (distance cen c) (distance cen d))
(setq code2 10)
(setq temp c
c d
d temp
code2 11
) ;_ end of setq
) ;_ end of if
;40----MODIFY ENDPOINTS
(setq a (polar cen (angle a b) coverad)
c (polar cen (angle c d) coverad)
) ;_ end of setq
(entmod (subst (cons code1 a) (assoc code1 el1) el1))
(entmod (subst (cons code2 c) (assoc code2 el2) el2))
(setq aa (angle cen a)
cc (angle cen c)
) ;_ end of setq
;50----SWAP A AND C IF NEEDED, DRAW ARC
(if (or (and (> aa cc) (< (- aa cc) pi))
(and (< aa cc) (> (- cc aa) pi))
) ;_ end of or
(setq temp a
a c
c temp
) ;_ end of setq
) ;_ end of if
(setvar "cmdecho" 0)
(command ".arc" "c" cen a c)
(setvar "cmdecho" 1)
) ;_ end of progn
) ;_ end of if
(setvar "osmode" oom)
(princ)
) ;_ end of defun