Give this a try:
Code:
(defun c:xf ( / *error* cm e0 e1 e2 e3 el p1 pe )
(defun *error* ( msg )
(if (= 'int (type cm))
(setvar 'cmdecho cm)
)
(if (= 'int (type pe))
(setvar 'peditaccept pe)
)
(if (not (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*"))
(princ (strcat "\nError: " msg))
)
(princ)
)
(setq cm (getvar 'cmdecho)
pe (getvar 'peditaccept)
)
(setvar 'cmdecho 0)
(setvar 'peditaccept 1)
(while (setq p1 (getpoint "\nPick Internal Point <Exit>: "))
(setq e0 (entlast)
el nil
)
(command "_.-boundary" "_A" "_I" "_N" "" "_O" "_P" "" "_non" p1 "")
(setq e1 (entlast))
(if (not (eq e0 e1))
(progn
(command "_.offset" 10.0 e1 "_non" p1 "")
(setq e2 (entlast))
(if (not (eq e1 e2))
(progn
(command "_.chprop" e2 "" "_LA" "0" "_C" 1 "")
(command "_.explode" e2)
(setq e3 e2)
(while (setq e3 (entnext e3))
(setq el (cons e3 el))
)
(mapcar
'(lambda ( a b ) (setvar 'filletrad 10.0) (command "_.fillet" a b))
(cons (last el) el)
el
)
(command "_.pedit" "_M")
(while (setq e2 (entnext e2))
(command e2)
)
(command "" "_J" "" "")
)
(alert "Unable to perform offset.")
)
(entdel e1)
)
(alert "Unable to detect boundary.")
)
)
(setvar 'peditaccept pe)
(setvar 'cmdecho cm)
(princ)
)
Bookmarks