@ptdesign
Instead of building complex algorithm that can fail to determine if arc is inner our outer, try this.
Before using convert all polylines to lwpolylines.
Code iterates around profile shape, stops at every arc segment marked with temporary circle
and you enter new radius value. This way you can make different changes not just +- 0.1,
and linear segments can be drawn at any angle. To skip arc segments just hit <enter>.
Before applying changes try to zoom at shape so it is fully shown on screen, or re-zoom to find marking circle.
At the end use command "JOIN" W and select all entities that define this shape to join into single lwpolyline.
(defun c:rfc ( / *error* LM:Bulge->Arc lwpoly_segs adoc e segs arc_segs cir c r r1 tc)
;author: hak_vz 02.03.2021 for ptdesign (Mr.Ang)
;https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5530556
;https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/profile-radius-size-change-inner-radius-and-outer-radius/td-p/10118360
(defun *error* ( msg )
(if (not (member msg '("Function cancelled" "quit / exit abort" "Automation Error. Object was erased")))
(princ (strcat "\nError: " msg))
)
(if adoc (vla-endundomark adoc))
(command "_.ucs" "p")
(setvar 'cmdecho 0)
(princ)
)
(defun LM:Bulge->Arc ( p1 p2 b / a c r )
(setq a (* 2 (atan b))
r (/ (distance p1 p2) 2 (sin a))
c (polar p1 (+ (- (/ pi 2) a) (angle p1 p2)) r)
)
(if (minusp b)
(list c (angle c p2) (angle c p1) (abs r))
(list c (angle c p1) (angle c p2) (abs r))
)
)
(defun lwpoly_segs ( e / ent p1 pt bulge seg seglst)
(setq ent (entget e))
(cond (ent
(if (= (logand (cdr (assoc 70 ent)) 1) 1)
(setq p1 (cdr (assoc 10 ent)))
)
(while (setq ent (member (assoc 10 ent) ent))
(setq seg nil)
(if (and pt bulge)
(setq seg (list pt bulge))
)
(setq pt (cdr (assoc 10 ent))
ent (member (assoc 42 ent) ent)
bulge (cdar ent)
)
(if seg
(setq seg (list (car seg)(cadr seg)pt)
seglst (cons seg seglst))
)
)
)
)
(if p1 (setq seglst (cons (list pt bulge p1) seglst)))
(reverse seglst)
)
(command "_.ucs" "w")
(setvar 'cmdecho 0)
(setq adoc (vla-get-activedocument (vlax-get-acad-object)))
(setq e (car (entsel "\n Select entity >")))
(cond
((and e)
(vla-endundomark adoc)
(vla-startundomark adoc)
(setq segs (lwpoly_segs e))
(foreach seg segs
(if (/= (cadr seg) 0.0)
(setq arc_segs (cons seg arc_segs))
)
)
(setq arc_segs (reverse arc_segs))
(command "_.fillet" "p" "r" 0.0 e)
(command "_.explode" e)
(cond
((and arc_segs)
(foreach mm arc_segs
(setq cir (LM:Bulge->Arc (car mm) (last mm) (cadr mm)))
(setq c (car cir) r (last cir))
(command "_.circle" c (* 2.5 r))
(setq tc (entlast))
(setq r1 (getreal (strcat "\nEnter new arc radius at position. Current radius is " (rtos r 2 3) " >")))
(if (not r1) (setq r1 r))
(setvar 'filletrad r)
(command "_.fillet" (car mm) (last mm) "")
(entdel tc)
)
)
)
(vla-endundomark adoc)
)
)
(command "_.ucs" "p")
(setvar 'cmdecho 0)
(princ)
)
(princ "\n Command RFC iteratively changes arch radiuses in lwpolyline!")
(princ)
Miljenko Hatlak

Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.