Restoring 2 Arcs to a Circle.
This routine will join 2 arcs back into
a circle.
It will also complete a circle from an Arc.
(defun c:rcirc (/ os pt2 a pt1 ra pt3)
(setq os (getvar "osmode"))
(setvar "osmode" 512)
(setq pt2 (getpoint "\nPick one of the Arcs : "))
(setq a (entget (ssname (ssget pt2) 0)))
(setq pt1 (cdr (assoc 10 a)))
(setq ra (cdr (assoc 40 a)))
(command "erase" pt2 "")
(setq pt3 (getpoint "\nPick other Arc : "))
(setvar "osmode" os)
(command "erase" pt3 "")
(command "circle" pt1 ra)
(princ)
)
(princ)
Begin this routine with one or two arcs.
Pick either arc. That arc will disappear.
Pick the remaining arc if you started with two.
If you started with only one arc, pick any blank space on the screen or
press Enter. Now the circle will be restored or the single arc is turned
into a complete circle.
|